#include <BoxND.h>
Public Member Functions | |
BoxND () | |
BoxND (const unsigned long dim) | |
BoxND (const unsigned long dim, const Interval< Numeric > &v) | |
template<typename Num2 > | |
BoxND (const std::vector< Num2 > &limits) | |
template<typename Num2 > | |
BoxND (const BoxND< Num2 > &r) | |
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 (double r) |
void | getMidpoint (Numeric *coord, unsigned long coordLen) const |
BoxND & | moveToOrigin () |
template<typename Num2 > | |
BoxND< Numeric > & | operator+= (const std::vector< Num2 > &shifts) |
template<typename Num2 > | |
BoxND< Numeric > & | operator-= (const std::vector< Num2 > &shifts) |
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) |
Numeric | volume () 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 |
template<typename Num2 > | |
bool | isInside (const Num2 *coord, unsigned long coordLen) const |
BoxND & | operator*= (double r) |
BoxND & | operator/= (double r) |
BoxND & | operator*= (const std::vector< double > &scales) |
BoxND & | operator/= (const std::vector< double > &scales) |
BoxND & | expand (const std::vector< double > &scales) |
BoxND & | expand (const double *scales, unsigned long lenScales) |
template<typename Num2 > | |
BoxND & | operator+= (const std::vector< Num2 > &shifts) |
template<typename Num2 > | |
BoxND & | operator-= (const std::vector< Num2 > &shifts) |
template<typename Num2 > | |
BoxND & | shift (const Num2 *shifts, unsigned long lenShifts) |
gs::ClassId | classId () 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 |
Constructor where one of the limits will be 0 and the other will be generated from the given vector (which also determines the dimensionality)
Definition at line 194 of file BoxND.h.
References i, and relativeConstraints::value.
|
explicit |
Converting constructor
Definition at line 178 of file BoxND.h.
References i, npstat::Interval< Numeric >::max(), and npstat::Interval< Numeric >::min().
|
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 | ) |
Definition at line 214 of file BoxND.h.
References hitfit::clear(), i, npstat::Interval< Numeric >::max(), npstat::Interval< Numeric >::min(), and n.
|
inline |
Box dimensionality
Definition at line 57 of file BoxND.h.
Referenced by npstat::ArrayND< Numeric, StackLen, StackDim >::processSubrange().
BoxND< Numeric > & npstat::BoxND< Numeric >::expand | ( | double | r | ) |
Scaling of all limits by a constant in such a way that the midpoint remains unchanged
Definition at line 362 of file BoxND.h.
References i, and findQualityFiles::size.
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
Definition at line 384 of file BoxND.h.
References i, and findQualityFiles::size.
BoxND< Numeric > & npstat::BoxND< Numeric >::expand | ( | const double * | scales, |
unsigned long | lenScales | ||
) |
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 270 of file BoxND.h.
References i, and findQualityFiles::size.
bool npstat::BoxND< Numeric >::isInside | ( | const Num2 * | coord, |
unsigned long | coordLen | ||
) | const |
Definition at line 331 of file BoxND.h.
References i, and findQualityFiles::size.
bool npstat::BoxND< Numeric >::isInsideLower | ( | const Num2 * | coord, |
unsigned long | coordLen | ||
) | const |
This method return "true" if the corresponding function of the Interval returns "true" for every coordinate. There must be an automatic conversion from Num2 type into Numeric.
Definition at line 286 of file BoxND.h.
References i, and findQualityFiles::size.
bool npstat::BoxND< Numeric >::isInsideUpper | ( | const Num2 * | coord, |
unsigned long | coordLen | ||
) | const |
Definition at line 301 of file BoxND.h.
References i, and findQualityFiles::size.
bool npstat::BoxND< Numeric >::isInsideWithBounds | ( | const Num2 * | coord, |
unsigned long | coordLen | ||
) | const |
Definition at line 316 of file BoxND.h.
References i, and findQualityFiles::size.
BoxND< Numeric > & npstat::BoxND< Numeric >::moveToOrigin | ( | ) |
Moving this object so that the midpoint is (0, 0, ..., 0)
Definition at line 353 of file BoxND.h.
References i, and findQualityFiles::size.
BoxND< Numeric > & npstat::BoxND< Numeric >::operator*= | ( | double | r | ) |
Scaling of all limits by a constant
Definition at line 344 of file BoxND.h.
References i, alignCSCRings::r, and findQualityFiles::size.
BoxND< Numeric > & npstat::BoxND< Numeric >::operator*= | ( | const std::vector< double > & | scales | ) |
Scaling by a different constant in each dimension
Definition at line 371 of file BoxND.h.
References i, and findQualityFiles::size.
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/= | ( | double | r | ) |
BoxND< Numeric > & npstat::BoxND< Numeric >::operator/= | ( | const std::vector< double > & | scales | ) |
double npstat::BoxND< Numeric >::overlapFraction | ( | const BoxND< Numeric > & | r | ) | const |
A faster way to calculate overlapVolume(r)/volume()
Definition at line 255 of file BoxND.h.
References f, i, and findQualityFiles::size.
Numeric npstat::BoxND< Numeric >::overlapVolume | ( | const BoxND< Numeric > & | r | ) | const |
Overlap volume with another box
Definition at line 240 of file BoxND.h.
References i, findQualityFiles::size, and findQualityFiles::v.
|
static |
Definition at line 522 of file BoxND.h.
References cond::rpcobimon::current, and i.
BoxND& npstat::BoxND< Numeric >::shift | ( | const Num2 * | shifts, |
unsigned long | lenShifts | ||
) |
BoxND<Numeric>& npstat::BoxND< Numeric >::shift | ( | const Num2 * | shifts, |
const unsigned long | shiftsLen | ||
) |
|
static |
|
static |
Box with lower limit 0 and upper limit 1 in all coordinates
Definition at line 477 of file BoxND.h.
References csvLumiCalc::unit.
|
inlinestatic |
Numeric npstat::BoxND< Numeric >::volume | ( | void | ) | const |
Box volume
Definition at line 230 of file BoxND.h.
References i, findQualityFiles::size, and findQualityFiles::v.
bool npstat::BoxND< Numeric >::write | ( | std::ostream & | of | ) | const |
Definition at line 508 of file BoxND.h.
References i, max(), bookConverter::min, and findQualityFiles::size.