#include <IndexTM.H>
Constants | |
static const IndexTM | Zero |
static const IndexTM | Unit |
void | linearIn (const void *inBuf) |
void | linearOut (void *outBuf) const |
static int | InitStatics () |
I/O Functions | |
std::ostream & | operator<< (std::ostream &os, const IndexTM &iv) |
std::istream & | operator>> (std::istream &os, IndexTM &iv) |
void | printOn (std::ostream &os) const |
void | p () const |
void | dumpOn (std::ostream &os) const |
Public Member Functions | |
template<typename OP> | |
bool | operatorCompare (const IndexTM< T, N > &, const OP &) const |
template<typename OP> | |
IndexTM< T, N > & | operatorOpEquals (const IndexTM< T, N > &, const OP &) |
template<typename OP> | |
IndexTM< T, N > & | operatorOpEquals (const T &, const OP &) |
IndexTM & | reciprocal () |
int | minDir (bool a_doAbs) const |
int | maxDir (bool a_doAbs) const |
Constructors and Accessors | |
IndexTM () | |
~IndexTM () | |
IndexTM (T i) | |
IndexTM (T i, T j) | |
IndexTM (T i, T j, T k) | |
IndexTM (T i, T j, T k, T m) | |
IndexTM (T i, T j, T k, T m, T n) | |
IndexTM (T i, T j, T k, T m, T n, T p) | |
IndexTM (const T *a) | |
IndexTM (const IndexTM &rhs) | |
IndexTM | copy () const |
IndexTM & | operator= (const IndexTM &rhs) |
T & | operator[] (int i) |
T | operator[] (int i) const |
void | setVal (int i, T val) |
void | setAll (T val) |
Data pointer functions | |
const T * | getVect () const |
const T * | dataPtr () const |
T * | dataPtr () |
Comparison Operators | |
bool | operator== (const IndexTM &p) const |
bool | operator!= (const IndexTM &p) const |
bool | lexLT (const IndexTM &s) const |
bool | lexGT (const IndexTM &s) const |
Unary operators | |
IndexTM | operator+ () const |
IndexTM | operator- () const |
T | dotProduct (const IndexTM &a_rhs) const |
T | sum () const |
T | product () const |
Other arithmetic operators | |
IndexTM & | min (const IndexTM &p) |
IndexTM & | max (const IndexTM &p) |
IndexTM & | scale (T s) |
IndexTM & | reflect (T ref_ix, int idir) |
IndexTM & | shift (int coord, T s) |
IndexTM & | shift (const IndexTM &iv) |
IndexTM & | diagShift (T s) |
IndexTM & | coarsen (const IndexTM &p) |
IndexTM & | coarsen (T p) |
Protected Attributes | |
T | vect [N] |
Friends | |
class | HDF5Handle |
Construct an IndexTM whose components are uninitialized.
References IndexTM< T, N >::vect.
References IndexTM< T, N >::vect.
References IndexTM< T, N >::vect.
References IndexTM< T, N >::vect.
References IndexTM< T, N >::vect.
References IndexTM< T, N >::vect.
Construct an IndexTM setting the coordinates to the corresponding values in the integer array a.
References IndexTM< T, N >::vect.
The copy constructor.
References IndexTM< T, N >::vect.
IndexTM< T, N > & IndexTM< T, N >::operator= | ( | const IndexTM< T, N > & | rhs | ) | [inline] |
The assignment operator.
References IndexTM< T, N >::vect.
T & IndexTM< T, N >::operator[] | ( | int | i | ) | [inline] |
Returns a modifiable lvalue reference to the i'th coordinate of the IndexTM.
References IndexTM< T, N >::vect.
T IndexTM< T, N >::operator[] | ( | int | i | ) | const [inline] |
Returns the i'th coordinate of the IndexTM.
References IndexTM< T, N >::vect.
void IndexTM< T, N >::setVal | ( | int | i, | |
T | val | |||
) | [inline] |
Set i'th coordinate of IndexTM to val.
References IndexTM< T, N >::vect.
void IndexTM< T, N >::setAll | ( | T | val | ) | [inline] |
set all values to val
References i, and IndexTM< T, N >::vect.
Referenced by IndexTM< T, N >::InitStatics().
const T * IndexTM< T, N >::getVect | ( | ) | const [inline] |
Returns a const pointer to an array of coordinates of the IndexTM. Useful for arguments to FORTRAN calls.
References IndexTM< T, N >::vect.
const T * IndexTM< T, N >::dataPtr | ( | ) | const [inline] |
T * IndexTM< T, N >::dataPtr | ( | ) | [inline] |
Only for sending to Fortran
References IndexTM< T, N >::vect.
bool IndexTM< T, N >::operator== | ( | const IndexTM< T, N > & | p | ) | const [inline] |
Returns true if this IndexTM is equivalent to argument IndexTM. All comparisons between analogous components must be satisfied.
References IndexTM< T, N >::vect.
Referenced by IndexTM< T, N >::operator!=().
bool IndexTM< T, N >::operator!= | ( | const IndexTM< T, N > & | p | ) | const [inline] |
Returns true if this IndexTM is different from argument IndexTM. All comparisons between analogous components must be satisfied.
References IndexTM< T, N >::operator==().
bool IndexTM< T, N >::lexLT | ( | const IndexTM< T, N > & | s | ) | const [inline] |
Returns true if this IndexTM is lexically less than the argument. An IndexTM MUST BE either lexically less than, lexically greater than, or equal to another IndexTM.
iv1 is lexically less than iv2 if:
in 2-D:
(iv1[0] < iv2[0]) || ((iv1[0] == iv2[0]) && (iv1[1] < iv2[1]));
in 3-D:
(iv1[0] < iv2[0]) || (iv1[0]==iv2[0] && ((iv1[1] < iv2[1] || ((iv1[1] == iv2[1]) && (iv1[2] < iv2[2])))));
References IndexTM< T, N >::vect.
bool IndexTM< T, N >::lexGT | ( | const IndexTM< T, N > & | s | ) | const [inline] |
Returns true if this IndexTM is lexically greater than the argument. An IndexTM MUST BE either lexically less than, lexically greater than, or equal to another IndexTM.
iv1 is lexically less than iv2 if:
in 2-D:
(iv1[0] > iv2[0]) || ((iv1[0] == iv2[0]) && (iv1[1] > iv2[1]));
in 3-D:
(iv1[0] > iv2[0]) || (iv1[0]==iv2[0] && ((iv1[1] > iv2[1] || ((iv1[1] == iv2[1]) && (iv1[2] > iv2[2])))));
References IndexTM< T, N >::vect.
Unary plus -- for completeness.
Unary minus -- negates all components of this IndexTM.
References i, and IndexTM< T, N >::vect.
T IndexTM< T, N >::dotProduct | ( | const IndexTM< T, N > & | a_rhs | ) | const [inline] |
References IndexTM< T, N >::vect.
T IndexTM< T, N >::sum | ( | ) | const [inline] |
Sum of all components of this IndexTM.
References IndexTM< T, N >::vect.
T IndexTM< T, N >::product | ( | ) | const [inline] |
Product of all components of this IndexTM.
References IndexTM< T, N >::vect.
bool IndexTM< T, N >::operatorCompare | ( | const IndexTM< T, N > & | p, | |
const OP & | op | |||
) | const [inline] |
Used by GenericArithmeticable to implement all pointwise arithmetic and comparison functions.
References IndexTM< T, N >::vect.
IndexTM< T, N > & IndexTM< T, N >::operatorOpEquals | ( | const IndexTM< T, N > & | p, | |
const OP & | op | |||
) | [inline] |
References IndexTM< T, N >::vect.
IndexTM< T, N > & IndexTM< T, N >::operatorOpEquals | ( | const T & | s, | |
const OP & | op | |||
) | [inline] |
References IndexTM< T, N >::vect.
Modifies this IndexTM by division of each component into T(1).
References IndexTM< T, N >::vect.
int IndexTM< T, N >::minDir | ( | bool | a_doAbs | ) | const [inline] |
Component with the minimum value of this Index(returns 0 if they are all the same). a_doAbs : if true then take the absolute value before comparing
References IndexTM< T, N >::vect.
int IndexTM< T, N >::maxDir | ( | bool | a_doAbs | ) | const [inline] |
Component with the maximum value of this Index (returns 0 if they are all the same). a_doAbs : if true then take the absolute value before comparing.
References IndexTM< T, N >::vect.
IndexTM< T, N > & IndexTM< T, N >::min | ( | const IndexTM< T, N > & | p | ) | [inline] |
Modifies this IndexTM by taking component-wise min with IndexTM argument.
References IndexTM< T, N >::vect.
Referenced by min().
IndexTM< T, N > & IndexTM< T, N >::max | ( | const IndexTM< T, N > & | p | ) | [inline] |
Modifies this IndexTM by taking component-wise max with IndexTM argument.
References IndexTM< T, N >::vect.
Referenced by max().
Modifies this IndexTM by multiplying each component by a scalar.
IndexTM< T, N > & IndexTM< T, N >::reflect | ( | T | ref_ix, | |
int | idir | |||
) | [inline] |
Modifies IndexTM by reflecting it in the plane defined by the index ref_ix and with normal in the direction of idir. Directions are based at zero.
References IndexTM< T, N >::vect.
Referenced by reflect().
Modifies this IndexTM by adding s to component in given coordinate direction.
References IndexTM< T, N >::vect.
Modifies this IndexTM by adding a scalar s to each component.
IndexTM< T, N > & IndexTM< T, N >::coarsen | ( | const IndexTM< T, N > & | p | ) | [inline] |
Modify IndexTM by component-wise integer projection.
References IndexTM< T, N >::vect.
Referenced by coarsen().
Modify IndexTM by component-wise integer projection.
References IndexTM< T, N >::vect.
void IndexTM< T, N >::printOn | ( | std::ostream & | os | ) | const |
Print an IndexTM to the ostream.
void IndexTM< T, N >::p | ( | ) | const [inline] |
void IndexTM< T, N >::dumpOn | ( | std::ostream & | os | ) | const |
Print an IndexTM to the ostream a bit more verbosely.
int IndexTM< T, N >::InitStatics | ( | ) | [inline, static] |
Initializes Zero and Unit.
References IndexTM< T, N >::setAll().
void IndexTM< T, N >::linearIn | ( | const void * | inBuf | ) | [inline] |
Low-level data copy.
References IndexTM< T, N >::vect.
void IndexTM< T, N >::linearOut | ( | void * | outBuf | ) | const [inline] |
References IndexTM< T, N >::vect.
friend class HDF5Handle [friend] |
std::ostream& operator<< | ( | std::ostream & | os, | |
const IndexTM< T, N > & | iv | |||
) | [friend] |
Print the IndexTM to given output stream in ASCII.
std::istream& operator>> | ( | std::istream & | os, | |
IndexTM< T, N > & | iv | |||
) | [friend] |
Read next IndexTM from given input stream.
const IndexTM< T, N > IndexTM< T, N >::Zero [inline, static] |
This is an IndexTM all of whose components are equal to zero.
Referenced by LSProblem< dim >::computeBounds().
const IndexTM< T, N > IndexTM< T, N >::Unit [inline, static] |
This is an IndexTM all of whose components are equal to one.
The individual components of this IndexTM.
Referenced by IndexTM< T, N >::coarsen(), IndexTM< T, N >::dataPtr(), IndexTM< T, N >::dotProduct(), IndexTM< T, N >::getVect(), IndexTM< T, N >::IndexTM(), IndexTM< T, N >::lexGT(), IndexTM< T, N >::lexLT(), IndexTM< T, N >::linearIn(), IndexTM< T, N >::linearOut(), IndexTM< T, N >::max(), IndexTM< T, N >::maxDir(), IndexTM< T, N >::min(), IndexTM< T, N >::minDir(), IndexTM< T, N >::operator-(), IndexTM< T, N >::operator=(), IndexTM< T, N >::operator==(), IndexTM< T, N >::operator[](), IndexTM< T, N >::operatorCompare(), IndexTM< T, N >::operatorOpEquals(), IndexTM< T, N >::product(), IndexTM< T, N >::reciprocal(), IndexTM< T, N >::reflect(), IndexTM< T, N >::setAll(), IndexTM< T, N >::setVal(), IndexTM< T, N >::shift(), and IndexTM< T, N >::sum().