#include <Box.h>
Inheritance diagram for Box< Float >:


A box is an axis aligned region of space represented by a vector of intervals. A generalized Box can be of any dimension. Specialized classes exist for 3D and 4D regions.
Definition at line 22 of file Box.h.
Public Member Functions | |
| Box () | |
| Constructors. | |
| Box (int n) | |
| Construct a Box of size n. | |
| Box (int n, Float x) | |
| Construct a Box of size n with initial values x. | |
| Box (TNT::Vector< Float > x) | |
| Construct a Box from a TNT vector of doubles. | |
| Box< Float > & | operator *= (const Interval< Float > &c) |
| Math operators. | |
| Box< Float > & | operator/= (const Interval< Float > &c) |
| Divide the Box by an Interval. | |
| Box< Float > & | operator+= (const Interval< Float > &c) |
| Add an Interval to each element of the Box. | |
| Float | width (int &dim) |
| Also returns which side was longest. | |
| Float | width () |
| Convenience function to find the maximum length of the sides of the box. | |
| Interval< Float > | length () |
| This method is poorly named, but we need some equivalent to "length" of a vector. | |
| Interval< Float > | lengthSquared () |
| This method is poorly named, but we need some equivalent to "lengthSquared" of a vector. | |
| Box< Float > | normalize () |
| We need some equivalent to "normalize" for a standard vector. | |
| Box< Float > | unionWith (Box< Float > &b) |
| Parts of Boxes. | |
| void | subdivide (Box< Float > &IX1, Box< Float > &IX2) |
| Subdivide a box nearly in half along widest dimension. | |
| TNT::Vector< Float > | center () |
| Return the 'center' of the box as a TNT Vector. | |
| void | print () |
| Basic output. | |
Private Attributes | |
| RandomStream | rs |
| A stream of random numbers. | |
|
|||||||||
|
Constructors. Used for parameter specifications. |
|
||||||||||
|
Construct a Box of size n.
|
|
||||||||||||||||
|
Construct a Box of size n with initial values x.
|
|
||||||||||
|
Construct a Box from a TNT vector of doubles. This is a convenience operator to convert a TNT vector to a Box.
|
|
|||||||||
|
Return the 'center' of the box as a TNT Vector.
Definition at line 226 of file Box.cpp. Referenced by Newton::AddRoot(), Implicit::grad(), Implicit::hess(), Implicit::proc(), ADF::proc(), and Newton::SameRoot(). |
|
|||||||||
|
This method is poorly named, but we need some equivalent to "length" of a vector. So given a Box such as [ [xlo,xhi],[ylo,yhi],[zlo,zhi] ] we want to return an Interval which gives the closest/and furthest distance from the origin to the interval.
Definition at line 128 of file Box.cpp. References Interval< Type >::sqrt(). Referenced by RBF::gradphi(). |
|
|||||||||
|
This method is poorly named, but we need some equivalent to "lengthSquared" of a vector. So given a Box such as [ [xlo,xhi],[ylo,yhi],[zlo,zhi] ] we want to return an Interval which gives the closest/and furthest distance from the origin to the interval, squared.
Definition at line 143 of file Box.cpp. References Infinite< Type >::max(), Infinite< Type >::min(), and Infinite< Type >::pow(). |
|
|||||||||
|
We need some equivalent to "normalize" for a standard vector. So, we divide each element of the Box by it's "length" and set the box equal to these new elements.
|
|
||||||||||
|
Math operators. Each element of the box is multiplied by the scalar. Amazingly, TNT doesn't have this operator.
|
|
||||||||||
|
Add an Interval to each element of the Box.
|
|
||||||||||
|
Divide the Box by an Interval. Each element of the box is divided by the scalar.
|
|
|||||||||
|
Basic output. Appends a <CR/LF> to the end. |
|
||||||||||||||||
|
Subdivide a box nearly in half along widest dimension. The two new 'halves' of the Box are returned in IX1 and IX2.
Definition at line 199 of file Box.cpp. References RandomStream::next(), Box< Float >::rs, and Box< Float >::width(). |
|
||||||||||
|
Parts of Boxes.
|
|
|||||||||
|
Convenience function to find the maximum length of the sides of the box.
Definition at line 114 of file Box.cpp. Referenced by Box< Float >::subdivide(). |
|
||||||||||
|
Also returns which side was longest. This method takes a 'dummy' parameter which gets set to the side (index) with the largest dimension upon return.
Definition at line 95 of file Box.cpp. Referenced by Newton::INewton(). |
|
|||||
|
A stream of random numbers.
Definition at line 25 of file Box.h. Referenced by Box< Float >::subdivide(). |
1.3.4