PLearn 0.1
|
#include <ViewSplitterVMatrix.h>
Public Member Functions | |
ViewSplitterVMatrix () | |
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 ViewSplitterVMatrix * | 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 | set |
int | split |
PP< Splitter > | splitter |
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. | |
Protected Attributes | |
TVec< VMat > | sets |
Contains the split given by the splitter. | |
Private Types | |
typedef SourceVMatrix | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
Definition at line 53 of file ViewSplitterVMatrix.h.
typedef SourceVMatrix PLearn::ViewSplitterVMatrix::inherited [private] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 58 of file ViewSplitterVMatrix.h.
PLearn::ViewSplitterVMatrix::ViewSplitterVMatrix | ( | ) |
string PLearn::ViewSplitterVMatrix::_classname_ | ( | ) | [static] |
Declares name and deepCopy methods.
Reimplemented from PLearn::SourceVMatrix.
Definition at line 63 of file ViewSplitterVMatrix.cc.
OptionList & PLearn::ViewSplitterVMatrix::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 63 of file ViewSplitterVMatrix.cc.
RemoteMethodMap & PLearn::ViewSplitterVMatrix::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 63 of file ViewSplitterVMatrix.cc.
Reimplemented from PLearn::SourceVMatrix.
Definition at line 63 of file ViewSplitterVMatrix.cc.
Object * PLearn::ViewSplitterVMatrix::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 63 of file ViewSplitterVMatrix.cc.
StaticInitializer ViewSplitterVMatrix::_static_initializer_ & PLearn::ViewSplitterVMatrix::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 63 of file ViewSplitterVMatrix.cc.
void PLearn::ViewSplitterVMatrix::build | ( | ) | [virtual] |
Simply calls inherited::build() then build_().
Reimplemented from PLearn::SourceVMatrix.
Definition at line 86 of file ViewSplitterVMatrix.cc.
References PLearn::SourceVMatrix::build(), and build_().
{ inherited::build(); build_(); }
void PLearn::ViewSplitterVMatrix::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::SourceVMatrix.
Definition at line 95 of file ViewSplitterVMatrix.cc.
References i, PLearn::TVec< T >::length(), PLearn::VMatrix::setMetaInfoFrom(), sets, PLearn::SourceVMatrix::source, split, splitter, and PLearn::VMatrix::updateMtime().
Referenced by build().
{ splitter->setDataSet(source); sets = splitter->getSplit(split); setMetaInfoFrom(sets[set]); updateMtime(source); for(int i=0;i<sets.length();i++) updateMtime(sets[i]); }
string PLearn::ViewSplitterVMatrix::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 63 of file ViewSplitterVMatrix.cc.
void PLearn::ViewSplitterVMatrix::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declares this class' options.
Reimplemented from PLearn::SourceVMatrix.
Definition at line 68 of file ViewSplitterVMatrix.cc.
References PLearn::OptionBase::buildoption, PLearn::declareOption(), PLearn::SourceVMatrix::declareOptions(), set, split, and splitter.
{ declareOption(ol, "splitter", &ViewSplitterVMatrix::splitter, OptionBase::buildoption, "The splitter applied on the source VMat."); declareOption(ol, "split", &ViewSplitterVMatrix::split, OptionBase::buildoption, "The index of the wanted split."); declareOption(ol, "set", &ViewSplitterVMatrix::set, OptionBase::buildoption, "The index of the wanted set."); // Now call the parent class' declareOptions inherited::declareOptions(ol); }
static const PPath& PLearn::ViewSplitterVMatrix::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 117 of file ViewSplitterVMatrix.h.
ViewSplitterVMatrix * PLearn::ViewSplitterVMatrix::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 63 of file ViewSplitterVMatrix.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 108 of file ViewSplitterVMatrix.cc.
References sets.
{ sets[set]->getRow(i, v); }
OptionList & PLearn::ViewSplitterVMatrix::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 63 of file ViewSplitterVMatrix.cc.
OptionMap & PLearn::ViewSplitterVMatrix::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 63 of file ViewSplitterVMatrix.cc.
RemoteMethodMap & PLearn::ViewSplitterVMatrix::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::SourceVMatrix.
Definition at line 63 of file ViewSplitterVMatrix.cc.
void PLearn::ViewSplitterVMatrix::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::SourceVMatrix.
Definition at line 116 of file ViewSplitterVMatrix.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("ViewSplitterVMatrix::makeDeepCopyFromShallowCopy not fully (correctly) implemented yet!"); }
Reimplemented from PLearn::SourceVMatrix.
Definition at line 117 of file ViewSplitterVMatrix.h.
Definition at line 75 of file ViewSplitterVMatrix.h.
Referenced by declareOptions().
TVec<VMat> PLearn::ViewSplitterVMatrix::sets [protected] |
Contains the split given by the splitter.
Definition at line 63 of file ViewSplitterVMatrix.h.
Referenced by build_(), and getNewRow().
Definition at line 76 of file ViewSplitterVMatrix.h.
Referenced by build_(), and declareOptions().
Definition at line 77 of file ViewSplitterVMatrix.h.
Referenced by build_(), and declareOptions().