Developer Documentation
Centre for Vision, Speech & Signal Processing
USER IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
NumDataSetC::NumDataSetC(void)
NumDataSetC::NumDataSetC(const DListC &,const DListC &)
NumDataSetC::NumDataSetC(const DListC> &)
NumDataSetC::NumDataSetC(istream &)
NumDataSetC::NumDataSetC(const FilenameC &)
NumDataSetC::NumDataSetC(const NumDataSetC &)
NumDataSetC::Copy(void) const
NumDataSetC::InputSet(void) const
NumDataSetC::InputSet(const OutputC &) const
NumDataSetC::OutputSet(void) const
NumDataSetC::OutputSet(const InputC &) const
NumDataSetC::Shuffle(void)
NumDataSetC::Extract(RealT)
NumDataSetC::Extract(UIntT,UIntT)
NumDataSetC::Append(const NumDataSetC &)
NumDataSetC::Append(const InputC &,const OutputC &)
NumDataSetC::Save(ostream &) const
NumDataSetC::Save(const FilenameC &) const
DListC::Copy(void) const
DListC::operator=(const DListC &)
DListC::Body(void)
DListC::Tail(BaseBodyConstDLIterC &)
DListC::Head(BaseBodyConstDLIterC &)
DListC::Size(void) const
DListC::operator==(const DListC &) const
DListC::operator!=(const DListC &) const
DListC::IsEmpty(void) const
DListC::ConsistencyCheck(LongIntT) const
DListC::First(void) const
DListC::First(void)
DListC::Last(void) const
DListC::Last(void)
DListC::operator[](IndexT) const
DListC::operator[](IndexT)
DListC::InsFirst(const DataC &)
DListC::InsLast(const DataC &)
DListC::DelFirst(void)
DListC::DelLast(void)
DListC::GetFirst(void)
DListC::GetLast(void)
DListC::MakeFirst(BaseBodyConstDLIterC &)
DListC::MakeLast(BaseBodyConstDLIterC &)
DListC::MoveFirst(BaseBodyConstDLIterC &)
DListC::MoveLast(BaseBodyConstDLIterC &)
DListC::MoveFirst(DListC &)
DListC::MoveLast(DListC &)
DListC::operator+=(const DListC &)
DListC::operator+=(const DataC &)
DListC::Reverse(void)
DListC::Empty(void)
DListC::LessOrEqualDefault(const DataC &,const DataC &)
DListC::MergeSort(DListC::LessOrEqualFuncT)
DListC::BubbleSort(DListC::LessOrEqualFuncT)
DListC::Hash(void) const
NumDataSetC<class InputC,class OutputC>
 
Represents data sets using lists for use with PatternRec classes.
 
include "amma/Num/NumDataSet.hh"
User Level:Default
Library:NumData
Example:testSquareIterFill.cc
Section:Pattern Recognition.Data Types Numerical Methods.Data Types
In Scope:std

Comments:
Template class for representing data sets that are a list of NumDataC objects.

Base class in the PatternRec hierarchy that uses NumDataC objects for storing data sets. The data sets are used for training and test data in many PatternRec classes, eg models, pdfs and classifiers. Most frequently, derived versions, NumVVDataSetC and NumVLDataSetC are used which have (VectorC, VectorC) and (VectorC, NumLabelC) data objects respectively.

Parent Classes: Derived Classes: Methods:
NumDataSetC()
Default constructor
Calls default constructors for each element in the list.

NumDataSetC(const DListC<InputC> & input,const DListC<OutputC> & output)
Constructor taking lists of input and output values

NumDataSetC(const DListC<NumDataC<InputC,OutputC>> & list)
Constructor taking a list of data pairs

NumDataSetC(istream & in)
Constructs from stream

NumDataSetC(const FilenameC & in)
Constructs from file

NumDataSetC(const NumDataSetC & oth)
Copy constuctor

NumDataSetC<InputC,OutputC> & Copy() const
Makes a copy of the current object

DListC<InputC> InputSet() const
Exports a list of input types

DListC<InputC> InputSet(const OutputC & output) const
Extracts all input data which has the given output value..
output output of associated input data vectors to be extracted

DListC<OutputC> OutputSet() const
Exports a list of output types

DListC<OutputC> OutputSet(const InputC & input) const
Exports a list of output types which has the given input value..

void Shuffle()
Shuffles all the elements in the data set into random order

NumDataSetC<InputC,OutputC> Extract(RealT proportion)
Extracts a subset from the data set
proportionthe 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.

