iso::math::VectorField< Type > Class Template Reference

template vector field More...

#include <iso_math_vector_field.h>

Collaboration diagram for iso::math::VectorField< Type >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 VectorField (const Vector< unsigned int > &pSize, unsigned int pVectorDim)
 create vector field
 VectorField (const VectorField< Type > &pVectorField)
 create vector field
 ~VectorField ()
 destructor
const VectorField< Type > & operator= (const VectorField< Type > &pVectorField) throw (MathException)
 copy operator
unsigned int fieldDim () const
 return field dimension
unsigned int vectorDim () const
 return vector dimension
const Vector< unsigned int > & size () const
 return size of vector field
unsigned int vectorCount () const
 return number of vectors
Vector< Type > ** vectors ()
 return vectors
const Vector< Type > ** vectors () const
 return vectors
Vector< Type > sum () const
 return sum of all vectors
void subField (const Vector< unsigned int > &pIndex, VectorField< Type > &pSubField) throw (MathException)
 retrieve subfield
const Vector< Type > & operator[] (unsigned int pIndex) const throw (MathException)
 return vector
const Vector< Type > & get (unsigned int pIndex) const throw (MathException)
 return vector
const Vector< Type > & get (const Vector< unsigned int > &pIndex) const throw (MathException)
 return vector
Vector< Type > get (const Vector< real > &pIndex) const throw (MathException)
 return interpolated vector
void get (const Vector< real > &pIndex, Vector< Type > &pResult) const throw (MathException)
 return interpolated vector
void set (unsigned int pIndex, const Vector< Type > &pValue) throw (MathException)
 set vector
void set (const Vector< unsigned int > &pIndex, const Vector< Type > &pValue) throw (MathException)
 set vector
void set (const Vector< real > &pIndex, const Vector< Type > &pValue) throw (MathException)
 set vector (interpolated mode)
void set (const Vector< unsigned int > &pStartIndex, const Vector< unsigned int > &pEndIndex, const Vector< Type > &pValue) throw (MathException)
 set vectors
void set (const Vector< Type > &pValue) throw (MathException)
 set all vector values
void add (unsigned int pIndex, const Vector< Type > &pValue) throw (MathException)
 add vector
void add (const Vector< unsigned int > &pIndex, const Vector< Type > &pValue) throw (MathException)
 add vector
void add (const Vector< real > &pIndex, const Vector< Type > &pValue) throw (MathException)
 add vector (interpolated mode)
void add (const Vector< unsigned int > &pStartIndex, const Vector< unsigned int > &pEndIndex, const Vector< Type > &pValue) throw (MathException)
 add vector
void add (const Vector< Type > &pValue) throw (MathException)
 add all vector values
const VectorField< Type > & operator+= (const Vector< Type > &pVector) throw (MathException)
 vectorfield += vector
const VectorField< Type > & operator-= (const Vector< Type > &pVector) throw (MathException)
 vectorfield -= vector
const VectorField< Type > & operator *= (const Vector< Type > &pVector) throw (MathException)
 vectorfield *= vector
const VectorField< Type > & operator/= (const Vector< Type > &pVector) throw (MathException)
 vectorfield /= vector
VectorField< Type > operator+ (const Vector< Type > &pVector) const throw (MathException)
 vectorfield + vector
VectorField< Type > operator- (const Vector< Type > &pVector) const throw (MathException)
 vectorfield - vector
VectorField< Type > operator * (const Vector< Type > &pVector) const throw (MathException)
 vectorfield * vector
VectorField< Type > operator/ (const Vector< Type > &pVector) const throw (MathException)
 vectorfield / vector
const VectorField< Type > & operator+= (const VectorField< Type > &pVectorField) throw (MathException)
 vectorfield += vectorfield
const VectorField< Type > & operator-= (const VectorField< Type > &pVectorField) throw (MathException)
 vectorfield -= vectorfield
virtual const VectorField<
Type > & 
operator *= (const VectorField< Type > &pVectorField) throw (MathException)
 vectorfield *= vectorfield
const VectorField< Type > & operator/= (const VectorField< Type > &pVectorField) throw (MathException)
 vectorfield /= vectorfield
VectorField< Type > operator+ (const VectorField< Type > &pVectorField) const throw (MathException)
 vectorfield + vectorfield
VectorField< Type > operator- (const VectorField< Type > &pVectorField) const throw (MathException)
 vectorfield - vectorfield
VectorField< Type > operator * (const VectorField< Type > &pVectorField) const throw (MathException)
 vectorfield * vectorfield
