IGLib  1.7.2
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Num.BoundingBox1d Class Reference

An 1D bounding box. More...

+ Inheritance diagram for IG.Num.BoundingBox1d:
+ Collaboration diagram for IG.Num.BoundingBox1d:

Public Member Functions

 BoundingBox1d ()
 Creates an 1D bounding box with unspecified bounds; minimal co-ordinate components equal to BoundingBoxBase.UndefinedMin and maximal co-ordinate components equal do BoundingBoxBase.UndefinedMax. More...
 
 BoundingBox1d (double minX, double maxX)
 Creates an 1D bounding box with the specified bounds. More...
 
 BoundingBox1d (IVector coordinates)
 Creates a bounding box and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified vector. More...
 
 BoundingBox1d (IVector min, IVector max)
 Creates a bounding box of the specified dimension and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified vectors. More...
 
 BoundingBox1d (IBoundingBox bounds)
 Constructs a 1D bounding box of the specified dimension and initializes it in such a way that its bounds correspond to those of the specified bounding box. More...
 
 BoundingBox1d (double[] coordinates)
 Creates a bounding box and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified array. More...
 
 BoundingBox1d (double[] min, double[] max)
 Creates a bounding box and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified arrays. More...
 
- Public Member Functions inherited from IG.Num.BoundingBoxBase
 BoundingBoxBase (int dimension)
 Creates a bounding box of the specified dimension and initializes it in such a way that minimal co-ordinate components equal to BoundingBoxBase.UndefinedMin and maximal co-ordinate components equal do BoundingBoxBase.UndefinedMax. More...
 
 BoundingBoxBase (IVector coordinates)
 Creates a bounding box and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified vector. More...
 
 BoundingBoxBase (IVector min, IVector max)
 Constructs a bounding box of the specified dimension and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified vectors. More...
 
 BoundingBoxBase (IBoundingBox bounds)
 Constructs a bounding box of the specified dimension and initializes it in such a way that its bounds correspond to those of the specified bounding box. More...
 
 BoundingBoxBase (double[] coordinates)
 Creates a bounding box and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified array. More...
 
 BoundingBoxBase (double[] min, double[] max)
 Creates a bounding box and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified arrays. More...
 
void SetDimensionAndReset (int newDimension)
 Changes dimension of the current bounding box to the specified dimension and resets the bounding box. Existent bounds information is lost. More...
 
void Reset ()
 Resets all components of vector of minimal coordinates to BoundingBoxBase.UndefinedMin, and all components of vector of maximal coordinates to BoundingBoxBase.UndefinedMax. More...
 
void Reset (int componentIndex)
 Resets the specified component of vector of minimal coordinates to UndefinedMin, and the same component of vector of maximal coordinates to UndefinedMax. More...
 
void ResetMin (int componentIndex)
 Resets the specified minimal coordinate value to UndefinedMin. More...
 
void ResetMax (int componentIndex)
 Resets the specified maximal coordinate value to UndefinedMax. More...
 
bool LiesOutside (IVector coordinates)
 Returns true if the speciifed co-ordinates lie outside of the bounding box, and false otherwise. More...
 
bool LiesOutside (params double[] coordinates)
 Returns true if the speciifed co-ordinates lie outside of the bounding box, and false otherwise. If the specified coordinates are null then false is returned. More...
 
bool LiesOutside (int componentIndex, double coordinate)
 Returns true of the specified co-ordinate lies outside of the bounding box, and false otherwise. More...
 
bool LiesOutside (IBoundingBox bounds)
 Returns true if the specified bounding box lise outside of the current bounding box, and false otherwise. If the specified bounding box is null then false is returned. More...
 
void Update (IVector coordinates)
 Updates the bounding box in such a way that the specified vector fits in it. If the specified vector is null then this method has no effect. More...
 
void Update (params IVector[] points)
 Updates the bounding box in such a way that all specified vectors fit in it. More...
 
void Update (params double[] coordinates)
 Updates the bounding box in such a way that a vector with the specified co-ordinates fits in it. More...
 
void Update (int componentIndex, double coordinate)
 Updates the bounding box in such a way that the specified value of the specified co-ordinate component (defined by co-ordinate index) fits in it. More...
 
void Update (int componentIndex, params double[] coordinates)
 Updates the bounding box in such a way that all specified values of the specified co-ordinate component fit in it. More...
 
void Update (IBoundingBox bounds)
 Updates the bounding box in such a way that the specified other bounding box fits in it. If the specified bounding box is null then this method has no effect. More...
 
void UpdateAll (params double[] coordinates)
 Updates the current bounding box in such a way that in all components, all specified coordinates fit in it. This is for example useful to define a hypercube (equal minimum and maximum in all components), in this case just minimal and maximal bounds are specified as arguments. More...
 
