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

PLearn::BatchVMatrix Class Reference

VMat class that replicates small parts of a matrix (mini-batches), so that each mini-batch appears twice (consecutively). More...

#include <BatchVMatrix.h>

Inheritance diagram for PLearn::BatchVMatrix:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BatchVMatrix ()
 PLEARN_DECLARE_OBJECT (BatchVMatrix)
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.

int batch_size

Private Types

typedef VMatrix inherited

Private Member Functions

void build_ ()
 This does the actual building.


Private Attributes

int last_batch
int last_batch_size

Detailed Description

VMat class that replicates small parts of a matrix (mini-batches), so that each mini-batch appears twice (consecutively).

Definition at line 50 of file BatchVMatrix.h.


Member Typedef Documentation

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

Reimplemented from PLearn::VMatrix.

Definition at line 52 of file BatchVMatrix.h.


Constructor & Destructor Documentation

PLearn::BatchVMatrix::BatchVMatrix  )  [inline]
 

Definition at line 67 of file BatchVMatrix.h.


Member Function Documentation

void PLearn::BatchVMatrix::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 70 of file BatchVMatrix.cc.

References build_().

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

This does the actual building.

Reimplemented from PLearn::VMatrix.

Definition at line 79 of file BatchVMatrix.cc.

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

Referenced by build().

void PLearn::BatchVMatrix::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 49 of file BatchVMatrix.cc.

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

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

returns element (i,j)

Reimplemented from PLearn::VMatrix.

Definition at line 95 of file BatchVMatrix.cc.

References batch_size, k, last_batch, last_batch_size, and m.

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

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::VMatrix.

Definition at line 61 of file BatchVMatrix.cc.

References PLearn::deepCopyField(), and m.

PLearn::BatchVMatrix::PLEARN_DECLARE_OBJECT BatchVMatrix   ) 
 

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

sets element (i,j) to value

Reimplemented from PLearn::VMatrix.

Definition at line 109 of file BatchVMatrix.cc.

References batch_size, and m.


Member Data Documentation

int PLearn::BatchVMatrix::batch_size
 

Definition at line 58 of file BatchVMatrix.h.

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

int PLearn::BatchVMatrix::last_batch [private]
 

Definition at line 62 of file BatchVMatrix.h.

Referenced by build_(), and get().

int PLearn::BatchVMatrix::last_batch_size [private]
 

Definition at line 63 of file BatchVMatrix.h.

Referenced by build_(), and get().

VMat PLearn::BatchVMatrix::m
 

Public build options.

Definition at line 57 of file BatchVMatrix.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:00 2004 for PLearn by doxygen 1.3.7