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

#include <BinaryBallTree.h>

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

List of all members.

Public Member Functions

 BinaryBallTree ()
 Default constructor.
virtual string classname () const
virtual OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual BinaryBallTreedeepCopy (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 BinaryBallTreegetParent ()
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 PPathdeclaringFile ()

Public Attributes

Vec pivot
real radius
TVec< intpoint_set

Static Public Attributes

static StaticInitializer _static_initializer_

Static Protected Member Functions

static void declareOptions (OptionList &ol)
 Declares this class' options.

Protected Attributes

BinaryBallTreeparent
BinBallTree child1
BinBallTree child2

Private Types

typedef Object inherited

Private Member Functions

void build_ ()
 This does the actual building.

Detailed Description

Definition at line 55 of file BinaryBallTree.h.


Member Typedef Documentation

Reimplemented from PLearn::Object.

Definition at line 60 of file BinaryBallTree.h.


Constructor & Destructor Documentation

PLearn::BinaryBallTree::BinaryBallTree ( )

Default constructor.

Definition at line 49 of file BinaryBallTree.cc.

    : pivot( Vec() ),
      radius( 0 )
{}

Member Function Documentation

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.

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

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

Here is the call graph for this function:

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

{
    if( child1 )
    { child1->parent = this; }

    if( child2 )
    { child2->parent = this; }
}

Here is the caller graph for this function:

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

Here is the call graph for this function:

static const PPath& PLearn::BinaryBallTree::declaringFile ( ) [inline, static]

Reimplemented from PLearn::Object.

Definition at line 103 of file BinaryBallTree.h.

{
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]

Definition at line 115 of file BinaryBallTree.cc.

References child1.

{
    return this->child1;
}
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]

Definition at line 125 of file BinaryBallTree.cc.

References parent.

{
    return this->parent;
}
RemoteMethodMap & PLearn::BinaryBallTree::getRemoteMethodMap ( ) const [virtual]

Reimplemented from PLearn::Object.

Definition at line 59 of file BinaryBallTree.cc.

BinBallTree PLearn::BinaryBallTree::getSecondChild ( ) [virtual]

Definition at line 120 of file BinaryBallTree.cc.

References child2.

{
    return this->child2;
}
bool PLearn::BinaryBallTree::isEmpty ( ) const [inline]

Definition at line 121 of file BinaryBallTree.h.

    {
        bool result = !pivot && !child1 && !child2 ;
        return result;
    }
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.

Here is the call graph for this function:

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

Member Data Documentation

Reimplemented from PLearn::Object.

Definition at line 103 of file BinaryBallTree.h.

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


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