Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

MultiArray Class Template Reference

A multidimensional array made from a 1D vector. More...

#include <marray.h>

List of all members.

Public Methods

 MultiArray (const vector< int > &dims, const E &x)
 Constructor with default assignment of x to each element. More...

 MultiArray (const vector< int > &dims)
 Constructor with no default assignment. More...

 MultiArray ()
 Constructor with no initialization. More...

 ~MultiArray ()
E & operator[] (const vector< int > &indices)
 This can be used for access or assignment (e.g., ma[indices] = 1). More...

bool Increment (vector< int > &indices)
 Get the next element (used as an iterator). Return true if at end. More...


Public Attributes

int MaxSize
 Maximum allowable array size (default = 10 million). More...


Friends

istream & operator>> (istream &is, MultiArray &ma)
 This will not work correctly unless dimensions are preset correctly. More...

ostream & operator<< (ostream &os, const MultiArray &ma)
 Just print out the vector. More...


Detailed Description

template<class E>
class MultiArray< E >

A multidimensional array made from a 1D vector.


Constructor & Destructor Documentation

template<class E>
MultiArray< E >::MultiArray const vector< int > &    dims,
const E &    x
 

Constructor with default assignment of x to each element.

template<class E>
MultiArray< E >::MultiArray const vector< int > &    dims
 

Constructor with no default assignment.

template<class E>
MultiArray< E >::MultiArray   [inline]
 

Constructor with no initialization.

template<class E>
MultiArray< E >::~MultiArray   [inline]
 


Member Function Documentation

template<class E>
bool MultiArray< E >::Increment vector< int > &    indices [inline]
 

Get the next element (used as an iterator). Return true if at end.

template<class E>
E & MultiArray< E >::operator[] const vector< int > &    indices [inline]
 

This can be used for access or assignment (e.g., ma[indices] = 1).


Friends And Related Function Documentation

template<class E>
ostream& operator<< ostream &    os,
const MultiArray< E > &    ma
[friend]
 

Just print out the vector.

template<class E>
istream& operator>> istream &    is,
MultiArray< E > &    ma
[friend]
 

This will not work correctly unless dimensions are preset correctly.


Member Data Documentation

template<class E>
int MultiArray::MaxSize
 

Maximum allowable array size (default = 10 million).


The documentation for this class was generated from the following files: Motion Strategy Library


Web page maintained by Steve LaValle