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

PLearn::IndexedVMatrix Class Reference

VMat class that sees a matrix as a collection of triplets (row, column, value) Thus it is a N x 3 matrix, with N = the number of elements in the original matrix. More...

#include <IndexedVMatrix.h>

Inheritance diagram for PLearn::IndexedVMatrix:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 IndexedVMatrix ()
 PLEARN_DECLARE_OBJECT (IndexedVMatrix)
virtual void makeDeepCopyFromShallowCopy (map< const void *, void * > &copies)
 Transforms a shallow copy into a deep copy.

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 put (int i, int j, real value)
 sets element (i,j) to value


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)


Public Attributes

VMat m
 Public build options.


Private Types

typedef VMatrix inherited

Private Member Functions

void build_ ()
 This does the actual building.


Detailed Description

VMat class that sees a matrix as a collection of triplets (row, column, value) Thus it is a N x 3 matrix, with N = the number of elements in the original matrix.

Definition at line 52 of file IndexedVMatrix.h.


Member Typedef Documentation

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

Reimplemented from PLearn::VMatrix.

Definition at line 54 of file IndexedVMatrix.h.


Constructor & Destructor Documentation

PLearn::IndexedVMatrix::IndexedVMatrix  )  [inline]
 

Definition at line 61 of file IndexedVMatrix.h.


Member Function Documentation

void PLearn::IndexedVMatrix::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 61 of file IndexedVMatrix.cc.

References build_().

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

This does the actual building.

Reimplemented from PLearn::VMatrix.

Definition at line 70 of file IndexedVMatrix.cc.

References PLearn::VMat::length(), m, and PLearn::VMat::width().

Referenced by build().

void PLearn::IndexedVMatrix::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 48 of file IndexedVMatrix.cc.

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

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

returns element (i,j)

Reimplemented from PLearn::VMatrix.

Definition at line 82 of file IndexedVMatrix.cc.

References m, PLERROR, and PLearn::VMat::width().

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

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::VMatrix.

Definition at line 55 of file IndexedVMatrix.cc.

References PLearn::deepCopyField(), and m.

PLearn::IndexedVMatrix::PLEARN_DECLARE_OBJECT IndexedVMatrix   ) 
 

void PLearn::IndexedVMatrix::put int  i,
int  j,
real  value
[virtual]
 

sets element (i,j) to value

Reimplemented from PLearn::VMatrix.

Definition at line 102 of file IndexedVMatrix.cc.

References m, PLERROR, and PLearn::VMat::width().


Member Data Documentation

VMat PLearn::IndexedVMatrix::m
 

Public build options.

Definition at line 58 of file IndexedVMatrix.h.

Referenced by build_(), get(), makeDeepCopyFromShallowCopy(), and put().


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