|
PLearn 0.1
|
The first sentence should be a BRIEF DESCRIPTION of what the class does. More...
#include <SelectSetsSplitter.h>


Public Member Functions | |
| SelectSetsSplitter () | |
| Default constructor. | |
| virtual int | nsplits () const |
| Returns the number of available different "splits". | |
| virtual int | nSetsPerSplit () const |
| Returns the number of sets per split. | |
| virtual TVec< VMat > | getSplit (int i=0) |
| Returns split number i. | |
| virtual void | setDataSet (VMat the_dataset) |
| Overridden to forward to underlying splitter. | |
| virtual string | classname () const |
| virtual OptionList & | getOptionList () const |
| virtual OptionMap & | getOptionMap () const |
| virtual RemoteMethodMap & | getRemoteMethodMap () const |
| virtual SelectSetsSplitter * | deepCopy (CopiesMap &copies) const |
| virtual void | build () |
| Post-constructor. | |
| virtual void | makeDeepCopyFromShallowCopy (CopiesMap &copies) |
| Transforms a shallow copy into a deep copy. | |
Static Public Member Functions | |
| static string | _classname_ () |
| 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 | |
| TVec< int > | indices |
| PP< Splitter > | splitter |
Static Public Attributes | |
| static StaticInitializer | _static_initializer_ |
Static Protected Member Functions | |
| static void | declareOptions (OptionList &ol) |
| Declares the class options. | |
Private Types | |
| typedef Splitter | 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 SelectSetsSplitter.h.
typedef Splitter PLearn::SelectSetsSplitter::inherited [private] |
Reimplemented from PLearn::Splitter.
Definition at line 59 of file SelectSetsSplitter.h.
| PLearn::SelectSetsSplitter::SelectSetsSplitter | ( | ) |
| string PLearn::SelectSetsSplitter::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::Splitter.
Definition at line 49 of file SelectSetsSplitter.cc.
| OptionList & PLearn::SelectSetsSplitter::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::Splitter.
Definition at line 49 of file SelectSetsSplitter.cc.
| RemoteMethodMap & PLearn::SelectSetsSplitter::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::Splitter.
Definition at line 49 of file SelectSetsSplitter.cc.
Reimplemented from PLearn::Splitter.
Definition at line 49 of file SelectSetsSplitter.cc.
| Object * PLearn::SelectSetsSplitter::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 49 of file SelectSetsSplitter.cc.
| StaticInitializer SelectSetsSplitter::_static_initializer_ & PLearn::SelectSetsSplitter::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::Splitter.
Definition at line 49 of file SelectSetsSplitter.cc.
| void PLearn::SelectSetsSplitter::build | ( | ) | [virtual] |
Post-constructor.
The normal implementation should call simply inherited::build(), then this class's build_(). This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object.
Reimplemented from PLearn::Object.
Definition at line 77 of file SelectSetsSplitter.cc.
{
inherited::build();
build_();
}
| void PLearn::SelectSetsSplitter::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::Object.
Definition at line 74 of file SelectSetsSplitter.cc.
{}
| string PLearn::SelectSetsSplitter::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 49 of file SelectSetsSplitter.cc.
| void PLearn::SelectSetsSplitter::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declares the class options.
Reimplemented from PLearn::Splitter.
Definition at line 57 of file SelectSetsSplitter.cc.
References PLearn::OptionBase::buildoption, PLearn::declareOption(), indices, and splitter.
{
declareOption(ol, "splitter", &SelectSetsSplitter::splitter,
OptionBase::buildoption,
"The underlying splitter.");
declareOption(ol, "indices", &SelectSetsSplitter::indices,
OptionBase::buildoption,
"Indices of sets being selected.");
// Now call the parent class' declareOptions
inherited::declareOptions(ol);
}

| static const PPath& PLearn::SelectSetsSplitter::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::Splitter.
Definition at line 91 of file SelectSetsSplitter.h.
:
//##### Protected Options ###############################################
| SelectSetsSplitter * PLearn::SelectSetsSplitter::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::Splitter.
Definition at line 49 of file SelectSetsSplitter.cc.
| OptionList & PLearn::SelectSetsSplitter::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 49 of file SelectSetsSplitter.cc.
| OptionMap & PLearn::SelectSetsSplitter::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 49 of file SelectSetsSplitter.cc.
| RemoteMethodMap & PLearn::SelectSetsSplitter::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 49 of file SelectSetsSplitter.cc.
Returns split number i.
Implements PLearn::Splitter.
Definition at line 113 of file SelectSetsSplitter.cc.
References PLearn::TVec< T >::append(), and i.
{
TVec<VMat> sub = splitter->getSplit(k);
TVec<VMat> result;
for (int i = 0; i < indices.length(); i++)
result.append(sub[indices[i]]);
return result;
}

| void PLearn::SelectSetsSplitter::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::Splitter.
Definition at line 86 of file SelectSetsSplitter.cc.
References PLearn::deepCopyField().
{
inherited::makeDeepCopyFromShallowCopy(copies);
deepCopyField(indices, copies);
deepCopyField(splitter, copies);
}

| int PLearn::SelectSetsSplitter::nSetsPerSplit | ( | ) | const [virtual] |
Returns the number of sets per split.
Implements PLearn::Splitter.
Definition at line 105 of file SelectSetsSplitter.cc.
{
return indices.length();
}
| int PLearn::SelectSetsSplitter::nsplits | ( | ) | const [virtual] |
Returns the number of available different "splits".
Implements PLearn::Splitter.
Definition at line 97 of file SelectSetsSplitter.cc.
{
return splitter->nsplits();
}
| void PLearn::SelectSetsSplitter::setDataSet | ( | VMat | the_dataset | ) | [virtual] |
Overridden to forward to underlying splitter.
Reimplemented from PLearn::Splitter.
Definition at line 125 of file SelectSetsSplitter.cc.
{
splitter->setDataSet(the_dataset);
}
Reimplemented from PLearn::Splitter.
Definition at line 91 of file SelectSetsSplitter.h.
Definition at line 64 of file SelectSetsSplitter.h.
Referenced by declareOptions().
Definition at line 65 of file SelectSetsSplitter.h.
Referenced by declareOptions().
1.7.4