VectorField< Type > operator/ (const VectorField< Type > &pVectorField) const throw (MathException)
 vectorfield / vectorfield
unsigned int calcIndex (const Vector< unsigned int > &pIndex) const throw (MathException)
 calculate index
void convolve (const VectorField< Type > &pKernel) throw (MathException)
 convolve vector field with supplied kernel

Protected Attributes

unsigned int mVectorCount
 number of vectors
Vector< unsigned int > mSize
 number of vectors in field
Vector< unsigned int > mIndexOffset
 offsets for converting a relative index into an absolute index
Vector< Type > ** mVectors
 vectors
unsigned int mInterpolVectorCount

Friends

std::ostream & operator<< (std::ostream &os, const VectorField< Type > pVectorField)
 output textual vector field information

Detailed Description

template<class Type>
class iso::math::VectorField< Type >

template vector field

field

Created by Daniel Bisig on 4/27/07.


Constructor & Destructor Documentation

template<class Type>
VectorField::VectorField ( const Vector< unsigned int > &  pSize,
unsigned int  pVectorDim 
)

create vector field

Parameters:
pSize size of vector field (i.e. number of vectors)
pVectorDim dimension of vectors

template<class Type>
VectorField::VectorField ( const VectorField< Type > &  pVectorField  ) 

create vector field

Parameters:
pVectorField vector field

template<class Type>
VectorField::~VectorField (  ) 

destructor


Member Function Documentation

template<class Type>
const VectorField< Type > & VectorField::operator= ( const VectorField< Type > &  pVectorField  )  throw (MathException)

copy operator

Parameters:
pVectorField vectorfield to copy
Returns:
vectorfield
Exceptions:
MathException if vector fields are incompatible

template<class Type>
unsigned int VectorField::fieldDim (  )  const

return field dimension

Returns:
field dimension

template<class Type>
unsigned int VectorField::vectorDim (  )  const

return vector dimension

Returns:
vector dimension

template<class Type>
const Vector< unsigned int > & VectorField::size (  )  const

return size of vector field

Returns:
size of vector field

template<class Type>
unsigned int VectorField::vectorCount (  )  const

return number of vectors

Returns:
number of vectors

template<class Type>
Vector< Type > ** VectorField::vectors (  ) 

return vectors

Returns:
vectors

template<class Type>
const Vector< Type > ** VectorField::vectors (  )  const

return vectors

Returns:
vectors

template<class Type>
Vector< Type > VectorField::sum (  )  const

return sum of all vectors

Returns:
sum of all vectors

template<class Type>
void VectorField::subField ( const Vector< unsigned int > &  pIndex,
VectorField< Type > &  pSubField 
) throw (MathException)

retrieve subfield

Parameters:
pIndex position of subfield (top left)
pSubField subfield
Exceptions:
MathException dimension mismatch or out of bounds error

template<class Type>
const Vector< Type > & VectorField::operator[] ( unsigned int  pIndex  )  const throw (MathException) [inline]

return vector

Parameters:
pIndex scalar index
Returns:
vector
Exceptions:
MathException if index is out of bounds

template<class Type>
const Vector< Type > & VectorField::get ( unsigned int  pIndex  )  const throw (MathException) [inline]

return vector

Parameters:
pIndex scalar index
Returns:
vector
Exceptions:
MathException fails if index is out of bounds

template<class Type>
const Vector< Type > & VectorField::get ( const Vector< unsigned int > &  pIndex  )  const throw (MathException)

return vector

Parameters:
pIndex nD index
Returns:
vector
Exceptions:
MathException if dimension mismatch or index is out of bounds

template<class Type>
Vector< Type > VectorField::get ( const Vector< real > &  pIndex  )  const throw (MathException)

return interpolated vector

Parameters:
pIndex nD index
Returns:
vector
Exceptions:
MathException if dimension mismatch or index is out of bounds
perform linear interpolation

template<class Type>
void VectorField::get ( const Vector< real > &  pIndex,
Vector< Type > &  pResult 
) const throw (MathException)

return interpolated vector

Parameters:
pIndex nD index
pResult interpolated vector
Exceptions:
MathException if dimension mismatch or index is out of bounds
perform linear interpolation

template<class Type>
void VectorField::set ( unsigned int  pIndex,
const Vector< Type > &  pValue 
) throw (MathException)

set vector

Parameters:
pIndex scalar index
pValue vector value
Exceptions:
MathException Vector dimension mismatch or out of bounds error

