SAMRAI::hier::IntVector< DIM > Class Template Reference

#include <source/hierarchy/boxes/IntVector.h>

Inheritance diagram for SAMRAI::hier::IntVector< DIM >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 IntVector ()
 IntVector (const int i)
 IntVector (const int i, const int j)
 IntVector (const int i, const int j, const int k)
 IntVector (const tbox::Array< int > &a)
 IntVector (const IntVector< DIM > &rhs)
IntVectoroperator= (const IntVector< DIM > &rhs)
virtual ~IntVector ()
int & operator() (const int i)
const int & operator() (const int i) const
 operator int * ()
 operator const int * () const
IntVector< DIM > & operator+= (const IntVector< DIM > &rhs)
IntVector< DIM > operator+ (const IntVector< DIM > &rhs) const
IntVector< DIM > & operator+= (const int rhs)
IntVector< DIM > operator+ (const int rhs) const
IntVector< DIM > & operator-= (const IntVector< DIM > &rhs)
IntVector< DIM > operator- (const IntVector< DIM > &rhs) const
IntVector< DIM > & operator-= (const int rhs)
IntVector< DIM > operator- (const int rhs) const
IntVector< DIM > & operator *= (const IntVector< DIM > &rhs)
IntVector< DIM > operator * (const IntVector< DIM > &rhs) const
IntVector< DIM > & operator *= (const int rhs)
IntVector< DIM > operator * (const int rhs) const
IntVector< DIM > & operator/= (const IntVector< DIM > &rhs)
IntVector< DIM > operator/ (const IntVector< DIM > &rhs) const
IntVector< DIM > & operator/= (const int rhs)
IntVector< DIM > operator/ (const int rhs) const
IntVector< DIM > operator- () const
bool operator== (const IntVector< DIM > &rhs) const
bool operator!= (const IntVector< DIM > &rhs) const
bool operator< (const IntVector< DIM > &rhs) const
bool operator<= (const IntVector< DIM > &rhs) const
bool operator> (const IntVector< DIM > &rhs) const
bool operator>= (const IntVector< DIM > &rhs) const
void min (const IntVector< DIM > &rhs)
int min () const
void max (const IntVector< DIM > &rhs)
int max () const
int getProduct () const

Static Public Member Functions

static IntVector< DIM > min (const IntVector< DIM > &a, const IntVector< DIM > &b)
static IntVector< DIM > max (const IntVector< DIM > &a, const IntVector< DIM > &b)

Friends

template<int DIMENSION>
std::istream & operator>> (std::istream &s, IntVector< DIMENSION > &rhs)
template<int DIMENSION>
std::ostream & operator<< (std::ostream &s, const IntVector< DIMENSION > &rhs)

Detailed Description

template<int DIM>
class SAMRAI::hier::IntVector< DIM >

Class IntVector implements a simple N-dimensional integer vector. This class is the base class for most of the simple indexing classes.


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::hier::IntVector< DIM >::IntVector (  )  [inline]

The default constructor creates an uninitialized vector.

template<int DIM>
SAMRAI::hier::IntVector< DIM >::IntVector ( const int  i  )  [inline]

Construct an integer vector with all components equal to the argument.

template<int DIM>
SAMRAI::hier::IntVector< DIM >::IntVector ( const int  i,
const int  j 
) [inline]

Construct a two-dimensional integer vector with the value (i,j). Provided for 2D and 3D only.

template<int DIM>
SAMRAI::hier::IntVector< DIM >::IntVector ( const int  i,
const int  j,
const int  k 
) [inline]

Construct a three-dimensional integer vector with the value (i,j,k). Provided for 2D and 3D only.

template<int DIM>
SAMRAI::hier::IntVector< DIM >::IntVector ( const tbox::Array< int > &  a  )  [inline]

Construct a n-dimensional integer vector with the value with values provided by the array.

template<int DIM>
SAMRAI::hier::IntVector< DIM >::IntVector ( const IntVector< DIM > &  rhs  )  [inline]

Construct an integer vector equal to the argument.

