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

PLearn::SourceVMatrix Class Reference

#include <SourceVMatrix.h>

Inheritance diagram for PLearn::SourceVMatrix:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

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


Public Attributes

VMat source

Protected Member Functions

void setMetaInfoFromSource ()
 Sets all meta info (length_, width_, inputsize_, targetsize_, weightsize_, fieldnames, ...) that is not already set, by copying it from the source's Modification time is also set to the latest of the current mtime of this vmat and of the mtime of the source.

virtual void getNewRow (int i, const Vec &v) const
 Must be implemented in subclasses: default version returns an error.


Static Protected Member Functions

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


Protected Attributes

Vec sourcerow
 To be used in subclasses for convenience.


Private Types

typedef RowBufferedVMatrix inherited

Private Member Functions

void build_ ()
 This does the actual building.


Member Typedef Documentation

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

Reimplemented from PLearn::RowBufferedVMatrix.

Reimplemented in PLearn::BootstrapVMatrix, PLearn::CenteredVMatrix, PLearn::CumVMatrix, PLearn::FilteredVMatrix, PLearn::GetInputVMatrix, PLearn::KNNVMatrix, PLearn::LocalNeighborsDifferencesVMatrix, PLearn::MovingAverageVMatrix, PLearn::PrecomputedVMatrix, PLearn::ProcessingVMatrix, PLearn::RemoveDuplicateVMatrix, PLearn::RowsSubVMatrix, PLearn::SelectColumnsVMatrix, PLearn::SelectRowsVMatrix, PLearn::SortRowsVMatrix, PLearn::SubInputVMatrix, PLearn::TransposeVMatrix, and PLearn::UpsideDownVMatrix.

Definition at line 66 of file SourceVMatrix.h.

Referenced by SourceVMatrix().


Constructor & Destructor Documentation

PLearn::SourceVMatrix::SourceVMatrix  ) 
 

Definition at line 50 of file SourceVMatrix.cc.

References inherited.

PLearn::SourceVMatrix::SourceVMatrix VMat  the_source  )  [inline]
 

Definition at line 97 of file SourceVMatrix.h.

References source.


Member Function Documentation

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

Reimplemented in PLearn::BootstrapVMatrix, PLearn::CenteredVMatrix, PLearn::CumVMatrix, PLearn::FilteredVMatrix, PLearn::GetInputVMatrix, PLearn::KNNVMatrix, PLearn::LocalNeighborsDifferencesVMatrix, PLearn::MovingAverageVMatrix, PLearn::PrecomputedVMatrix, PLearn::ProcessingVMatrix, PLearn::RemoveDuplicateVMatrix, PLearn::RowsSubVMatrix, PLearn::SelectColumnsVMatrix, PLearn::SelectRowsVMatrix, PLearn::SortRowsVMatrix, PLearn::SubInputVMatrix, PLearn::TransposeVMatrix, and PLearn::UpsideDownVMatrix.

Definition at line 163 of file SourceVMatrix.cc.

References build_().

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

This does the actual building.

Reimplemented from PLearn::VMatrix.

Reimplemented in PLearn::BootstrapVMatrix, PLearn::CenteredVMatrix, PLearn::CumVMatrix, PLearn::FilteredVMatrix, PLearn::GetInputVMatrix, PLearn::KNNVMatrix, PLearn::LocalNeighborsDifferencesVMatrix, PLearn::MovingAverageVMatrix, PLearn::PrecomputedVMatrix, PLearn::ProcessingVMatrix, PLearn::RemoveDuplicateVMatrix, PLearn::RowsSubVMatrix, PLearn::SelectColumnsVMatrix, PLearn::SelectRowsVMatrix, PLearn::SortRowsVMatrix, PLearn::SubInputVMatrix, PLearn::TransposeVMatrix, and PLearn::UpsideDownVMatrix.

Definition at line 105 of file SourceVMatrix.cc.

Referenced by build().

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

Declares this class' options.

Reimplemented from PLearn::VMatrix.

Reimplemented in PLearn::BootstrapVMatrix, PLearn::CenteredVMatrix, PLearn::CumVMatrix, PLearn::FilteredVMatrix, PLearn::GetInputVMatrix, PLearn::KNNVMatrix, PLearn::LocalNeighborsDifferencesVMatrix, PLearn::MovingAverageVMatrix, PLearn::PrecomputedVMatrix, PLearn::ProcessingVMatrix, PLearn::RemoveDuplicateVMatrix, PLearn::RowsSubVMatrix, PLearn::SelectColumnsVMatrix, PLearn::SelectRowsVMatrix, PLearn::SortRowsVMatrix, PLearn::SubInputVMatrix, PLearn::TransposeVMatrix, and PLearn::UpsideDownVMatrix.

