|
User Documentation |
|
Centre for Vision, Speech & Signal Processing |
Comments:
Template class for representing data sets that are a list of
Tuple3C objects.
(VectorC, NumLabelC) data objects respectively.
Parent Classes:
Methods:
- DataSetTuple3C()
-
Default constructor
Calls default constructors for each element in the list.
- DataSetTuple3C(const DListC<Data1C> & d1,const DListC<Data2C> & d2,const DListC<Data3C> & d3)
-
Constructor taking lists
- DataSetTuple3C(const DListC<Tuple3C<Data1C,Data2C,Data3C>> & list)
-
Constructor taking a list of data triplets
- DataSetTuple3C(istream & in)
-
Constructs from stream
- DataSetTuple3C(const FilenameC & in)
-
Constructs from file
- DataSetTuple3C(const DataSetTuple3C & oth)
-
Copy constuctor
- DataSetTuple3C<Data1C,Data2C,Data3C> & Copy() const
-
Makes a copy of the current object
- DataSetTuple3C<Data1C,Data2C,Data3C> DataSet(const Data3C & d3) const
-
Extracts all data which has the given Data3 value..
| d3 | value of associated input data vectors to be extracted |
|
- DListC<Data1C> Data1() const
-
Exports a list of all Data1 elements
- DListC<Data1C> Data1(const Data3C & d3) const
-
Extracts all Data1 elements whose Data3 elements equal d3
- DListC<Data2C> Data2() const
-
Exports a list of all Data2 elements
- DListC<Data2C> Data2(const Data3C & d3) const
-
Extracts all Data2 elements whose Data3 elements equal d3
- DListC<Data3C> Data3() const
-
Exports a list of all Data3 elements
- void Shuffle()
-
Shuffles all the elements in the data set into random order
- DataSetTuple3C<Data1C,Data2C,Data3C> Extract(RealT proportion)
-
Extracts a subset from the data set
| proportion | the subset will contain this proportion of the original set |
|
A proportional subset of the initial data set will be extracted from the
front of the input set. Note that the data set is NOT shuffled by this
function and if this is required then it should be called earlier by the
user. The input set will have the extacted data removed from it. If you
desire to keep the original data set then you should copy it before
using this function.
- DataSetTuple3C<Data1C,Data2C,Data3C> Extract(UIntT numSamples,UIntT offset = 0)
-
Extracts a subset from the data set
| numSamples | specifies number of samples for subset |
| offset | consecutive samples starting from offset |
|
This creates a new data set by removing samples from the input set. The
sample in position offset will be found then numSample consecutive
samples will be extracted for the output set. Note that the data set is
NOT shuffled by this function and if this is required then it should be
called earlier by the user. The input set will have the extacted data
removed from it. If you desire to keep the original data set then you
should copy it before using this function.
- void Save(ostream & out) const
-
Writes object to stream, can be loaded using constructor
- void Save(FilenameC & out) const
-
Writes object to file, can be loaded using constructor
- DListC<Tuple3C<Data1C,Data2C,Data3C>> Copy() const
-
Create a copy of this list.
- const DListC<Tuple3C<Data1C,Data2C,Data3C>> & operator=(const DListC<Tuple3C<Data1C,Data2C,Data3C>> & 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<Tuple3C<Data1C,Data2C,Data3C>> & Body()
-
- DListC<Tuple3C<Data1C,Data2C,Data3C>> Tail(BaseBodyConstDLIterC<Tuple3C<Data1C,Data2C,Data3C>> & 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<Tuple3C<Data1C,Data2C,Data3C>> Head(BaseBodyConstDLIterC<Tuple3C<Data1C,Data2C,Data3C>> & 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<Tuple3C<Data1C,Data2C,Data3C>> & list) const
-
Returns TRUE if both lists represent the same list.
- BooleanT operator!=(const DListC<Tuple3C<Data1C,Data2C,Data3C>> & 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 Tuple3C<Data1C,Data2C,Data3C> & First() const
-
Returns the first element of the constant list.
- Tuple3C<Data1C,Data2C,Data3C> & First()
-
Returns the first element of the list.
- const Tuple3C<Data1C,Data2C,Data3C> & Last() const
-
Returns the last element of the constant list.
- Tuple3C<Data1C,Data2C,Data3C> & Last()
-
Returns the last element of the constant list.
- const Tuple3C<Data1C,Data2C,Data3C> & operator[](IndexT i) const
-
Returns the i-th element of the constant list.
The first element has the index 0.
- Tuple3C<Data1C,Data2C,Data3C> & operator[](IndexT i)
-
Returns the i-th element of the list.
The first element has the index 0.
Elementary changes in the list
------------------------------
- DListC<Tuple3C<Data1C,Data2C,Data3C>> & InsFirst(const Tuple3C<Data1C,Data2C,Data3C> & data)
-
Inserts the new element at the beginning of the list.
Returns the reference to the changed list.
- DListC<Tuple3C<Data1C,Data2C,Data3C>> & InsLast(const Tuple3C<Data1C,Data2C,Data3C> & data)
-
Inserts the new element at the end of the list.
Returns the pointer to the list.
- DListC<Tuple3C<Data1C,Data2C,Data3C>> & DelFirst()
-
Deletes the first element of the list.
Returns the reference to the list.
- DListC<Tuple3C<Data1C,Data2C,Data3C>> & DelLast()
-
Deletes the last element of the list.
Returns the reference to the list.
- Tuple3C<Data1C,Data2C,Data3C> GetFirst()
-
Removes the first element from the list.
Returns that removed element.
- Tuple3C<Data1C,Data2C,Data3C> GetLast()
-
Removes the last element from the list.
Returns that removed element.
- DListC<Tuple3C<Data1C,Data2C,Data3C>> & MakeFirst(BaseBodyConstDLIterC<Tuple3C<Data1C,Data2C,Data3C>> & 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<Tuple3C<Data1C,Data2C,Data3C>> & MakeLast(BaseBodyConstDLIterC<Tuple3C<Data1C,Data2C,Data3C>> & 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<Tuple3C<Data1C,Data2C,Data3C>> & MoveFirst(BaseBodyConstDLIterC<Tuple3C<Data1C,Data2C,Data3C>> & 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<Tuple3C<Data1C,Data2C,Data3C>> & MoveLast(BaseBodyConstDLIterC<Tuple3C<Data1C,Data2C,Data3C>> & 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<Tuple3C<Data1C,Data2C,Data3C>> & MoveFirst(DListC<Tuple3C<Data1C,Data2C,Data3C>> & list)
-
Moves the whole 'list' to the beginning of this list.
The 'list' will be empty after the operation. Returns this list.
- DListC<Tuple3C<Data1C,Data2C,Data3C>> & MoveLast(DListC<Tuple3C<Data1C,Data2C,Data3C>> & list)
-
Moves the whole 'list' to the end of this list.
The 'list' will be empty after the operation. Returns this list.
- const DListC<Tuple3C<Data1C,Data2C,Data3C>> & operator+=(const DListC<Tuple3C<Data1C,Data2C,Data3C>> & 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<Tuple3C<Data1C,Data2C,Data3C>> & operator+=(const Tuple3C<Data1C,Data2C,Data3C> & list)
-
Concatenation an element.
This is just an alias for InsLast().
Returns this list.
- DListC<Tuple3C<Data1C,Data2C,Data3C>> & Reverse()
-
Reverses the list. Returns the list.
- DListC<Tuple3C<Data1C,Data2C,Data3C>> & Empty()
-
All elements of the list will be destroyed.
- int LessOrEqualDefault(const Tuple3C<Data1C,Data2C,Data3C> & el1,const Tuple3C<Data1C,Data2C,Data3C> & el2)
-
- void MergeSort(DListC<Tuple3C<Data1C,Data2C,Data3C>>::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<Tuple3C<Data1C,Data2C,Data3C>>::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:Kieron Messer, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001
|