![]() |
ATLAS Offline Software
|
Read-only multidimensional array, specialized for N=0.
More...
#include <Array.h>
Public Types | |
| enum | { NDIM = 0 } |
| The number of dimensions of the array. More... | |
| enum | |
| The number of dimensions of the array. More... | |
| typedef ArrayIteratorChooser< N >::const_iterator | const_iterator |
| The iterator for this container. | |
Public Member Functions | |
| Array () | |
| Default constructor. | |
| Array (const Arrayrep &rep) | |
| Constructor. | |
| 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. | |
| operator Arrayelt () const | |
| Convert to a number. | |
| int | asint () const |
| Convert to an integer. | |
| void | write_array (std::ostream &stream) const |
| Creates a text representation of the array content. | |
| Array () | |
| Default constructor. | |
| Array (const Arrayrep &rep) | |
| Constructor. | |
| 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. | |
| Array< N-1 > | operator[] (unsigned int i) const |
| Array indexing. | |
| const Arrayelt * | ptr () const |
| Return a direct pointer to array elements. | |
| 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 Member Functions | |
| Array (const Arrayrep &rep, unsigned int offs) | |
| Private constructor for array indexing. | |
| Array (const Arrayrep &rep, unsigned int offs) | |
| Private constructor for array indexing. | |
Protected Attributes | |
| const Arrayelt * | m_elt |
| Pointer to this array's single element. | |
| friend | WritableArray< N+1 > |
| 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. | |
Friends | |
| class | Array< 1 > |
| class | WritableArray< 1 > |
| class | Array< N+1 > |
| class | ArrayIterator< N+1 > |
Read-only multidimensional array, specialized for N=0.
This is a specialization of Array for the case N=0, i.e., a scalar. It does not support indexing, but it does support implicit conversions to Arrayelt, as well as an explicit conversion to an integer.
Definition at line 269 of file Control/CxxUtils/CxxUtils/Array.h.
| typedef ArrayIteratorChooser<N>::const_iterator CxxUtils::Array< N >::const_iterator |
The iterator for this container.
Definition at line 141 of file Control/CxxUtils/CxxUtils/Array.h.
| anonymous enum |
The number of dimensions of the array.
Definition at line 138 of file Control/CxxUtils/CxxUtils/Array.h.
| anonymous enum |
The number of dimensions of the array.
| Enumerator | |
|---|---|
| NDIM | |
Definition at line 273 of file Control/CxxUtils/CxxUtils/Array.h.
| CxxUtils::Array< 0 >::Array | ( | ) |
| CxxUtils::Array< 0 >::Array | ( | const Arrayrep & | rep | ) |
|
protected |
| CxxUtils::Array< N >::Array | ( | ) |
Default constructor.
This produces an invalid Array that is not associated with an Arrayrep. valid() will return false for such an array. The only other things that it is legal to do with an invalid array are to assign to it (which may make it valid) or request its size with size() (which will always return 0).
| CxxUtils::Array< N >::Array | ( | const Arrayrep & | rep | ) |
|
protected |
| int CxxUtils::Array< 0 >::asint | ( | ) | const |
Convert to an integer.
Array<0> contents as an integer. | const_iterator CxxUtils::Array< N >::begin | ( | ) | const |
Return an iterator pointing at the beginning of the container.
| const_iterator CxxUtils::Array< N >::end | ( | ) | const |
Return an iterator pointing past the end of the container.
| CxxUtils::Array< 0 >::operator Arrayelt | ( | ) | const |
Convert to a number.
Array<0> contents as a number. | Array< N-1 > CxxUtils::Array< N >::operator[] | ( | unsigned int | i | ) | const |
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.
| const Arrayelt * CxxUtils::Array< N >::ptr | ( | ) | const |
Return a direct pointer to array elements.
Subsequent elements follow in standard C indexing order.
| std::vector< unsigned int > CxxUtils::Array< N >::shape | ( | ) | const |
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.
| std::vector< unsigned int > CxxUtils::Array< 0 >::shape | ( | ) | const |
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. For Array<0>, this will always be an empty array.
| unsigned int CxxUtils::Array< N >::size | ( | unsigned int | dim = 0 | ) | const |
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. | unsigned int CxxUtils::Array< 0 >::size | ( | unsigned int | dim = 0 | ) | const |
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.For Array<0>, dim must be 0, and the function will always return 0.
| bool CxxUtils::Array< N >::valid | ( | ) | const |
| bool CxxUtils::Array< 0 >::valid | ( | ) | const |
| void CxxUtils::Array< N >::write_array | ( | std::ostream & | stream | ) | const |
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.
| void CxxUtils::Array< 0 >::write_array | ( | std::ostream & | stream | ) | const |
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.
|
friend |
Definition at line 357 of file Control/CxxUtils/CxxUtils/Array.h.
|
friend |
Definition at line 243 of file Control/CxxUtils/CxxUtils/Array.h.
|
friend |
Definition at line 247 of file Control/CxxUtils/CxxUtils/Array.h.
|
friend |
Definition at line 357 of file Control/CxxUtils/CxxUtils/Array.h.
|
protected |
Pointer to this array's single element.
Null if this instance was created using the default constructor.
Definition at line 365 of file Control/CxxUtils/CxxUtils/Array.h.
|
protected |
Offset in the Arrayrep's data of the first element of this array.
Definition at line 255 of file Control/CxxUtils/CxxUtils/Array.h.
|
protected |
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.
|
protected |
Definition at line 247 of file Control/CxxUtils/CxxUtils/Array.h.