| IGLib 1.4 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files
- Directories

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Properties

# IG::Num::IBoundingBox Interface Reference

Bounding box, defines minimum and maximum co-ordinates of domains, geometric objects and their groups. More...

Inheritance diagram for IG::Num::IBoundingBox:
[legend]

List of all members.

## Public Member Functions
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.
void | Reset ()
| Resets all components of vector of minimal coordinates to BoundingBoxBase.UndefinedMin, and all components of vector of maximal coordinates to BoundingBoxBase.UndefinedMax. After this method is called, Update() called on any co-ordinate of the bounding box will set both bounds of that coordinate exactly to the value of coordinate passed as argument.
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. After this method is called, the first Update() called on this component will set the bounds exactly to value that is passed as argument.
void | ResetMin (int componentIndex)
| Resets the specified minimal coordinate value to UndefinedMin. After this method is called, the first update called on this coordinate component will set its lower bound exactly to the value that is passed as argument.
void | ResetMax (int componentIndex)
| Resets the specified maximal coordinate value to UndefinedMax. After this method is called, the first update called on this coordinate component will set its upper bound exactly to the value that is passed as argument.
bool | LiesOutside (IVector 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, if dimensions do not match then exception is thrown.
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.
bool | LiesOutside (int componentIndex, double coordinate)
| Returns true of the specified co-ordinate lies outside of the bounding box, and false otherwise.
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.
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.
void | Update (params IVector[] points)
| Updates the bounding box in such a way that all specified vectors fit in it. If any of the specified vector is null then this entry has no effect, and if the array is null then the method call has no effect.
void | Update (params double[] coordinates)
| Updates the bounding box in such a way that a vector with the specified co-ordinates fits in it. If the specified array of co-ordinate values is null then this method has no effect.Number of specified co-ordinates must match dimension of the bounding box.
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.
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. If the specified array of the coordinate values is null then this method has no effect.Update is performed for a particular coordinate of the bounding box, and all specified values are taken into account.
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.
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.
void | Shrink (IBoundingBox outerBounds)
| Reduces (if necessary) the current bounding box in such a way that the specified bounding box contains it. Minimal and maximal components of the current bounding box that don't fall in the specified bounding box are changed such that they lie just on the border of the bounding box, and others remain intact.
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.
void | ExpandOrShrinkInterval (int componentIndex, double factor)
| Symmetrically expands or shrinks the interval between the bounds for the specified component for the specified factor. Factors greater than 1 mean expansion, factors lesser than 1 mean shrinkage, and fators lesser than 0 are invalid.
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.
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.
void | SetMin (int componentIndex, double min)
| Sets minimal value for the specified coponent of the bounding box.
void | SetMax (int componentIndex, double max)
| Sets maximal value for the specified coponent of the bounding box.
void | SetBounds (int componentIndex, double min, double max)
| Sets minimal and maximal value for the specified coponent of the bounding box.
double | GetMin (int which)
| Returns the lower bound on the specified co-ordinate component of the bounding box. If lower bound is not defined for this component then double.MinValue is returned.
double | GetMax (int which)
| Returns the upper bound on the specified co-ordinate component of the bounding box. If upper bound is not defined for this component then double.MaxValue is returned.
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. Components for which lower bounds are not defined are set to double.MinValue.
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. Components for which upper bounds are not defined are set to double.MaxValue.
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.
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. Elements for which either upper or lower bounds are not defined are set to 0.
bool | IsMinDefined (int componentIndex)
| Returns true if maximum value is defined for the specified component, false otherwise.
bool | IsMaxDefined (int componentIndex)
| Returns true if maximum value is defined for the specified component, false otherwise.
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.
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.
## Properties
int | Dimension`[get]`
| Gets dimension of the bounding box space.
IVector | Min`[get, set]`
| Gets or sets the vector of minimal co-ordinates of the bounding box. Getter always creates and returns a new vector whose elements are minimal components of the bounding box.Setter copies components rather than vector reference (if the vector assigned is null then exception is thrown). When setting the vector, its dimension must match current dimension of the bounding box, otherwise exception is thrown.
IVector | Max`[get, set]`
| Gets or sets the vector of maximal co-ordinates of the bounding box. Getter always creates and returns a new vector whose elements are maximal components of the bounding box.Setter copies components rather than vector reference (if the vector assigned is null then exception is thrown). When setting the vector, its dimension must match current dimension of the bounding box, otherwise exception is thrown.

## Detailed Description

Bounding box, defines minimum and maximum co-ordinates of domains, geometric objects and their groups.

$A Igor Mar10 Nov10;

## Member Function Documentation

void IG::Num::IBoundingBox::SetDimensionAndReset | ( | int | newDimension | ) |

Changes dimension of the current bounding box to the specified dimension and resets the bounding box. Existent bounds information is lost.

Parameters:

  newDimension | New dimenson of the bounding box.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::Reset | ( |  | ) |

Resets all components of vector of minimal coordinates to BoundingBoxBase.UndefinedMin, and all components of vector of maximal coordinates to BoundingBoxBase.UndefinedMax. After this method is called, Update() called on any co-ordinate of the bounding box will set both bounds of that coordinate exactly to the value of coordinate passed as argument.

After reset, bounds on the reset coordinates become undefined.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::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. After this method is called, the first Update() called on this component will set the bounds exactly to value that is passed as argument.

After reset, bounds on the reset coordinates become undefined.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::ResetMin | ( | int | componentIndex | ) |

Resets the specified minimal coordinate value to UndefinedMin. After this method is called, the first update called on this coordinate component will set its lower bound exactly to the value that is passed as argument.

After reset, specific bounds on the reset coordinates become undefined.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::ResetMax | ( | int | componentIndex | ) |

Resets the specified maximal coordinate value to UndefinedMax. After this method is called, the first update called on this coordinate component will set its upper bound exactly to the value that is passed as argument.

After reset, specific bounds on the reset coordinates become undefined.

Implemented in IG::Num::BoundingBoxBase.

bool IG::Num::IBoundingBox::LiesOutside | ( | IVector | 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, if dimensions do not match then exception is thrown.

Parameters:

  coordinates | Coordinates that are tested for falling outside the bounding box.

Exceptions:

  ArgumentException | Throws exception when dimensions don't match.

Implemented in IG::Num::BoundingBoxBase.

bool IG::Num::IBoundingBox::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.

Parameters:

  coordinates | Coordinates that are tested for falling outside the bounding box.

Exceptions:

  ArgumentException | Throws exception when dimensions don't match.

Implemented in IG::Num::BoundingBoxBase.

bool IG::Num::IBoundingBox::LiesOutside | ( | int | componentIndex,
|  | double | coordinate
| ) |  |

Returns true of the specified co-ordinate lies outside of the bounding box, and false otherwise.

Parameters:

  componentIndex | Index of co-ordinate component that is tested for lying out of the bounding box.
  coordinate | Co-ordinate component that is tested for lying outside of the bounding box.

Implemented in IG::Num::BoundingBoxBase.

bool IG::Num::IBoundingBox::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.

Parameters:

  bounds | Bounding box that is tested for falling outside the current bounding box.

Exceptions:

  ArgumentException | Throws exception when dimensions don't match.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::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.

Parameters:

  coordinates | Vector that needs to fit into the bounding box after this call.

Exceptions:

  ArgumentException | Throws exception when dimensions don't match.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::Update | ( | params IVector[] | points | ) |

Updates the bounding box in such a way that all specified vectors fit in it. If any of the specified vector is null then this entry has no effect, and if the array is null then the method call has no effect.

Parameters:

  points | Vector of coordinates that need to fit into the bounding box after this call.

Exceptions:

  ArgumentException | Throws exception when dimensions don't match.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::Update | ( | params double[] | coordinates | ) |

Updates the bounding box in such a way that a vector with the specified co-ordinates fits in it. If the specified array of co-ordinate values is null then this method has no effect.Number of specified co-ordinates must match dimension of the bounding box.

Parameters:

  coordinates | Array of co/ordinate components of the vector to which the bounding box is adapted in such a way that the vector fits in the bounding box after the call.

Number of specified co-ordinates must match the dimension of the bounding box.

Exceptions:

  ArgumentException | Throws exception when dimensions don't match.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::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.

Parameters:

  componentIndex | Index of the co-ordinate component that is updated.
  coordinate | Co-ordinate value to which the bounding box is adapted in such a way that this co-ordinate value fits inside it.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::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. If the specified array of the coordinate values is null then this method has no effect.Update is performed for a particular coordinate of the bounding box, and all specified values are taken into account.

Parameters:

  componentIndex | Index of co-ordinate component in which the bounding box is updated.
  coordinates | Values of co-ordinate component to which the bounding box is adapted in such a way that these values fit inside it (in the specified co-ordinate direction).

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::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.

Parameters:

  bounds | Bounding box that needs to fit into bounding box after this call.

Exceptions:

  ArgumentException | Throws exception when dimensions don't match.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::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.

Parameters:

  coordinates | Co-ordinates to which the bounding box is adapted in all axis directions in such a way that the specified co-ordinates fit inside it.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::Shrink | ( | IBoundingBox | outerBounds | ) |

Reduces (if necessary) the current bounding box in such a way that the specified bounding box contains it. Minimal and maximal components of the current bounding box that don't fall in the specified bounding box are changed such that they lie just on the border of the bounding box, and others remain intact.

Parameters:

  outerBounds | Bounding box that specify the area within which the current bounding box must fit. Components that fall out of this bounding box are moved to the border of this bounding box (and the current bounding box shrinks because of this).

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::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.

Parameters:

  which | Index of the component along which the bounding box is reduced if nexessary.
  minBound | Lower bound on the interval that is admissible in the specified coordinate direction.
  maxBound | Upper bound on the interval that is admissible in the specified coordinate direction.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::ExpandOrShrinkInterval | ( | int | componentIndex,
|  | double | factor
| ) |  |

Symmetrically expands or shrinks the interval between the bounds for the specified component for the specified factor. Factors greater than 1 mean expansion, factors lesser than 1 mean shrinkage, and fators lesser than 0 are invalid.

Parameters:

  componentIndex | Component of the coordinate to be expanded or shrinked.
  factor | Factor by which the interval between bounds is expanded or shrinked. Factors greater than 1 mean expansion, factors less than 1 mean shrinkage, and factors less than 0 are invalid (ArgumentException thrown).

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::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.

Parameters:

  factor | Factor by which the interval between bounds is expanded or shrinked. Factors greater than 1 mean expansion, factors less than 1 mean shrinkage, and factors less than 0 are invalid (ArgumentException thrown).
  zeroIntervalLengthReplacemnt | Interval length that is taken for those components for which the current interval length equals 0 (i.e. lower bound equals upper bound).

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::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.

Parameters:

  factor | Factor by which the interval between bounds is expanded or shrinked. Factors greater than 1 mean expansion, factors less than 1 mean shrinkage, and factors less than 0 are invalid (ArgumentException thrown).

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::SetMin | ( | int | componentIndex,
|  | double | min
| ) |  |

Sets minimal value for the specified coponent of the bounding box.

Parameters:

  componentIndex | Component index.
  min | Minimal value of the component.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::SetMax | ( | int | componentIndex,
|  | double | max
| ) |  |

Sets maximal value for the specified coponent of the bounding box.

Parameters:

  componentIndex | Component index.
  max | Maximal value of the component.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::SetBounds | ( | int | componentIndex,
|  | double | min,
|  | double | max
| ) |  |

Sets minimal and maximal value for the specified coponent of the bounding box.

Parameters:

  componentIndex | Component index.
  min | Minimal value of the component.
  max | Maximal value of the component.

Implemented in IG::Num::BoundingBoxBase.

double IG::Num::IBoundingBox::GetMin | ( | int | which | ) |

Returns the lower bound on the specified co-ordinate component of the bounding box. If lower bound is not defined for this component then double.MinValue is returned.

Parameters:

  componentIndex | Component index.

Implemented in IG::Num::BoundingBoxBase.

double IG::Num::IBoundingBox::GetMax | ( | int | which | ) |

Returns the upper bound on the specified co-ordinate component of the bounding box. If upper bound is not defined for this component then double.MaxValue is returned.

Parameters:

  componentIndex | Component index.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::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. Components for which lower bounds are not defined are set to double.MinValue.

Parameters:

  min | Reference to a vector object where lower bounds (minimal co-ordinates) are stored.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::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. Components for which upper bounds are not defined are set to double.MaxValue.

Parameters:

  max | Reference to a vector object where upper bounds (maximal co-ordinates) are stored.

Implemented in IG::Num::BoundingBoxBase.

double IG::Num::IBoundingBox::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.

Parameters:

  componentIndex | Specifies the component for which interval length is returned.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::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. Elements for which either upper or lower bounds are not defined are set to 0.

Parameters:

  intervals | Reference to a vector object where interval lengths are stored.

Implemented in IG::Num::BoundingBoxBase.

bool IG::Num::IBoundingBox::IsMinDefined | ( | int | componentIndex | ) |

Returns true if maximum value is defined for the specified component, false otherwise.

Parameters:

  componentIndex | Index of component that is queried.

Implemented in IG::Num::BoundingBoxBase.

bool IG::Num::IBoundingBox::IsMaxDefined | ( | int | componentIndex | ) |

Returns true if maximum value is defined for the specified component, false otherwise.

Parameters:

  componentIndex | Index of component that is queried.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::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.

Parameters:

  point | Vector where generated random point is stored.
  rand | Random number generator used for generation of the random point.

Implemented in IG::Num::BoundingBoxBase.

void IG::Num::IBoundingBox::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.

Parameters:

  point | Vector where generated random point is stored.

Implemented in IG::Num::BoundingBoxBase.

## Property Documentation

int IG::Num::IBoundingBox::Dimension`[get]`

Gets dimension of the bounding box space.

Setter is not public. In order to change dimension, use the ChangeDimensionAndReset() method!

Implemented in IG::Num::BoundingBoxBase.

IVector IG::Num::IBoundingBox::Min`[get, set]`

Gets or sets the vector of minimal co-ordinates of the bounding box. Getter always creates and returns a new vector whose elements are minimal components of the bounding box.Setter copies components rather than vector reference (if the vector assigned is null then exception is thrown). When setting the vector, its dimension must match current dimension of the bounding box, otherwise exception is thrown.

If dimension needs to be changed then one must set the Dimension property first. This will also reset the bounding box, and a more transparent approach is to create a new bounding box.

Implemented in IG::Num::BoundingBoxBase.

IVector IG::Num::IBoundingBox::Max`[get, set]`

Gets or sets the vector of maximal co-ordinates of the bounding box. Getter always creates and returns a new vector whose elements are maximal components of the bounding box.Setter copies components rather than vector reference (if the vector assigned is null then exception is thrown). When setting the vector, its dimension must match current dimension of the bounding box, otherwise exception is thrown.

If dimension needs to be changed then one must set the Dimension property first. This will also reset the bounding box, and a more transparent approach is to create a new bounding box.

Implemented in IG::Num::BoundingBoxBase.

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

- BoundingBox.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events