DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
dtree::Node Class Reference

a decision tree node. More...

#include <dtnode.h>

Public Member Functions

 Node (std::shared_ptr< DecisionTree > node)
 
int getChildrenCount () const
 
std::shared_ptr< NodegetChild (int idx)
 Returns the children pointer indexed by the argument If the children has been remapped using setMapping(), it returns the remapped pointer. More...
 
std::shared_ptr< NodegetUnmappedChild (int idx)
 Returns the children pointer indexed by the argument, ignoring any mapping. More...
 
void setChild (int idx, std::shared_ptr< Node > child)
 
void setMapping (int idx, int remapped)
 
int getMapping (int idx) const
 
void setExtra (std::shared_ptr< NodeExtra > extra)
 
std::shared_ptr< NodeExtraextra () const
 
Variable variable () const
 
void setVariable (Variable var)
 
void setParent (std::weak_ptr< Node > node)
 
std::weak_ptr< Nodeparent () const
 
double value () const
 
void setValue (double v)
 

Detailed Description

a decision tree node.

Constructor & Destructor Documentation

◆ Node()

Node::Node ( std::shared_ptr< DecisionTree node)
explicit

Member Function Documentation

◆ extra()

std::shared_ptr< NodeExtra > Node::extra ( ) const

◆ getChild()

std::shared_ptr< Node > Node::getChild ( int  idx)

Returns the children pointer indexed by the argument If the children has been remapped using setMapping(), it returns the remapped pointer.

◆ getChildrenCount()

int Node::getChildrenCount ( ) const

◆ getMapping()

int Node::getMapping ( int  idx) const

◆ getUnmappedChild()

std::shared_ptr< Node > Node::getUnmappedChild ( int  idx)

Returns the children pointer indexed by the argument, ignoring any mapping.

◆ parent()

std::weak_ptr<Node> dtree::Node::parent ( ) const
inline

◆ setChild()

void Node::setChild ( int  idx,
std::shared_ptr< Node child 
)

◆ setExtra()

void Node::setExtra ( std::shared_ptr< NodeExtra extra)

◆ setMapping()

void Node::setMapping ( int  idx,
int  remapped 
)

◆ setParent()

void dtree::Node::setParent ( std::weak_ptr< Node node)
inline

◆ setValue()

void dtree::Node::setValue ( double  v)
inline

◆ setVariable()

void Node::setVariable ( Variable  var)

◆ value()

double dtree::Node::value ( ) const
inline

◆ variable()

Variable dtree::Node::variable ( ) const
inline

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