Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::FilteredVMatrix Class Reference

#include <FilteredVMatrix.h>

Inheritance diagram for PLearn::FilteredVMatrix:

Inheritance graph
[legend]
Collaboration diagram for PLearn::FilteredVMatrix:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FilteredVMatrix ()
 Default constructor.

 FilteredVMatrix (VMat the_source, const string &program_string, const string &the_metadatadir="")
 Convenience constructor.

virtual void setMetaDataDir (const string &the_metadatadir)
 Also sets the source's meta-data dir if it's not already set.

virtual void build ()
 Should call simply inherited::build(), then this class's build_().

virtual void makeDeepCopyFromShallowCopy (map< const void *, void * > &copies)
 Transforms a shallow copy into a deep copy.

 PLEARN_DECLARE_OBJECT (FilteredVMatrix)
 Declares name and deepCopy methods.


Public Attributes

string prg

Protected Member Functions

void openIndex ()
 Generates the index file if it does not already exist.

virtual void getNewRow (int i, const Vec &v) const
 This is the only method requiring implementation.


Static Protected Member Functions

void declareOptions (OptionList &ol)
 Declares this class' options.


Protected Attributes

VMatLanguage program
IntVecFile indexes

Private Types

typedef SourceVMatrix inherited

Private Member Functions

void build_ ()
 This does the actual building.


Private Attributes

bool build_complete
 A custom hack to make sure openIndex() is not called before the build is complete.


Member Typedef Documentation

typedef SourceVMatrix PLearn::FilteredVMatrix::inherited [private]
 

Reimplemented from PLearn::SourceVMatrix.

Definition at line 55 of file FilteredVMatrix.h.

Referenced by FilteredVMatrix().


Constructor & Destructor Documentation

PLearn::FilteredVMatrix::FilteredVMatrix  ) 
 

Default constructor.

Definition at line 50 of file FilteredVMatrix.cc.

References inherited.

PLearn::FilteredVMatrix::FilteredVMatrix VMat  the_source,
const string program_string,
const string the_metadatadir = ""
 

Convenience constructor.

Definition at line 56 of file FilteredVMatrix.cc.

References build_().


Member Function Documentation

void PLearn::FilteredVMatrix::build  )  [virtual]
 

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::SourceVMatrix.

Definition at line 139 of file FilteredVMatrix.cc.

References build_(), and build_complete.

void PLearn::FilteredVMatrix::build_  )  [private]
 

This does the actual building.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 125 of file FilteredVMatrix.cc.

References build_complete, PLearn::VMatLanguage::compileString(), openIndex(), prg, program, PLearn::SourceVMatrix::setMetaInfoFromSource(), and PLearn::VMatLanguage::setSource().

Referenced by build(), and FilteredVMatrix().

void PLearn::FilteredVMatrix::declareOptions OptionList ol  )  [static, protected]
 

Declares this class' options.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 115 of file FilteredVMatrix.cc.

References PLearn::declareOption(), and PLearn::OptionList.

void PLearn::FilteredVMatrix::getNewRow int  i,
const Vec v
const [protected, virtual]
 

This is the only method requiring implementation.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 108 of file FilteredVMatrix.cc.

References indexes, PLearn::IntVecFile::length(), and PLERROR.

void PLearn::FilteredVMatrix::makeDeepCopyFromShallowCopy map< const void *, void * > &  copies  )  [virtual]
 

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 146 of file FilteredVMatrix.cc.

void PLearn::FilteredVMatrix::openIndex  )  [protected]
 

Generates the index file if it does not already exist.

If it exists and is up to date, simply opens it.

Definition at line 71 of file FilteredVMatrix.cc.

References PLearn::IntVecFile::append(), PLearn::IntVecFile::close(), PLearn::file_exists(), PLearn::VMatrix::getMetaDataDir(), PLearn::VMatrix::getMtime(), indexes, PLearn::IntVecFile::length(), PLearn::VMat::length(), PLearn::mtime(), PLearn::IntVecFile::open(), program, PLearn::rm(), PLearn::VMatLanguage::run(), PLearn::ProgressBar::update(), and PLearn::Vec.

Referenced by build_(), and setMetaDataDir().

PLearn::FilteredVMatrix::PLEARN_DECLARE_OBJECT FilteredVMatrix   ) 
 

Declares name and deepCopy methods.

void PLearn::FilteredVMatrix::setMetaDataDir const string the_metadatadir  )  [virtual]
 

Also sets the source's meta-data dir if it's not already set.

If there are fields that have no corresponding .smap .notes or .binning info files but the source has those files for a field with the same name, then those of the source will be set also for this vmatrix.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 98 of file FilteredVMatrix.cc.

References build_complete, and openIndex().


Member Data Documentation

bool PLearn::FilteredVMatrix::build_complete [private]
 

A custom hack to make sure openIndex() is not called before the build is complete.

Definition at line 61 of file FilteredVMatrix.h.

Referenced by build(), build_(), and setMetaDataDir().

IntVecFile PLearn::FilteredVMatrix::indexes [protected]
 

Definition at line 66 of file FilteredVMatrix.h.

Referenced by getNewRow(), and openIndex().

string PLearn::FilteredVMatrix::prg
 

Definition at line 78 of file FilteredVMatrix.h.

Referenced by build_().

VMatLanguage PLearn::FilteredVMatrix::program [protected]
 

Definition at line 65 of file FilteredVMatrix.h.

Referenced by build_(), and openIndex().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:26:15 2004 for PLearn by doxygen 1.3.7