PLearn 0.1
|
#include <TransposeVMatrix.h>
Public Member Functions | |
TransposeVMatrix () | |
Default constructor. | |
TransposeVMatrix (const VMat &the_source) | |
Convenience 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 TransposeVMatrix * | 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 () |
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. | |
virtual void | getColumn (int j, Vec v) const |
Copies column i into v (which must have appropriate length equal to the VMat's length). | |
virtual void | getMat (int i, int j, Mat m) const |
Copies the submatrix starting at i,j into m (which must have appropriate length and width). | |
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 52 of file TransposeVMatrix.h.
typedef SourceVMatrix PLearn::TransposeVMatrix::inherited [private] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 57 of file TransposeVMatrix.h.
PLearn::TransposeVMatrix::TransposeVMatrix | ( | ) |
PLearn::TransposeVMatrix::TransposeVMatrix | ( | const VMat & | the_source | ) |
Convenience constructor.
Definition at line 55 of file TransposeVMatrix.cc.
string PLearn::TransposeVMatrix::_classname_ | ( | ) | [static] |
Declares name and deepCopy methods.
Reimplemented from PLearn::SourceVMatrix.
Definition at line 64 of file TransposeVMatrix.cc.
OptionList & PLearn::TransposeVMatrix::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 64 of file TransposeVMatrix.cc.
RemoteMethodMap & PLearn::TransposeVMatrix::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 64 of file TransposeVMatrix.cc.
Reimplemented from PLearn::SourceVMatrix.
Definition at line 64 of file TransposeVMatrix.cc.
Object * PLearn::TransposeVMatrix::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 64 of file TransposeVMatrix.cc.
StaticInitializer TransposeVMatrix::_static_initializer_ & PLearn::TransposeVMatrix::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 64 of file TransposeVMatrix.cc.
void PLearn::TransposeVMatrix::build | ( | ) | [virtual] |
Simply calls inherited::build() then build_().
Reimplemented from PLearn::SourceVMatrix.
Definition at line 89 of file TransposeVMatrix.cc.
{ // ### Nothing to add here, simply calls build_ inherited::build(); build_(); }
void PLearn::TransposeVMatrix::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::SourceVMatrix.
Definition at line 99 of file TransposeVMatrix.cc.
{ if (source) { width_ = source->length(); length_ = source->width(); if (inputsize_ < 0) inputsize_ = width_; if (targetsize_ < 0) targetsize_ = 0; if (weightsize_ < 0) weightsize_ = 0; setMetaInfoFromSource(); } }
string PLearn::TransposeVMatrix::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 64 of file TransposeVMatrix.cc.
void PLearn::TransposeVMatrix::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declares this class' options.
Reimplemented from PLearn::SourceVMatrix.
Definition at line 69 of file TransposeVMatrix.cc.
{ // ### Declare all of this object's options here // ### For the "flags" of each option, you should typically specify // ### one of OptionBase::buildoption, OptionBase::learntoption or // ### OptionBase::tuningoption. Another possible flag to be combined with // ### is OptionBase::nosave // ### ex: // declareOption(ol, "myoption", &TransposeVMatrix::myoption, OptionBase::buildoption, // "Help text describing this option"); // ... // Now call the parent class' declareOptions inherited::declareOptions(ol); }
static const PPath& PLearn::TransposeVMatrix::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 115 of file TransposeVMatrix.h.
TransposeVMatrix * PLearn::TransposeVMatrix::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 64 of file TransposeVMatrix.cc.
Copies column i into v (which must have appropriate length equal to the VMat's length).
Reimplemented from PLearn::VMatrix.
Definition at line 125 of file TransposeVMatrix.cc.
Copies the submatrix starting at i,j into m (which must have appropriate length and width).
Reimplemented from PLearn::VMatrix.
Definition at line 134 of file TransposeVMatrix.cc.
References PLearn::TMat< T >::length(), m, PLERROR, and PLearn::TMat< T >::width().
{ #ifdef BOUNDCHECK if(i<0 || j<0 || i+m.length()>length() || j+m.width()>width()) PLERROR("In VMatrix::getMat(i,j,m) OUT OF BOUNDS"); #endif Vec tmp(m.length()); for(int ii=0; ii<m.width(); ii++) { source->getSubRow(i+ii, j,tmp); for(int k=0;k<m.length();k++) m(k,ii)=tmp[k]; } }
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 117 of file TransposeVMatrix.cc.
{ source->getColumn(i, v); }
OptionList & PLearn::TransposeVMatrix::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 64 of file TransposeVMatrix.cc.
OptionMap & PLearn::TransposeVMatrix::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 64 of file TransposeVMatrix.cc.
RemoteMethodMap & PLearn::TransposeVMatrix::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 64 of file TransposeVMatrix.cc.
void PLearn::TransposeVMatrix::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::SourceVMatrix.
Definition at line 152 of file TransposeVMatrix.cc.
{ inherited::makeDeepCopyFromShallowCopy(copies); }
Reimplemented from PLearn::SourceVMatrix.
Definition at line 115 of file TransposeVMatrix.h.