LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::crispDecisionTree::univariateCrispDecisionFunction Class Reference

This class implements the most common decision function: Each node has a real-valued threshold in one dimension only. More...

#include <ltiCrispDecisionTree.h>

Inheritance diagram for lti::crispDecisionTree::univariateCrispDecisionFunction:
Inheritance graph
[legend]
Collaboration diagram for lti::crispDecisionTree::univariateCrispDecisionFunction:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 univariateCrispDecisionFunction ()
 univariateCrispDecisionFunction (const int &dim, const double &thresh)
 univariateCrispDecisionFunction (const univariateCrispDecisionFunction &other)
 ~univariateCrispDecisionFunction ()
const char * getTypeName () const
univariateCrispDecisionFunctioncopy (const univariateCrispDecisionFunction &other)
univariateCrispDecisionFunctionoperator= (const univariateCrispDecisionFunction &other)
virtual crispDecisionFunctionclone () const
virtual bool apply (const dvector &data) const
void setCondition (const int &dim, const double &thresh)
virtual bool write (ioHandler &handler, const bool complete=true) const
virtual bool read (ioHandler &handler, const bool complete=true)

Protected Attributes

int dimension
double threshold

Detailed Description

This class implements the most common decision function: Each node has a real-valued threshold in one dimension only.


Constructor & Destructor Documentation

lti::crispDecisionTree::univariateCrispDecisionFunction::univariateCrispDecisionFunction (  ) 

default constructor

lti::crispDecisionTree::univariateCrispDecisionFunction::univariateCrispDecisionFunction ( const int &  dim,
const double &  thresh 
)

Sets the condition of the decision function.

Parameters:
dim dimension for the decision
thresh the threshold
lti::crispDecisionTree::univariateCrispDecisionFunction::univariateCrispDecisionFunction ( const univariateCrispDecisionFunction other  ) 

copy constructor

Parameters:
other the univariateCrispDecisionFunction object to be copied
lti::crispDecisionTree::univariateCrispDecisionFunction::~univariateCrispDecisionFunction (  ) 

destructor


Member Function Documentation

virtual bool lti::crispDecisionTree::univariateCrispDecisionFunction::apply ( const dvector data  )  const [virtual]

Evaluate the condition implemented in the cdf.

Parameters:
data value to be evaluated
Returns:
true if it meets the condition (left), false if not

Implements lti::crispDecisionTree::crispDecisionFunction.

virtual crispDecisionFunction* lti::crispDecisionTree::univariateCrispDecisionFunction::clone (  )  const [virtual]

returns a pointer to a clone of the univariateCrispDecisionFunction

Implements lti::crispDecisionTree::crispDecisionFunction.

univariateCrispDecisionFunction& lti::crispDecisionTree::univariateCrispDecisionFunction::copy ( const univariateCrispDecisionFunction other  ) 

copy the contents of a univariateCrispDecisionFunction object

Parameters:
other the univariateCrispDecisionFunction object to be copied
Returns:
a reference to this univariateCrispDecisionFunction object

Reimplemented from lti::crispDecisionTree::crispDecisionFunction.

const char* lti::crispDecisionTree::univariateCrispDecisionFunction::getTypeName (  )  const [virtual]

returns name of this type

Reimplemented from lti::crispDecisionTree::crispDecisionFunction.

univariateCrispDecisionFunction& lti::crispDecisionTree::univariateCrispDecisionFunction::operator= ( const univariateCrispDecisionFunction other  ) 

copy the contents of a univariateCrispDecisionFunction object

Parameters:
other the univariateCrispDecisionFunction object to be copied
Returns:
a reference to this univariateCrispDecisionFunction object

Reimplemented from lti::crispDecisionTree::crispDecisionFunction.

virtual bool lti::crispDecisionTree::univariateCrispDecisionFunction::read ( ioHandler handler,
const bool  complete = true 
) [virtual]

read the univariateCrispDecisionFunction from the given ioHandler

Parameters:
handler the ioHandler to be used
complete if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written.
Returns:
true if write was successful

Reimplemented from lti::crispDecisionTree::crispDecisionFunction.

void lti::crispDecisionTree::univariateCrispDecisionFunction::setCondition ( const int &  dim,
const double &  thresh 
)

Sets the condition to be tested.

Parameters:
dim the dimension to be tested.
thresh the threshold in that dimension
virtual bool lti::crispDecisionTree::univariateCrispDecisionFunction::write ( ioHandler handler,
const bool  complete = true 
) const [virtual]

write the univariateCrispDecisionFunction in the given ioHandler

Parameters:
handler the ioHandler to be used
complete if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written.
Returns:
true if write was successful

Reimplemented from lti::crispDecisionTree::crispDecisionFunction.


Member Data Documentation

The dimension to be tested.

Threshold against which the data is tested in the given dimension.


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:26:49 2010 for LTI-Lib by Doxygen 1.6.1