ml::TVector< TVectorBase > Class Template Reference

ML integer image vector class to be specialized for different purposes. More...

#include <mlIntegerVector.h>

List of all members.

Public Types

enum  { NumberOfDimensions = ParentClass::NumberOfDimensions }
 Enumerator defining the dimension of this class. More...
typedef TVectorBase::ComponentType ComponentType
 Integer type used by this vector.
typedef TVectorBase ParentClass
 Parent class of this class.

Public Member Functions

std::string print (const std::string &openStr="", const std::string &sepStr=" ", const std::string &termStr="", const MLint16 numDigits=-1) const
 Returns the string openStr + v.array[0] + sepStr + .
Initialization
 TVector ()
 Constructor. All components are initialized to 0.
 TVector (const ComponentType i)
 Constructor which initializes all components to i.
 TVector (const TVector< TVectorBase > &v2)
 Copy constructor.
template<typename TVectorBase2 >
 TVector (const TVector< TVectorBase2 > &v2)
 Copy constructor from another TVector of same or other integer type, values are cast.
 TVector (const ComponentType xp, const TVector &p)
 Constructor which assigns X to x and copies other elements from p.
 TVector (const MLint num, const ComponentType *const arr, const ComponentType deflt)
 Constructor which initializes the vector components by copying them from arr[0] ,.
void copy (const MLint num, ComponentType *const arr) const
 Copy the first num elements from internal array into arr starting with array[0] to arr[0] to array[num-1] to arr[num-1], respectively.
void set (const ComponentType v=0)
 Set all components to v or - if v is not specified - to 0.
void set (const TVector &v)
 Like assignment operator.
Functions and operators.
TVector< TVectorBase > operator+ (const TVector &b) const
 To each component add the corresponding component from b.
TVector< TVectorBase > & operator+= (const TVector< TVectorBase > &b)
 To each component add the corresponding component from b.
TVector< TVectorBase > operator- (const TVector< TVectorBase > &b) const
 Calculates and returns *this-b.
TVector< TVectorBase > & operator-= (const TVector< TVectorBase > &b)
 From each component subtract the corresponding component from b.
TVector< TVectorBase > operator* (const TVector< TVectorBase > &b) const
 Calculates and returns the multiplication of each component of this with its corresponding component from b.
TVector< TVectorBase > & operator*= (const TVector< TVectorBase > &b)
 Multiply each component with its corresponding components from b.
TVector< TVectorBase > operator+ (const ComponentType b) const
 Calculate and return addition of each component of *this with scalar b.
TVector< TVectorBase > operator- (const ComponentType b) const
 Subtract the scalar b from all components.
TVector< TVectorBase > operator* (const ComponentType b) const
 Multiply all components with scalar b.
TVector< TVectorBase > operator/ (const TVector< TVectorBase > &b) const
 Calculate and return the division of each component of *this by its corresponding component from b.
TVector< TVectorBase > & operator/= (const TVector< TVectorBase > &b)
 Divide each component by its corresponding component from b.
bool operator== (const TVector< TVectorBase > &b) const
 Equality operator: Returns true if each component of a is equal to its corresponding component of b, otherwise false.
bool operator!= (const TVector< TVectorBase > &b) const
 Inequality operator: Returns true if any component differs from its corresponding component of b, otherwise false.
bool operator< (const TVector< TVectorBase > &b) const
 "Smaller" comparison operator, return true if relation is valid for all components.
bool operator<= (const TVector< TVectorBase > &b) const
 "Smaller Or Equal" comparison operator, return true if relation is valid for all components.
bool operator> (const TVector< TVectorBase > &b) const
 "Bigger" comparison operator, return true if relation is valid for all components.
bool operator>= (const TVector< TVectorBase > &b) const
 "Bigger or Equal" comparison operator, return true if relation is valid for all components.
TVector< TVectorBase > operator& (const TVector< TVectorBase > &b) const
 Binary "And" of all components with the corresponding components of another Vector.