template<int DIM>
SAMRAI::hier::IntVector< DIM >::~IntVector (  )  [inline, virtual]

The integer vector destructor does nothing interesting.


Member Function Documentation

template<int DIM>
IntVector< DIM > & SAMRAI::hier::IntVector< DIM >::operator= ( const IntVector< DIM > &  rhs  )  [inline]

The assignment operator sets the integer vector equal to the argument.

Reimplemented in SAMRAI::hier::Index< DIM >.

template<int DIM>
int & SAMRAI::hier::IntVector< DIM >::operator() ( const int  i  )  [inline]

Return the specified component of the vector. No bounds checking.

template<int DIM>
const int & SAMRAI::hier::IntVector< DIM >::operator() ( const int  i  )  const [inline]

Return the specified component of the vector as a const integer. No bounds checking.

template<int DIM>
SAMRAI::hier::IntVector< DIM >::operator int * (  )  [inline]

Return a pointer to the beginning of the vector data values.

template<int DIM>
SAMRAI::hier::IntVector< DIM >::operator const int * (  )  const [inline]

Return a const pointer to the beginning of the vector data values.

template<int DIM>
IntVector< DIM > & SAMRAI::hier::IntVector< DIM >::operator+= ( const IntVector< DIM > &  rhs  )  [inline]

Plus-equals operator for two integer vectors.

Reimplemented in SAMRAI::hier::Index< DIM >, SAMRAI::pdat::CellIndex< DIM >, SAMRAI::pdat::EdgeIndex< DIM >, SAMRAI::pdat::FaceIndex< DIM >, SAMRAI::pdat::NodeIndex< DIM >, and SAMRAI::pdat::SideIndex< DIM >.

template<int DIM>
IntVector< DIM > SAMRAI::hier::IntVector< DIM >::operator+ ( const IntVector< DIM > &  rhs  )  const [inline]

Plus operator for two integer vectors.

Reimplemented in SAMRAI::hier::Index< DIM >, SAMRAI::pdat::CellIndex< DIM >, SAMRAI::pdat::EdgeIndex< DIM >, SAMRAI::pdat::FaceIndex< DIM >, SAMRAI::pdat::NodeIndex< DIM >, and SAMRAI::pdat::SideIndex< DIM >.

template<int DIM>
IntVector< DIM > & SAMRAI::hier::IntVector< DIM >::operator+= ( const int  rhs  )  [inline]

Plus-equals operator for an integer vector and an integer.

Reimplemented in SAMRAI::hier::Index< DIM >, SAMRAI::pdat::CellIndex< DIM >, SAMRAI::pdat::EdgeIndex< DIM >, SAMRAI::pdat::FaceIndex< DIM >, SAMRAI::pdat::NodeIndex< DIM >, and SAMRAI::pdat::SideIndex< DIM >.

template<int DIM>
IntVector< DIM > SAMRAI::hier::IntVector< DIM >::operator+ ( const int  rhs  )  const [inline]

Plus operator for an integer vector and an integer.

Reimplemented in SAMRAI::hier::Index< DIM >, SAMRAI::pdat::CellIndex< DIM >, SAMRAI::pdat::EdgeIndex< DIM >, SAMRAI::pdat::FaceIndex< DIM >, SAMRAI::pdat::NodeIndex< DIM >, and SAMRAI::pdat::SideIndex< DIM >.

template<int DIM>
IntVector< DIM > & SAMRAI::hier::IntVector< DIM >::operator-= ( const IntVector< DIM > &  rhs  )  [inline]

Minus-equals operator for two integer vectors.

Reimplemented in SAMRAI::hier::Index< DIM >, SAMRAI::pdat::CellIndex< DIM >, SAMRAI::pdat::EdgeIndex< DIM >, SAMRAI::pdat::FaceIndex< DIM >, SAMRAI::pdat::NodeIndex< DIM >, and SAMRAI::pdat::SideIndex< DIM >.

template<int DIM>
IntVector< DIM > SAMRAI::hier::IntVector< DIM >::operator- ( const IntVector< DIM > &  rhs  )  const [inline]

Minus operator for two integer vectors.

