User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - Core - Indexing - IndexRangeC
 

  PUBLIC
IndexRangeC::IndexRangeC(SizeT)
IndexRangeC::IndexRangeC(IndexC)
IndexRangeC::IndexRangeC(IndexC,IndexC)
IndexRangeC::IndexRangeC(istream &)
IndexRangeC::Size(void) const
IndexRangeC::Range(void) const
IndexRangeC::Min(void) const
IndexRangeC::Max(void) const
IndexRangeC::Min(void)
IndexRangeC::Max(void)
IndexRangeC::Center(void) const
IndexRangeC::CenterD(void) const
IndexRangeC::Percentage(const RealT) const
IndexRangeC::IsEmpty(void) const
IndexRangeC::IsValid(void) const
IndexRangeC::Contains(IndexC) const
IndexRangeC::Contains(const IndexRangeC &) const
IndexRangeC::operator ==(const IndexRangeC &) const
IndexRangeC::operator !=(const IndexRangeC &) const
IndexRangeC::In(const IndexRangeC &) const
IndexRangeC::IsOverlapping(const IndexRangeC &) const
IndexRangeC::SetOrigin(IndexC)
IndexRangeC::operator ++(void)
IndexRangeC::operator --(void)
IndexRangeC::operator +=(IndexC)
IndexRangeC::operator -=(IndexC)
IndexRangeC::operator +(IndexC) const
IndexRangeC::operator -(IndexC) const
IndexRangeC::ClipBy(const IndexRangeC &)
IndexRangeC::FirstHalf(void) const
IndexRangeC::FirstHalfD(void) const
IndexRangeC::Enlarge(IndexC) const
IndexRangeC::Expand(IndexC) const
IndexRangeC::Shrink(IndexC) const
IndexRangeC::ShrinkHigh(IndexC)
IndexRangeC::Swap(IndexRangeC &)
IndexRangeC::Involve(IndexC)
IndexRangeC::Involve(const IndexRangeC &)

   IndexRangeC   
 
1D index range of array
 
include "Ravl/IndexRange1d.hh"
Created:2.1.1997 
User Level:Normal
Library:RavlCore
In Scope:RavlN

Comments:
The class IndexRangeC is a representation of an interval of one dimensional index.

Variables:
Methods:

Constructors, copy, assigment, and destructor.
IndexRangeC(SizeT dim = 0)
Creates the index range <0, dim-1>.

IndexRangeC(IndexC dim)
Creates the index range <0, dim-1>.

IndexRangeC(IndexC minIndex,IndexC maxIndex)
Creates the index range .

IndexRangeC(istream & s)
Creates the index range from the input stream.

Access to the object information.

IntT Size() const
Returns the number of elements in the range.

const IndexRangeC & Range() const
Returns this object.

const IndexC & Min() const
Returns the minimum index of the range.

const IndexC & Max() const
Returns the maximum index of the range.

IndexC & Min()
Returns the minimum index of the range.

IndexC & Max()
Returns the maximum index of the range.

IndexC Center() const
Returns the index in the middle of the range, eg. (Max()+Min()+1)/2.

IndexC CenterD() const
Returns the index previous the middle of the range, eg. (Max()+Min())/2.

IndexC Percentage(const RealT p) const
Returns the index which is in the 'p' % of the whole range.

Logical operations.

bool IsEmpty() const
Returns true if the minimum limit is bigger than the maximum limit.

bool IsValid() const
Returns true if the minimum limit is bigger than the maximum limit.

bool Contains(IndexC i) const
Returns true if this range contains the index 'i'.

bool Contains(const IndexRangeC & range) const
Returns true if this range contains the subrange 'range'.

bool operator ==(const IndexRangeC & range) const
Returns true if both index ranges have the same limits.

bool operator !=(const IndexRangeC & range) const
Returns true if both the ranges have different limits.

bool In(const IndexRangeC & range) const
Returns true if this range is inside of the 'range'.

bool IsOverlapping(const IndexRangeC & r) const
Returns true if this range contains at least one common index with the range 'r'.

Special operations.

const IndexRangeC & SetOrigin(IndexC position)
Set the origin of the range to 'position'.
Returns a reference to this range.

IndexRangeC & operator ++()
Move both the max and min of the range along 1.
Returns a reference to this range.

IndexRangeC & operator --()
Move both the max and min of the range back 1.
Returns a reference to this range.

const IndexRangeC & operator +=(IndexC i)
Both minimum and maximum limits are shifted by adding the offset 'i'.
Returns a reference to this range.

const IndexRangeC & operator -=(IndexC i)
Both minimum and maximum limits are shifted by subtracting the offset 'i'.
Returns a reference to this range.

IndexRangeC operator +(IndexC i) const
Create a new IndexRangeC with minimum and maximum limits shifted by adding the offset 'i'.

IndexRangeC operator -(IndexC i) const
Create a new IndexRangeC with minimum and maximum limits shifted by subtracting the offset 'i'.

IndexRangeC & ClipBy(const IndexRangeC & r)
This index range is clipped to contain at most the index range 'r'.

IndexRangeC FirstHalf() const
Returns the index range < Min(), (Max()+Min()+1)/2 >.

IndexRangeC FirstHalfD() const
Returns the index range < Min(), (Max()+Min())/2 >.

IndexRangeC Enlarge(IndexC f) const
Returns the index range whose number of elements is enlarged by the factor 'f'. The upper limits is changed.

IndexRangeC Expand(IndexC n) const
Returns the range extended by adding 'n' items on both limits of this range.

IndexRangeC Shrink(IndexC n) const
Returns the range extended by adding 'n' items on both limits of this range.

IndexRangeC & ShrinkHigh(IndexC n)
Returns the range shrinked by removing of the last 'n' items on both limits of this range.

IndexRangeC & Swap(IndexRangeC & r)
Exchanges the contents of this range and range 'r'. The function returns this range.

const IndexRangeC & Involve(IndexC i)
Modify this range to ensure index i is contained within it.

const IndexRangeC & Involve(const IndexRangeC & subRange)
Modify this range to ensure subRange is contained within it.


Maintainer:Radek Marik, Created: 2.1.1997, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002