latest version v1.9 - last update 10 Apr 2010 |
class to load lnc-files (ascii format to store feature vectors) More...
#include <ltiLncFeatureFile.h>
Public Member Functions | |
loadLnc () | |
loadLnc (const parameters &par) | |
bool | apply (dvector &vct, patternId &id) |
bool | apply (dmatrix &vcts, ivector &ids) |
bool | apply (dmatrix &vcts, ivector &ids, std::map< int, std::string > &names) |
bool | apply (dmatrix &vcts, ivector &ids, std::vector< std::string > &attribs, std::map< int, std::string > &names) |
bool | apply (dmatrix &vcts, ivector &ids, std::vector< std::string > &attribs) |
bool | load (const std::string &filename, dmatrix &vcts, ivector &ids, const bool useCnc=false) |
bool | load (const std::string &filename, dmatrix &vcts, ivector &ids, std::vector< std::string > &attribs, const bool useCnc=false) |
bool | load (const std::string &filename, dmatrix &vcts, ivector &ids, std::map< int, std::string > &names, const bool useCnc=false) |
bool | load (const std::string &filename, dmatrix &vcts, ivector &ids, std::vector< std::string > &attribs, std::map< int, std::string > &names, const bool useCnc=false) |
void | getClassNames (std::map< int, std::string > &names) const |
void | reset () |
virtual functor * | clone () const |
class to load lnc-files (ascii format to store feature vectors)
lti::loadLnc::loadLnc | ( | ) |
Default constructor.
Referenced by clone().
lti::loadLnc::loadLnc | ( | const parameters & | par | ) |
Constructor with parameters.
load all the vectors in the file and leave the results in the given matrix.
The i-th row of the matrix will be the i-th vector on the file.
vcts | the matrix where the vectors will be written | |
ids | a vector, the class ids for each vector in the matrix. The i-th element of the vector contains the id of the i-th row of the matrix. | |
attribs | a vector of std::string with the attributes for each pattern in the file |
bool lti::loadLnc::apply | ( | dmatrix & | vcts, | |
ivector & | ids, | |||
std::vector< std::string > & | attribs, | |||
std::map< int, std::string > & | names | |||
) |
load all the vectors in the file and leave the results in the given matrix.
The i-th row of the matrix will be the i-th vector on the file.
vcts | the matrix where the vectors will be written | |
ids | a vector the class ids for each vector in the matrix. The i-th element of the vector contains the id of the i-th row of the matrix. | |
attribs | a vector of std::string with the attributes for each pattern in the file | |
names | a table with the corresponding names for each object id |
load all the vectors in the file and leave the results in the given matrix.
The i-th row of the matrix will be the i-th vector on the file.
vcts | the matrix where the vectors will be written | |
ids | a vector the class ids for each vector in the matrix. The i-th element of the vector contains the id of the i-th row of the matrix. | |
names | a table with the corresponding names for each object id |
load all the vectors in the file and leave the results in the given matrix.
The i-th row of the matrix will be the i-th vector on the file.
vcts | the matrix where the vectors will be written | |
ids | a vector the class ids for each vector in the matrix. The i-th element of the vector contains the id of the i-th row of the matrix. |
load the next vector in the file.
vct | the vector object, where the readed data will be written | |
id | the id of the class the vector belongs to. |
virtual functor* lti::loadLnc::clone | ( | ) | const [inline, virtual] |
void lti::loadLnc::getClassNames | ( | std::map< int, std::string > & | names | ) | const |
returns a map with the names of the classes for each object id.
bool lti::loadLnc::load | ( | const std::string & | filename, | |
dmatrix & | vcts, | |||
ivector & | ids, | |||
std::vector< std::string > & | attribs, | |||
std::map< int, std::string > & | names, | |||
const bool | useCnc = false | |||
) |
shortcut to read the given lnc file, ignoring the filenames
filename | name of the file to be loaded | |
vcts | the matrix where the vectors will be written | |
ids | a vector the class ids for each vector in the matrix. The i-th element of the vector contains the id of the i-th row of the matrix. | |
attribs | a vector of std::string with the attributes for each pattern in the file | |
names | a table with the corresponding names for each object id | |
useCnc | use a class name file (extension cnc) to get the object names and corresponding ids. |
bool lti::loadLnc::load | ( | const std::string & | filename, | |
dmatrix & | vcts, | |||
ivector & | ids, | |||
std::map< int, std::string > & | names, | |||
const bool | useCnc = false | |||
) |
shortcut to read the given lnc file, ignoring the filenames
filename | name of the file to be loaded | |
vcts | the matrix where the vectors will be written | |
ids | a vector the class ids for each vector in the matrix. The i-th element of the vector contains the id of the i-th row of the matrix. | |
names | a table with the corresponding names for each object id | |
useCnc | use a class name file (extension cnc) to get the object names and corresponding ids. |
bool lti::loadLnc::load | ( | const std::string & | filename, | |
dmatrix & | vcts, | |||
ivector & | ids, | |||
std::vector< std::string > & | attribs, | |||
const bool | useCnc = false | |||
) |
shortcut to read the given lnc file, ignoring the filenames
filename | name of the file to be loaded | |
vcts | the matrix where the vectors will be written | |
ids | a vector the class ids for each vector in the matrix. The i-th element of the vector contains the id of the i-th row of the matrix. | |
attribs | a vector of std::string with the attributes for each pattern in the file | |
useCnc | use a class name file (extension cnc) to get the object names and corresponding ids. |
bool lti::loadLnc::load | ( | const std::string & | filename, | |
dmatrix & | vcts, | |||
ivector & | ids, | |||
const bool | useCnc = false | |||
) |
shortcut to read the given lnc file, ignoring the filenames
filename | name of the file to be loaded | |
vcts | the matrix where the vectors will be written | |
ids | a vector the class ids for each vector in the matrix. The i-th element of the vector contains the id of the i-th row of the matrix. | |
useCnc | use a class name file (extension cnc) to get the object names and corresponding ids. |
void lti::loadLnc::reset | ( | ) |
restart reading the file (use only when a file need to be readed again)