TVector< TVectorBase > operator| (const TVector< TVectorBase > &b) const
 Binary "Or" of all components with the corresponding components of another Vector.
TVector< TVectorBase > operator^ (const TVector< TVectorBase > &b) const
 Binary "Xor" of all components with the corresponding components of another Vector.
TVector< TVectorBase > & operator&= (const TVector< TVectorBase > &b)
 Binary "And" of all components with the corresponding components of another Vector.
TVector< TVectorBase > & operator|= (const TVector< TVectorBase > &b)
 Binary "Or" of all components with the corresponding components of another Vector.
TVector< TVectorBase > & operator^= (const TVector< TVectorBase > &b)
 Binary "Xor" of all components with the corresponding components of another Vector.
TVector< TVectorBase > operator& (const ComponentType b) const
 Binary "And" of all components with an integer.
TVector< TVectorBase > operator| (const ComponentType b) const
 Binary "Or" of all components with an integer.
TVector< TVectorBase > operator^ (const ComponentType b) const
 Binary "Xor" of all components with an integer.
TVector< TVectorBase > & operator&= (const ComponentType b)
 Binary "And" of all components with an integer.
TVector< TVectorBase > & operator|= (const ComponentType b)
 Binary "Or" of all components with an integer.
TVector< TVectorBase > & operator^= (const ComponentType b)
 Binary "Xor" of all components with an integer.
TVector< TVectorBase > operator>> (const int b) const
 ">>" on each vector component.
TVector< TVectorBase > operator<< (const int b) const
 "<<" on each vector component.
TVector< TVectorBase > & operator>>= (const int b)
 ">>=" on each vector component.
TVector< TVectorBase > & operator<<= (const int b)
 "<<=" on each vector component.
TVector< TVectorBase > operator- () const
 Unary "-" on each vector component.
ComponentType operator[] (const size_t i) const
 Constant indexing operator permits read access to array[0], .
ComponentTypeoperator[] (const size_t i)
 Indexing operator permits read and write access to array[0], .
MLint getMaxIdx () const
 Searches the maximum component and returns the index of its first occurrence.
ComponentType getMax () const
 Return maximum component value.
MLint getMinIdx () const
 Searches the minimum component and returns the index of its first occurrence.
ComponentType getMin () const
 Return minimum component value.
TVector< TVectorBase > getStrides (const ComponentType offset=1) const
 Interprets the vector as image extension and returns a stride vector.
TVector< TVectorBase > getVectorPosition (ComponentType offsetPos) const
 Interprets the vector as a stride vector of an image and returns the offset position offsetPos from the image origin to the coordinate specified by the vector.
MLint getExtDimension () const
 Returns the index to the highest vector component which is not 1 which is useful to get the real dimensional extent of an image.
bool hasNegativeComp () const
 Returns true if any component is negative, otherwise false.
bool allBiggerZero () const
 Returns true if all components > 0, otherwise false.

Arithmetics as static and member functions

TVector< TVectorBase > divCeil (const TVector< TVectorBase > &b) const
 Return the componentwise division of the vector this by vector b with rounding up.
TVector< TVectorBase > compMin (const TVector< TVectorBase > &b) const
 Return the componentwise minimum of components of this and b.
TVector< TVectorBase > compMax (const TVector< TVectorBase > &b) const
 Return the componentwise maximum of components of this and b.
TVector< TVectorBase > compMod (const TVector< TVectorBase > &b) const
 Return the rest of the division of this by b componentwise.
TVector< TVectorBase > compAbs () const
 Return a vector with all components of this replaced by their absolute values.
ComponentType compMul () const
 Return product of all components. There is no check for integer overflow.
ComponentType compSum () const
 Return sum of all components. There is no check for integer overflow.
ComponentType dot (const TVector< TVectorBase > &b) const
 Return scalar product of vectors this and b. There is no check for integer overflow.
