LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::uciDataWriter Class Reference

Writes data in the form as it is often found in standard data sets: Raw data either just a matrix of doubles with each row a feature vector, or rows containing feature vectors and an id as last element of the row, or raw data with or without ids and a header with the number of points and the dimensionality. More...

#include <ltiUciDataWriter.h>

Inheritance diagram for lti::uciDataWriter:
Inheritance graph
[legend]
Collaboration diagram for lti::uciDataWriter:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 the parameters for the class uciDataWriter More...

Public Member Functions

 uciDataWriter ()
 uciDataWriter (std::string filename)
 uciDataWriter (std::string filename, bool bHeader)
 uciDataWriter (const uciDataWriter &other)
virtual ~uciDataWriter ()
virtual const char * getTypeName () const
bool apply (dmatrix &data) const
bool apply (dmatrix &data, ivector &ids) const
bool apply (fmatrix &data) const
bool apply (fmatrix &data, ivector &ids) const
bool apply (std::list< dmatrix > &data) const
bool apply (std::list< dmatrix > &data, ivector &ids) const
uciDataWritercopy (const uciDataWriter &other)
uciDataWriteroperator= (const uciDataWriter &other)
virtual functorclone () const
const parametersgetParameters () const

Detailed Description

Writes data in the form as it is often found in standard data sets: Raw data either just a matrix of doubles with each row a feature vector, or rows containing feature vectors and an id as last element of the row, or raw data with or without ids and a header with the number of points and the dimensionality.

With parameter append it can be choosen if the data if appended to an existing file or if the file should be new created.

If the filename exists and append is false, your data will be lost.

This functor needs the filename and the existence of a header as parameters. With the third parameter you can choose if the data should be appended of if a new file will be created.


Constructor & Destructor Documentation

lti::uciDataWriter::uciDataWriter (  ) 

default constructor

lti::uciDataWriter::uciDataWriter ( std::string  filename  ) 

sets the filename

lti::uciDataWriter::uciDataWriter ( std::string  filename,
bool  bHeader 
)

sets the parameters filename and hasHeader

lti::uciDataWriter::uciDataWriter ( const uciDataWriter other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::uciDataWriter::~uciDataWriter (  )  [virtual]

destructor


Member Function Documentation

bool lti::uciDataWriter::apply ( std::list< dmatrix > &  data,
ivector ids 
) const

Writes data and ids to the file given in the parameters.

The i-th element of ids is the number to which the points in the i-th matrix in data belong to

Parameters:
data the feature vectors
ids IDs for the elements in data.
Returns:
true if apply successful or false otherwise.
bool lti::uciDataWriter::apply ( std::list< dmatrix > &  data  )  const

Writes data and ids to the file given in the parameters.

It is suggested that each element of the list is one Cluster

Parameters:
data the feature vectors
Returns:
true if apply successful or false otherwise.
bool lti::uciDataWriter::apply ( fmatrix data,
ivector ids 
) const

Writes data and ids to the file given in the parameters.

Parameters:
data the feature vectors
ids ids of the feature vectors
Returns:
true if apply successful or false otherwise.
bool lti::uciDataWriter::apply ( fmatrix data  )  const

Writes data to the file given in the parameters.

Parameters:
data the feature vectors
Returns:
true if apply successful or false otherwise.
bool lti::uciDataWriter::apply ( dmatrix data,
ivector ids 
) const

Writes data and ids to the file given in the parameters.

Parameters:
data the feature vectors
ids ids of the feature vectors
Returns:
true if apply successful or false otherwise.
bool lti::uciDataWriter::apply ( dmatrix data  )  const

Writes data to the file given in the parameters.

Parameters:
data the feature vectors
Returns:
true if apply successful or false otherwise.
virtual functor* lti::uciDataWriter::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::functor.

uciDataWriter& lti::uciDataWriter::copy ( const uciDataWriter other  ) 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.

const parameters& lti::uciDataWriter::getParameters (  )  const

returns used parameters

Reimplemented from lti::ioFunctor.

virtual const char* lti::uciDataWriter::getTypeName (  )  const [virtual]

returns the name of this type ("uciDataWriter")

Reimplemented from lti::ioFunctor.

uciDataWriter& lti::uciDataWriter::operator= ( const uciDataWriter other  ) 

alias for copy member

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.


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

Generated on Sat Apr 10 15:28:08 2010 for LTI-Lib by Doxygen 1.6.1