void Shrink (IBoundingBox outerBounds)
 Reduces (if necessary) the current bounding box in such a way that the specified bounding box contains it. More...
 
void Shrink (int which, double minBound, double maxBound)
 Reduces (if necessary) the current bounding box in such a way that the specified component falls within the interval specified by the lower and upper bound. More...
 
void ExpandOrShrinkInterval (int componentIndex, double factor)
 Symmetrically expands or shrinks the interval between the bounds for the specified component for the specified factor. More...
 
void ExpandOrShrinkInterval (double factor)
 Symmetrically expands or shrinks the intervals between the bounds for all components for the specified factor. Factors greater than 1 mean expansion, factors lesser than 1 mean shrinkage, and fators lesser than 0 are invalid. More...
 
void ExpandOrShrinkInterval (double factor, double zeroIntervalLengthReplacemnt)
 Symmetrically expands or shrinks the intervals between the bounds for all components for the specified factor, and takes care that minimal interval lengths are not 0. Factors greater than 1 mean expansion, factors lesser than 1 mean shrinkage, and fators lesser than 0 are invalid. Remark: components where minimal bound is set above maximal are not treated specially. More...
 
void SetMin (int componentIndex, double min)
 Sets minimal value for the specified coponent of the bounding box. More...
 
void SetMax (int componentIndex, double max)
 Sets maximal value for the specified coponent of the bounding box. More...
 
void SetBounds (int componentIndex, double min, double max)
 Sets minimal and maximal value for the specified coponent of the bounding box. More...
 
double GetMin (int componentIndex)
 Returns the lower bound on the specified co-ordinate component of the bounding box. More...
 
double GetMax (int componentIndex)
 Returns the upper bound on the specified co-ordinate component of the bounding box. More...
 
void GetMin (ref IVector min)
 Gets the vector of lower bounds on co-ordinates of the current bounding box and stores it in the specified object. More...
 
void GetMax (ref IVector max)
 Gets the vector of upper bounds on co-ordinates of the current bounding box and stores it in the specified object. More...
 
double GetIntervalLength (int componentIndex)
 Returns interval length for the specified co-ordinate component (i.e. difference between the upper and lower bound), or 0 if either lower or upper bound is not defined for this component. More...
 
void GetIntervalLengths (ref IVector intervals)
 Gets the interval lengths for co-ordinates of the current bounding box (i.e. differences) and stores them in the specified vector object. More...
 
void GetRelativeCoordinates (IVector absoluteCoordinates, ref IVector relativeCoordinates)
 Calculates relative coordinates, with respect to the current bounding box, that correspond to the specified absolute (or physical or actual) coordinates. More...
 
void GetAbsoluteCoordinates (IVector relativeCoordinates, ref IVector absoluteCoordinates)
 Calculates absolute (physical) coordinates, with respect to the current bounding box, that correspond to the specified relative coordinates. More...
 
bool IsMinDefined (int componentIndex)
 Returns true if maximum value is defined for the specified component, false otherwise. More...
 
bool IsMaxDefined (int componentIndex)
 Returns true if maximum value is defined for the specified component, false otherwise. More...
 
override string ToString ()
 
void GetRandomPoint (ref IVector point)
 Creates a random point contained in the current bounding box by using the global random number generator, and stores that point into the specified vector. The random point is generated according to a uniform distribution within the bounding box. More...
 
void GetRandomPoint (ref IVector point, IRandomGenerator rand)
 Creates a random point contained in the current bounding box by using the specified random number generator, and stores that point into the specified vector. The random point is generated according to a uniform distribution within the bounding box. More...
 
void Copy (IBoundingBox original, IBoundingBox copy)
 Copies state of the specified bounding box to anotherv(target) bounding box. More...
 

Protected Member Functions

override IVector CreateVector (int dim)
 Creates and returns a new vector that is consistent with the definition of bounding box. More...
 
- Protected Member Functions inherited from IG.Num.BoundingBoxBase
void ResetMin ()
 Sets all components of vector of minimal coordinates to UndefinedMin. More...
 
void ResetMax ()
 Sets all components of vector of maximal coordinates to UndefinedMax. More...
 

Properties

double MinX [get]
 Gets the lower bound in the first coordinate. More...
 
double MaxX [get]
 Gets the upper bound in the first coordinate. More...
 
double MinValue [get]
 Gets the lower bound in the first coordinate. More...
 
double MaxValue [get]
 Gets the upper bound in the first coordinate. More...
 
- Properties inherited from IG.Num.BoundingBoxBase
IVector MinAuxiliary [get, set]
 Auxiliary property, gets or sets vector of minimal co-ordinates. More...
 
