|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
Handles a set region defined by a set of nonoverlaping rectangles.
Parent Classes:
Methods:
- IndexRectangleSetC()
-
Default constructor.
- IndexRectangleSetC(const IndexRectangleC & rect)
-
Constructor.
- IndexRectangleSetC Subtract(const IndexRectangleC & rect1,const IndexRectangleC & rect2)
-
Subtract rect2 from rect1.
- IndexRectangleSetC Add(const IndexRectangleC & rect1,const IndexRectangleC & rect2)
-
Add rect2 and rect1.
- IndexRectangleC Enclosing() const
-
Get minumum enclosing rectangle for set.
- IndexRectangleSetC Subtract(const IndexRectangleC & rect) const
-
Remove 'rect' rectangle from the region given by the set.
- IndexRectangleSetC Subtract(const IndexRectangleSetC & rectset) const
-
Remove 'rectset' from the region given by the set.
- IndexRectangleSetC SubtractFrom(const IndexRectangleC & rect) const
-
Remove set from rect.
- IndexRectangleSetC Add(const IndexRectangleC & rect) const
-
Add this rectangle to the set.
- IndexRectangleSetC Add(const IndexRectangleSetC & rect) const
-
Add rectangle set to this set.
- BooleanT Contains(const IndexRectangleC & rect) const
-
Does this set wholy contain 'rect' ?
- UIntT Area() const
-
Total area of set.
- DListC<IndexRectangleC> Copy() const
-
Create a copy of this list.
- const DListC<IndexRectangleC> & operator=(const DListC<IndexRectangleC> & l)
-
Both this list and the list 'l' will be the same list.
The old list will be emptied if there is no other references to it.
- BodyDListC<IndexRectangleC> & Body()
-
- DListC<IndexRectangleC> Tail(BaseBodyConstDLIterC<IndexRectangleC> & ptr)
-
Splits the list into two parts.
This list will contain the beginning
of the original list. The function returns the second part
of the original list including the element 'ptr'.
- DListC<IndexRectangleC> Head(BaseBodyConstDLIterC<IndexRectangleC> & ptr)
-
Splits the list into two parts.
This list will contain the second part
of the original list including the element 'ptr'.
The function returns the list containing the beginning of the original
list.
Status functions
----------------
- BaseDListC::ListSizeT Size() const
-
Returns the length of a list. It does not check the counter overflow.
- BooleanT operator==(const DListC<IndexRectangleC> & list) const
-
Returns TRUE if both lists represent the same list.
- BooleanT operator!=(const DListC<IndexRectangleC> & list) const
-
Returns TRUE if both lists are independent.
- BooleanT IsEmpty() const
-
Returns TRUE if the list is empty.
- void ConsistencyCheck(LongIntT stopSize = 30000) const
-
Checks the list if all links are valid.
If the counter of elements
during the checking overflows the number 'stopSize', the function
exits with error.
Access to the elements
----------------------
- const IndexRectangleC & First() const
-
Returns the first element of the constant list.
- IndexRectangleC & First()
-
Returns the first element of the list.
- const IndexRectangleC & Last() const
-
Returns the last element of the constant list.
- IndexRectangleC & Last()
-
Returns the last element of the constant list.
- const IndexRectangleC & operator[](IndexT i) const
-
Returns the i-th element of the constant list.
The first element has the index 0.
- IndexRectangleC & operator[](IndexT i)
-
Returns the i-th element of the list.
The first element has the index 0.
Elementary changes in the list
------------------------------
- DListC<IndexRectangleC> & InsFirst(const IndexRectangleC & data)
-
Inserts the new element at the beginning of the list.
Returns the reference to the changed list.
- DListC<IndexRectangleC> & InsLast(const IndexRectangleC & data)
-
Inserts the new element at the end of the list.
Returns the pointer to the list.
- DListC<IndexRectangleC> & DelFirst()
-
Deletes the first element of the list.
Returns the reference to the list.
- DListC<IndexRectangleC> & DelLast()
-
Deletes the last element of the list.
Returns the reference to the list.
- IndexRectangleC GetFirst()
-
Removes the first element from the list.
Returns that removed element.
- IndexRectangleC GetLast()
-
Removes the last element from the list.
Returns that removed element.
- DListC<IndexRectangleC> & MakeFirst(BaseBodyConstDLIterC<IndexRectangleC> & ptr)
-
Moves the head of the list to be the predeccessor of the element pointed to be 'ptr'.
The iterator 'ptr' must belong to this list.
Returns the reference to the list.
- DListC<IndexRectangleC> & MakeLast(BaseBodyConstDLIterC<IndexRectangleC> & ptr)
-
Moves the head of the list to be the successor of the element pointed to by 'ptr'.
The iterator 'ptr' must belong to this list.
Returns the reference to the list.
- DListC<IndexRectangleC> & MoveFirst(BaseBodyConstDLIterC<IndexRectangleC> & ptr)
-
Moves the list element pointed to by 'ptr' into the list as the first element.
The pointed list element need not to be
the element of this list, but it cannot be the head of any list.
Returns this list.
- DListC<IndexRectangleC> & MoveLast(BaseBodyConstDLIterC<IndexRectangleC> & ptr)
-
Moves the list element, which 'ptr' points to, into the list as the last element.
The pointed list element need not to be
the element of this list, but it cannot be the head of any list.
Returns this list.
Transformations of lists
------------------------
- DListC<IndexRectangleC> & MoveFirst(DListC<IndexRectangleC> & list)
-
Moves the whole 'list' to the beginning of this list.
The 'list' will be empty after the operation. Returns this list.
- DListC<IndexRectangleC> & MoveLast(DListC<IndexRectangleC> & list)
-
Moves the whole 'list' to the end of this list.
The 'list' will be empty after the operation. Returns this list.
- const DListC<IndexRectangleC> & operator+=(const DListC<IndexRectangleC> & list)
-
Concatenation.
The operator moves the whole 'list to the end
of this list. The 'list' will be EMPTY after the operation.
The arg is only constant so that 'list' may be a tempory without
causing warnings.
Returns this list.
- const DListC<IndexRectangleC> & operator+=(const IndexRectangleC & list)
-
Concatenation an element.
This is just an alias for InsLast().
Returns this list.
- DListC<IndexRectangleC> & Reverse()
-
Reverses the list. Returns the list.
- DListC<IndexRectangleC> & Empty()
-
All elements of the list will be destroyed.
- int LessOrEqualDefault(const IndexRectangleC & el1,const IndexRectangleC & el2)
-
- void MergeSort(DListC<IndexRectangleC>::LessOrEqualFuncT func)
-
Sorts the list according to order defined by the comparing function 'LessOrEqual'.
The default function uses the > operator of the class to do the sort.
If no such operator exists one will be created that prints an
error message then aborts the code.
- void BubbleSort(DListC<IndexRectangleC>::LessOrEqualFuncT func)
-
Sorts the list according to order defined by the comparing function 'LessOrEqual'.
The default function uses the > operator of the class to do the sort.
If no such operator exists one will be created that prints an
error message then aborts the code.
- UIntT Hash() const
-
Get a hash value unique to this list.
it does not depend in anyway on the contents of the list.
|
Programmer:Charles Galambos, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|