Machine Learning Library
Public Member Functions | Protected Attributes | List of all members
CDatasetItem< Type > Class Template Reference

Single item of a dataset consisting of a pair of input and out vectors. More...

#include <CDatasetItem.h>

Inheritance diagram for CDatasetItem< Type >:
CObject< Type >

Public Member Functions

 CDatasetItem ()
 
 CDatasetItem (int iDimInput, int iDimOutput)
 
 CDatasetItem (const CVector< Type > &rtInput, const CVector< Type > &rtOutput)
 
 CDatasetItem (const CVector< Type > &rtInput, const CVector< Type > &rtOutput, const int iID)
 
 CDatasetItem (const CDatasetItem< Type > &rtItem)
 
virtual string className () const
 Returns the class name. More...
 
virtual CDatasetItem< Type > & operator= (const CDatasetItem< Type > &rtItem)
 
 CDatasetItem (CVector< Type > *in, CVector< Type > *out)
 
virtual CDatasetItem< double > * convertToDouble ()
 
virtual CDatasetItem< float > * convertToFloat ()
 
virtual ~CDatasetItem ()
 
void setInputVector (const CVector< Type > &rtVector)
 
void setOutputVector (const CVector< Type > &rtVector)
 
const CVector< Type > & getInputVector () const
 
const CVector< Type > & inputVector () const
 
CVector< Type > & getInputVector ()
 
CVector< Type > & inputVector ()
 
CVector< Type > * inputVectorPtr () const
 
const CVector< Type > & getOutputVector () const
 
const CVector< Type > & outputVector () const
 
CVector< Type > & getOutputVector ()
 
CVector< Type > & outputVector ()
 
CVector< Type > * outputVectorPtr () const
 
Type getInputComponent (int iIndex) const
 
Type inputComponent (int iIndex) const
 
Type getOutputComponent (int iIndex) const
 
Type outputComponent (int iIndex) const
 
int inputDimension () const
 
int outputDimension () const
 
virtual bool operator== (const CDatasetItem< Type > &right) const
 
virtual bool operator!= (const CDatasetItem< Type > &right) const
 
virtual bool operator> (const CDatasetItem< Type > &right) const
 
virtual bool operator< (const CDatasetItem< Type > &right) const
 
int id () const
 
void setId (int iId)
 
bool serialize (fstream &stream, IO_MODE mode)
 
bool serialize2 (CArchiv &tA)
 
- Public Member Functions inherited from CObject< Type >
 CObject ()
 Constructor. More...
 
virtual ~CObject ()
 Destructor. More...
 
void setVerbose (VERBOSE_LEVEL tVerbose)
 Set the verbose level. More...
 
VERBOSE_LEVEL verbose (void) const
 Return current verbose level. More...
 
virtual bool isA (const char *acClass) const
 Check if the object is an instance of the class with given name. More...
 
DATATYPE dataType () const
 Returns the template data type. More...
 

Protected Attributes

CVector< Type > * ptInput
 
CVector< Type > * ptOutput
 
int iId
 
- Protected Attributes inherited from CObject< Type >
unsigned char ucVerbose
 

Detailed Description

template<class Type>
class CDatasetItem< Type >

Single item of a dataset consisting of a pair of input and out vectors.

Author
Thorsten Twellmann

Constructor & Destructor Documentation

template<class Type>
CDatasetItem< Type >::CDatasetItem ( )
inline
template<class Type>
CDatasetItem< Type >::CDatasetItem ( int  iDimInput,
int  iDimOutput 
)
inline
template<class Type>
CDatasetItem< Type >::CDatasetItem ( const CVector< Type > &  rtInput,
const CVector< Type > &  rtOutput 
)
inline
template<class Type>
CDatasetItem< Type >::CDatasetItem ( const CVector< Type > &  rtInput,
const CVector< Type > &  rtOutput,
const int  iID 
)
inline
template<class Type>
CDatasetItem< Type >::CDatasetItem ( const CDatasetItem< Type > &  rtItem)
inline
template<class Type>
CDatasetItem< Type >::CDatasetItem ( CVector< Type > *  in,
CVector< Type > *  out 
)
inline

Initializes CDatasetItem from given pointer arguments. Assumes ownership and will delete them on destruction.

References CDatasetItem< Type >::iId, CDatasetItem< Type >::ptInput, and CDatasetItem< Type >::ptOutput.

template<class Type>
virtual CDatasetItem< Type >::~CDatasetItem ( )
inlinevirtual

Member Function Documentation

template<class Type>
virtual string CDatasetItem< Type >::className ( ) const
inlinevirtual

