8 #include <boost/weak_ptr.hpp> 22 explicit Node(std::shared_ptr<DecisionTree> node);
24 int getChildrenCount()
const;
29 std::shared_ptr<Node> getChild(
int idx);
32 std::shared_ptr<Node> getUnmappedChild(
int idx);
33 void setChild(
int idx, std::shared_ptr<Node> child);
35 void setMapping (
int idx,
int remapped);
36 int getMapping(
int idx)
const;
38 void setExtra(std::shared_ptr<NodeExtra> extra);
39 std::shared_ptr<NodeExtra> extra()
const;
44 void setParent(std::weak_ptr<Node> node) { mParent = node; }
45 std::weak_ptr<Node>
parent()
const {
return mParent; }
47 double value()
const {
return mValue; }
51 std::weak_ptr<DecisionTree> mTree;
52 std::weak_ptr<Node> mParent;
53 std::vector<std::shared_ptr<Node> > mNodes;
54 std::vector<int> mGroups;
55 std::shared_ptr<NodeExtra> mExtra;
std::weak_ptr< Node > parent() const
Definition: dtnode.h:45
void setParent(std::weak_ptr< Node > node)
Definition: dtnode.h:44
a decision tree node.
Definition: dtnode.h:19
void setValue(double v)
Definition: dtnode.h:48
Variable
Definition: variables.h:10
Definition: commonstateevaluators.h:8
double value() const
Definition: dtnode.h:47
Variable variable() const
Definition: dtnode.h:41
#define COMMONSSHARED_EXPORT
Definition: commons_global.h:23