template<class Type>
void VectorField::set ( const Vector< unsigned int > &  pIndex,
const Vector< Type > &  pValue 
) throw (MathException)

set vector

Parameters:
pIndex vector index
pValue vector value
Exceptions:
MathException vector dimension mismatch or field dimension mismatch or index out of bounds

template<class Type>
void VectorField::set ( const Vector< real > &  pIndex,
const Vector< Type > &  pValue 
) throw (MathException)

set vector (interpolated mode)

Parameters:
pIndex vector index
pValue vector value
Exceptions:
MathException vector dimension mismatch or field dimension mismatch or index out of bounds

template<class Type>
void VectorField::set ( const Vector< unsigned int > &  pStartIndex,
const Vector< unsigned int > &  pEndIndex,
const Vector< Type > &  pValue 
) throw (MathException)

set vectors

Parameters:
pStartIndex start vector index
pEndIndex end vector index
pValue vector value
Exceptions:
MathException vector dimension mismatch or field dimension mismatch or index out of bounds or start index larger than end index

template<class Type>
void VectorField::set ( const Vector< Type > &  pValue  )  throw (MathException)

set all vector values

Parameters:
pValue vector value
Exceptions:
MathException vector dimension mismatch

template<class Type>
void VectorField::add ( unsigned int  pIndex,
const Vector< Type > &  pValue 
) throw (MathException)

add vector

Parameters:
pIndex scalar index
pValue vector value
Exceptions:
MathException Vector dimension mismatch or out of bounds error

template<class Type>
void VectorField::add ( const Vector< unsigned int > &  pIndex,
const Vector< Type > &  pValue 
) throw (MathException)

add vector

Parameters:
pIndex vector index
pValue vector value
Exceptions:
MathException field dimension mismatch or index out of bounds or vector dimension mismatch

template<class Type>
void VectorField::add ( const Vector< real > &  pIndex,
const Vector< Type > &  pValue 
) throw (MathException)

add vector (interpolated mode)

Parameters:
pIndex vector index
pValue vector value
Exceptions:
MathException vector dimension mismatch or field dimension mismatch or index out of bounds

template<class Type>
void VectorField::add ( const Vector< unsigned int > &  pStartIndex,
const Vector< unsigned int > &  pEndIndex,
const Vector< Type > &  pValue 
) throw (MathException)

add vector

Parameters:
pStartIndex start vector index
pEndIndex end vector index
pValue vector value
Exceptions:
MathException vector dimension mismatch or field dimension mismatch or index out of bounds or start index larger than end index

template<class Type>
void VectorField::add ( const Vector< Type > &  pValue  )  throw (MathException)

add all vector values

Parameters:
pValue vector value
Exceptions:
MathException vector dimension mismatch

template<class Type>
const VectorField< Type > & VectorField::operator+= ( const Vector< Type > &  pVector  )  throw (MathException) [inline]

vectorfield += vector

Parameters:
pVector vector
Returns:
vectorfield
Exceptions:
MathException vector dimension mismatch

template<class Type>
const VectorField< Type > & VectorField::operator-= ( const Vector< Type > &  pVector  )  throw (MathException) [inline]

vectorfield -= vector

Parameters:
pVector vector
Returns:
vectorfield
Exceptions:
MathException vector dimension mismatch

template<class Type>
const VectorField< Type > & VectorField::operator *= ( const Vector< Type > &  pVector  )  throw (MathException) [inline]

vectorfield *= vector

Parameters:
pVector vector
Returns:
vectorfield
Exceptions:
MathException vector dimension mismatch

template<class Type>
const VectorField< Type > & VectorField::operator/= ( const Vector< Type > &  pVector  )  throw (MathException) [inline]

vectorfield /= vector

Parameters:
pVector vector
Returns:
vectorfield
Exceptions:
MathException vector dimension mismatch

template<class Type>
VectorField< Type > VectorField::operator+ ( const Vector< Type > &  pVector  )  const throw (MathException) [inline]

vectorfield + vector

Parameters:
pVector vector
Returns:
vectorfield
Exceptions:
MathException vector dimension mismatch

template<class Type>
VectorField< Type > VectorField::operator- ( const Vector< Type > &  pVector  )  const throw (MathException) [inline]

vectorfield - vector

Parameters:
pVector vector
Returns:
vectorfield
Exceptions:
MathException vector dimension mismatch

template<class Type>
VectorField< Type > VectorField::operator * ( const Vector< Type > &  pVector  )  const throw (MathException) [inline]

vectorfield * vector

Parameters:
pVector vector
Returns:
vectorfield
Exceptions:
MathException vector dimension mismatch