Returns the class name.

Reimplemented from CObject< Type >.

template<class Type>
virtual CDatasetItem<double>* CDatasetItem< Type >::convertToDouble ( )
inlinevirtual
template<class Type>
virtual CDatasetItem<float>* CDatasetItem< Type >::convertToFloat ( )
inlinevirtual
template<class Type>
Type CDatasetItem< Type >::getInputComponent ( int  iIndex) const
inline

Obsolete! Use intputComponent(..) instead

References CDatasetItem< Type >::ptInput.

template<class Type>
const CVector<Type>& CDatasetItem< Type >::getInputVector ( ) const
inline

Obsolete! Use inputVector(..) instead

References CDatasetItem< Type >::ptInput.

template<class Type>
CVector<Type>& CDatasetItem< Type >::getInputVector ( )
inline

Obsolete! Use inputVector(..) instead

References CDatasetItem< Type >::ptInput.

template<class Type>
Type CDatasetItem< Type >::getOutputComponent ( int  iIndex) const
inline

Obsolete! Use outputComponent(..) instead

References CDatasetItem< Type >::ptOutput.

template<class Type>
const CVector<Type>& CDatasetItem< Type >::getOutputVector ( ) const
inline

Obsolete! Use outputVector(..) instead

References CDatasetItem< Type >::ptOutput.

template<class Type>
CVector<Type>& CDatasetItem< Type >::getOutputVector ( )
inline

Obsolete! Use outputVector(..) instead

References CDatasetItem< Type >::ptOutput.

template<class Type>
int CDatasetItem< Type >::id ( ) const
inline
template<class Type>
Type CDatasetItem< Type >::inputComponent ( int  iIndex) const
inline
template<class Type>
int CDatasetItem< Type >::inputDimension ( ) const
inline
template<class Type>
const CVector<Type>& CDatasetItem< Type >::inputVector ( ) const
inline
template<class Type>
CVector<Type>& CDatasetItem< Type >::inputVector ( )
inline
template<class Type>
CVector<Type>* CDatasetItem< Type >::inputVectorPtr ( ) const
inline
template<class Type>
virtual bool CDatasetItem< Type >::operator!= ( const CDatasetItem< Type > &  right) const
inlinevirtual
template<class Type>
virtual bool CDatasetItem< Type >::operator< ( const CDatasetItem< Type > &  right) const
inlinevirtual
template<class Type>
virtual CDatasetItem<Type>& CDatasetItem< Type >::operator= ( const CDatasetItem< Type > &  rtItem)
inlinevirtual
template<class Type>
virtual bool CDatasetItem< Type >::operator== ( const CDatasetItem< Type > &  right) const
inlinevirtual
template<class Type>
virtual bool CDatasetItem< Type >::operator> ( const CDatasetItem< Type > &  right) const
inlinevirtual
template<class Type>
Type CDatasetItem< Type >::outputComponent ( int  iIndex) const
inline
template<class Type>
int CDatasetItem< Type >::outputDimension ( ) const
inline
template<class Type>
const CVector<Type>& CDatasetItem< Type >::outputVector ( ) const
inline
template<class Type>
CVector<Type>& CDatasetItem< Type >::outputVector ( )
inline
template<class Type>
CVector<Type>* CDatasetItem< Type >::outputVectorPtr ( ) const
inline
template<class Type>
bool CDatasetItem< Type >::serialize ( fstream &  stream,
IO_MODE  mode 
)
inlinevirtual

Read/write object from/to binary stream

Parameters
streamReference to stream
Mode(READ/WRITE)
Returns
False on error

Reimplemented from CObject< Type >.

References CObject< Type >::dataType(), CDatasetItem< Type >::iId, CObjectFactory::instance(), CObjectFactory::produceObject(), CDatasetItem< Type >::ptInput, CDatasetItem< Type >::ptOutput, CObject< Type >::serialize(), and WRITE.

template<class Type>
bool CDatasetItem< Type >::serialize2 ( CArchiv tA)
inlinevirtual
template<class Type>
void CDatasetItem< Type >::setId ( int  iId)
inline
template<class Type>
void CDatasetItem< Type >::setInputVector ( const CVector< Type > &  rtVector)
inline
template<class Type>
void CDatasetItem< Type >::setOutputVector ( const CVector< Type > &  rtVector)
inline

Member Data Documentation

template<class Type>
int CDatasetItem< Type >::iId
protected
template<class Type>
CVector<Type>* CDatasetItem< Type >::ptInput
protected
template<class Type>
CVector<Type>* CDatasetItem< Type >::ptOutput
protected

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