Definition at line 87 of file SourceVMatrix.cc.

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

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

Must be implemented in subclasses: default version returns an error.

Implements PLearn::RowBufferedVMatrix.

Reimplemented in PLearn::CenteredVMatrix, PLearn::CumVMatrix, PLearn::FilteredVMatrix, PLearn::KNNVMatrix, PLearn::LocalNeighborsDifferencesVMatrix, PLearn::PrecomputedVMatrix, PLearn::ProcessingVMatrix, PLearn::SelectColumnsVMatrix, PLearn::SelectRowsVMatrix, PLearn::SubInputVMatrix, and PLearn::TransposeVMatrix.

Definition at line 179 of file SourceVMatrix.cc.

References PLERROR.

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

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::RowBufferedVMatrix.

Reimplemented in PLearn::CenteredVMatrix, PLearn::CumVMatrix, PLearn::FilteredVMatrix, PLearn::GetInputVMatrix, PLearn::KNNVMatrix, PLearn::LocalNeighborsDifferencesVMatrix, PLearn::MovingAverageVMatrix, PLearn::PrecomputedVMatrix, PLearn::ProcessingVMatrix, PLearn::RemoveDuplicateVMatrix, PLearn::RowsSubVMatrix, PLearn::SelectColumnsVMatrix, PLearn::SelectRowsVMatrix, PLearn::SortRowsVMatrix, PLearn::SubInputVMatrix, PLearn::TransposeVMatrix, and PLearn::UpsideDownVMatrix.

Definition at line 169 of file SourceVMatrix.cc.

References PLearn::deepCopyField(), source, and sourcerow.

PLearn::SourceVMatrix::PLEARN_DECLARE_OBJECT SourceVMatrix   ) 
 

Declares name and deepCopy methods.

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

Reimplemented in PLearn::FilteredVMatrix, PLearn::PrecomputedVMatrix, and PLearn::ProcessingVMatrix.

Definition at line 65 of file SourceVMatrix.cc.

References PLearn::file_exists(), PLearn::VMatrix::hasFieldInfos(), slash, and source.

void PLearn::SourceVMatrix::setMetaInfoFromSource  )  [protected]
 

Sets all meta info (length_, width_, inputsize_, targetsize_, weightsize_, fieldnames, ...) that is not already set, by copying it from the source's Modification time is also set to the latest of the current mtime of this vmat and of the mtime of the source.

This method is mostly to simplify writing subclass' build_ method, which may call it after first setting the fields that it doesn't want copied from the source.

Definition at line 115 of file SourceVMatrix.cc.

References PLearn::VMatrix::getMtime(), PLearn::VMatrix::hasFieldInfos(), PLearn::TVec< map< string, real > >::length(), PLearn::TVec< map< real, string > >::length(), PLearn::VMat::length(), PLearn::max(), PLearn::TVec< map< string, real > >::resize(), PLearn::TVec< map< real, string > >::resize(), source, PLearn::VMatrix::width(), and PLearn::VMat::width().

Referenced by PLearn::UpsideDownVMatrix::build_(), PLearn::TransposeVMatrix::build_(), PLearn::SubInputVMatrix::build_(), PLearn::RowsSubVMatrix::build_(), PLearn::ProcessingVMatrix::build_(), PLearn::PrecomputedVMatrix::build_(), PLearn::KNNVMatrix::build_(), PLearn::FilteredVMatrix::build_(), and PLearn::CenteredVMatrix::build_().


Member Data Documentation

VMat PLearn::SourceVMatrix::source
 

Definition at line 85 of file SourceVMatrix.h.

Referenced by PLearn::local_neighbors_differences(), makeDeepCopyFromShallowCopy(), setMetaDataDir(), setMetaInfoFromSource(), and SourceVMatrix().

Vec PLearn::SourceVMatrix::sourcerow [protected]
 

To be used in subclasses for convenience.

Definition at line 77 of file SourceVMatrix.h.

Referenced by makeDeepCopyFromShallowCopy().


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