#include <VVMatrix.h>
Inheritance diagram for PLearn::VVMatrix:
Public Member Functions | |
PLEARN_DECLARE_OBJECT (VVMatrix) | |
virtual void | build () |
Should call simply inherited::build(), then this class's build_(). | |
const string & | getCode () |
bool | isPrecomputedAndUpToDate () |
returns true if the .vmat is precomputed *and* if that precomputed data is more recent than the .vmat file | |
string | getPrecomputedDataName () |
VVMatrix (const string &filename_) | |
VVMatrix () | |
virtual real | get (int i, int j) const |
returns element (i,j) | |
virtual void | getSubRow (int i, int j, Vec v) const |
fills v with the subrow i lying between columns j (inclusive) and j+v.length() (exclusive) | |
virtual void | makeDeepCopyFromShallowCopy (map< const void *, void * > &copies) |
Transforms a shallow copy into a deep copy. | |
Static Public Member Functions | |
time_t | getDateOfVMat (const string &filename) |
get "real" date of .vmat according to its dependencies | |
VMat | buildFilteredVMatFromVPL (VMat source, const string &code, const string &ivfname, time_t date_of_code) |
returns the source VMat after filtering it with 'code' . | |
Public Attributes | |
string | the_filename |
Static Protected Member Functions | |
void | declareOptions (OptionList &ol) |
redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down) | |
VMat | createPreproVMat (const string &filename) |
loads a .vmat file and return the VMat object built from it | |
void | generateVMatIndex (VMat source, const string &meta_data_dir, const string &filename, time_t date_of_code, const string &in, size_t idx_prefilter, size_t cidx_prefilter, size_t idx_postfilter, size_t cidx_postfilter, size_t idx_process, size_t cidx_process, size_t idx_shuffle, size_t cidx_shuffle, size_t idx_join, size_t cidx_join) |
void | processJoinSection (const vector< string > &code, VMat &tmpsource) |
vector< vector< string > > | extractSourceMatrix (const string &str, const string &filename) |
void | generateFilterIndexFile (VMat source, const string &code, const string &ivfname) |
Protected Attributes | |
string | code |
VMat | the_mat |
Private Types | |
typedef VMatrix | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
Definition at line 48 of file VVMatrix.h.
|
Reimplemented from PLearn::VMatrix. Definition at line 53 of file VVMatrix.h. |
|
Definition at line 110 of file VVMatrix.h. References build_(), and the_filename. |
|
Definition at line 111 of file VVMatrix.h. |
|
Should call simply inherited::build(), then this class's build_(). This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object. Reimplemented from PLearn::VMatrix. Definition at line 600 of file VVMatrix.cc. References build_(). |
|
This does the actual building.
Reimplemented from PLearn::VMatrix. Definition at line 606 of file VVMatrix.cc. References code, createPreproVMat(), PLearn::force_mkdir(), PLearn::VMatrix::getMetaDataDir(), PLearn::PP< VMatrix >::isNull(), PLearn::VMat::length(), PLearn::makeExplicitPath(), PLearn::newObject(), PLERROR, PLearn::readFileAndMacroProcess(), PLearn::removeblanks(), PLearn::TVec< VMField >::resize(), the_filename, the_mat, and PLearn::VMat::width(). Referenced by build(), and VVMatrix(). |
|
returns the source VMat after filtering it with 'code' . ivfname is the name of the index file and date_of_code is the code last modification date. If existant, index file is used as is, provided its date is > the latest date of all files (code + all its dependencies) Definition at line 102 of file VVMatrix.cc. References generateFilterIndexFile(), PLearn::getNonBlankLines(), PLearn::isfile(), and PLearn::mtime(). Referenced by generateVMatIndex(). |
|
loads a .vmat file and return the VMat object built from it
Definition at line 344 of file VVMatrix.cc. References code, PLearn::endl(), PLearn::extract_directory(), extractSourceMatrix(), PLearn::force_mkdir(), PLearn::force_rmdir(), generateVMatIndex(), PLearn::getDataSet(), getDateOfVMat(), PLearn::hconcat(), PLearn::isdir(), PLearn::isfile(), PLearn::PP< VMatrix >::isNull(), PLearn::TVec< T >::length(), PLearn::mtime(), PLearn::mvforce(), NEW_SYNTAX_CHAR, PLearn::newObject(), PLearn::pathexists(), PLERROR, PLWARNING, processJoinSection(), PLearn::readFileAndMacroProcess(), PLearn::remove_trailing_slash(), PLearn::removeblanks(), PLearn::rm(), PLearn::TVec< T >::size(), slash, slash_char, PLearn::split(), PLearn::toint(), and PLearn::vconcat(). Referenced by build_(). |
|
redefine this in subclasses: call declareOption(...) for each option, and then call inherited::declareOptions(options) ( see the declareOption function further down) ex: static void declareOptions(OptionList& ol) { declareOption(ol, "inputsize", &MyObject::inputsize_, OptionBase::buildoption, "the size of the input\n it must be provided"); declareOption(ol, "weights", &MyObject::weights, OptionBase::learntoption, "the learnt model weights"); inherited::declareOptions(ol); } Reimplemented from PLearn::VMatrix. Definition at line 71 of file VVMatrix.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
Definition at line 113 of file VVMatrix.cc. References PLearn::extract_directory(), PLearn::file_exists(), PLearn::getNonBlankLines(), NEW_SYNTAX_CHAR, PLearn::removeblanks(), slash_char, and PLearn::split(). Referenced by createPreproVMat(), and getDateOfVMat(). |
|
Definition at line 80 of file VVMatrix.cc. References PLearn::IntVecFile::append(), PLearn::IntVecFile::close(), PLearn::VMatLanguage::compileString(), PLearn::VMat::fieldName(), PLearn::VMat::length(), PLearn::rm(), PLearn::VMatLanguage::run(), PLearn::Vec, and PLearn::VMat::width(). Referenced by buildFilteredVMatFromVPL(). |
|
Definition at line 219 of file VVMatrix.cc. References PLearn::IntVecFile::append(), buildFilteredVMatFromVPL(), code, PLearn::endl(), PLearn::IntVecFile::getVec(), PLearn::isfile(), PLearn::VMat::length(), PLearn::IntVecFile::length(), PLearn::manual_seed(), PLearn::mv(), PLERROR, processJoinSection(), PLearn::removeblanks(), PLearn::rm(), PLearn::seed(), PLearn::shuffleElements(), slash, PLearn::split(), and PLearn::toint(). Referenced by createPreproVMat(). |
|
returns element (i,j)
Reimplemented from PLearn::VMatrix. Definition at line 125 of file VVMatrix.h. References get(), and the_mat. Referenced by get(). |
|
Definition at line 94 of file VVMatrix.h. References code. |
|
get "real" date of .vmat according to its dependencies
Definition at line 142 of file VVMatrix.cc. References PLearn::extract_directory(), extractSourceMatrix(), PLearn::getDataSetDate(), PLearn::getDateOfCode(), PLearn::mtime(), PLERROR, PLearn::readFileAndMacroProcess(), slash_char, PLearn::split(), and PLearn::strlen(). Referenced by createPreproVMat(). |
|
Definition at line 333 of file VVMatrix.cc. References PLearn::isfile(), PLearn::pathexists(), PLearn::remove_trailing_slash(), slash, and the_filename. Referenced by PLearn::vmatmain(). |
|
fills v with the subrow i lying between columns j (inclusive) and j+v.length() (exclusive)
Reimplemented from PLearn::VMatrix. Definition at line 126 of file VVMatrix.h. References PLearn::VMat::getSubRow(), getSubRow(), and the_mat. Referenced by getSubRow(). |
|
returns true if the .vmat is precomputed *and* if that precomputed data is more recent than the .vmat file
Definition at line 321 of file VVMatrix.cc. References PLearn::VMatrix::getMtime(), PLearn::isfile(), PLearn::mtime(), PLearn::pathexists(), PLearn::remove_trailing_slash(), slash, and the_filename. Referenced by PLearn::vmatmain(). |
|
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::VMatrix. Definition at line 666 of file VVMatrix.cc. References PLearn::deepCopyField(), and the_mat. |
|
|
|
Definition at line 180 of file VVMatrix.cc. References PLearn::JoinVMatrix::addStatField(), PLearn::getDataSet(), PLearn::isBlank(), PLERROR, PLearn::removeblanks(), and PLearn::split(). Referenced by createPreproVMat(), and generateVMatIndex(). |
|
Definition at line 57 of file VVMatrix.h. Referenced by build_(), createPreproVMat(), generateVMatIndex(), and getCode(). |
|
Definition at line 86 of file VVMatrix.h. Referenced by build_(), getPrecomputedDataName(), isPrecomputedAndUpToDate(), and VVMatrix(). |
|
Definition at line 58 of file VVMatrix.h. Referenced by build_(), get(), getSubRow(), and makeDeepCopyFromShallowCopy(). |