PLearn 0.1
|
The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
#include <PutSubVMatrix.h>
Public Member Functions | |
PutSubVMatrix () | |
Default constructor. | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual PutSubVMatrix * | deepCopy (CopiesMap &copies) const |
virtual void | build () |
Simply calls inherited::build() then build_(). | |
virtual void | makeDeepCopyFromShallowCopy (CopiesMap &copies) |
Transforms a shallow copy into a deep copy. | |
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 | istart |
int | jstart |
VMat | submat |
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 the class options. | |
Protected Attributes | |
Vec | subrow |
Private Types | |
typedef SourceVMatrix | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
The first sentence should be a BRIEF DESCRIPTION of what the class does.
Place the rest of the class programmer documentation here. Doxygen supports Javadoc-style comments. See http://www.doxygen.org/manual.html
Definition at line 57 of file PutSubVMatrix.h.
typedef SourceVMatrix PLearn::PutSubVMatrix::inherited [private] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 59 of file PutSubVMatrix.h.
PLearn::PutSubVMatrix::PutSubVMatrix | ( | ) |
string PLearn::PutSubVMatrix::_classname_ | ( | ) | [static] |
Declares name and deepCopy methods.
Reimplemented from PLearn::SourceVMatrix.
Definition at line 50 of file PutSubVMatrix.cc.
OptionList & PLearn::PutSubVMatrix::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 50 of file PutSubVMatrix.cc.
RemoteMethodMap & PLearn::PutSubVMatrix::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 50 of file PutSubVMatrix.cc.
Reimplemented from PLearn::SourceVMatrix.
Definition at line 50 of file PutSubVMatrix.cc.
Object * PLearn::PutSubVMatrix::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 50 of file PutSubVMatrix.cc.
StaticInitializer PutSubVMatrix::_static_initializer_ & PLearn::PutSubVMatrix::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 50 of file PutSubVMatrix.cc.
void PLearn::PutSubVMatrix::build | ( | ) | [virtual] |
Simply calls inherited::build() then build_().
Reimplemented from PLearn::SourceVMatrix.
Definition at line 84 of file PutSubVMatrix.cc.
References PLearn::SourceVMatrix::build(), and build_().
{ inherited::build(); build_(); }
void PLearn::PutSubVMatrix::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::SourceVMatrix.
Definition at line 93 of file PutSubVMatrix.cc.
References istart, jstart, PLearn::VMat::length(), PLCHECK, PLearn::TVec< T >::resize(), PLearn::SourceVMatrix::setMetaInfoFromSource(), PLearn::SourceVMatrix::source, submat, subrow, PLearn::VMatrix::updateMtime(), and PLearn::VMat::width().
Referenced by build().
{ if (!source) return; if (submat) { updateMtime(submat); PLCHECK( istart + submat.length() <= source->length() ); PLCHECK( jstart + submat.width() <= source->width() ); subrow.resize(submat->width()); } setMetaInfoFromSource(); }
string PLearn::PutSubVMatrix::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 50 of file PutSubVMatrix.cc.
void PLearn::PutSubVMatrix::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declares the class options.
Reimplemented from PLearn::SourceVMatrix.
Definition at line 63 of file PutSubVMatrix.cc.
References PLearn::OptionBase::buildoption, PLearn::declareOption(), PLearn::SourceVMatrix::declareOptions(), istart, jstart, and submat.
{ declareOption(ol, "submat", &PutSubVMatrix::submat, OptionBase::buildoption, "The data matrix to put in the source."); declareOption(ol, "istart", &PutSubVMatrix::istart, OptionBase::buildoption, "Row index where 'submat' will be put."); declareOption(ol, "jstart", &PutSubVMatrix::jstart, OptionBase::buildoption, "Column index where 'submat' will be put."); // Now call the parent class' declareOptions inherited::declareOptions(ol); }
static const PPath& PLearn::PutSubVMatrix::declaringFile | ( | ) | [inline, static] |
PutSubVMatrix * PLearn::PutSubVMatrix::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 50 of file PutSubVMatrix.cc.
Fill the vector 'v' with the content of the i-th row.
v is assumed to be the right size. ### This function must be overridden in your class
Reimplemented from PLearn::SourceVMatrix.
Definition at line 111 of file PutSubVMatrix.cc.
References istart, j, jstart, PLearn::VMatrix::length(), PLearn::TVec< T >::length(), PLearn::VMat::length(), PLearn::SourceVMatrix::source, submat, and subrow.
{ source->getRow(i, v); if (submat && submat->length() > 0 && subrow.length() > 0) { if (i >= istart && i < istart + submat->length()) { submat->getRow(i - istart, subrow); for (int j = 0; j < subrow.length(); j++) v[jstart + j] = subrow[j]; } } }
OptionList & PLearn::PutSubVMatrix::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 50 of file PutSubVMatrix.cc.
OptionMap & PLearn::PutSubVMatrix::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 50 of file PutSubVMatrix.cc.
RemoteMethodMap & PLearn::PutSubVMatrix::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 50 of file PutSubVMatrix.cc.
void PLearn::PutSubVMatrix::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::SourceVMatrix.
Definition at line 126 of file PutSubVMatrix.cc.
References PLearn::SourceVMatrix::makeDeepCopyFromShallowCopy(), and PLERROR.
{ inherited::makeDeepCopyFromShallowCopy(copies); // ### Call deepCopyField on all "pointer-like" fields // ### that you wish to be deepCopied rather than // ### shallow-copied. // ### ex: // deepCopyField(trainvec, copies); // ### Remove this line when you have fully implemented this method. PLERROR("PutSubVMatrix::makeDeepCopyFromShallowCopy not fully (correctly) implemented yet!"); }
Reimplemented from PLearn::SourceVMatrix.
Definition at line 82 of file PutSubVMatrix.h.
Definition at line 64 of file PutSubVMatrix.h.
Referenced by build_(), declareOptions(), and getNewRow().
Definition at line 65 of file PutSubVMatrix.h.
Referenced by build_(), declareOptions(), and getNewRow().
Definition at line 66 of file PutSubVMatrix.h.
Referenced by build_(), declareOptions(), and getNewRow().
Vec PLearn::PutSubVMatrix::subrow [protected] |
Definition at line 93 of file PutSubVMatrix.h.
Referenced by build_(), and getNewRow().