IVector MaxAuxiliary [get, set]
 Auxiliary property, gets or sets vector of maximal co-ordinates. More...
 
int Dimension [get, protected set]
 Gets dimension of the bounding box space. More...
 
virtual IVector Min [get, set]
 Gets or sets the vector of minimal co-ordinates of the bounding box. More...
 
virtual IVector Max [get, set]
 Gets or sets the vector of maximal co-ordinates of the bounding box. More...
 
- Properties inherited from IG.Num.IBoundingBox
int Dimension [get]
 Gets dimension of the bounding box space. More...
 
IVector Min [get, set]
 Gets or sets the vector of minimal co-ordinates of the bounding box. More...
 
IVector Max [get, set]
 Gets or sets the vector of maximal co-ordinates of the bounding box. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IG.Num.BoundingBoxBase
static BoundingBox Create (int dimension, double min, double max)
 Creates and returns a bounding box with specified dimension and minimum and maximum bounds equal in all components. More...
 
static BoundingBox Create (params IVector[] points)
 Creates and returns a minimal bounding box that contains all the specified points. More...
 
static double Map (IBoundingBox original, IBoundingBox target, int whichComponent, double value)
 Mapping from one bounding box to another. Returns a single component mapped by a mapping that maps the original to the target bounding box. If one of the bounding boxes is not specified then the performed mapping is identity mapping and does not change the value. More...
 
static void Map (IBoundingBox original, IBoundingBox target, IVector value, ref IVector result)
 Mapping from one bounding box to another. Maps a vector from the original to the target space. Mapped vector is stored to a specified vector. If one of the bounding boxes is not specified then the performed mapping is identity mapping and does not change the value. More...
 
- Protected Attributes inherited from IG.Num.BoundingBoxBase
const double UndefinedMin = double.MinValue
 
const double UndefinedMax = double.MaxValue
 

Detailed Description

An 1D bounding box.

Constructor & Destructor Documentation

IG.Num.BoundingBox1d.BoundingBox1d ( )
inline

Creates an 1D bounding box with unspecified bounds; minimal co-ordinate components equal to BoundingBoxBase.UndefinedMin and maximal co-ordinate components equal do BoundingBoxBase.UndefinedMax.

IG.Num.BoundingBox1d.BoundingBox1d ( double  minX,
double  maxX 
)
inline

Creates an 1D bounding box with the specified bounds.

Parameters
minXLower bound in the first coordinate.
maxXUpper bound in the first coordinate.
IG.Num.BoundingBox1d.BoundingBox1d ( IVector  coordinates)
inline

Creates a bounding box and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified vector.

Parameters
coordinatesVector of coordinates to which minimal and maximal co-ordines of the bounding box are set.
IG.Num.BoundingBox1d.BoundingBox1d ( IVector  min,
IVector  max 
)
inline

Creates a bounding box of the specified dimension and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified vectors.

Parameters
minVector of minimal coordinates.
maxVector of macimal coordinates.
IG.Num.BoundingBox1d.BoundingBox1d ( IBoundingBox  bounds)
inline

Constructs a 1D bounding box of the specified dimension and initializes it in such a way that its bounds correspond to those of the specified bounding box.

The specified bounding box must be different than null, otherwise exception is thrown.

Parameters
boundsBounds with which the constructed bounding box is initialized.
IG.Num.BoundingBox1d.BoundingBox1d ( double[]  coordinates)
inline

Creates a bounding box and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified array.

Parameters
coordinatesArray of coordinates to which minimal and maximal co-ordines of the bounding box are set.
IG.Num.BoundingBox1d.BoundingBox1d ( double[]  min,
double[]  max 
)
inline

Creates a bounding box and initializes it in such a way that minimal and maximal co-ordinate components equal to components of the spacified arrays.

Parameters
minArray of components to which minimal co-ordines of the bounding box are set.
maxArray of components to which maximal co-ordines of the bounding box are set.

Member Function Documentation

override IVector IG.Num.BoundingBox1d.CreateVector ( int  dim)
inlineprotectedvirtual

Creates and returns a new vector that is consistent with the definition of bounding box.

Parameters
dimDimension of vector space.

Implements IG.Num.BoundingBoxBase.

Property Documentation

double IG.Num.BoundingBox1d.MinX
get

Gets the lower bound in the first coordinate.

Referenced by IG.Gr3d.VtkPlotBase.ExamplePlotterDecoration().

double IG.Num.BoundingBox1d.MaxX
get

Gets the upper bound in the first coordinate.

Referenced by IG.Gr3d.VtkPlotBase.ExamplePlotterDecoration().

double IG.Num.BoundingBox1d.MinValue
get

Gets the lower bound in the first coordinate.

double IG.Num.BoundingBox1d.MaxValue
get

Gets the upper bound in the first coordinate.


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