All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

AdvancedMathematics Class CATMathIntervalND

Mathematics.CATCGMVirtual
  |
  +---CATMathIntervalND
 

Usage: you must use this class as is. You should never derive it.


public class CATMathIntervalND

Class representing a closed bounded interval of R^N.

A CATMathIntervalND is the set of the points whose each coordinate x_i ,i=0,..,N-1 is lying between two real bounds Low_i and High_i: Low_i <= x_i <= High_i. If there exists one coordinate for which Low_i > High_i, the interval is empty.


Constructor and Destructor Index


o CATMathIntervalND()
Constructs a CATMathIntervalND of dimension N=0, only containing 0.
o CATMathIntervalND(CATLONG32)
Allocates a CATMathInterval of a given dimension.
o CATMathIntervalND(CATLONG32,double*)
Constructs a CATMathIntervalND of a given dimension from the array of the boundaries of each coordinates.
o CATMathIntervalND(CATMathIntervalND&)
Copy constructor.
o ~CATMathIntervalND()
Destructor.

Method Index


o Center(double*)
Returns the center point of this CATMathIntervalND.
o ContainsPoint(double*)
Tests whether this CATMathIntervalND contains a given point (of dimension N).
o ContainsPoint(double*,double&)
Tests whether a point is inside this CATMathIntervalND at a given tolerance.
o GetCoords()
Returns the limitations of this CATMathIntervalND in an array.
o GetDimension()
Returns the dimension of this CATMathIntervalND.
o GetInterval(CATLONG32)
Returns the CATMathInterval associated with a coordinate of this CATMathIntervalND.
o GetMax(CATLONG32)
Returns the high limitation of a coordinate of this CATMathIntervalND.
o GetMin(CATLONG32)
Returns the low limitation of a coordinate of this CATMathIntervalND.
o Intersection(double*,double*,double&,CATLONG32&)
Intersects this CATMathIntervalND with a segment.
o IsEmpty()
Tests whether this CATMathIntervalND is empty.
o MinSquareDistance(double*,double*)
Projects a given point onto this CATMathIntervalND.
o SetCoords(double*)
Sets the limitations of this CATMathIntervalND with an array.
o SetInterval(CATLONG32,CATMathInterval&)
Modifies the limitations associated with a coordinate of this CATMathIntervalND.
o SetMax(CATLONG32,double)
Modifies the high limitation of a coordinate of this CATMathIntervalND.
o SetMin(CATLONG32,double)
Modifies the low limitation of a coordinate of this CATMathIntervalND.
o Width()
Returns the sum of the interval width of each coordinate of this CATMathIntervalND.
o operator =(CATMathIntervalND&)
Assignement operator.

Constructor and Destructor


o CATMathIntervalND
public CATMathIntervalND()
Constructs a CATMathIntervalND of dimension N=0, only containing 0.
o CATMathIntervalND
public CATMathIntervalND( const CATLONG32 iN)
Allocates a CATMathInterval of a given dimension.
Note that this does not initialize the Low_i and High_i boundaries of each coordinates.
Parameters:
iN
The dimension of the interval.
o CATMathIntervalND
public CATMathIntervalND( const CATLONG32 iN,
const double* iMinMax)
Constructs a CATMathIntervalND of a given dimension from the array of the boundaries of each coordinates.
Parameters:
iN
The dimension of the interval.
iMinMax
The array [2,iN] of the boundaries.
The domain is then [iMinMax[0], iMinMax[1]] X ... X [iMinMax[2iN-2], iMinMax[2iN-1]]
o CATMathIntervalND
public CATMathIntervalND( const CATMathIntervalND& iDomainToCopy)
Copy constructor.
o ~CATMathIntervalND
public virtual ~CATMathIntervalND()
Destructor.

Methods