void fillSmallerComps (const ComponentType threshold=0, const ComponentType fillVal=0)
 Set components which are smaller than threshold to fillVal.
void fillGreaterComps (const ComponentType threshold=0, const ComponentType fillVal=0)
 Set components which are greater than threshold to fillVal.
void fillEqualComps (const ComponentType threshold=0, const ComponentType fillVal=0)
 Set components which are equal to threshold to fillVal.
static TVector< TVectorBase > divCeil (const TVector< TVectorBase > &a, const TVector< TVectorBase > &b)
 Static version: Return the componentwise division of the vector a by vector b with rounding up.
static TVector< TVectorBase > compMin (const TVector< TVectorBase > &a, const TVector< TVectorBase > &b)
 Static version: Return the componentwise minimum of vectors a and b.
static TVector< TVectorBase > compMax (const TVector< TVectorBase > &a, const TVector< TVectorBase > &b)
 Static version: Return the componentwise maximum of vectors a and b.
static TVector< TVectorBase > compMod (const TVector< TVectorBase > &a, const TVector< TVectorBase > &b)
 Static version: Return the rest dividing vector a by b componentwise.
static TVector< TVectorBase > compAbs (const TVector< TVectorBase > &a)
 Static version: Return a vector with all components of a replaced by their absolute values.
static ComponentType compMul (const TVector< TVectorBase > &a)
 Static version: Return product of all components without check for integer overflow.
static ComponentType compSum (const TVector< TVectorBase > &a)
 Static version: Return sum of all components without check for integer overflow.
static ComponentType dot (const TVector< TVectorBase > &a, const TVector< TVectorBase > &b)
 Static version: Return scalar product of vectors a and b without check for integer overflow.


Detailed Description

template<class TVectorBase>
class ml::TVector< TVectorBase >

ML integer image vector class to be specialized for different purposes.

It is a template to handle and calculate with n dimensional cardinal coordinates and vectors.

It represents a vector to address coordinates and offsets into images. The methods provide elementary arithmetic vector operations and support the stride concept for efficient image addressing.

The members of this class define a ND vector of type integer which is specialized normally to the ImageVector class which has the MLMaxImageDimension (defined in mlImageVector.h) with MLint as component type.

This class can also be instantiated with higher NumberOfDimensions arguments or other CompIntType arguments to compile arbitrary dimensional vectors with an arbitrary integer base type.

Example for vector initialization:

       TVector<MLint> p;
       p[0]=3; p[1]=5; p[2]=7; p[3]=9; p[4]=11; p[5]=13;
      // or
       TVector<MLint> q(4, p);
      // or
       TVector<MLint> q();
       q.set(0);

Notes:

Parameters:
TVectorBase should be TVector6DBase for 6D ML image vector types or TVectorNDBase for other dimensional vectors.

Definition at line 106 of file mlIntegerVector.h.


Member Typedef Documentation

template<class TVectorBase>
typedef TVectorBase::ComponentType ml::TVector< TVectorBase >::ComponentType

Integer type used by this vector.

Reimplemented in ml::TImageVector< CompIntType >, ml::TImageVector< intT >, and ml::TImageVector< MLint >.

Definition at line 111 of file mlIntegerVector.h.

template<class TVectorBase>
typedef TVectorBase ml::TVector< TVectorBase >::ParentClass

Parent class of this class.

Reimplemented in ml::TImageVector< CompIntType >, ml::TImageVector< intT >, and ml::TImageVector< MLint >.

Definition at line 114 of file mlIntegerVector.h.


Member Enumeration Documentation

template<class TVectorBase>
anonymous enum

Enumerator defining the dimension of this class.

Enumerator:
NumberOfDimensions 

Definition at line 117 of file mlIntegerVector.h.


Constructor & Destructor Documentation

template<class TVectorBase>
ml::TVector< TVectorBase >::TVector (  )  [inline]

Constructor. All components are initialized to 0.

Definition at line 125 of file mlIntegerVector.h.

