AdvancedMathematics 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()
-
- o
GetCoords()
- Returns the limitations of this CATMathIntervalND in an array.
- o
GetDimension()
-
- 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 | 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 | iN, |
| const | 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 | iDomainToCopy) |
-
Copy constructor.
o ~CATMathIntervalND
public virtual ~CATMathIntervalND( | ) |
-
Destructor.
Methods
o Center
-
Returns the center point of this CATMathIntervalND.
- Parameters:
-
- oCenter
- The array (already allocated) of the coordinates of the interval center.
o ContainsPoint
public virtual ContainsPoint( | const | iPoint) |
-
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 ContainsPoint( | const | iPoint, |
| const | iTol) |
-
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
-
o GetCoords
-
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
-
o GetDimension
-
Returns the dimension of this CATMathIntervalND.
- Returns:
- The dimension.
o GetInterval
public GetInterval( | const | iCoordIndex) |
-
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 GetMax( | const | iCoordIndex) |
-
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 GetMin( | const | iCoordIndex) |
-
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 Intersection( | const | iFirstPoint, |
| const | iSecondPoint, |
| | oWeight, |
| | oPosition) |
-
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
-
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 MinSquareDistance( | const | iPointToProject, |
| | ioSolution) |
-
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 SetCoords( | const | 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 SetInterval( | const | iCoordIndex, |
| const | 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 SetMax( | const | iCoordIndex, |
| const | 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 SetMin( | const | iCoordIndex, |
| const | 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
-
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 operator =( | const | iToAffect) |
-
Assignement operator.
This object is included in the file: CATMathIntervalND.h
If needed, your Imakefile.mk should include the module: CATAdvancedMathematics
Copyright © 1999-2014, Dassault Systèmes. All rights reserved.