Main Page   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.

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

 MultiArray ()
 Constructor with no initialization.

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

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


Public Attributes

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


Friends

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

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


Detailed Description

template<class E> class MultiArray

A multidimensional array made from a 1D vector.


Constructor & Destructor Documentation

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

Constructor with default assignment of x to each element.

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

Constructor with no default assignment.

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

Constructor with no initialization.

template<class E>
MultiArray<E>::~MultiArray<E> ( ) [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<E>::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
Partial support provided by NSF CAREER Award IRI-970228 (LaValle), Honda Research.
Contributors: Anna Atramentov, Peng Cheng, James Kuffner, Steve LaValle, and Libo Yang.