|
PLearn 0.1
|
#include <DBSplitter.h>


Public Member Functions | |
| DBSplitter () | |
| virtual void | build () |
| Post-constructor. | |
| 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 DBSplitter * | deepCopy (CopiesMap &copies) const |
| 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. | |
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 | |
| TVec< string > | databases |
Static Public Attributes | |
| static StaticInitializer | _static_initializer_ |
Static Protected Member Functions | |
| static void | declareOptions (OptionList &ol) |
| Declares this class' options. | |
Private Types | |
| typedef Splitter | inherited |
Private Member Functions | |
| void | build_ () |
| This does the actual building. | |
Definition at line 52 of file DBSplitter.h.
typedef Splitter PLearn::DBSplitter::inherited [private] |
Reimplemented from PLearn::Splitter.
Definition at line 57 of file DBSplitter.h.
| PLearn::DBSplitter::DBSplitter | ( | ) |
Definition at line 50 of file DBSplitter.cc.
| string PLearn::DBSplitter::_classname_ | ( | ) | [static] |
Declares name and deepCopy methods.
Reimplemented from PLearn::Splitter.
Definition at line 58 of file DBSplitter.cc.
| OptionList & PLearn::DBSplitter::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::Splitter.
Definition at line 58 of file DBSplitter.cc.
| RemoteMethodMap & PLearn::DBSplitter::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::Splitter.
Definition at line 58 of file DBSplitter.cc.
Reimplemented from PLearn::Splitter.
Definition at line 58 of file DBSplitter.cc.
| Object * PLearn::DBSplitter::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 58 of file DBSplitter.cc.
| StaticInitializer DBSplitter::_static_initializer_ & PLearn::DBSplitter::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::Splitter.
Definition at line 58 of file DBSplitter.cc.
| void PLearn::DBSplitter::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 75 of file DBSplitter.cc.
References PLearn::Object::build(), and build_().
{
inherited::build();
build_();
}

| void PLearn::DBSplitter::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::Object.
Definition at line 70 of file DBSplitter.cc.
Referenced by build().
{
}

| string PLearn::DBSplitter::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 58 of file DBSplitter.cc.
| void PLearn::DBSplitter::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declares this class' options.
Reimplemented from PLearn::Splitter.
Definition at line 60 of file DBSplitter.cc.
References PLearn::OptionBase::buildoption, databases, PLearn::declareOption(), and PLearn::Splitter::declareOptions().
{
declareOption(ol, "databases", &DBSplitter::databases, OptionBase::buildoption,
"Vector with the specifications of the databases to be used.");
// Now call the parent class' declareOptions
inherited::declareOptions(ol);
}

| static const PPath& PLearn::DBSplitter::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::Splitter.
Definition at line 106 of file DBSplitter.h.
| DBSplitter * PLearn::DBSplitter::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::Splitter.
Definition at line 58 of file DBSplitter.cc.
| OptionList & PLearn::DBSplitter::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 58 of file DBSplitter.cc.
| OptionMap & PLearn::DBSplitter::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 58 of file DBSplitter.cc.
| RemoteMethodMap & PLearn::DBSplitter::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 58 of file DBSplitter.cc.
Returns split number i.
Implements PLearn::Splitter.
Definition at line 105 of file DBSplitter.cc.
References PLearn::TVec< T >::append(), databases, and PLearn::getDataSet().
{
TVec<VMat> result;
result.append(PLearn::getDataSet(databases[k]));
return result;
}

| void PLearn::DBSplitter::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::Splitter.
Definition at line 81 of file DBSplitter.cc.
References PLearn::Splitter::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("DBSplitter::makeDeepCopyFromShallowCopy not fully (correctly) implemented yet!");
}

| int PLearn::DBSplitter::nSetsPerSplit | ( | ) | const [virtual] |
Returns the number of sets per split.
Implements PLearn::Splitter.
Definition at line 100 of file DBSplitter.cc.
{
return 1;
}
| int PLearn::DBSplitter::nsplits | ( | ) | const [virtual] |
Returns the number of available different "splits".
Implements PLearn::Splitter.
Definition at line 95 of file DBSplitter.cc.
References databases, and PLearn::TVec< T >::size().
{
return databases.size();
}

Reimplemented from PLearn::Splitter.
Definition at line 106 of file DBSplitter.h.
| TVec<string> PLearn::DBSplitter::databases |
Definition at line 73 of file DBSplitter.h.
Referenced by declareOptions(), getSplit(), and nsplits().
1.7.4