#include <BoxND.h>
Public Member Functions | |
BoxND () | |
template<typename Num2 > | |
BoxND (const BoxND< Num2 > &r) | |
template<typename Num2 > | |
BoxND (const std::vector< Num2 > &limits) | |
BoxND (const unsigned long dim) | |
BoxND (const unsigned long dim, const Interval< Numeric > &v) | |
gs::ClassId | classId () const |
template<typename Num2 > | |
BoxND & | copyFrom (const BoxND< Num2 > &r) |
template<typename Num2 > | |
BoxND< Numeric > & | copyFrom (const BoxND< Num2 > &r) |
unsigned long | dim () const |
BoxND & | expand (const double *scales, unsigned long lenScales) |
BoxND & | expand (const std::vector< double > &scales) |
BoxND & | expand (double r) |
void | getMidpoint (Numeric *coord, unsigned long coordLen) const |
template<typename Num2 > | |
bool | isInside (const Num2 *coord, unsigned long coordLen) const |
template<typename Num2 > | |
bool | isInsideLower (const Num2 *coord, unsigned long coordLen) const |
template<typename Num2 > | |
bool | isInsideUpper (const Num2 *coord, unsigned long coordLen) const |
template<typename Num2 > | |
bool | isInsideWithBounds (const Num2 *coord, unsigned long coordLen) const |
BoxND & | moveToOrigin () |
BoxND & | operator*= (const std::vector< double > &scales) |
BoxND & | operator*= (double r) |
template<typename Num2 > | |
BoxND & | operator+= (const std::vector< Num2 > &shifts) |
template<typename Num2 > | |
BoxND< Numeric > & | operator+= (const std::vector< Num2 > &shifts) |
template<typename Num2 > | |
BoxND & | operator-= (const std::vector< Num2 > &shifts) |
template<typename Num2 > | |
BoxND< Numeric > & | operator-= (const std::vector< Num2 > &shifts) |
BoxND & | operator/= (const std::vector< double > &scales) |
BoxND & | operator/= (double r) |
double | overlapFraction (const BoxND &r) const |
Numeric | overlapVolume (const BoxND &r) const |
template<typename Num2 > | |
BoxND< Numeric > & | shift (const Num2 *shifts, const unsigned long shiftsLen) |
template<typename Num2 > | |
BoxND & | shift (const Num2 *shifts, unsigned long lenShifts) |
Numeric | volume () const |
bool | write (std::ostream &of) const |
Static Public Member Functions | |
static BoxND | allSpace (unsigned long ndim) |
static const char * | classname () |
static void | restore (const gs::ClassId &id, std::istream &in, BoxND *box) |
static BoxND | sizeTwoBox (unsigned long ndim) |
static BoxND | unitBox (unsigned long ndim) |
static unsigned | version () |
Class to represent rectangles, boxes, and hyperboxes
|
inline |
|
inlineexplicit |
|
inline |
|
explicit |
|
explicit |
Converting constructor
|
static |
|
inline |
|
static |
BoxND& npstat::BoxND< Numeric >::copyFrom | ( | const BoxND< Num2 > & | r | ) |
Get the data from a box of a different type. This method works essentially as a converting assignment operator.
BoxND<Numeric>& npstat::BoxND< Numeric >::copyFrom | ( | const BoxND< Num2 > & | r | ) |
|
inline |
Box dimensionality
Definition at line 54 of file BoxND.h.
Referenced by npstat::ArrayND< Num1, Len1, Dim1 >::processSubrange().
BoxND< Numeric > & npstat::BoxND< Numeric >::expand | ( | const double * | scales, |
unsigned long | lenScales | ||
) |
Definition at line 365 of file BoxND.h.
BoxND< Numeric > & npstat::BoxND< Numeric >::expand | ( | const std::vector< double > & | scales | ) |
Scaling of all limits in such a way that the midpoint remains unchanged, using a different scaling factor in each dimension
BoxND< Numeric > & npstat::BoxND< Numeric >::expand | ( | double | r | ) |
void npstat::BoxND< Numeric >::getMidpoint | ( | Numeric * | coord, |
unsigned long | coordLen | ||
) | const |
Midpoint for every coordinate. The size of the "coord" array should be at least as large as the box dimensionality.
Definition at line 253 of file BoxND.h.
bool npstat::BoxND< Numeric >::isInside | ( | const Num2 * | coord, |
unsigned long | coordLen | ||
) | const |
Definition at line 308 of file BoxND.h.
bool npstat::BoxND< Numeric >::isInsideLower | ( | const Num2 * | coord, |
unsigned long | coordLen | ||
) | const |
bool npstat::BoxND< Numeric >::isInsideUpper | ( | const Num2 * | coord, |
unsigned long | coordLen | ||
) | const |
bool npstat::BoxND< Numeric >::isInsideWithBounds | ( | const Num2 * | coord, |
unsigned long | coordLen | ||
) | const |
BoxND< Numeric > & npstat::BoxND< Numeric >::moveToOrigin | ( | ) |
BoxND< Numeric > & npstat::BoxND< Numeric >::operator*= | ( | const std::vector< double > & | scales | ) |
BoxND< Numeric > & npstat::BoxND< Numeric >::operator*= | ( | double | r | ) |
BoxND& npstat::BoxND< Numeric >::operator+= | ( | const std::vector< Num2 > & | shifts | ) |
Shifting this object
BoxND<Numeric>& npstat::BoxND< Numeric >::operator+= | ( | const std::vector< Num2 > & | shifts | ) |
BoxND& npstat::BoxND< Numeric >::operator-= | ( | const std::vector< Num2 > & | shifts | ) |
BoxND<Numeric>& npstat::BoxND< Numeric >::operator-= | ( | const std::vector< Num2 > & | shifts | ) |
BoxND< Numeric > & npstat::BoxND< Numeric >::operator/= | ( | const std::vector< double > & | scales | ) |
BoxND< Numeric > & npstat::BoxND< Numeric >::operator/= | ( | double | r | ) |
double npstat::BoxND< Numeric >::overlapFraction | ( | const BoxND< Numeric > & | r | ) | const |
A faster way to calculate overlapVolume(r)/volume()
Numeric npstat::BoxND< Numeric >::overlapVolume | ( | const BoxND< Numeric > & | r | ) | const |
Overlap volume with another box
|
static |
BoxND<Numeric>& npstat::BoxND< Numeric >::shift | ( | const Num2 * | shifts, |
const unsigned long | shiftsLen | ||
) |
Definition at line 412 of file BoxND.h.
BoxND& npstat::BoxND< Numeric >::shift | ( | const Num2 * | shifts, |
unsigned long | lenShifts | ||
) |
|
static |
Box with lower limit -1 and upper limit 1 in all coordinates. Note that this will produce nonsense in case the Numeric type is unsigned.
|
static |
|
inlinestatic |
Definition at line 152 of file BoxND.h.
Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().
Numeric npstat::BoxND< Numeric >::volume | ( | void | ) | const |
bool npstat::BoxND< Numeric >::write | ( | std::ostream & | of | ) | const |