ATLAS Offline Software
|
Multi-dimensional array with a compile-time number of dimensions, and a run-time complete freedom over the size of the dimensions. More...
#include <MultiDimArray.h>
Public Types | |
typedef MultiDimArray< T, N > | ThisType |
typedef MultiDimArrayTypes< T, N >::SubType | SubType |
typedef T::ValueType | ValueType |
Public Member Functions | |
MultiDimArray () | |
~MultiDimArray () | |
MultiDimArray (const MultiDimArray &) | |
MultiDimArray & | operator= (const MultiDimArray &) |
void | clear () |
SubType & | operator[] (int index) |
const SubType & | operator[] (int index) const |
int | minIndex () const |
int | maxIndex () const |
unsigned int | size () const |
Size of this field. More... | |
unsigned int | depth () const |
Depth of this field, i.e. More... | |
bool | isInRange (int index) const |
Check that an index is in the range of the this field. More... | |
unsigned int | totalSize () const |
The total number of elements, including invalid (=default) holes, from this field downwards. More... | |
unsigned int | validSize () const |
The total number of valid (=non-default) elements from this field downwards. More... | |
void | dump (std::ostream &os=std::cout) const |
Dump the complete table to an output stream. More... | |
void | dump (const std::string &prefix, std::ostream &os=std::cout) const |
Dump the complete table to an output stream, with an additional prefix before each line. More... | |
std::string | dumpToString () const |
Dump the complete table into a string. More... | |
std::string | dumpToString (const std::string &prefix) const |
Dump the complete table into a string, with an additional prefix before each line. More... | |
template<class K > | |
void | dumpOneEntry (const K &indices, std::ostream &os=std::cout) const |
Dump one entry with given indices to an output stream. More... | |
template<class K > | |
std::string | dumpOneEntryToString (const K &indices) const |
Dump one entry with given indices into a string. More... | |
Static Public Member Functions | |
static SubType | defaultSubType () |
static ValueType | defaultValueType () |
static const SubType & | invalidSubType () |
Private Attributes | |
SubType * | m_data |
int | m_minIndex |
unsigned int | m_size |
Static Private Attributes | |
static SubType | s_invalidSubType = MultiDimArray<T,N>::defaultSubType() |
Multi-dimensional array with a compile-time number of dimensions, and a run-time complete freedom over the size of the dimensions.
It is used by IdentifierToHash to provide fast access in identifier to hash conversions. It is obtained as a vector of pointers to MultiDimArrayTypes<T,N>.
Definition at line 24 of file MultiDimArray.h.
typedef MultiDimArrayTypes<T,N>::SubType MultiDimArray< T, N >::SubType |
Definition at line 79 of file MultiDimArray.h.
typedef MultiDimArray<T,N> MultiDimArray< T, N >::ThisType |
Definition at line 78 of file MultiDimArray.h.
typedef T::ValueType MultiDimArray< T, N >::ValueType |
Definition at line 80 of file MultiDimArray.h.
|
inline |
Definition at line 162 of file MultiDimArray.h.
|
inline |
Definition at line 173 of file MultiDimArray.h.
|
inline |
Definition at line 183 of file MultiDimArray.h.
|
inline |
Definition at line 195 of file MultiDimArray.h.
|
inlinestatic |
Definition at line 147 of file MultiDimArray.h.
|
inlinestatic |
Definition at line 152 of file MultiDimArray.h.
|
inline |
Depth of this field, i.e.
the number of fields from this fields downwards, including this field. It is equal to this field number plus one.
Definition at line 218 of file MultiDimArray.h.
|
inline |
|
inline |
Dump the complete table to an output stream.
Definition at line 380 of file MultiDimArray.h.
|
inline |
Dump one entry with given indices to an output stream.
Definition at line 423 of file MultiDimArray.h.
std::string MultiDimArray< T, N >::dumpOneEntryToString | ( | const K & | indices | ) | const |
Dump one entry with given indices into a string.
Definition at line 429 of file MultiDimArray.h.
|
inline |
Dump the complete table into a string.
Definition at line 392 of file MultiDimArray.h.
|
inline |
Dump the complete table into a string, with an additional prefix before each line.
Definition at line 399 of file MultiDimArray.h.
|
inlinestatic |
Definition at line 157 of file MultiDimArray.h.
|
inline |
|
inline |
Definition at line 208 of file MultiDimArray.h.
|
inline |
Definition at line 203 of file MultiDimArray.h.
MultiDimArray< T, N > & MultiDimArray< T, N >::operator= | ( | const MultiDimArray< T, N > & | rhs | ) |
Definition at line 228 of file MultiDimArray.h.
MultiDimArray< T, N >::SubType & MultiDimArray< T, N >::operator[] | ( | int | index | ) |
Definition at line 262 of file MultiDimArray.h.
|
inline |
|
inline |
|
inline |
The total number of elements, including invalid (=default) holes, from this field downwards.
Definition at line 348 of file MultiDimArray.h.
|
inline |
The total number of valid (=non-default) elements from this field downwards.
Definition at line 353 of file MultiDimArray.h.
|
private |
Definition at line 127 of file MultiDimArray.h.
|
private |
Definition at line 128 of file MultiDimArray.h.
|
private |
Definition at line 129 of file MultiDimArray.h.
|
staticprivate |
Definition at line 130 of file MultiDimArray.h.