Reimplemented in SAMRAI::hier::Index< DIM >, SAMRAI::pdat::CellIndex< DIM >, SAMRAI::pdat::EdgeIndex< DIM >, SAMRAI::pdat::FaceIndex< DIM >, SAMRAI::pdat::NodeIndex< DIM >, and SAMRAI::pdat::SideIndex< DIM >.

template<int DIM>
IntVector< DIM > & SAMRAI::hier::IntVector< DIM >::operator-= ( const int  rhs  )  [inline]

Minus-equals operator for an integer vector and an integer.

Reimplemented in SAMRAI::hier::Index< DIM >, SAMRAI::pdat::CellIndex< DIM >, SAMRAI::pdat::EdgeIndex< DIM >, SAMRAI::pdat::FaceIndex< DIM >, SAMRAI::pdat::NodeIndex< DIM >, and SAMRAI::pdat::SideIndex< DIM >.

template<int DIM>
IntVector< DIM > SAMRAI::hier::IntVector< DIM >::operator- ( const int  rhs  )  const [inline]

Minus operator for an integer vector and an integer.

Reimplemented in SAMRAI::hier::Index< DIM >, SAMRAI::pdat::CellIndex< DIM >, SAMRAI::pdat::EdgeIndex< DIM >, SAMRAI::pdat::FaceIndex< DIM >, SAMRAI::pdat::NodeIndex< DIM >, and SAMRAI::pdat::SideIndex< DIM >.

template<int DIM>
IntVector< DIM > & SAMRAI::hier::IntVector< DIM >::operator *= ( const IntVector< DIM > &  rhs  )  [inline]

Times-equals operator for two integer vectors.

Reimplemented in SAMRAI::hier::Index< DIM >, SAMRAI::pdat::CellIndex< DIM >, SAMRAI::pdat::EdgeIndex< DIM >, SAMRAI::pdat::FaceIndex< DIM >, SAMRAI::pdat::NodeIndex< DIM >, and SAMRAI::pdat::SideIndex< DIM >.

template<int DIM>
IntVector< DIM > SAMRAI::hier::IntVector< DIM >::operator * ( const IntVector< DIM > &  rhs  )  const [inline]

Times operator for two integer vectors.

Reimplemented in SAMRAI::hier::Index< DIM >, SAMRAI::pdat::CellIndex< DIM >, SAMRAI::pdat::EdgeIndex< DIM >, SAMRAI::pdat::FaceIndex< DIM >, SAMRAI::pdat::NodeIndex< DIM >, and SAMRAI::pdat::SideIndex< DIM >.

template<int DIM>
IntVector< DIM > & SAMRAI::hier::IntVector< DIM >::operator *= ( const int  rhs  )  [inline]

Times-equals operator for an integer vector and an integer.

Reimplemented in SAMRAI::hier::Index< DIM >, SAMRAI::pdat::CellIndex< DIM >, SAMRAI::pdat::EdgeIndex< DIM >, SAMRAI::pdat::FaceIndex< DIM >, SAMRAI::pdat::NodeIndex< DIM >, and SAMRAI::pdat::SideIndex< DIM >.

template<int DIM>
IntVector< DIM > SAMRAI::hier::IntVector< DIM >::operator * ( const int  rhs  )  const [inline]

Times operator for an integer vector and an integer.

Reimplemented in SAMRAI::hier::Index< DIM >, SAMRAI::pdat::CellIndex< DIM >, SAMRAI::pdat::EdgeIndex< DIM >, SAMRAI::pdat::FaceIndex< DIM >, SAMRAI::pdat::NodeIndex< DIM >, and SAMRAI::pdat::SideIndex< DIM >.

template<int DIM>
IntVector< DIM > & SAMRAI::hier::IntVector< DIM >::operator/= ( const IntVector< DIM > &  rhs  )  [inline]

Assign-quotient operator for two integer vectors.

Reimplemented in SAMRAI::hier::Index< DIM >.

template<int DIM>
IntVector< DIM > SAMRAI::hier::IntVector< DIM >::operator/ ( const IntVector< DIM > &  rhs  )  const [inline]

