Public Types | |
| enum | { NDIM = 0 } |
The number of dimensions of the array. | |
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. | |
Protected Member Functions | |
| Array (const Arrayrep &rep, unsigned int offs) | |
| Private constructor for array indexing. | |
Protected Attributes | |
| const Arrayelt * | m_elt |
Friends | |
| class | Array< 1 > |
| CxxUtils::Array< 0 >::Array | ( | ) | [inline] |
| CxxUtils::Array< 0 >::Array | ( | const Arrayrep & | rep | ) | [inline] |
Constructor.
| rep | Arrayrep from which to initialize the array. |
Initialize an array from an Arrayrep. The new array will represent the entire Arrayrep. The dimension N must match the length of the Arrayrep's shape.
| CxxUtils::Array< 0 >::Array | ( | const Arrayrep & | rep, | |
| unsigned int | offs | |||
| ) | [inline, protected] |
Private constructor for array indexing.
| rep | Arrayrep from which to initialize the array. | |
| offs | Offset of the first element of the new array within rep. |
This is a private constructor used to make the Array instances returned from an indexing operation.
| int CxxUtils::Array< 0 >::asint | ( | ) | const [inline] |
Convert to an integer.
Array<0> contents as an integer. | CxxUtils::Array< 0 >::operator Arrayelt | ( | ) | const [inline] |
Convert to a number.
Array<0> contents as a number. | std::vector< unsigned int > CxxUtils::Array< 0 >::shape | ( | ) | const [inline] |
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< 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. |
For Array<0>, dim must be 0, and the function will always return 0.
| bool CxxUtils::Array< 0 >::valid | ( | ) | const [inline] |
Test for validity.
Array is associated with an Arrayrep, false if not. const Arrayelt* CxxUtils::Array< 0 >::m_elt [protected] |
Pointer to this array's single element. Null if this instance was created using the default constructor.
1.6.1