template<class TVectorBase>
ml::TVector< TVectorBase >::TVector ( const ComponentType  i  )  [inline, explicit]

Constructor which initializes all components to i.

Definition at line 132 of file mlIntegerVector.h.

template<class TVectorBase>
ml::TVector< TVectorBase >::TVector ( const TVector< TVectorBase > &  v2  )  [inline]

Copy constructor.

Definition at line 139 of file mlIntegerVector.h.

template<class TVectorBase>
template<typename TVectorBase2 >
ml::TVector< TVectorBase >::TVector ( const TVector< TVectorBase2 > &  v2  )  [inline, explicit]

Copy constructor from another TVector of same or other integer type, values are cast.

Only valid elements are copied if vectors have different lengths.

Definition at line 148 of file mlIntegerVector.h.

template<class TVectorBase>
ml::TVector< TVectorBase >::TVector ( const ComponentType  xp,
const TVector< TVectorBase > &  p 
) [inline, explicit]

Constructor which assigns X to x and copies other elements from p.

Definition at line 159 of file mlIntegerVector.h.

template<class TVectorBase>
ml::TVector< TVectorBase >::TVector ( const MLint  num,
const ComponentType *const   arr,
const ComponentType  deflt 
) [inline, explicit]

Constructor which initializes the vector components by copying them from arr[0] ,.

.., arr[num-1]. All other elements are initialized to the value deflt.

Definition at line 667 of file mlIntegerVector.h.

References ML_CATCH_RETHROW, ML_CHECK_THROW, ML_TRACE_IN, ML_TRY, and ml::TVector< TVectorBase >::NumberOfDimensions.


Member Function Documentation

template<class TVectorBase>
bool ml::TVector< TVectorBase >::allBiggerZero (  )  const [inline]

Returns true if all components > 0, otherwise false.

Definition at line 527 of file mlIntegerVector.h.

template<class TVectorBase>
TVector< TVectorBase > ml::TVector< TVectorBase >::compAbs ( const TVector< TVectorBase > &  a  )  [inline, static]

Static version: Return a vector with all components of a replaced by their absolute values.

Definition at line 821 of file mlIntegerVector.h.

References ML_TRACE_IN_TIME_CRITICAL, and ml::TVector< TVectorBase >::NumberOfDimensions.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::compAbs (  )  const [inline]

Return a vector with all components of this replaced by their absolute values.

Definition at line 552 of file mlIntegerVector.h.

template<class TVectorBase>
TVector< TVectorBase > ml::TVector< TVectorBase >::compMax ( const TVector< TVectorBase > &  a,
const TVector< TVectorBase > &  b 
) [inline, static]

Static version: Return the componentwise maximum of vectors a and b.

Definition at line 788 of file mlIntegerVector.h.

References ML_TRACE_IN_TIME_CRITICAL, and ml::TVector< TVectorBase >::NumberOfDimensions.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::compMax ( const TVector< TVectorBase > &  b  )  const [inline]

Return the componentwise maximum of components of this and b.

Definition at line 547 of file mlIntegerVector.h.

template<class TVectorBase>
TVector< TVectorBase > ml::TVector< TVectorBase >::compMin ( const TVector< TVectorBase > &  a,
const TVector< TVectorBase > &  b 
) [inline, static]

Static version: Return the componentwise minimum of vectors a and b.

Definition at line 775 of file mlIntegerVector.h.

References ML_TRACE_IN_TIME_CRITICAL, and ml::TVector< TVectorBase >::NumberOfDimensions.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::compMin ( const TVector< TVectorBase > &  b  )  const [inline]

Return the componentwise minimum of components of this and b.

Definition at line 545 of file mlIntegerVector.h.

template<class TVectorBase>
TVector< TVectorBase > ml::TVector< TVectorBase >::compMod ( const TVector< TVectorBase > &  a,
const TVector< TVectorBase > &  b 
) [inline, static]

Static version: Return the rest dividing vector a by b componentwise.

