Particle Identification and Tracking
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
utilities::ND_Array< T, N > Class Template Reference

A N-D array. More...

#include <ndarray.h>

+ Inheritance diagram for utilities::ND_Array< T, N >:
+ Collaboration diagram for utilities::ND_Array< T, N >:

Public Member Functions

const T * data_ptr () const
 Returns a const pointer to the data. More...
 
T & operator() (const Tuple< int, N > &pos)
 Returns a reference to at element. More...
 
const T & operator() (const Tuple< int, N > &pos) const
 Returns a const reference to at element. More...
 
T & operator() (int pos)
 Returns a reference to at element. More...
 
const T & operator() (int pos) const
 Returns a const reference to at element. More...
 
 ND_Array (const Tuple< int, N > &dim)
 
 ~ND_Array ()
 
void print () const
 Prints a representation of the. More...
 
void fill_test ()
 Fills the array with the index of the positions, this assumes that the type is int or similar. More...
 

Static Public Attributes

static const int rank_ = N
 Rank of matrix. More...
 

Private Member Functions

int cord_to_indx (const Tuple< int, N > &pos) const
 
Tuple< int, N > indx_to_cord (int indx) const
 
bool increment_cord (Tuple< int, N > &cord) const
 Inrements to the next 2-D plane to. More...
 

Private Attributes

T * data_ptr_
 pointer to the data More...
 
const Tuple< int, N > dims_
 The dimensions. More...
 
const int * dims_ptr_
 Pointer to the data in dims_. More...
 
Tuple< int, N > cum_dims_
 the cumulative dimensions More...
 
const int * cum_dims_ptr_
 Pointer to data in cum_dims_. More...
 
int elm_count_
 Total number of elements. More...
 

Detailed Description

template<class T, int N>
class utilities::ND_Array< T, N >

A N-D array.

Not sure what this is used for. Maybe can get rid of it.

Constructor & Destructor Documentation

template<class T , int N>
utilities::ND_Array< T, N >::ND_Array ( const Tuple< int, N > &  dim)
template<class T , int N>
utilities::ND_Array< T, N >::~ND_Array ( )

Member Function Documentation

template<class T , int N>
int utilities::ND_Array< T, N >::cord_to_indx ( const Tuple< int, N > &  pos) const
private
template<class T, int N>
const T* utilities::ND_Array< T, N >::data_ptr ( ) const
inline

Returns a const pointer to the data.

This is useful for dealing with wrappers.

template<class T , int N>
void utilities::ND_Array< T, N >::fill_test ( )

Fills the array with the index of the positions, this assumes that the type is int or similar.

Referenced by main().

template<class T , int N>
bool utilities::ND_Array< T, N >::increment_cord ( Tuple< int, N > &  cord) const
private

Inrements to the next 2-D plane to.

template<class T , int N>
Tuple< int, N > utilities::ND_Array< T, N >::indx_to_cord ( int  indx) const
private
template<class T , int N>
T & utilities::ND_Array< T, N >::operator() ( const Tuple< int, N > &  pos)

Returns a reference to at element.

template<class T , int N>
const T & utilities::ND_Array< T, N >::operator() ( const Tuple< int, N > &  pos) const

Returns a const reference to at element.

template<class T , int N>
T & utilities::ND_Array< T, N >::operator() ( int  pos)

Returns a reference to at element.

template<class T , int N>
const T & utilities::ND_Array< T, N >::operator() ( int  pos) const

Returns a const reference to at element.

template<class T , int N>
void utilities::ND_Array< T, N >::print ( ) const

Prints a representation of the.

Referenced by main().

Member Data Documentation

template<class T, int N>
Tuple<int,N> utilities::ND_Array< T, N >::cum_dims_
private

the cumulative dimensions

Referenced by utilities::ND_Array< T, N >::ND_Array().

template<class T, int N>
const int* utilities::ND_Array< T, N >::cum_dims_ptr_
private

Pointer to data in cum_dims_.

Referenced by utilities::ND_Array< T, N >::ND_Array().

template<class T, int N>
T* utilities::ND_Array< T, N >::data_ptr_
private
template<class T, int N>
const Tuple<int,N> utilities::ND_Array< T, N >::dims_
private

The dimensions.

Referenced by utilities::ND_Array< T, N >::ND_Array().

template<class T, int N>
const int* utilities::ND_Array< T, N >::dims_ptr_
private

Pointer to the data in dims_.

Referenced by utilities::ND_Array< T, N >::ND_Array().

template<class T, int N>
int utilities::ND_Array< T, N >::elm_count_
private

Total number of elements.

Referenced by utilities::ND_Array< T, N >::ND_Array().

template<class T, int N>
const int utilities::ND_Array< T, N >::rank_ = N
static

Rank of matrix.

Referenced by utilities::ND_Array< T, N >::ND_Array().


The documentation for this class was generated from the following file: