#include <MultiIndex.hpp>
Inheritance diagram for MultiIndex:


Public Member Functions | |
| MultiIndex & | operator= (MultiIndex &src) |
| Standard assignment. | |
| MultiIndex & | operator= (int v) |
| Sets a constant value to all entries. | |
| long | abs () |
The -operation. | |
| long | factorial () |
| The product of the components. | |
| bool | InRange (const Array< int > &range) const |
True if all indices are . | |
| void | Scale (const Array< int > &range, Array< double > &coord) const |
Maps the components linearly onto . | |
| bool | NextPos (const Array< int > &size) |
| Shifts to the next lexicographical position. | |
| bool | NextPos (const Array< int > &size, int range) |
| Shifts the restricted index to the next lex. pos. | |
| bool | NextPos (const Array< int > &size, const SelectedDim &subgrid) |
| Shifts to the next lex. pos. in the selected subgrid. | |
| long | Offset (long dim, const Array< int > &size) const |
| computes the offset of an entry given by first dim entries of the multiindex in a multidim. | |
| long | Offset (const Array< int > &size) const |
| Computes the offset of an entry given by the multiindex in a multidim. | |
| MultiIndex () | |
| MultiIndex (long dim) | |
| A multiindex of a given dimension (uninit.). | |
| MultiIndex (MultiIndex &I) | |
| Duplication. | |
Static Public Member Functions | |
| static long | SubArrayTotalLen (int n, const Array< int > &size) |
| Raw length of subarrays reference by first n indices. | |
| MultiIndex::MultiIndex | ( | ) | [inline] |
| MultiIndex::MultiIndex | ( | long | dim | ) | [inline] |
A multiindex of a given dimension (uninit.).
| MultiIndex::MultiIndex | ( | MultiIndex & | I | ) | [inline] |
Duplication.
| MultiIndex& MultiIndex::operator= | ( | MultiIndex & | src | ) | [inline] |
Standard assignment.
| MultiIndex& MultiIndex::operator= | ( | int | v | ) | [inline] |
Sets a constant value to all entries.
| long MultiIndex::abs | ( | ) | [inline] |
The
-operation.
| long MultiIndex::factorial | ( | ) | [inline] |
The product of the components.
| bool MultiIndex::InRange | ( | const Array< int > & | range | ) | const [inline] |
True if all indices are
.
Checks the components of the multiindex and returns true if all they are nonnegativ and less then the corresponding components of a given int-array. The latter should have the same or a greater size as the multiindex.
| [in] | range | e.g. sizes of a multidimentional array. |
Maps the components linearly onto
.
The array 'range' contains e.g. the size of a multidimentional array for this multiindex. 'range' may be longer than the multiindex, but the resulting array 'coord' must have the same size
| [in] | range | The range of the components |
| [out] | coord | To save the coordinates |
| bool MultiIndex::NextPos | ( | const Array< int > & | size | ) | [inline] |
Shifts to the next lexicographical position.
| [in] | size | The grid size. |
| bool MultiIndex::NextPos | ( | const Array< int > & | size, | |
| int | range | |||
| ) | [inline] |
Shifts the restricted index to the next lex. pos.
| [in] | size | The grid size. |
| [in] | range | Only the first 'range' indices are considered and changed. |
| bool MultiIndex::NextPos | ( | const Array< int > & | size, | |
| const SelectedDim & | subgrid | |||
| ) | [inline] |
Shifts to the next lex. pos. in the selected subgrid.
| [in] | size | The grid size |
| [in] | subgrid | The selected subgrid |
| long MultiIndex::Offset | ( | long | dim, | |
| const Array< int > & | size | |||
| ) | const [inline] |
computes the offset of an entry given by first dim entries of the multiindex in a multidim.
| [in] | dim | First dim entries. |
| [in] | size | Array with sizes. |
'dim' should be POSITIVE and less than or equal to index.Length() and size.Length()
| long MultiIndex::Offset | ( | const Array< int > & | size | ) | const [inline] |
Computes the offset of an entry given by the multiindex in a multidim.
| [in] | size | Array with sizes. |
| static long MultiIndex::SubArrayTotalLen | ( | int | n, | |
| const Array< int > & | size | |||
| ) | [inline, static] |
Raw length of subarrays reference by first n indices.
Computes the raw length (i.e. the number of objects) of subarrays indexed by multiindices of the length n. 'n' should be less or equal the dimensionality of the array; if this condition is not satisfied and the index range checking is on, the function throws the fatal error exception.
| [in] | n | Number of the first indices |
| [in] | size | The size of the array |
1.5.2