Division by zero caused by zero components of b must be avoided by caller.

Definition at line 803 of file mlIntegerVector.h.

References ML_CATCH_RETHROW, ML_CHECK_THROW, ML_TRACE_IN_TIME_CRITICAL, ML_TRY, and ml::TVector< TVectorBase >::NumberOfDimensions.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::compMod ( const TVector< TVectorBase > &  b  )  const [inline]

Return the rest of the division of this by b componentwise.

Division by zero caused by zero components of b must be avoided by caller.

Definition at line 550 of file mlIntegerVector.h.

template<class TVectorBase>
static ComponentType ml::TVector< TVectorBase >::compMul ( const TVector< TVectorBase > &  a  )  [inline, static]

Static version: Return product of all components without check for integer overflow.

Definition at line 576 of file mlIntegerVector.h.

template<class TVectorBase>
ComponentType ml::TVector< TVectorBase >::compMul (  )  const [inline]

Return product of all components. There is no check for integer overflow.

Definition at line 555 of file mlIntegerVector.h.

template<class TVectorBase>
static ComponentType ml::TVector< TVectorBase >::compSum ( const TVector< TVectorBase > &  a  )  [inline, static]

Static version: Return sum of all components without check for integer overflow.

Definition at line 584 of file mlIntegerVector.h.

template<class TVectorBase>
ComponentType ml::TVector< TVectorBase >::compSum (  )  const [inline]

Return sum of all components. There is no check for integer overflow.

Definition at line 557 of file mlIntegerVector.h.

template<class TVectorBase >
void ml::TVector< TVectorBase >::copy ( const MLint  num,
ComponentType *const   arr 
) const [inline]

Copy the first num elements from internal array into arr starting with array[0] to arr[0] to array[num-1] to arr[num-1], respectively.

All other components are left unchanged. arr must have at least num entries and at most NumberOfDimensions elements are copied.

Definition at line 683 of file mlIntegerVector.h.

References ML_CATCH_RETHROW, ML_CHECK_THROW, ML_TRACE_IN, ML_TRY, and ml::TVector< TVectorBase >::NumberOfDimensions.

template<class TVectorBase>
TVector< TVectorBase > ml::TVector< TVectorBase >::divCeil ( const TVector< TVectorBase > &  a,
const TVector< TVectorBase > &  b 
) [inline, static]

Static version: Return the componentwise division of the vector a by vector b with rounding up.

Division by zero caused by zero components of b must be avoided by caller.

Definition at line 755 of file mlIntegerVector.h.

References ML_CATCH_RETHROW, ML_CHECK_THROW, ML_TRACE_IN_TIME_CRITICAL, ML_TRY, and ml::TVector< TVectorBase >::NumberOfDimensions.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::divCeil ( const TVector< TVectorBase > &  b  )  const [inline]

Return the componentwise division of the vector this by vector b with rounding up.

Division by zero caused by zero components of b must be avoided by caller.

Definition at line 543 of file mlIntegerVector.h.

template<class TVectorBase>
static ComponentType ml::TVector< TVectorBase >::dot ( const TVector< TVectorBase > &  a,
const TVector< TVectorBase > &  b 
) [inline, static]

Static version: Return scalar product of vectors a and b without check for integer overflow.

Definition at line 594 of file mlIntegerVector.h.

template<class TVectorBase>
ComponentType ml::TVector< TVectorBase >::dot ( const TVector< TVectorBase > &  b  )  const [inline]

Return scalar product of vectors this and b. There is no check for integer overflow.

Definition at line 560 of file mlIntegerVector.h.

template<class TVectorBase>
void ml::TVector< TVectorBase >::fillEqualComps ( const ComponentType  threshold = 0,
const ComponentType  fillVal = 0 
) [inline]

Set components which are equal to threshold to fillVal.

Definition at line 617 of file mlIntegerVector.h.

template<class TVectorBase>
void ml::TVector< TVectorBase >::fillGreaterComps ( const ComponentType  threshold = 0,
const ComponentType  fillVal = 0 
) [inline]

