PLearn 0.1
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Protected Member Functions | Private Types | Private Member Functions
PLearn::SelectSetsSplitter Class Reference

The first sentence should be a BRIEF DESCRIPTION of what the class does. More...

#include <SelectSetsSplitter.h>

Inheritance diagram for PLearn::SelectSetsSplitter:
Inheritance graph
[legend]
Collaboration diagram for PLearn::SelectSetsSplitter:
Collaboration graph
[legend]

List of all members.

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< VMatgetSplit (int i=0)
 Returns split number i.
virtual void setDataSet (VMat the_dataset)
 Overridden to forward to underlying splitter.
virtual string classname () const
virtual OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual SelectSetsSplitterdeepCopy (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 PPathdeclaringFile ()

Public Attributes

TVec< intindices
PP< Splittersplitter

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.

Detailed Description

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

Todo:
Write class to-do's here if there are any.
Deprecated:
Write deprecated stuff here if there is any. Indicate what else should be used instead.

Definition at line 57 of file SelectSetsSplitter.h.


Member Typedef Documentation

Reimplemented from PLearn::Splitter.

Definition at line 59 of file SelectSetsSplitter.h.


Constructor & Destructor Documentation

PLearn::SelectSetsSplitter::SelectSetsSplitter ( )

Default constructor.

Definition at line 51 of file SelectSetsSplitter.cc.

{}

Member Function Documentation

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.

bool PLearn::SelectSetsSplitter::_isa_ ( const Object o) [static]

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.

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);
}

Here is the call graph for this function:

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.

TVec< VMat > PLearn::SelectSetsSplitter::getSplit ( int  i = 0) [virtual]

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;
}

Here is the call graph for this function:

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().

Here is the call graph for this function:

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);
}

Member Data Documentation

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().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines