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

PLearn::MovingAverageVMatrix Class Reference

#include <MovingAverageVMatrix.h>

Inheritance diagram for PLearn::MovingAverageVMatrix:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

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


Public Attributes

TVec< stringcolumns_to_average
TVec< intwindow_sizes
bool centered_windows

Static Protected Member Functions

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


Protected Attributes

Mat sums
Mat ma
TMat< intnnonmissing
Vec row
Vec previous_sourcerow
TVec< intcolumns
int max_window_size

Private Types

typedef SourceVMatrix inherited

Private Member Functions

void build_ ()
 This does the actual building.


Member Typedef Documentation

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

Reimplemented from PLearn::SourceVMatrix.

Definition at line 54 of file MovingAverageVMatrix.h.

Referenced by MovingAverageVMatrix().


Constructor & Destructor Documentation

PLearn::MovingAverageVMatrix::MovingAverageVMatrix  ) 
 

Definition at line 50 of file MovingAverageVMatrix.cc.

References inherited.


Member Function Documentation

void PLearn::MovingAverageVMatrix::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 203 of file MovingAverageVMatrix.cc.

References build_().

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

This does the actual building.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 150 of file MovingAverageVMatrix.cc.

References c_str(), PLearn::TMat< int >::clear(), columns, columns_to_average, PLearn::TMat< T >::fill(), PLearn::VMatrix::getMtime(), PLearn::VMatrix::hasFieldInfos(), PLearn::VMat::length(), PLearn::TVec< int >::length(), PLearn::TVec< string >::length(), ma, PLearn::max(), max_window_size, MISSING_VALUE, nnonmissing, PLERROR, previous_sourcerow, PLearn::TMat< int >::resize(), PLearn::TMat< T >::resize(), PLearn::TVec< int >::resize(), PLearn::TVec< T >::resize(), row, PLearn::TVec< T >::size(), PLearn::TVec< T >::subVec(), sums, PLearn::tostring(), PLearn::VMat::width(), and window_sizes.

Referenced by build().

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

Declares this class' options.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 129 of file MovingAverageVMatrix.cc.

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

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

This is the only method requiring implementation.

Definition at line 66 of file MovingAverageVMatrix.cc.

References centered_windows, columns, columns_to_average, PLearn::is_missing(), k, PLearn::TVec< T >::length(), PLearn::TVec< string >::length(), PLearn::TVec< int >::length(), PLearn::VMatrix::length(), ma, max_window_size, PLearn::min(), MISSING_VALUE, nnonmissing, previous_sourcerow, row, sums, PLearn::Vec, and window_sizes.

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

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 209 of file MovingAverageVMatrix.cc.

References columns, columns_to_average, PLearn::deepCopyField(), sums, and window_sizes.

PLearn::MovingAverageVMatrix::PLEARN_DECLARE_OBJECT MovingAverageVMatrix   ) 
 

Declares name and deepCopy methods.


Member Data Documentation

bool PLearn::MovingAverageVMatrix::centered_windows
 

Definition at line 78 of file MovingAverageVMatrix.h.

Referenced by getNewRow().

TVec<int> PLearn::MovingAverageVMatrix::columns [protected]
 

Definition at line 66 of file MovingAverageVMatrix.h.

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

TVec<string> PLearn::MovingAverageVMatrix::columns_to_average
 

Definition at line 76 of file MovingAverageVMatrix.h.

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

Mat PLearn::MovingAverageVMatrix::ma [protected]
 

Definition at line 62 of file MovingAverageVMatrix.h.

Referenced by build_(), and getNewRow().

int PLearn::MovingAverageVMatrix::max_window_size [protected]
 

Definition at line 67 of file MovingAverageVMatrix.h.

Referenced by build_(), and getNewRow().

TMat<int> PLearn::MovingAverageVMatrix::nnonmissing [protected]
 

Definition at line 63 of file MovingAverageVMatrix.h.

Referenced by build_(), and getNewRow().

Vec PLearn::MovingAverageVMatrix::previous_sourcerow [protected]
 

Definition at line 65 of file MovingAverageVMatrix.h.

Referenced by build_(), and getNewRow().

Vec PLearn::MovingAverageVMatrix::row [protected]
 

Definition at line 64 of file MovingAverageVMatrix.h.

Referenced by build_(), and getNewRow().

Mat PLearn::MovingAverageVMatrix::sums [protected]
 

Definition at line 61 of file MovingAverageVMatrix.h.

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

TVec<int> PLearn::MovingAverageVMatrix::window_sizes
 

Definition at line 77 of file MovingAverageVMatrix.h.

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


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