PLearn 0.1
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Private Types | Private Member Functions
PLearn::RepeatVMatrix Class Reference

#include <RepeatVMatrix.h>

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

List of all members.

Public Member Functions

 RepeatVMatrix ()
 Default constructor.
virtual void build ()
 Simply calls inherited::build() then build_().
virtual void makeDeepCopyFromShallowCopy (CopiesMap &copies)
 Transforms a shallow copy into a deep copy.
virtual string classname () const
virtual OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual RepeatVMatrixdeepCopy (CopiesMap &copies) const

Static Public Member Functions

static string _classname_ ()
 Declares name and deepCopy methods.
static OptionList_getOptionList_ ()
static RemoteMethodMap_getRemoteMethodMap_ ()
static Object_new_instance_for_typemap_ ()
static bool _isa_ (const Object *o)
static void _static_initialize_ ()
static const PPathdeclaringFile ()

Public Attributes

int repeat_n_times
 Number of times to repeat the source VMatrix.

Static Public Attributes

static StaticInitializer _static_initializer_

Protected Member Functions

virtual void getNewRow (int i, const Vec &v) const
 Fill the vector 'v' with the content of the i-th row.

Static Protected Member Functions

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

Private Types

typedef SourceVMatrix inherited

Private Member Functions

void build_ ()
 This does the actual building.

Detailed Description

Definition at line 51 of file RepeatVMatrix.h.


Member Typedef Documentation

Reimplemented from PLearn::SourceVMatrix.

Definition at line 56 of file RepeatVMatrix.h.


Constructor & Destructor Documentation

PLearn::RepeatVMatrix::RepeatVMatrix ( )

Default constructor.

Definition at line 52 of file RepeatVMatrix.cc.

  : repeat_n_times(1)
{}

Member Function Documentation

string PLearn::RepeatVMatrix::_classname_ ( ) [static]

Declares name and deepCopy methods.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 60 of file RepeatVMatrix.cc.

OptionList & PLearn::RepeatVMatrix::_getOptionList_ ( ) [static]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 60 of file RepeatVMatrix.cc.

RemoteMethodMap & PLearn::RepeatVMatrix::_getRemoteMethodMap_ ( ) [static]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 60 of file RepeatVMatrix.cc.

bool PLearn::RepeatVMatrix::_isa_ ( const Object o) [static]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 60 of file RepeatVMatrix.cc.

Object * PLearn::RepeatVMatrix::_new_instance_for_typemap_ ( ) [static]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 60 of file RepeatVMatrix.cc.

StaticInitializer RepeatVMatrix::_static_initializer_ & PLearn::RepeatVMatrix::_static_initialize_ ( ) [static]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 60 of file RepeatVMatrix.cc.

void PLearn::RepeatVMatrix::build ( ) [virtual]

Simply calls inherited::build() then build_().

Reimplemented from PLearn::SourceVMatrix.

Definition at line 76 of file RepeatVMatrix.cc.

References PLearn::SourceVMatrix::build(), and build_().

Referenced by PLearn::repeat_vmatrix().

Here is the call graph for this function:

Here is the caller graph for this function:

void PLearn::RepeatVMatrix::build_ ( ) [private]

This does the actual building.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 85 of file RepeatVMatrix.cc.

References PLearn::VMat::length(), PLearn::VMatrix::length_, PLERROR, repeat_n_times, PLearn::SourceVMatrix::setMetaInfoFromSource(), and PLearn::SourceVMatrix::source.

Referenced by build().

{
  if(source)
  {
    setMetaInfoFromSource();
    length_ = source->length()*repeat_n_times;
    if(repeat_n_times < 1)
      PLERROR("In RepeatVMatrix::build_(): repeat_n_times cannot be < 1");
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

string PLearn::RepeatVMatrix::classname ( ) const [virtual]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 60 of file RepeatVMatrix.cc.

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

Declares this class' options.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 65 of file RepeatVMatrix.cc.

References PLearn::OptionBase::buildoption, PLearn::declareOption(), PLearn::SourceVMatrix::declareOptions(), and repeat_n_times.

{
  declareOption(ol, "repeat_n_times", &RepeatVMatrix::repeat_n_times, OptionBase::buildoption,
                "Number of times to repeat the source VMatrix.\n");

  inherited::declareOptions(ol);
}

Here is the call graph for this function:

static const PPath& PLearn::RepeatVMatrix::declaringFile ( ) [inline, static]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 111 of file RepeatVMatrix.h.

{
RepeatVMatrix * PLearn::RepeatVMatrix::deepCopy ( CopiesMap copies) const [virtual]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 60 of file RepeatVMatrix.cc.

void PLearn::RepeatVMatrix::getNewRow ( int  i,
const Vec v 
) const [protected, virtual]

Fill the vector 'v' with the content of the i-th row.

v is assumed to be the right size.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 99 of file RepeatVMatrix.cc.

References PLearn::VMat::length(), and PLearn::SourceVMatrix::source.

{
  source->getRow(i%source->length(),v);
}

Here is the call graph for this function:

OptionList & PLearn::RepeatVMatrix::getOptionList ( ) const [virtual]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 60 of file RepeatVMatrix.cc.

OptionMap & PLearn::RepeatVMatrix::getOptionMap ( ) const [virtual]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 60 of file RepeatVMatrix.cc.

RemoteMethodMap & PLearn::RepeatVMatrix::getRemoteMethodMap ( ) const [virtual]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 60 of file RepeatVMatrix.cc.

void PLearn::RepeatVMatrix::makeDeepCopyFromShallowCopy ( CopiesMap copies) [virtual]

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 107 of file RepeatVMatrix.cc.

References PLearn::SourceVMatrix::makeDeepCopyFromShallowCopy().

{
  inherited::makeDeepCopyFromShallowCopy(copies);

  //PLERROR("RepeatVMatrix::makeDeepCopyFromShallowCopy not fully (correctly) implemented yet!");
}

Here is the call graph for this function:


Member Data Documentation

Reimplemented from PLearn::SourceVMatrix.

Definition at line 111 of file RepeatVMatrix.h.

Number of times to repeat the source VMatrix.

Definition at line 71 of file RepeatVMatrix.h.

Referenced by build_(), declareOptions(), and PLearn::repeat_vmatrix().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines