CxxUtils::WritableArray< N > Class Template Reference

Read-write multidimensional array. More...

#include <Array.h>

Inheritance diagram for CxxUtils::WritableArray< N >:
CxxUtils::Array< N > CxxUtils::WritableArrayData< N >

List of all members.

Public Member Functions

 WritableArray (Arrayrep &rep)
 Constructor.
WritableArray< N-1 > operator[] (unsigned int i) const
 Array indexing.
Arrayelt * ptr ()
 Return a direct pointer to array elements.

Friends

class WritableArray< N+1 >

Detailed Description

template<unsigned int N>
class CxxUtils::WritableArray< N >

Read-write multidimensional array.

Read-write multidimensional array, specialized for N=0.

This class derives from <N>. It allows writing into the array, but otherwise works in the same way.

This class derives from <0>. It allows writing into the (single) element, but otherwise works in the same way.


Constructor & Destructor Documentation

template<unsigned int N>
CxxUtils::WritableArray< N >::WritableArray ( Arrayrep rep  )  [inline]

Constructor.

Parameters:
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.


Member Function Documentation

template<unsigned int N>
WritableArray< N-1 > CxxUtils::WritableArray< N >::operator[] ( unsigned int  i  )  const [inline]

Array indexing.

Parameters:
i The desired index. Must be less than the array size along this dimension.
Returns:
The i'th N-1 dimensional subarray in the array.

Note that this operation is not available if N is 0.

Reimplemented from CxxUtils::Array< N >.

template<unsigned int N>
Arrayelt * CxxUtils::WritableArray< N >::ptr (  )  [inline]

Return a direct pointer to array elements.

Returns:
A pointer to the first array elements.

Subsequent elements follow in standard C indexing order.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1