template<class Type>
VectorField< Type > VectorField::operator/ ( const Vector< Type > &  pVector  )  const throw (MathException) [inline]

vectorfield / vector

Parameters:
pVector vector
Returns:
vectorfield
Exceptions:
MathException vector dimension mismatch

template<class Type>
const VectorField< Type > & VectorField::operator+= ( const VectorField< Type > &  pVectorField  )  throw (MathException) [inline]

vectorfield += vectorfield

Parameters:
pVectorField vectorfield
Returns:
vectorfield
Exceptions:
MathException vector dimension or field dimension or field size mismatch

template<class Type>
const VectorField< Type > & VectorField::operator-= ( const VectorField< Type > &  pVectorField  )  throw (MathException) [inline]

vectorfield -= vectorfield

Parameters:
pVectorField vectorfield
Returns:
vectorfield
Exceptions:
MathException vector dimension or field dimension or field size mismatch

template<class Type>
const VectorField< Type > & VectorField::operator *= ( const VectorField< Type > &  pVectorField  )  throw (MathException) [virtual]

vectorfield *= vectorfield

Parameters:
pVectorField vectorfield
Returns:
vectorfield
Exceptions:
MathException vector dimension or field dimension or field size mismatch

template<class Type>
const VectorField< Type > & VectorField::operator/= ( const VectorField< Type > &  pVectorField  )  throw (MathException) [inline]

vectorfield /= vectorfield

Parameters:
pVectorField vectorfield
Returns:
vectorfield
Exceptions:
MathException vector dimension or field dimension or field size mismatch

template<class Type>
VectorField< Type > VectorField::operator+ ( const VectorField< Type > &  pVectorField  )  const throw (MathException) [inline]

vectorfield + vectorfield

Parameters:
pVectorField vectorfield
Returns:
vectorfield
Exceptions:
MathException vector dimension or field dimension or field size mismatch

template<class Type>
VectorField< Type > VectorField::operator- ( const VectorField< Type > &  pVectorField  )  const throw (MathException) [inline]

vectorfield - vectorfield

Parameters:
pVectorField vectorfield
Returns:
vectorfield
Exceptions:
MathException vector dimension or field dimension or field size mismatch

template<class Type>
VectorField< Type > VectorField::operator * ( const VectorField< Type > &  pVectorField  )  const throw (MathException) [inline]

vectorfield * vectorfield

Parameters:
pVectorField vectorfield
Returns:
vectorfield
Exceptions:
MathException vector dimension or field dimension or field size mismatch

template<class Type>
VectorField< Type > VectorField::operator/ ( const VectorField< Type > &  pVectorField  )  const throw (MathException) [inline]

vectorfield / vectorfield

Parameters:
pVectorField vectorfield
Returns:
vectorfield
Exceptions:
MathException vector dimension or field dimension or field size mismatch

template<class Type>
unsigned int VectorField::calcIndex ( const Vector< unsigned int > &  pIndex  )  const throw (MathException) [inline]

calculate index

Parameters:
pIndex nD index
Returns:
1D index
Remarks:
exception MathException dimension mismatch or index out of bounds
calculates scalar index into 1D array of vectors from an n-dimensional index

template<class Type>
void VectorField::convolve ( const VectorField< Type > &  pKernel  )  throw (MathException)

convolve vector field with supplied kernel

Parameters:
pKernel convolution kernel
Exceptions:
MathException kernel vector dimension or kernel field dimension mismatch or kernel size error (size not odd)


Friends And Related Function Documentation

template<class Type>
std::ostream& operator<< ( std::ostream &  os,
const VectorField< Type >  pVectorField 
) [friend]

output textual vector field information

Parameters:
os output stream
pVectorField vector field
Returns:
output stream


Member Data Documentation

template<class Type>
unsigned int iso::math::VectorField< Type >::mVectorCount [protected]

number of vectors

template<class Type>
Vector<unsigned int> iso::math::VectorField< Type >::mSize [protected]

number of vectors in field

template<class Type>
Vector<unsigned int> iso::math::VectorField< Type >::mIndexOffset [protected]

offsets for converting a relative index into an absolute index

template<class Type>
Vector<Type>** iso::math::VectorField< Type >::mVectors [protected]

vectors

template<class Type>
unsigned int iso::math::VectorField< Type >::mInterpolVectorCount [protected]


The documentation for this class was generated from the following file:
Generated on Fri Feb 25 14:04:07 2011 for iso_math by  doxygen 1.5.1