![]() |
ICF 3.0.5.47
Technical documentation of ICF Libraries
|
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) |
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.
int istd::TIndex< Dimensions >::IndexType |
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 ICF iterators, STL iterators or Qt iterators concept.
Definition at line 316 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 272 of file TIndex.h.
Referenced by imath::TMultidimensionalPolynomial< Dimensions, Element >::GetBaseFunctionValue().
|
inline |
Get number of dimensions of this index.
Definition at line 205 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 522 of file TIndex.h.
Referenced by imath::TMultidimensionalPolynomial< Dimensions, Element >::ApproximateCoefficientsFromFulcrums().
|
static |
Get global instance of zero index.
Definition at line 553 of file TIndex.h.
Referenced by ialgo::TGeneralHoughSpace< Dimensions, Element >::CombineWithSpace().
bool istd::TIndex< Dimensions >::Increase | ( | const TIndex< Dimensions > & | boundaries | ) |
Increase this index inside the boundaries.
Definition at line 475 of file TIndex.h.
Referenced by ialgo::TGeneralHoughSpace< Dimensions, Element >::AnalyseHoughSpace(), imath::TMultidimensionalPolynomial< Dimensions, Element >::ApproximateCoefficientsFromFulcrums(), and ialgo::TGeneralHoughSpace< Dimensions, Element >::CombineWithSpace().
|
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 460 of file TIndex.h.
Referenced by ialgo::TGeneralHoughSpace< Dimensions, Element >::AnalyseHoughSpace(), ialgo::TGeneralHoughSpace< Dimensions, Element >::CombineWithSpace(), istd::TArray< Element, Dimensions >::GetAt(), istd::TArray< Element, Dimensions >::GetAtRef(), imath::CSampledFunction2d::GetSampleValue(), istd::TArray< Element, Dimensions >::iterator::iterator(), 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 245 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 367 of file TIndex.h.
References istd::TIndex< Dimensions >::GetDimensionsCount().
TIndex< Dimensions > & istd::TIndex< Dimensions >::operator+= | ( | const TIndex< Dimensions > & | index | ) |
Definition at line 382 of file TIndex.h.
References istd::TIndex< Dimensions >::GetDimensionsCount().
TIndex< Dimensions > istd::TIndex< Dimensions >::operator- | ( | const TIndex< Dimensions > & | index | ) | const |
Definition at line 395 of file TIndex.h.
References istd::TIndex< Dimensions >::GetDimensionsCount().
TIndex< Dimensions > & istd::TIndex< Dimensions >::operator-= | ( | const TIndex< Dimensions > & | index | ) |
Definition at line 410 of file TIndex.h.
References istd::TIndex< Dimensions >::GetDimensionsCount().
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. |
© Witold Gantzke and Kirill Lepskiy