Set components which are greater than threshold to fillVal.

Definition at line 610 of file mlIntegerVector.h.

template<class TVectorBase>
void ml::TVector< TVectorBase >::fillSmallerComps ( const ComponentType  threshold = 0,
const ComponentType  fillVal = 0 
) [inline]

Set components which are smaller than threshold to fillVal.

Definition at line 603 of file mlIntegerVector.h.

template<class TVectorBase >
MLint ml::TVector< TVectorBase >::getExtDimension (  )  const [inline]

Returns the index to the highest vector component which is not 1 which is useful to get the real dimensional extent of an image.

Definition at line 738 of file mlIntegerVector.h.

References ML_TRACE_IN_TIME_CRITICAL, and ml::TVector< TVectorBase >::NumberOfDimensions.

template<class TVectorBase>
ComponentType ml::TVector< TVectorBase >::getMax (  )  const [inline]

Return maximum component value.

Definition at line 475 of file mlIntegerVector.h.

template<class TVectorBase>
MLint ml::TVector< TVectorBase >::getMaxIdx (  )  const [inline]

Searches the maximum component and returns the index of its first occurrence.

Definition at line 463 of file mlIntegerVector.h.

template<class TVectorBase>
ComponentType ml::TVector< TVectorBase >::getMin (  )  const [inline]

Return minimum component value.

Definition at line 494 of file mlIntegerVector.h.

template<class TVectorBase>
MLint ml::TVector< TVectorBase >::getMinIdx (  )  const [inline]

Searches the minimum component and returns the index of its first occurrence.

Definition at line 482 of file mlIntegerVector.h.

template<class TVectorBase >
TVector< TVectorBase > ml::TVector< TVectorBase >::getStrides ( const ComponentType  offset = 1  )  const [inline]

Interprets the vector as image extension and returns a stride vector.

The smallest stride (the x stride) is set to offset, i.e. an image voxel is assumed to have size = offset. So stride[0] = offset, stride[1] = offset*array[0], stride[2] = offset*array[0]*array[1], ..., etc.

Definition at line 700 of file mlIntegerVector.h.

References ML_TRACE_IN_TIME_CRITICAL, and ml::TVector< TVectorBase >::NumberOfDimensions.

Referenced by ml::TSubImage< DATATYPE >::copySubImageReorderColorPlanesToInterleaved().

template<class TVectorBase >
TVector< TVectorBase > ml::TVector< TVectorBase >::getVectorPosition ( ComponentType  offsetPos  )  const [inline]

Interprets the vector as a stride vector of an image and returns the offset position offsetPos from the image origin to the coordinate specified by the vector.

For offsetPos, an image with extents given by *this and the return value rv then holds:

 offsetPos = rv.array[0]*array[0] + rv.array[1]*array[1] + ... + rv.array[NumberOfDimensions-1]*array[NumberOfDimensions-1] 
)

Definition at line 715 of file mlIntegerVector.h.

References ML_CATCH_RETHROW, ML_CHECK_THROW, ML_TRACE_IN_TIME_CRITICAL, ML_TRY, and ml::TVector< TVectorBase >::NumberOfDimensions.

Referenced by ml::TSubImage< DATATYPE >::convertPointerToSubImagePosition().

template<class TVectorBase>
bool ml::TVector< TVectorBase >::hasNegativeComp (  )  const [inline]

Returns true if any component is negative, otherwise false.

Definition at line 519 of file mlIntegerVector.h.

template<class TVectorBase>
bool ml::TVector< TVectorBase >::operator!= ( const TVector< TVectorBase > &  b  )  const [inline]

Inequality operator: Returns true if any component differs from its corresponding component of b, otherwise false.

Definition at line 292 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::operator& ( const ComponentType  b  )  const [inline]

Binary "And" of all components with an integer.

Definition at line 373 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::operator& ( const TVector< TVectorBase > &  b  )  const [inline]

