SpaceDim multi-index type for use with higher order Taylor series.
More...
#include <CD_MultiIndex.H>
|
|
| MultiIndex ()=delete |
| | Weak construction is bad.
|
| |
| | MultiIndex (const MultiIndex &a_index)=default |
| | Copy constructor.
|
| |
| | MultiIndex (const int a_order) |
| | Full constructor.
|
| |
|
| ~MultiIndex ()=default |
| | Destructor.
|
| |
| void | define (const int a_order) |
| | Define function.
|
| |
| int | factorial () const |
| | Factorial function.
|
| |
| IntVect | getCurrentIndex () const |
| | Get index.
|
| |
| int | getOrder () const |
| | Get highest order for this index.
|
| |
| int | getLinearIndex (const IntVect a_MultiIndex) const |
| | Get the linear index (i.e. column number) for a given multi-index.
|
| |
| IntVect | getMultiIndex (const int a_linearIndex) const |
| | Get a multi-index corresponding to the linear index (i.e. column number)
|
| |
| MultiIndex & | operator= (const MultiIndex &a_other)=default |
| | Assignment operator.
|
| |
| int | operator[] (const int a_dir) const |
| | Get one index.
|
| |
|
void | operator++ () |
| | Increment multi-index lexicographically.
|
| |
|
void | reset () |
| | Reset multi-index to point to the first index.
|
| |
| bool | ok () const |
| | Check that multi-index is ok.
|
| |
| int | norm () const |
| | Get norm of multi-index.
|
| |
| int | getNumIndices () const |
| | Return number of indices in MultiIndex range.
|
| |
| Real | pow (const RealVect &a_vec) |
| | Power function for multi-indices.
|
| |
|
| int | factorial (const int a_n) const |
| | Base factorial function.
|
| |
|
void | makeIndices () |
| | Fill m_indices.
|
| |
|
void | makeMaps () |
| | Fill maps.
|
| |
|
|
int | m_order |
| | Maximum order representable by this multi-index.
|
| |
|
IntVect | m_curIndex |
| | Current idnex.
|
| |
|
std::vector< IntVect >::iterator | m_iter |
| | Pointer to index.
|
| |
|
std::vector< IntVect > | m_indices |
| | All indices.
|
| |
|
std::map< IntVect, int > | m_mapToLinearIndex |
| | Map for going from lexicographically ordered multi-index to linear index.
|
| |
|
std::map< int, IntVect > | m_mapToMultiIndex |
| | Map going from linear index to multi-index.
|
| |
SpaceDim multi-index type for use with higher order Taylor series.
- Note
- The next() and hasNext() functions are just temporary functions; I'm just too lazy to write an iterator class (yet)
◆ MultiIndex() [1/2]
| MultiIndex::MultiIndex |
( |
const MultiIndex & |
a_index | ) |
|
|
default |
Copy constructor.
- Parameters
-
| [in,out] | a_index | Description |
◆ MultiIndex() [2/2]
| MultiIndex::MultiIndex |
( |
const int |
a_order | ) |
|
Full constructor.
- Parameters
-
| [in] | a_order | Multi-index order |
◆ define()
| void MultiIndex::define |
( |
const int |
a_order | ) |
|
Define function.
- Parameters
-
◆ factorial() [1/2]
| int MultiIndex::factorial |
( |
| ) |
const |
Factorial function.
- Returns
- Return value
◆ factorial() [2/2]
| int MultiIndex::factorial |
( |
const int |
a_n | ) |
const |
|
protected |
Base factorial function.
- Returns
- Return value
- Parameters
-
◆ getCurrentIndex()
| IntVect MultiIndex::getCurrentIndex |
( |
| ) |
const |
Get index.
- Returns
- Current index
◆ getLinearIndex()
| int MultiIndex::getLinearIndex |
( |
const IntVect |
a_MultiIndex | ) |
const |
Get the linear index (i.e. column number) for a given multi-index.
- Returns
- Linear index
- Parameters
-
| [in] | a_MultiIndex | Description |
◆ getMultiIndex()
| IntVect MultiIndex::getMultiIndex |
( |
const int |
a_linearIndex | ) |
const |
Get a multi-index corresponding to the linear index (i.e. column number)
- Returns
- Multi index
- Parameters
-
| [in] | a_linearIndex | Description |
◆ getNumIndices()
| int MultiIndex::getNumIndices |
( |
| ) |
const |
Return number of indices in MultiIndex range.
- Returns
- Num indices
◆ getOrder()
| int MultiIndex::getOrder |
( |
| ) |
const |
Get highest order for this index.
- Returns
- Order
◆ norm()
| int MultiIndex::norm |
( |
| ) |
const |
Get norm of multi-index.
Returns |alpha| + |alpha2| + ....
- Returns
- Return value
◆ ok()
| bool MultiIndex::ok |
( |
| ) |
const |
Check that multi-index is ok.
- Returns
- Return value
◆ operator=()
Assignment operator.
- Returns
- Return value
- Parameters
-
| [in,out] | a_other | Description |
◆ operator[]()
| int MultiIndex::operator[] |
( |
const int |
a_dir | ) |
const |
Get one index.
- Returns
- Return value
- Parameters
-
◆ pow()
| Real MultiIndex::pow |
( |
const RealVect & |
a_vec | ) |
|
Power function for multi-indices.
- Returns
- Return value
- Parameters
-
The documentation for this class was generated from the following files: