ibex::Dim Struct Reference

Dimensions (of an entity). More...

#include <IbexDomain.h>

List of all members.

Public Member Functions

 Dim (int dim1, int dim2, int dim3)
int size1 () const
int size2 () const
int size3 () const
int size () const
bool scalar () const
bool operator== (const Dim &d) const

Public Attributes

int dim1
int dim2
int dim3


Detailed Description

Dimensions (of an entity).

All entities are considered here as 3-dimensionnal vectors, except that the "value" of a dimension can be 0. The "value" of the ith dimension means the number of valid symbols obtained by indexing in this dimension. The values of the three dimensions are represented by the fields dim1, dim2 and dim3. If x is scalar, dim1=0, dim2=0, dim3=0. Indeed, x[1] is not a valid symbol. If x is a vector of 2 components, dim1=0, dim2=0, dim3=2 (because x[1] and x[2] are valid symbols but not x[1][1]). If x is a 2x3 matrix, dim1=0, dim2=2, dim3=3, etc.

The "size" of a dimension represents the number of elements in the dimension (this time seen as an array). The size is simply equal to the "value" if it is greater than 0, and 1 otherwise.

Hence, a vector with a single component is distinguished from a scalar: the field dim3 is 1 and 0 respectively. But, in both cases, size3() returns 1.


Constructor & Destructor Documentation

ibex::Dim::Dim ( int  dim1,
int  dim2,
int  dim3 
) [inline]

Build the three-dimensional structure.


Member Function Documentation

int ibex::Dim::size1 (  )  const [inline]

Return the size of the first dimension.

int ibex::Dim::size2 (  )  const [inline]

Return the size of the second dimension.

int ibex::Dim::size3 (  )  const [inline]

Return the size of the third dimension.

int ibex::Dim::size (  )  const [inline]

Return the total number of components

bool ibex::Dim::scalar (  )  const [inline]

True if this is a scalar

bool ibex::Dim::operator== ( const Dim d  )  const [inline]

True if the three dimensions match


Member Data Documentation

The number of i such that x[i][1][1] is a valid symbol.

The number of i such that x[1][i][1] or x[i][1] is a valid scalar symbol.

The number of i such that x[1][1][i] or x[1][i] or x[i] is a valid scalar symbol.


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

Generated on Sun Jun 27 15:52:00 2010 for IBEX by  doxygen 1.5.5