![]() |
ATLAS Offline Software
|
#include <Array.h>
Public Types | |
| enum | { NDIM = N } |
| The number of dimensions of the array. More... | |
| typedef ArrayIteratorChooser< N >::const_iterator | const_iterator |
| The iterator for this container. | |
Public Member Functions | |
| WritableArrayData (const unsigned int shape[]) | |
| Constructor. | |
| WritableArrayData (const std::vector< unsigned int > &shape) | |
| Constructor. | |
| WritableArray< N-1 > | operator[] (unsigned int i) |
| Array indexing. | |
| Array< N-1 > | operator[] (unsigned int i) const |
| Array indexing. | |
| Arrayelt * | ptr () |
| Return a direct pointer to array elements. | |
| const Arrayelt * | ptr () const |
| Return a direct pointer to array elements. | |
| bool | valid () const |
| Test for validity. | |
| std::vector< unsigned int > | shape () const |
| Return the array shape. | |
| unsigned int | size (unsigned int dim=0) const |
| Return the size of the array along one dimension. | |
| const_iterator | begin () const |
| Return an iterator pointing at the beginning of the container. | |
| const_iterator | end () const |
| Return an iterator pointing past the end of the container. | |
| void | write_array (std::ostream &stream) const |
| Creates a text representation of the array content. | |
Protected Attributes | |
| const Arrayrep * | m_rep |
| Pointer to the representation. | |
| unsigned int | m_offs |
Offset in the Arrayrep's data of the first element of this array. | |
Private Member Functions | |
| void | init_sizes (bool resize_data=false) |
Initialize the m_sizes vector from the m_shape vector. | |
| void | write_array (std::ostream &stream) const |
| Creates a text representation of the array content. | |
| void | write_subarray (std::ostream &stream, std::vector< Arrayelt >::size_type &idx, unsigned dimIndex) const |
| Helper function for write_array. | |
Private Attributes | |
| *The array | data |
| *The array shape *One entry per | dimension |
| *The array shape *One entry per giving the size of each dimension std::vector< unsigned int > | m_shape |
| *Subarray | sizes |
| *Subarray for faster access See above *This member could be considered transient std::vector< unsigned int > | m_sizes |
| Arrayrep * | m_rep_nc |
| The underlying array representation, non-const copy. | |
Definition at line 772 of file Control/CxxUtils/CxxUtils/Array.h.
|
inherited |
The iterator for this container.
Definition at line 141 of file Control/CxxUtils/CxxUtils/Array.h.
|
inherited |
The number of dimensions of the array.
| Enumerator | |
|---|---|
| NDIM | |
Definition at line 138 of file Control/CxxUtils/CxxUtils/Array.h.
| CxxUtils::WritableArrayData< N >::WritableArrayData | ( | const unsigned int | shape[] | ) |
Constructor.
| shape | The shape of the array, as a C array. Should be N elements long. |
The shape is the size of the array along each dimension.
| CxxUtils::WritableArrayData< N >::WritableArrayData | ( | const std::vector< unsigned int > & | shape | ) |
Constructor.
| shape | The shape of the array, as a std::vector. Should be N elements long. |
The shape is the size of the array along each dimension.
|
inherited |
Return an iterator pointing at the beginning of the container.
|
inherited |
Return an iterator pointing past the end of the container.
|
inherited |
Initialize the m_sizes vector from the m_shape vector.
| resize_data | Should m_data be resized appropriately? |
The contents of the m_sizes vector are initialized from the contents of the m_shape vector. If resize_data is true, then the size of m_data is changed to the total size indicated by m_shape. Otherwise, we verify that m_data has the correct size, and raise an assertion if not.
Definition at line 34 of file Arrayrep.cxx.
|
inherited |
Array indexing.
| i | The desired index. Must be less than the array size along this dimension. |
N-1 dimensional subarray in the array.Note that this operation is not available if N is 0.
|
inherited |
Array indexing.
| i | The desired index. Must be less than the array size along this dimension. |
N-1 dimensional subarray in the array.Note that this operation is not available if N is 0.
|
inherited |
Return a direct pointer to array elements.
Subsequent elements follow in standard C indexing order.
|
inherited |
Return a direct pointer to array elements.
Subsequent elements follow in standard C indexing order.
|
inherited |
Return the array shape.
The array shape is vector with one element for each array dimension, giving the size of the array along that dimension.
|
inherited |
Return the size of the array along one dimension.
| dim | The dimension of the size to retrieve. Must be less than the number of dimensions. |
dim.
|
inherited |
|
inherited |
Creates a text representation of the array content.
Helper function for write_array.
| std::ostream | where the text should be written |
Writes the content of the array to a ostream. The sub-arrays are enclosed by square brackets and separated by commas.
| stream | where the array should be written |
| idx | Current index in m_data |
| dimIndex | Current index in m_shapes |
Calls itself recursively with dimIndex-1
Definition at line 245 of file Arrayrep.cxx.
|
inherited |
Creates a text representation of the array content.
| std::ostream | where the text should be written |
Writes the content of the array to a ostream. The sub-arrays are enclosed by square-brackets and separated by commas.
|
inherited |
Helper function for write_array.
Creates a text representation of the array content.
| stream | where the array should be written |
| idx | Current index in m_data |
| dimIndex | Current index in m_shapes |
Calls itself recursively with dimIndex-1
| std::ostream | where the text should be written |
Writes the content of the array to a ostream. The sub-arrays are enclosed by square brackets and separated by commas.
Definition at line 279 of file Arrayrep.cxx.
|
inherited |
Definition at line 101 of file Control/CxxUtils/CxxUtils/Arrayrep.h.
|
inherited |
Definition at line 105 of file Control/CxxUtils/CxxUtils/Arrayrep.h.
|
protectedinherited |
Offset in the Arrayrep's data of the first element of this array.
Definition at line 255 of file Control/CxxUtils/CxxUtils/Array.h.
|
protectedinherited |
Pointer to the representation.
Null if this instance was created using the default constructor.
Definition at line 252 of file Control/CxxUtils/CxxUtils/Array.h.
|
privateinherited |
The underlying array representation, non-const copy.
Definition at line 704 of file Control/CxxUtils/CxxUtils/Array.h.
|
inherited |
Definition at line 106 of file Control/CxxUtils/CxxUtils/Arrayrep.h.
|
inherited |
Definition at line 110 of file Control/CxxUtils/CxxUtils/Arrayrep.h.
|
inherited |
Definition at line 108 of file Control/CxxUtils/CxxUtils/Arrayrep.h.