npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0

#include <ArrayRange.hh>

Inheritance diagram for npstat::ArrayRange:
npstat::BoxND< unsigned >

Public Member Functions

 ArrayRange (unsigned dim)
 
 ArrayRange (unsigned dim, const Interval< unsigned > &r1)
 
 ArrayRange (const ArrayShape &shape)
 
 ArrayRange (const unsigned *shape, unsigned shapeLen)
 
ArrayShape shape () const
 
bool isCompatible (const ArrayShape &shape) const
 
bool isCompatible (const unsigned *shape, unsigned shapeLen) const
 
unsigned long rangeSize () const
 
bool operator< (const ArrayRange &) const
 
ArrayRangestripOuterLayer ()
 
void lowerLimits (unsigned *limits, unsigned limitsLen) const
 
void upperLimits (unsigned *limits, unsigned limitsLen) const
 
void rangeLength (unsigned *range, unsigned rangeLen) const
 
gs::ClassId classId () const
 
bool write (std::ostream &of) const
 
- Public Member Functions inherited from npstat::BoxND< unsigned >
 BoxND ()
 
 BoxND (const unsigned long dim)
 
 BoxND (const unsigned long dim, const Interval< unsigned > &v)
 
 BoxND (const std::vector< Num2 > &limits)
 
 BoxND (const BoxND< Num2 > &r)
 
BoxNDcopyFrom (const BoxND< Num2 > &r)
 
unsigned long dim () const
 
unsigned volume () const
 
bool isInsideLower (const Num2 *coord, unsigned long coordLen) const
 
bool isInsideUpper (const Num2 *coord, unsigned long coordLen) const
 
bool isInsideWithBounds (const Num2 *coord, unsigned long coordLen) const
 
bool isInside (const Num2 *coord, unsigned long coordLen) const
 
bool isInside (const Num2 *coord, unsigned long coordLen, const BoundaryInclusion *bi, unsigned long nBi) const
 
BoxNDoperator*= (double r)
 
BoxNDoperator*= (const std::vector< double > &scales)
 
BoxNDoperator/= (double r)
 
BoxNDoperator/= (const std::vector< double > &scales)
 
BoxNDexpand (double r)
 
BoxNDexpand (const std::vector< double > &scales)
 
BoxNDexpand (const double *scales, unsigned long lenScales)
 
BoxNDoperator+= (const std::vector< Num2 > &shifts)
 
BoxNDoperator-= (const std::vector< Num2 > &shifts)
 
BoxNDshift (const Num2 *shifts, unsigned long lenShifts)
 
BoxNDmoveToOrigin ()
 
unsigned overlapVolume (const BoxND &r) const
 
double overlapFraction (const BoxND &r) const
 
void getLowerCorner (unsigned *coord, unsigned long coordLen) const
 
std::vector< unsigned > lowerCorner () const
 
void getUpperCorner (unsigned *coord, unsigned long coordLen) const
 
std::vector< unsigned > upperCorner () const
 
void getLengths (unsigned *coord, unsigned long coordLen) const
 
std::vector< unsigned > lengths () const
 
void getMidpoint (unsigned *coord, unsigned long coordLen) const
 
std::vector< unsigned > midpoint () const
 
gs::ClassId classId () const
 
bool write (std::ostream &of) const
 

Static Public Member Functions

static const char * classname ()
 
static unsigned version ()
 
static void restore (const gs::ClassId &id, std::istream &in, ArrayRange *box)
 
- Static Public Member Functions inherited from npstat::BoxND< unsigned >
static BoxND unitBox (unsigned long ndim)
 
static BoxND sizeTwoBox (unsigned long ndim)
 
static BoxND allSpace (unsigned long ndim)
 
static const char * classname ()
 
static unsigned version ()
 
static void restore (const gs::ClassId &id, std::istream &in, BoxND *box)
 

Additional Inherited Members

- Public Types inherited from npstat::BoxND< unsigned >
typedef unsigned value_type
 

Detailed Description

Utility class for use in certain array iterations

Constructor & Destructor Documentation

◆ ArrayRange() [1/3]

npstat::ArrayRange::ArrayRange ( unsigned  dim)
inlineexplicit

Constructor from a given number of dimensions

◆ ArrayRange() [2/3]

npstat::ArrayRange::ArrayRange ( unsigned  dim,
const Interval< unsigned > &  r1 
)
inline

The given interval is repeated for every dimension

◆ ArrayRange() [3/3]

npstat::ArrayRange::ArrayRange ( const ArrayShape shape)
inlineexplicit

Constructor which creates a range out of a shape which is used to represent the upper limit. The lower limit in each dimension is set to 0.

Member Function Documentation

◆ isCompatible()

bool npstat::ArrayRange::isCompatible ( const ArrayShape shape) const

Check for compatibility with a shape

◆ lowerLimits()

void npstat::ArrayRange::lowerLimits ( unsigned *  limits,
unsigned  limitsLen 
) const

Get the lower range limits into an array. The length of the limit array should be at least equal to the dimensionality.

◆ operator<()

bool npstat::ArrayRange::operator< ( const ArrayRange ) const

Operator for use with maps

◆ rangeLength()

void npstat::ArrayRange::rangeLength ( unsigned *  range,
unsigned  rangeLen 
) const

Get the range into an array

◆ rangeSize()

unsigned long npstat::ArrayRange::rangeSize ( ) const

How many elements will be iterated over?

◆ shape()

ArrayShape npstat::ArrayRange::shape ( ) const

The shape which corresponds to this range (i.e., max - min in all dimensions)

◆ stripOuterLayer()

ArrayRange& npstat::ArrayRange::stripOuterLayer ( )

This method changes the range of this object so that for each dimension the minimum becomes larger by 1 and the maximum smaller by 1.

◆ upperLimits()

void npstat::ArrayRange::upperLimits ( unsigned *  limits,
unsigned  limitsLen 
) const

Get the upper range limits into an array


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