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

PLearn::UniformVMatrix Class Reference

#include <UniformVMatrix.h>

Inheritance diagram for PLearn::UniformVMatrix:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 UniformVMatrix ()
 default constructor (for automatic deserialization)

 UniformVMatrix (real the_minval, real the_maxval, int the_width)
 PLEARN_DECLARE_OBJECT (UniformVMatrix)
virtual void build ()
 Should call simply inherited::build(), then this class's build_().

virtual real get (int i, int j) const
 returns element (i,j)

virtual void getSubRow (int i, int j, Vec v) const
 fills v with the subrow i lying between columns j (inclusive) and j+v.length() (exclusive)


Static Public 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

real minval
real maxval

Private Types

typedef VMatrix inherited

Private Member Functions

void build_ ()
 This does the actual building.


Member Typedef Documentation

typedef VMatrix PLearn::UniformVMatrix::inherited [private]
 

Reimplemented from PLearn::VMatrix.

Definition at line 55 of file UniformVMatrix.h.

Referenced by UniformVMatrix().


Constructor & Destructor Documentation

PLearn::UniformVMatrix::UniformVMatrix  ) 
 

default constructor (for automatic deserialization)

Definition at line 52 of file UniformVMatrix.cc.

PLearn::UniformVMatrix::UniformVMatrix real  the_minval,
real  the_maxval,
int  the_width
 

Definition at line 57 of file UniformVMatrix.cc.

References inherited.


Member Function Documentation

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

References build_().

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

This does the actual building.

Reimplemented from PLearn::VMatrix.

Definition at line 69 of file UniformVMatrix.cc.

Referenced by build().

void PLearn::UniformVMatrix::declareOptions OptionList ol  )  [static]
 

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 UniformVMatrix.cc.

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

real PLearn::UniformVMatrix::get int  i,
int  j
const [virtual]
 

returns element (i,j)

Reimplemented from PLearn::VMatrix.

Definition at line 81 of file UniformVMatrix.cc.

References maxval, minval, and PLearn::uniform_sample().

void PLearn::UniformVMatrix::getSubRow int  i,
int  j,
Vec  v
const [virtual]
 

fills v with the subrow i lying between columns j (inclusive) and j+v.length() (exclusive)

Reimplemented from PLearn::VMatrix.

Definition at line 87 of file UniformVMatrix.cc.

References k, PLearn::TVec< T >::length(), maxval, minval, PLearn::uniform_sample(), and PLearn::Vec.

PLearn::UniformVMatrix::PLEARN_DECLARE_OBJECT UniformVMatrix   ) 
 


Member Data Documentation

real PLearn::UniformVMatrix::maxval [protected]
 

Definition at line 59 of file UniformVMatrix.h.

Referenced by get(), and getSubRow().

real PLearn::UniformVMatrix::minval [protected]
 

Definition at line 58 of file UniformVMatrix.h.

Referenced by get(), and getSubRow().


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