Binary "And" of all components with the corresponding components of another Vector.

Definition at line 332 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase>& ml::TVector< TVectorBase >::operator&= ( const ComponentType  b  )  [inline]

Binary "And" of all components with an integer.

Definition at line 392 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase>& ml::TVector< TVectorBase >::operator&= ( const TVector< TVectorBase > &  b  )  [inline]

Binary "And" of all components with the corresponding components of another Vector.

Definition at line 351 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::operator* ( const ComponentType  b  )  const [inline]

Multiply all components with scalar b.

Definition at line 254 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::operator* ( const TVector< TVectorBase > &  b  )  const [inline]

Calculates and returns the multiplication of each component of this with its corresponding component from b.

Definition at line 225 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase>& ml::TVector< TVectorBase >::operator*= ( const TVector< TVectorBase > &  b  )  [inline]

Multiply each component with its corresponding components from b.

Definition at line 231 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::operator+ ( const ComponentType  b  )  const [inline]

Calculate and return addition of each component of *this with scalar b.

Definition at line 238 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::operator+ ( const TVector< TVectorBase > &  b  )  const [inline]

To each component add the corresponding component from b.

Definition at line 199 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase>& ml::TVector< TVectorBase >::operator+= ( const TVector< TVectorBase > &  b  )  [inline]

To each component add the corresponding component from b.

Definition at line 205 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::operator- (  )  const [inline]

Unary "-" on each vector component.

Definition at line 442 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::operator- ( const ComponentType  b  )  const [inline]

Subtract the scalar b from all components.

Definition at line 246 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::operator- ( const TVector< TVectorBase > &  b  )  const [inline]

Calculates and returns *this-b.

Definition at line 212 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase>& ml::TVector< TVectorBase >::operator-= ( const TVector< TVectorBase > &  b  )  [inline]

From each component subtract the corresponding component from b.

Definition at line 218 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::operator/ ( const TVector< TVectorBase > &  b  )  const [inline]

Calculate and return the division of each component of *this by its corresponding component from b.

Definition at line 262 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase>& ml::TVector< TVectorBase >::operator/= ( const TVector< TVectorBase > &  b  )  [inline]

Divide each component by its corresponding component from b.

Definition at line 268 of file mlIntegerVector.h.

template<class TVectorBase>
bool ml::TVector< TVectorBase >::operator< ( const TVector< TVectorBase > &  b  )  const [inline]

"Smaller" comparison operator, return true if relation is valid for all components.

Definition at line 299 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::operator<< ( const int  b  )  const [inline]

"<<" on each vector component.

Definition at line 420 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase>& ml::TVector< TVectorBase >::operator<<= ( const int  b  )  [inline]

"<<=" on each vector component.

Definition at line 434 of file mlIntegerVector.h.

template<class TVectorBase>
bool ml::TVector< TVectorBase >::operator<= ( const TVector< TVectorBase > &  b  )  const [inline]

"Smaller Or Equal" comparison operator, return true if relation is valid for all components.

Definition at line 307 of file mlIntegerVector.h.

template<class TVectorBase>
bool ml::TVector< TVectorBase >::operator== ( const TVector< TVectorBase > &  b  )  const [inline]

Equality operator: Returns true if each component of a is equal to its corresponding component of b, otherwise false.

Definition at line 283 of file mlIntegerVector.h.

template<class TVectorBase>
bool ml::TVector< TVectorBase >::operator> ( const TVector< TVectorBase > &  b  )  const [inline]

"Bigger" comparison operator, return true if relation is valid for all components.

Definition at line 315 of file mlIntegerVector.h.

template<class TVectorBase>
bool ml::TVector< TVectorBase >::operator>= ( const TVector< TVectorBase > &  b  )  const [inline]

"Bigger or Equal" comparison operator, return true if relation is valid for all components.

Definition at line 323 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::operator>> ( const int  b  )  const [inline]