o Center
public void Center(double* ioCenter) const
Returns the center point of this CATMathIntervalND.
Parameters:
oCenter
The array (already allocated) of the coordinates of the interval center.
o ContainsPoint
public virtual CATBoolean ContainsPoint( const double* iPoint) const
Tests whether this CATMathIntervalND contains a given point (of dimension N).
Parameters:
iPoint
The array [N] of the coordinates of the point.
Returns:
The result of the test.
Legal values:
TRUE
if the point is inside the CATMathIntervalND.
FALSE
otherwise.
o ContainsPoint
public virtual CATBoolean ContainsPoint( const double* iPoint,
const double& iTol) const
Tests whether a point is inside this CATMathIntervalND at a given tolerance.
Parameters:
iPoint
The array [N] of the coordinates of the point.
Returns:
The result of the test.
Legal values:
TRUE
if the point is inside the CATMathIntervalND defined by iTol.
FALSE
otherwise.
o GetCoords
public const double * GetCoords()const
Returns the limitations of this CATMathIntervalND in an array.
Returns:
The array [2,N] of the limitations. The domain is then [iTab[0], iTab[1]] X ... X [iTab[2N-2], iTab[2N-1]].
As part of the class, the array must not be deleted.
o GetDimension
public CATLONG32 GetDimension()const
Returns the dimension of this CATMathIntervalND.
Returns:
The dimension.
o GetInterval
public CATMathInterval GetInterval( const CATLONG32 iCoordIndex) const
Returns the CATMathInterval associated with a coordinate of this CATMathIntervalND.
Parameters:
iCoordIndex
The index (0 <= iCoordIndex < N) of the coordinate.
Returns:
The corresponding interval.
o GetMax
public double GetMax( const CATLONG32 iCoordIndex) const
Returns the high limitation of a coordinate of this CATMathIntervalND.
Parameters:
iCoordIndex
The index (0 <= iCoordIndex < N) of the coordinate.
Returns:
The high limitation of iCoordIndex.
o GetMin
public double GetMin( const CATLONG32 iCoordIndex) const
Returns the low limitation of a coordinate of this CATMathIntervalND.
Parameters:
iCoordIndex
The index (0 <= iCoordIndex < N) of the coordinate.
Returns:
The low limitation of iCoordIndex.
o Intersection
public virtual CATBoolean Intersection( const double* iFirstPoint,
const double* iSecondPoint,
double& oWeight,
CATLONG32& oPosition) const
Intersects this CATMathIntervalND with a segment.
Parameters:
iFirstPoint
The array of the coordinates of the first point.
iSecondPoint
The array of the coordinates of the second point.
oWeight
The intersection parameter on the segment [iFirstPoint,iSecondPoint].
IntersectionPoint = iFirstPoint + oWeight * (iSecondPoint - iFirstPoint) .
oPosition
2*i + d
i being the index of the first coordinate of IntersectionPoint such as
  • either IntersectionPoint_i=Low_i and then d = 0
  • or IntersectionPoint_i=High_i and then d = 1
Returns:
TRUE
if this contains iFirstPoint and does not contain iSecondPoint.
FALSE
otherwise.
o IsEmpty
public virtual CATBoolean IsEmpty()const
Tests whether this CATMathIntervalND is empty.
A CATMathIntervalND is empty if there exists one coordinate for which Low_i > High_i. Note that if Low_i = High_i, it does not make an empty interval.
Returns:
The result of the test.
Legal values:
TRUE
if the interval is empty.
FALSE
otherwise.
o MinSquareDistance
public virtual double MinSquareDistance( const double* iPointToProject,
double* ioSolution) const
Projects a given point onto this CATMathIntervalND.
Parameters:
iPointToProject
The array of the coordinates of the point to project.
oSolution
The array (already allocated) of coordinates of the point realizing the minimum distance between iPointToProject and this. If iPointToProject belongs to this, oSolution = iPointToProject. Otherwise, oSolution is on this boundaries.
Returns:
The square of the distance between oSolution and this.
o SetCoords
public void SetCoords( const double* iMinMax)
Sets the limitations of this CATMathIntervalND with an array.
Parameters:
iMinMax[2,N]
The array of the limitation.
The domain is then [iMinMax[0], iMinMax[1]] X ... X [iMinMax[2N-2], iMinMax[2N-1]]
o SetInterval
public void SetInterval( const CATLONG32 iCoordIndex,
const CATMathInterval& iNewLimit)
Modifies the limitations associated with a coordinate of this CATMathIntervalND.
Parameters:
iCoordIndex
The index (0 <= iCoordIndex < N) of the coordinate.
iNewLimit
The new corresponding interval.
o SetMax
public void SetMax( const CATLONG32 iCoordIndex,
const double iNewMax)
Modifies the high limitation of a coordinate of this CATMathIntervalND.
Parameters:
iCoordIndex
The index (0 <= iCoordIndex < N) of the coordinate.
iNewMax
The new high limitation of iCoordIndex.
o SetMin
public void SetMin( const CATLONG32 iCoordIndex,
const double iNewMin)
Modifies the low limitation of a coordinate of this CATMathIntervalND.
Parameters:
iCoordIndex
The index (0 <= iCoordIndex < N) of the coordinate.
iNewMin
The new low limitation of iCoordIndex.
o Width
public double Width()const
Returns the sum of the interval width of each coordinate of this CATMathIntervalND.
Returns:
The width: (High_1-Low_1) + ... + (High_N-Low_N).
o operator =
public CATMathIntervalND & operator =( const CATMathIntervalND& iToAffect)
Assignement operator.

This object is included in the file: CATMathIntervalND.h
If needed, your Imakefile.mk should include the module: CATAdvancedMathematics

Copyright © 2003, Dassault Systèmes. All rights reserved.