Public Member Functions | |
| MultiDimStorage (int ndims, int nvals) | |
| MultiDimStorage (const MultiDimStorage< T > &) | |
| virtual | ~MultiDimStorage () |
| bool | isOK () const |
| MultiDimStorage< T > & | operator= (const MultiDimStorage< T > &) |
| bool | getRange (int dim, Interval< int > &) const |
| int | nrDims () const |
| int | nrVals () const |
| void | setNrVals (int, bool keepdata) |
| void | removeValue (int) |
| bool | allowsDuplicates () const |
| bool | allowDuplicates (bool) |
| bool | isEmpty () const |
| int | totalSize () const |
| int | size () const |
| MultiDimStorage< T > * | operator[] (int) |
| int | indexOf (int pos) const |
| int | getPos (int idx) const |
| template<class IDX > | |
| const T & | getRef (const IDX &index, int val) const |
| template<class IDX > | |
| T & | getRef (const IDX &index, int val) |
| template<class V , class POS , class IDX > | |
| bool | add (const V &vals, const POS &pos, IDX *index=0) |
| template<class V , class POS > | |
| bool | add (const V &vals, const POS &pos) |
| template<class IDX > | |
| void | remove (const IDX &index) |
| void | empty () |
| template<class POS , class IDX > | |
| bool | findFirst (const POS &, IDX &) const |
| template<class IDX > | |
| bool | getIndex (int global_pos, IDX &) const |
| template<class IDX , class POS > | |
| bool | getPos (const IDX &, POS &) const |
| template<class IDX > | |
| bool | next (IDX &, bool skipdups=false) const |
| template<class IDX > | |
| bool | prev (IDX &, bool skipdups=false) const |
| template<class IDX > | |
| bool | isValidPos (const IDX &) const |
| void | removeDuplicates () |
| bool | divide (ObjectSet< int > &) const |
| template<class IDX > | |
| bool | sort (TypeSet< IDX > &indices) const |
| template<class POS > | |
| void | getIndicesInRange (const POS &start, const POS &stop, TypeSet< int > &res) const |
| template<class IDXS > | |
| bool | sort (TypeSet< IDXS > &indices) const |
Protected Member Functions | |
| void | getRangeI (int dim, Interval< int > &) const |
| template<class IDX > | |
| void | setToLastPos (IDX &) const |
| int | findFirstPos (int pos) const |
| template<class POS > | |
| void | getIndicesInRangeI (const POS &start, const POS &stop, TypeSet< int > &curpos, TypeSet< int > &res) const |
Protected Attributes | |
| TypeSet< int > | positions_ |
| ObjectSet< MultiDimStorage< T > > | lowerdimstorage_ |
| TypeSet< T > | onedimstorage_ |
| bool | allowduplicates_ |
Private Attributes | |
| int | nrdims_ |
| int | nrvals_ |
Stores one or more values of type T that are associated with a discrete position in a N dimenstional space.
| MultiDimStorage< T >::MultiDimStorage | ( | int | ndims, | |
| int | nvals | |||
| ) | [inline] |
| MultiDimStorage< T >::MultiDimStorage | ( | const MultiDimStorage< T > & | templ | ) | [inline] |
| MultiDimStorage< T >::~MultiDimStorage | ( | ) | [inline, virtual] |
| bool MultiDimStorage< T >::add | ( | const V & | vals, | |
| const POS & | pos, | |||
| IDX * | index = 0 | |||
| ) | [inline] |
Adds values to stucture.
| bool MultiDimStorage< T >::add | ( | const V & | vals, | |
| const POS & | pos | |||
| ) | [inline] |
Adds values to stucture.
| bool MultiDimStorage< T >::allowDuplicates | ( | bool | nv | ) | [inline] |
| bool MultiDimStorage< T >::allowsDuplicates | ( | ) | const [inline] |
Set allowance for allowing multiple instances at the same position.
| bool MultiDimStorage< T >::divide | ( | ObjectSet< int > & | res | ) | const [inline] |
divides all items into chunks of (about equal size).
| void MultiDimStorage< T >::empty | ( | ) | [inline] |
removes everything.
| bool MultiDimStorage< T >::findFirst | ( | const POS & | posarr, | |
| IDX & | indexarr | |||
| ) | const [inline] |
| int MultiDimStorage< T >::findFirstPos | ( | int | pos | ) | const [inline, protected] |
| bool MultiDimStorage< T >::getIndex | ( | int | global_pos, | |
| IDX & | indexarr | |||
| ) | const [inline] |
| void MultiDimStorage< T >::getIndicesInRange | ( | const POS & | start, | |
| const POS & | stop, | |||
| TypeSet< int > & | res | |||
| ) | const [inline] |
Gives all indices within a position range.
| start | array with the interval starts for each dimension | |
| stop | array with the interval stops for each dimension | |
| res | the output. The indexes are multiplexed in, so the first ndims samples are the indices for first position, the second ndim samples are the indices for the second postion and so forth. |
| void MultiDimStorage< T >::getIndicesInRangeI | ( | const POS & | start, | |
| const POS & | stop, | |||
| TypeSet< int > & | curpos, | |||
| TypeSet< int > & | res | |||
| ) | const [inline, protected] |
| bool MultiDimStorage< T >::getPos | ( | const IDX & | indexarr, | |
| POS & | pos | |||
| ) | const [inline] |
| int MultiDimStorage< T >::getPos | ( | int | idx | ) | const [inline] |
| bool MultiDimStorage< T >::getRange | ( | int | dim, | |
| Interval< int > & | rg | |||
| ) | const [inline] |
| void MultiDimStorage< T >::getRangeI | ( | int | dim, | |
| Interval< int > & | rg | |||
| ) | const [inline, protected] |
| const T & MultiDimStorage< T >::getRef | ( | const IDX & | index, | |
| int | val | |||
| ) | const [inline] |
| T & MultiDimStorage< T >::getRef | ( | const IDX & | index, | |
| int | val | |||
| ) | [inline] |
| int MultiDimStorage< T >::indexOf | ( | int | pos | ) | const [inline] |
| bool MultiDimStorage< T >::isEmpty | ( | ) | const [inline] |
| bool MultiDimStorage< T >::isOK | ( | ) | const [inline] |
| bool MultiDimStorage< T >::isValidPos | ( | const IDX & | indexarr | ) | const [inline] |
| bool MultiDimStorage< T >::next | ( | IDX & | indexarr, | |
| bool | skipdups = false | |||
| ) | const [inline] |
| int MultiDimStorage< T >::nrDims | ( | ) | const [inline] |
| int MultiDimStorage< T >::nrVals | ( | ) | const [inline] |
| MultiDimStorage< T > & MultiDimStorage< T >::operator= | ( | const MultiDimStorage< T > & | templ | ) | [inline] |
| MultiDimStorage< T > * MultiDimStorage< T >::operator[] | ( | int | idx | ) | [inline] |
| bool MultiDimStorage< T >::prev | ( | IDX & | indexarr, | |
| bool | skipdups = false | |||
| ) | const [inline] |
| void MultiDimStorage< T >::remove | ( | const IDX & | index | ) | [inline] |
| void MultiDimStorage< T >::removeDuplicates | ( | ) | [inline] |
| void MultiDimStorage< T >::removeValue | ( | int | ) |
| void MultiDimStorage< T >::setNrVals | ( | int | nn, | |
| bool | keepdata | |||
| ) | [inline] |
| void MultiDimStorage< T >::setToLastPos | ( | IDX & | indexarr | ) | const [inline, protected] |
| int MultiDimStorage< T >::size | ( | ) | const [inline] |
| bool MultiDimStorage< T >::sort | ( | TypeSet< IDXS > & | indices | ) | const [inline] |
| bool MultiDimStorage< T >::sort | ( | TypeSet< IDX > & | indices | ) | const |
Sorts the array in order of globalpos.
| int MultiDimStorage< T >::totalSize | ( | ) | const [inline] |
bool MultiDimStorage< T >::allowduplicates_ [protected] |
ObjectSet<MultiDimStorage<T> > MultiDimStorage< T >::lowerdimstorage_ [protected] |
int MultiDimStorage< T >::nrdims_ [private] |
int MultiDimStorage< T >::nrvals_ [private] |
TypeSet<T> MultiDimStorage< T >::onedimstorage_ [protected] |
TypeSet<int> MultiDimStorage< T >::positions_ [protected] |
1.7.1