NumDataSetC<InputC,OutputC> Extract(UIntT numSamples,UIntT offset = 0)
Extracts a subset from the data set
numSamplesspecifies 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 Append(const NumDataSetC<InputC,OutputC> & oth)
Appends oth data set to the current one

void Append(const InputC & input,const OutputC & output)
Appends NumDataC(input,output) to the data set

void Save(ostream & out) const
Writes object to stream, can be loaded using constructor

void Save(const FilenameC & out) const
Writes object to file, can be loaded using constructor

#include "amma/DList.hh"
DListC<NumDataC<InputC,OutputC>> Copy() const
Create a copy of this list.

const DListC<NumDataC<InputC,OutputC>> & operator=(const DListC<NumDataC<InputC,OutputC>> & 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<NumDataC<InputC,OutputC>> & Body()

DListC<NumDataC<InputC,OutputC>> Tail(BaseBodyConstDLIterC<NumDataC<InputC,OutputC>> & 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<NumDataC<InputC,OutputC>> Head(BaseBodyConstDLIterC<NumDataC<InputC,OutputC>> & 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<NumDataC<InputC,OutputC>> & list) const
Returns TRUE if both lists represent the same list.

BooleanT operator!=(const DListC<NumDataC<InputC,OutputC>> & 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 NumDataC<InputC,OutputC> & First() const
Returns the first element of the constant list.

NumDataC<InputC,OutputC> & First()
Returns the first element of the list.

const NumDataC<InputC,OutputC> & Last() const
Returns the last element of the constant list.

NumDataC<InputC,OutputC> & Last()
Returns the last element of the constant list.

const NumDataC<InputC,OutputC> & operator[](IndexT i) const
Returns the i-th element of the constant list.
The first element has the index 0.

NumDataC<InputC,OutputC> & operator[](IndexT i)
Returns the i-th element of the list.
The first element has the index 0. Elementary changes in the list ------------------------------

DListC<NumDataC<InputC,OutputC>> & InsFirst(const NumDataC<InputC,OutputC> & data)
Inserts the new element at the beginning of the list.
Returns the reference to the changed list.

DListC<NumDataC<InputC,OutputC>> & InsLast(const NumDataC<InputC,OutputC> & data)
Inserts the new element at the end of the list.
Returns the pointer to the list.

DListC<NumDataC<InputC,OutputC>> & DelFirst()
Deletes the first element of the list.
Returns the reference to the list.

DListC<NumDataC<InputC,OutputC>> & DelLast()
Deletes the last element of the list.
Returns the reference to the list.

NumDataC<InputC,OutputC> GetFirst()
Removes the first element from the list.
Returns that removed element.

NumDataC<InputC,OutputC> GetLast()
Removes the last element from the list.
Returns that removed element.

DListC<NumDataC<InputC,OutputC>> & MakeFirst(BaseBodyConstDLIterC<NumDataC<InputC,OutputC>> & 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<NumDataC<InputC,OutputC>> & MakeLast(BaseBodyConstDLIterC<NumDataC<InputC,OutputC>> & 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<NumDataC<InputC,OutputC>> & MoveFirst(BaseBodyConstDLIterC<NumDataC<InputC,OutputC>> & 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<NumDataC<InputC,OutputC>> & MoveLast(BaseBodyConstDLIterC<NumDataC<InputC,OutputC>> & 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<NumDataC<InputC,OutputC>> & MoveFirst(DListC<NumDataC<InputC,OutputC>> & list)
Moves the whole 'list' to the beginning of this list.
The 'list' will be empty after the operation. Returns this list.

DListC<NumDataC<InputC,OutputC>> & MoveLast(DListC<NumDataC<InputC,OutputC>> & list)
Moves the whole 'list' to the end of this list.
The 'list' will be empty after the operation. Returns this list.

const DListC<NumDataC<InputC,OutputC>> & operator+=(const DListC<NumDataC<InputC,OutputC>> & 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<NumDataC<InputC,OutputC>> & operator+=(const NumDataC<InputC,OutputC> & list)
Concatenation an element.
This is just an alias for InsLast(). Returns this list.

DListC<NumDataC<InputC,OutputC>> & Reverse()
Reverses the list. Returns the list.

DListC<NumDataC<InputC,OutputC>> & Empty()
All elements of the list will be destroyed.

int LessOrEqualDefault(const NumDataC<InputC,OutputC> & el1,const NumDataC<InputC,OutputC> & el2)

void MergeSort(DListC<NumDataC<InputC,OutputC>>::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<NumDataC<InputC,OutputC>>::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:Robert Crida, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001