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

PLearn::PairsVMatrix Class Reference

#include <PairsVMatrix.h>

Inheritance diagram for PLearn::PairsVMatrix:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 PairsVMatrix ()
 default constructor (for automatic deserialization)

 PairsVMatrix (Mat the_data1, Mat the_data2)
 PLEARN_DECLARE_OBJECT (PairsVMatrix)
virtual void build ()
 Should call simply inherited::build(), then this class's build_().

virtual void reset_dimensions ()
 in case the dimensions of an underlying vmat has changed, recompute it


Protected Member Functions

virtual void getNewRow (int ij, const Vec &samplevec) 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 data1
Mat data2

Private Types

typedef RowBufferedVMatrix inherited

Private Member Functions

void build_ ()
 This does the actual building.


Detailed Description

like PairVMatrix but samples from all the pairs in order (traversing all the nxn pairs), outputs a Vec that is the concatenation of the i-th row of data1 and j-th row of data2. The j-index moves faster than the i-index.

Definition at line 60 of file PairsVMatrix.h.


Member Typedef Documentation

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

Reimplemented from PLearn::RowBufferedVMatrix.

Definition at line 62 of file PairsVMatrix.h.

Referenced by PairsVMatrix().


Constructor & Destructor Documentation

PLearn::PairsVMatrix::PairsVMatrix  ) 
 

default constructor (for automatic deserialization)

Definition at line 51 of file PairsVMatrix.cc.

PLearn::PairsVMatrix::PairsVMatrix Mat  the_data1,
Mat  the_data2
 

Definition at line 55 of file PairsVMatrix.cc.

References inherited, and PLearn::Mat.


Member Function Documentation

void PLearn::PairsVMatrix::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 62 of file PairsVMatrix.cc.

References build_().

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

This does the actual building.

Reimplemented from PLearn::VMatrix.

Definition at line 69 of file PairsVMatrix.cc.

Referenced by build().

void PLearn::PairsVMatrix::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 74 of file PairsVMatrix.cc.

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

void PLearn::PairsVMatrix::getNewRow int  ij,
const Vec samplevec
const [protected, virtual]
 

This is the only method requiring implementation in subclasses.

Implements PLearn::RowBufferedVMatrix.

Definition at line 81 of file PairsVMatrix.cc.

References PLearn::TVec< T >::data(), data1, data2, k, PLearn::TMat< T >::length(), and PLearn::Vec.

PLearn::PairsVMatrix::PLEARN_DECLARE_OBJECT PairsVMatrix   ) 
 

virtual void PLearn::PairsVMatrix::reset_dimensions  )  [inline, virtual]
 

in case the dimensions of an underlying vmat has changed, recompute it

Reimplemented from PLearn::VMatrix.

Definition at line 87 of file PairsVMatrix.h.

References PLERROR.


Member Data Documentation

Mat PLearn::PairsVMatrix::data1 [protected]
 

Definition at line 65 of file PairsVMatrix.h.

Referenced by getNewRow().

Mat PLearn::PairsVMatrix::data2 [protected]
 

Definition at line 66 of file PairsVMatrix.h.

Referenced by getNewRow().


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