|
ACF $AcfVersion:0$
|
Multidimensional index used to addressing fixed-size array. More...
#include <TIndex.h>
Public Types | |
| enum | { DIMENSIONS = Dimensions } |
| typedef int | IndexType |
| typedef int * | Iterator |
Public Member Functions | |
| TIndex () | |
| Default constructor with initialization of member to 0. | |
| TIndex (int value) | |
| Constructor initializing all members to specified value. | |
| TIndex (const TIndex &index) | |
| Copy constructor. | |
| bool | IsValid () const |
| Check if this index is valid. | |
| bool | IsZero () const |
| Check if this index point at zero element. | |
| bool | IsSizeEmpty () const |
| Check if this index interpreted as size is empty. | |
| void | Reset () |
| Reset this object. | |
| void | Clear () |
| Set all components to 0. | |
| bool | IsDimensionsCountFixed () const |
| Check, if number dimensions is fixed. | |
| int | GetDimensionsCount () const |
| Get number of dimensions of this index. | |
| bool | SetDimensionsCount (int count) const |
| Set number of dimensions of this index. | |
| int | GetAt (int index) const |
| Get element stored at specified index. | |
| void | SetAt (int index, int value) |
| Set element at specified index. | |
| void | SetAllTo (int value) |
| Set all components to specified value. | |
| bool | IncreaseAt (int index) |
| Increase single component at specified position. | |
| bool | DecreaseAt (int index) |
| Decrease single component at specified position. | |
| bool | IsInside (const TIndex &boundaries) const |
| Check if index is inside boundaries. | |
| bool | Increase (const TIndex &boundaries) |
| Increase this index inside the boundaries. | |
| bool | Decrease (const TIndex &boundaries) |
| Decrease this index inside the boundaries. | |
| int | GetProductVolume () const |
| Get total number of elements if this index is treated as size. | |
| int | GetIterationIndex (const TIndex &boundaries) const |
| Get index of iteration from zero to current index inside some boundaries. | |
| Iterator | Begin () const |
| Get begin value of element access iterator. | |
| Iterator | End () const |
| Get end value of element access iterator. | |
| int | operator[] (int index) const |
| int & | operator[] (int index) |
| bool | operator== (const TIndex &index) const |
| bool | operator!= (const TIndex &index) const |
| TIndex | operator+ (const TIndex &index) const |
| TIndex & | operator+= (const TIndex &index) |
| TIndex | operator- (const TIndex &index) const |
| TIndex & | operator-= (const TIndex &index) |
| TIndex & | operator= (const TIndex &index)=default |
Static Public Member Functions | |
| static const TIndex< Dimensions > & | GetZero () |
| Get global instance of zero index. | |
| static const TIndex< Dimensions > & | GetInvalid () |
| Get global instance of invalid index. | |
Multidimensional index used to addressing fixed-size array.
| typedef int istd::TIndex< Dimensions >::IndexType |
| typedef int* istd::TIndex< Dimensions >::Iterator |
| anonymous enum |
| istd::TIndex< Dimensions >::TIndex | ( | ) |
|
explicit |
| istd::TIndex< Dimensions >::TIndex | ( | const TIndex< Dimensions > & | index | ) |
|
inline |
Get begin value of element access iterator.
Please refer to general description of ACF iterators, STL iterators or Qt iterators concept.
Definition at line 313 of file TIndex.h.
Referenced by imath::TMultidimensionalPolynomial< Dimensions, Element >::Serialize().
|
inline |
| bool istd::TIndex< Dimensions >::Decrease | ( | const TIndex< Dimensions > & | boundaries | ) |
|
inline |
|
inline |
|
inline |
Get element stored at specified index.
Definition at line 269 of file TIndex.h.
Referenced by imath::TMultidimensionalPolynomial< Dimensions, Element >::CumulateRecursiveValueAt(), imath::TMultidimensionalPolynomial< Dimensions, Element >::GetBaseFunctionValue(), and imath::TMultidimensionalPolynomial< Dimensions, Element >::GetValueAt().
|
inline |
Get number of dimensions of this index.
Definition at line 202 of file TIndex.h.
Referenced by istd::TIndex< Dimensions >::operator+(), istd::TIndex< Dimensions >::operator+=(), istd::TIndex< Dimensions >::operator-(), and istd::TIndex< Dimensions >::operator-=().
|
static |
| int istd::TIndex< Dimensions >::GetIterationIndex | ( | const TIndex< Dimensions > & | boundaries | ) | const |
| int istd::TIndex< Dimensions >::GetProductVolume | ( | ) | const |
Get total number of elements if this index is treated as size.
Definition at line 521 of file TIndex.h.
Referenced by imath::TMultidimensionalPolynomial< Dimensions, Element >::ApproximateCoefficientsFromFulcrums().
|
static |
| bool istd::TIndex< Dimensions >::Increase | ( | const TIndex< Dimensions > & | boundaries | ) |
Increase this index inside the boundaries.
Definition at line 472 of file TIndex.h.
Referenced by imath::TMultidimensionalPolynomial< Dimensions, Element >::ApproximateCoefficientsFromFulcrums().
|
inline |
|
inline |
| bool istd::TIndex< Dimensions >::IsInside | ( | const TIndex< Dimensions > & | boundaries | ) | const |
Check if index is inside boundaries.
Index is inside boundaries, if all its components are smaller than according boundary components.
Definition at line 457 of file TIndex.h.
Referenced by istd::TArray< Element, Dimensions >::GetAt(), istd::TArray< Element, Dimensions >::GetAtRef(), imath::CSampledFunction2d::GetSampleValue(), istd::TArray< Element, Dimensions >::SetAt(), and imath::CSampledFunction2d::SetSampleValue().
|
inline |
Check if this index interpreted as size is empty.
It means, it returns true, is some of components is less or equal 0.
Definition at line 242 of file TIndex.h.
Referenced by imath::TMultidimensionalPolynomial< Dimensions, Element >::ApproximateCoefficientsFromFulcrums(), and istd::TArray< Element, Dimensions >::IsEmpty().
|
inline |
|
inline |
| bool istd::TIndex< Dimensions >::operator!= | ( | const TIndex< Dimensions > & | index | ) | const |
| TIndex< Dimensions > istd::TIndex< Dimensions >::operator+ | ( | const TIndex< Dimensions > & | index | ) | const |
Definition at line 364 of file TIndex.h.
References istd::TIndex< Dimensions >::GetDimensionsCount().
| TIndex< Dimensions > & istd::TIndex< Dimensions >::operator+= | ( | const TIndex< Dimensions > & | index | ) |
Definition at line 379 of file TIndex.h.
References istd::TIndex< Dimensions >::GetDimensionsCount().
| TIndex< Dimensions > istd::TIndex< Dimensions >::operator- | ( | const TIndex< Dimensions > & | index | ) | const |
Definition at line 392 of file TIndex.h.
References istd::TIndex< Dimensions >::GetDimensionsCount().
| TIndex< Dimensions > & istd::TIndex< Dimensions >::operator-= | ( | const TIndex< Dimensions > & | index | ) |
Definition at line 407 of file TIndex.h.
References istd::TIndex< Dimensions >::GetDimensionsCount().
|
default |
| bool istd::TIndex< Dimensions >::operator== | ( | const TIndex< Dimensions > & | index | ) | const |
|
inline |
|
inline |
|
inline |
| void istd::TIndex< Dimensions >::SetAllTo | ( | int | value | ) |
|
inline |
|
inline |
Set number of dimensions of this index.
It is provided to allows template implementations to use fixed-size or variable arrays.
| count | number of dimensions will be set. |