![]() |
ATLAS Offline Software
|
#include <Array.h>
Public Member Functions | |
WritableArrayData (const unsigned int shape[]) | |
Constructor. More... | |
WritableArrayData (const std::vector< unsigned int > &shape) | |
Constructor. More... | |
WritableArray< N-1 > | operator[] (unsigned int i) |
Array indexing. More... | |
Array< N-1 > | operator[] (unsigned int i) const |
Array indexing. More... | |
Arrayelt * | ptr () |
Return a direct pointer to array elements. More... | |
Private Member Functions | |
void | init_sizes (bool resize_data=false) |
Initialize the m_sizes vector from the m_shape vector. More... | |
void | write_array (std::ostream &stream) const |
Creates a text representation of the array content. More... | |
void | write_subarray (std::ostream &stream, std::vector< Arrayelt >::size_type &idx, unsigned dimIndex) const |
Helper function for write_array. More... | |
Private Attributes | |
std::vector< Arrayelt > | m_data |
The array data, stored using the C array ordering. More... | |
std::vector< unsigned int > | m_shape |
The array shape. More... | |
std::vector< unsigned int > | m_sizes |
Subarray sizes, for faster access. More... | |
Arrayrep * | m_rep_nc |
The underlying array representation, non-const copy. More... | |
Definition at line 772 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 |
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 |
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 |
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 |
The array data, stored using the C array ordering.
Definition at line 102 of file Control/CxxUtils/CxxUtils/Arrayrep.h.
|
privateinherited |
The underlying array representation, non-const copy.
Definition at line 704 of file Control/CxxUtils/CxxUtils/Array.h.
|
inherited |
The array shape.
One entry per dimension, giving the size of each dimension.
Definition at line 106 of file Control/CxxUtils/CxxUtils/Arrayrep.h.
|
inherited |
Subarray sizes, for faster access.
See above. This member could be considered transient.
Definition at line 110 of file Control/CxxUtils/CxxUtils/Arrayrep.h.