IBAMR  IBAMR version 0.19.
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
SAMRAI::hier::IntVector< DIM > Class Template Reference

#include <ibtk/StreamableManager.h>

Inheritance diagram for SAMRAI::hier::IntVector< DIM >:
Inheritance graph
[legend]

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)
 
intoperator() (const int i)
 
const intoperator() (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)
 

Private Attributes

int d_vector [DIM]
 

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

◆ IntVector() [1/6]

template<int DIM>
SAMRAI::hier::IntVector< DIM >::IntVector ( )

The default constructor creates an uninitialized vector.

◆ IntVector() [2/6]

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

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

◆ IntVector() [3/6]

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

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

◆ IntVector() [4/6]

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

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

◆ IntVector() [5/6]

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

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

◆ IntVector() [6/6]

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

Construct an integer vector equal to the argument.

Member Function Documentation

◆ operator=()

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

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

◆ operator()() [1/2]

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

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

◆ operator()() [2/2]

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

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

◆ operator int *()

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

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

◆ operator const int *()

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

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

◆ operator+=() [1/2]

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

Plus-equals operator for two integer vectors.

◆ operator+() [1/2]

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

Plus operator for two integer vectors.

◆ operator+=() [2/2]

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

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

◆ operator+() [2/2]

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

Plus operator for an integer vector and an integer.

◆ operator-=() [1/2]

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

Minus-equals operator for two integer vectors.

◆ operator-() [1/3]

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

Minus operator for two integer vectors.

◆ operator-=() [2/2]

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

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

◆ operator-() [2/3]

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

Minus operator for an integer vector and an integer.

◆ operator*=() [1/2]

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

Times-equals operator for two integer vectors.

◆ operator*() [1/2]

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

Times operator for two integer vectors.

◆ operator*=() [2/2]

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

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

◆ operator*() [2/2]

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

Times operator for an integer vector and an integer.

◆ operator/=() [1/2]

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

Assign-quotient operator for two integer vectors.

◆ operator/() [1/2]

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

Quotient operator for two integer vectors.

◆ operator/=() [2/2]

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

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

◆ operator/() [2/2]

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

Quotient operator for an integer vector and an integer.

◆ operator-() [3/3]

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

Unary minus to negate an integer vector.

◆ operator==()

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

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

◆ operator!=()

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

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

◆ operator<()

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

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

◆ operator<=()

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

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

◆ operator>()

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

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

◆ operator>=()

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

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

◆ min() [1/3]

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

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

◆ min() [2/3]

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

Return the minimum entry in an integer vector.

◆ max() [1/3]

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

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

◆ max() [2/3]

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

Return the maximum entry in an integer vector.

◆ min() [3/3]

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

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

◆ max() [3/3]

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

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

◆ getProduct()

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

Return the product of the entries in the integer vector.

Friends And Related Function Documentation

◆ operator>>

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.

◆ operator<<

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.

Member Data Documentation

◆ d_vector

template<int DIM>
int SAMRAI::hier::IntVector< DIM >::d_vector[DIM]
private

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