PLearn 0.1
|
#include <BinaryBallTree.h>
Public Member Functions | |
BinaryBallTree () | |
Default constructor. | |
virtual string | classname () const |
virtual OptionList & | getOptionList () const |
virtual OptionMap & | getOptionMap () const |
virtual RemoteMethodMap & | getRemoteMethodMap () const |
virtual BinaryBallTree * | deepCopy (CopiesMap &copies) const |
virtual void | build () |
Post-constructor. | |
virtual void | makeDeepCopyFromShallowCopy (CopiesMap &copies) |
Transforms a shallow copy into a deep copy. | |
virtual void | setFirstChild (const BinBallTree &first_child) |
virtual void | setSecondChild (const BinBallTree &second_child) |
virtual BinBallTree | getFirstChild () |
virtual BinBallTree | getSecondChild () |
virtual BinaryBallTree * | getParent () |
bool | isEmpty () const |
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 | |
Vec | pivot |
real | radius |
TVec< int > | point_set |
Static Public Attributes | |
static StaticInitializer | _static_initializer_ |
Static Protected Member Functions | |
static void | declareOptions (OptionList &ol) |
Declares this class' options. | |
Protected Attributes | |
BinaryBallTree * | parent |
BinBallTree | child1 |
BinBallTree | child2 |
Private Types | |
typedef Object | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
Definition at line 55 of file BinaryBallTree.h.
typedef Object PLearn::BinaryBallTree::inherited [private] |
Reimplemented from PLearn::Object.
Definition at line 60 of file BinaryBallTree.h.
PLearn::BinaryBallTree::BinaryBallTree | ( | ) |
Default constructor.
Definition at line 49 of file BinaryBallTree.cc.
string PLearn::BinaryBallTree::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 59 of file BinaryBallTree.cc.
OptionList & PLearn::BinaryBallTree::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 59 of file BinaryBallTree.cc.
RemoteMethodMap & PLearn::BinaryBallTree::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 59 of file BinaryBallTree.cc.
Reimplemented from PLearn::Object.
Definition at line 59 of file BinaryBallTree.cc.
Object * PLearn::BinaryBallTree::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 59 of file BinaryBallTree.cc.
StaticInitializer BinaryBallTree::_static_initializer_ & PLearn::BinaryBallTree::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 59 of file BinaryBallTree.cc.
void PLearn::BinaryBallTree::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 91 of file BinaryBallTree.cc.
References PLearn::Object::build(), and build_().
{ inherited::build(); build_(); }
void PLearn::BinaryBallTree::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::Object.
Definition at line 82 of file BinaryBallTree.cc.
References child1, and child2.
Referenced by build().
string PLearn::BinaryBallTree::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 59 of file BinaryBallTree.cc.
void PLearn::BinaryBallTree::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declares this class' options.
Reimplemented from PLearn::Object.
Definition at line 61 of file BinaryBallTree.cc.
References PLearn::OptionBase::buildoption, child1, child2, PLearn::declareOption(), PLearn::Object::declareOptions(), pivot, point_set, radius, and PLearn::OptionBase::tuningoption.
{ declareOption( ol, "pivot", &BinaryBallTree::pivot, OptionBase::buildoption, "Center of the ball" ); declareOption(ol, "radius", &BinaryBallTree::radius, OptionBase::buildoption, "Radius of the ball" ); declareOption(ol, "point_set", &BinaryBallTree::point_set, OptionBase::buildoption, "List of indices of the points owned by this node (leaf only)" ); declareOption(ol, "child1", &BinaryBallTree::child1, OptionBase::tuningoption, "Pointer to first child (non-leaf only)" ); declareOption(ol, "child2", &BinaryBallTree::child2, OptionBase::tuningoption, "Pointer to second child (non-leaf only)" ); // Now call the parent class' declareOptions inherited::declareOptions(ol); }
static const PPath& PLearn::BinaryBallTree::declaringFile | ( | ) | [inline, static] |
BinaryBallTree * PLearn::BinaryBallTree::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 59 of file BinaryBallTree.cc.
BinBallTree PLearn::BinaryBallTree::getFirstChild | ( | ) | [virtual] |
OptionList & PLearn::BinaryBallTree::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 59 of file BinaryBallTree.cc.
OptionMap & PLearn::BinaryBallTree::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 59 of file BinaryBallTree.cc.
BinaryBallTree * PLearn::BinaryBallTree::getParent | ( | ) | [virtual] |
RemoteMethodMap & PLearn::BinaryBallTree::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 59 of file BinaryBallTree.cc.
BinBallTree PLearn::BinaryBallTree::getSecondChild | ( | ) | [virtual] |
bool PLearn::BinaryBallTree::isEmpty | ( | ) | const [inline] |
Definition at line 121 of file BinaryBallTree.h.
void PLearn::BinaryBallTree::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::Object.
Definition at line 130 of file BinaryBallTree.cc.
References child1, child2, PLearn::deepCopyField(), PLearn::Object::makeDeepCopyFromShallowCopy(), pivot, and point_set.
{ inherited::makeDeepCopyFromShallowCopy(copies); deepCopyField( child1, copies ); deepCopyField( child2, copies ); deepCopyField( pivot, copies ); deepCopyField( point_set, copies ); }
void PLearn::BinaryBallTree::setFirstChild | ( | const BinBallTree & | first_child | ) | [virtual] |
Definition at line 97 of file BinaryBallTree.cc.
References child1.
{ this->child1 = first_child; if( first_child ) { first_child->parent = this; } }
void PLearn::BinaryBallTree::setSecondChild | ( | const BinBallTree & | second_child | ) | [virtual] |
Definition at line 106 of file BinaryBallTree.cc.
References child2.
{ this->child2 = second_child; if( second_child ) { second_child->parent = this; } }
Reimplemented from PLearn::Object.
Definition at line 103 of file BinaryBallTree.h.
BinBallTree PLearn::BinaryBallTree::child1 [protected] |
Definition at line 68 of file BinaryBallTree.h.
Referenced by build_(), declareOptions(), getFirstChild(), makeDeepCopyFromShallowCopy(), and setFirstChild().
BinBallTree PLearn::BinaryBallTree::child2 [protected] |
Definition at line 69 of file BinaryBallTree.h.
Referenced by build_(), declareOptions(), getSecondChild(), makeDeepCopyFromShallowCopy(), and setSecondChild().
BinaryBallTree* PLearn::BinaryBallTree::parent [protected] |
Definition at line 67 of file BinaryBallTree.h.
Referenced by getParent().
Definition at line 77 of file BinaryBallTree.h.
Referenced by declareOptions(), and makeDeepCopyFromShallowCopy().
Definition at line 79 of file BinaryBallTree.h.
Referenced by declareOptions(), and makeDeepCopyFromShallowCopy().
Definition at line 78 of file BinaryBallTree.h.
Referenced by declareOptions().