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

PLearn::MultiInstanceVMatrix Class Reference

#include <MultiInstanceVMatrix.h>

Inheritance diagram for PLearn::MultiInstanceVMatrix:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MultiInstanceVMatrix ()
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 (MultiInstanceVMatrix)
 Declares name and deepCopy methods.


Public Attributes

int header_lines_to_skip

Protected Member Functions

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


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)


Protected Attributes

Mat data_
string filename_
vector< intconfigs_
vector< pair< string, int > > names_
int source_targetsize

Private Types

typedef RowBufferedVMatrix inherited

Private Member Functions

void build_ ()
 This does the actual building.


Member Typedef Documentation

typedef RowBufferedVMatrix PLearn::MultiInstanceVMatrix::inherited [private]
 

Reimplemented from PLearn::RowBufferedVMatrix.

Definition at line 56 of file MultiInstanceVMatrix.h.

Referenced by MultiInstanceVMatrix().


Constructor & Destructor Documentation

PLearn::MultiInstanceVMatrix::MultiInstanceVMatrix  ) 
 

Definition at line 54 of file MultiInstanceVMatrix.cc.

References inherited, and PLearn::Mat.


Member Function Documentation

void PLearn::MultiInstanceVMatrix::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::VMatrix.

Definition at line 245 of file MultiInstanceVMatrix.cc.

References build_().

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

This does the actual building.

Reimplemented from PLearn::VMatrix.

Definition at line 116 of file MultiInstanceVMatrix.cc.

References configs_, count, data_, filename_, header_lines_to_skip, PLearn::mtime(), names_, PLERROR, PLearn::TMat< T >::resize(), PLearn::skipBlanksAndComments(), source_targetsize, and PLearn::split().

Referenced by build().

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

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 91 of file MultiInstanceVMatrix.cc.

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

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

This is the only method requiring implementation in subclasses.

Implements PLearn::RowBufferedVMatrix.

Definition at line 86 of file MultiInstanceVMatrix.cc.

References data_, and PLearn::Vec.

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

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::RowBufferedVMatrix.

Definition at line 251 of file MultiInstanceVMatrix.cc.

References data_, PLearn::deepCopyField(), and PLERROR.

PLearn::MultiInstanceVMatrix::PLEARN_DECLARE_OBJECT MultiInstanceVMatrix   ) 
 

Declares name and deepCopy methods.


Member Data Documentation

vector<int> PLearn::MultiInstanceVMatrix::configs_ [protected]
 

Definition at line 62 of file MultiInstanceVMatrix.h.

Referenced by build_().

Mat PLearn::MultiInstanceVMatrix::data_ [protected]
 

Definition at line 60 of file MultiInstanceVMatrix.h.

Referenced by build_(), getNewRow(), and makeDeepCopyFromShallowCopy().

string PLearn::MultiInstanceVMatrix::filename_ [protected]
 

Definition at line 61 of file MultiInstanceVMatrix.h.

Referenced by build_().

int PLearn::MultiInstanceVMatrix::header_lines_to_skip
 

Definition at line 72 of file MultiInstanceVMatrix.h.

Referenced by build_().

vector< pair<string, int> > PLearn::MultiInstanceVMatrix::names_ [protected]
 

Definition at line 63 of file MultiInstanceVMatrix.h.

Referenced by build_().

int PLearn::MultiInstanceVMatrix::source_targetsize [protected]
 

Definition at line 64 of file MultiInstanceVMatrix.h.

Referenced by build_().


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