Quotient operator for two integer vectors.

Reimplemented in SAMRAI::hier::Index< DIM >.

template<int DIM>
IntVector< DIM > & SAMRAI::hier::IntVector< DIM >::operator/= ( const int  rhs  )  [inline]

Assign-quotient operator for an integer vector and an integer.

Reimplemented in SAMRAI::hier::Index< DIM >.

template<int DIM>
IntVector< DIM > SAMRAI::hier::IntVector< DIM >::operator/ ( const int  rhs  )  const [inline]

Quotient operator for an integer vector and an integer.

Reimplemented in SAMRAI::hier::Index< DIM >.

template<int DIM>
IntVector< DIM > SAMRAI::hier::IntVector< DIM >::operator- (  )  const [inline]

Unary minus to negate an integer vector.

template<int DIM>
bool SAMRAI::hier::IntVector< DIM >::operator== ( const IntVector< DIM > &  rhs  )  const [inline]

Returns true if two vector objects are equal. All components must be the same for equality.

template<int DIM>
bool SAMRAI::hier::IntVector< DIM >::operator!= ( const IntVector< DIM > &  rhs  )  const [inline]

Returns true if two vector objects are not equal. Any of the components may be different for inequality.

template<int DIM>
bool SAMRAI::hier::IntVector< DIM >::operator< ( const IntVector< DIM > &  rhs  )  const [inline]

Returns true if each integer in vector is less than corresponding integer in comparison vector.

template<int DIM>
bool SAMRAI::hier::IntVector< DIM >::operator<= ( const IntVector< DIM > &  rhs  )  const [inline]

Returns true if each integer in vector is less or equal to corresponding integer in comparison vector.

template<int DIM>
bool SAMRAI::hier::IntVector< DIM >::operator> ( const IntVector< DIM > &  rhs  )  const [inline]

Returns true if each integer in vector is greater than corresponding integer in comparison vector.

template<int DIM>
bool SAMRAI::hier::IntVector< DIM >::operator>= ( const IntVector< DIM > &  rhs  )  const [inline]

Returns true if each integer in vector is greater or equal to corresponding integer in comparison vector.

template<int DIM>
void SAMRAI::hier::IntVector< DIM >::min ( const IntVector< DIM > &  rhs  )  [inline]

Return the component-wise minimum of two integer vector objects.

template<int DIM>
int SAMRAI::hier::IntVector< DIM >::min (  )  const [inline]

Return the minimum entry in an integer vector.

template<int DIM>
void SAMRAI::hier::IntVector< DIM >::max ( const IntVector< DIM > &  rhs  )  [inline]

Return the component-wise maximum of two integer vector objects.

template<int DIM>
int SAMRAI::hier::IntVector< DIM >::max (  )  const [inline]

Return the maximum entry in an integer vector.

template<int DIM>
IntVector< DIM > SAMRAI::hier::IntVector< DIM >::min ( const IntVector< DIM > &  a,
const IntVector< DIM > &  b 
) [inline, static]

Utility function to take the minimum of two integer vector objects.

template<int DIM>
IntVector< DIM > SAMRAI::hier::IntVector< DIM >::max ( const IntVector< DIM > &  a,
const IntVector< DIM > &  b 
) [inline, static]

Utility function to take the maximum of two integer vector objects.

template<int DIM>
int SAMRAI::hier::IntVector< DIM >::getProduct (  )  const [inline]

Return the product of the entries in the integer vector.


Friends And Related Function Documentation

template<int DIM>
template<int DIMENSION>
std::istream& operator>> ( std::istream &  s,
IntVector< DIMENSION > &  rhs 
) [friend]

Read an integer vector from an input stream. The format for the input is (i0,...,in) for an n-dimensional vector.

template<int DIM>
template<int DIMENSION>
std::ostream& operator<< ( std::ostream &  s,
const IntVector< DIMENSION > &  rhs 
) [friend]

Write an integer vector into an output stream. The format for the output is (i0,...,in) for an n-dimensional vector.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:28:28 2009 for SAMRAI by  doxygen 1.5.1