My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::util::CoordRange Class Reference

Public Member Functions

 CoordRange ()
 
 CoordRange (unsigned index)
 
 CoordRange (unsigned iStart, unsigned iStop)
 
 CoordRange (Coord &start, Coord &stop)
 
 CoordRange (Coord &coord)
 
 CoordRange (CoordRange *coordRange)
 
void initialize ()
 
virtual ~CoordRange ()
 
void setStartIndex (unsigned iAxis, unsigned iStart)
 
unsigned startIndex (unsigned iAxis)
 
void setStartCoord (Coord &startCoord)
 
void setStartCoord (Coord *startCoord)
 
Coord startCoord ()
 
void setStopIndex (unsigned iAxis, unsigned iStop)
 
unsigned stopIndex (unsigned iAxis)
 
void setIndex (unsigned iAxis, unsigned index)
 
void setIndex (unsigned index)
 
void setStopCoord (Coord &stopCoord)
 
void setStopCoord (Coord *stopCoord)
 
Coord stopCoord ()
 
void setCoord (Coord coord)
 
unsigned nEl (unsigned iAxis)
 
unsigned nAxis ()
 
bool isValid ()
 
void setContiguous (bool contiguous)
 
bool isContiguous ()
 
CoordRangeoperator+= (unsigned incr)
 
bool operator== (CoordRange &range)
 
bool contains (CoordRange &range)
 

Friends

std::ostream & operator<< (std::ostream &os, CoordRange range)
 

Constructor & Destructor Documentation

CoordRange::CoordRange ( )

Constructor.

....................................................................... Constructors

CoordRange::~CoordRange ( )
virtual

Destructor.

....................................................................... Destructor.

Member Function Documentation

bool CoordRange::isContiguous ( )

................................................................................. Return true if this range is to be interpreted as a contiguous range from startCoord to stopCoord

bool CoordRange::isValid ( )

Return true if this coordinate range contains valid data

....................................................................... Return true if this coordinate range contains valid data

unsigned CoordRange::nAxis ( )

Get the number of axes specified

....................................................................... Get the number of axes specified

unsigned CoordRange::nEl ( unsigned  iAxis)

Get the number of elements in this axis

....................................................................... Get the number of elements in this axis

CoordRange & CoordRange::operator+= ( unsigned  incr)

An operator for incrementing this object

....................................................................... Add an increment to this object

bool CoordRange::operator== ( CoordRange range)

An operator for incrementing this object

....................................................................... Test for equality of two ranges

void CoordRange::setContiguous ( bool  contiguous)

Set whether or not this range is to be interpreted as a contiguous range of indices from startCoord_ to stopCoord_, or disjunct index ranges for the separate axes.

For example, if this object specified an index into a 2-D array, with 4 elements in the first axis, and 3 elements in the second axis, the range (0, 1) - (3, 2) could be inberpreted either as:

[0-3][1-2] -> [0][1-2] and [1][1-2] and [2][1-2] and [3]1-2 or

[0][1] - [3][2] -> [0][1] to [3]2

................................................................................. Set whether or not this range is to be interpreted as a contiguous range from startCoord to stopCoord

void CoordRange::setIndex ( unsigned  iAxis,
unsigned  index 
)

....................................................................... Set both the start and stop index to the same value

void CoordRange::setIndex ( unsigned  index)

....................................................................... Same as above, but defaults to axis 0

void CoordRange::setStartCoord ( Coord startCoord)

....................................................................... Set the start coordinate

void CoordRange::setStartIndex ( unsigned  iAxis,
unsigned  iStart 
)

Set/get the index of the first element in the range

....................................................................... Set/get the index of the first element in the range

void CoordRange::setStopCoord ( Coord stopCoord)

....................................................................... Set the stop coordinate

void CoordRange::setStopIndex ( unsigned  iAxis,
unsigned  iStop 
)

....................................................................... Set/get the index of the first element in the range

unsigned CoordRange::startIndex ( unsigned  iAxis)

....................................................................... Return the start index for axis iAxis

unsigned CoordRange::stopIndex ( unsigned  iAxis)

....................................................................... Return the stop index for axis iAxis

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
CoordRange  range 
)
friend

An operator for printing this object


The documentation for this class was generated from the following files: