PLearn 0.1
|
#include <RepeatVMatrix.h>
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 OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual RepeatVMatrix * | deepCopy (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 PPath & | declaringFile () |
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. |
Definition at line 51 of file RepeatVMatrix.h.
typedef SourceVMatrix PLearn::RepeatVMatrix::inherited [private] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 56 of file RepeatVMatrix.h.
PLearn::RepeatVMatrix::RepeatVMatrix | ( | ) |
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.
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().
{ inherited::build(); build_(); }
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"); } }
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); }
static const PPath& PLearn::RepeatVMatrix::declaringFile | ( | ) | [inline, static] |
RepeatVMatrix * PLearn::RepeatVMatrix::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 60 of file RepeatVMatrix.cc.
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.
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!"); }
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().