">>" on each vector component.

Definition at line 414 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase>& ml::TVector< TVectorBase >::operator>>= ( const int  b  )  [inline]

">>=" on each vector component.

Definition at line 427 of file mlIntegerVector.h.

template<class TVectorBase>
ComponentType& ml::TVector< TVectorBase >::operator[] ( const size_t  i  )  [inline]

Indexing operator permits read and write access to array[0], .

.., array[NumberOfDimensions-1] via indexes 0,1, ..., NumberOfDimensions-1, respectively. The caller must guarantee that i is within [0,...,NumberOfDimensions-1].

Definition at line 460 of file mlIntegerVector.h.

template<class TVectorBase>
ComponentType ml::TVector< TVectorBase >::operator[] ( const size_t  i  )  const [inline]

Constant indexing operator permits read access to array[0], .

.., array[NumberOfDimensions-1] via indexes 0,1, ..., NumberOfDimensions-1, respectively. The caller must guarantee that i is within [0,...,NumberOfDimensions-1].

Definition at line 454 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::operator^ ( const ComponentType  b  )  const [inline]

Binary "Xor" of all components with an integer.

Definition at line 385 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::operator^ ( const TVector< TVectorBase > &  b  )  const [inline]

Binary "Xor" of all components with the corresponding components of another Vector.

Definition at line 344 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase>& ml::TVector< TVectorBase >::operator^= ( const ComponentType  b  )  [inline]

Binary "Xor" of all components with an integer.

Definition at line 406 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase>& ml::TVector< TVectorBase >::operator^= ( const TVector< TVectorBase > &  b  )  [inline]

Binary "Xor" of all components with the corresponding components of another Vector.

Definition at line 365 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::operator| ( const ComponentType  b  )  const [inline]

Binary "Or" of all components with an integer.

Definition at line 379 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase> ml::TVector< TVectorBase >::operator| ( const TVector< TVectorBase > &  b  )  const [inline]

Binary "Or" of all components with the corresponding components of another Vector.

Definition at line 338 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase>& ml::TVector< TVectorBase >::operator|= ( const ComponentType  b  )  [inline]

Binary "Or" of all components with an integer.

Definition at line 399 of file mlIntegerVector.h.

template<class TVectorBase>
TVector<TVectorBase>& ml::TVector< TVectorBase >::operator|= ( const TVector< TVectorBase > &  b  )  [inline]

Binary "Or" of all components with the corresponding components of another Vector.

Definition at line 358 of file mlIntegerVector.h.

template<class TVectorBase >
std::string ml::TVector< TVectorBase >::print ( const std::string &  openStr = "",
const std::string &  sepStr = " ",
const std::string &  termStr = "",
const MLint16  numDigits = -1 
) const [inline]

Returns the string openStr + v.array[0] + sepStr + .

.. + v.array[NumberOfDimensions-2] + sepStr + v.array[NumberOfDimensions-1] + termStr. numDigits is the number of digits to be used as print parameter. If numDigits is <=0 then no space specification is used.

Definition at line 836 of file mlIntegerVector.h.

References ML_CATCH_RETHROW, ML_TRACE_IN, ML_TRY, MLsnprintf, and ml::TVector< TVectorBase >::NumberOfDimensions.

template<class TVectorBase>
void ml::TVector< TVectorBase >::set ( const TVector< TVectorBase > &  v  )  [inline]

Like assignment operator.

Definition at line 185 of file mlIntegerVector.h.

template<class TVectorBase>
void ml::TVector< TVectorBase >::set ( const ComponentType  v = 0  )  [inline]

Set all components to v or - if v is not specified - to 0.

Reimplemented in ml::TImageVector< CompIntType >, ml::TImageVector< intT >, and ml::TImageVector< MLint >.

Definition at line 178 of file mlIntegerVector.h.


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

Generated on Sat Sep 3 18:39:37 2011 for MeVisLab Toolbox Reference by  doxygen 1.5.8