treelite
Classes | Public Member Functions | Public Attributes | List of all members
Tree Class Reference

in-memory representation of a decision tree More...

#include <tree.h>

Classes

class  Node
 tree node More...
 

Public Member Functions

Nodeoperator[] (int nid)
 get node given nid More...
 
const Nodeoperator[] (int nid) const
 get node given nid (const version) More...
 
void Init ()
 initialize the model with a single root node
 
void AddChilds (int nid)
 add child nodes to node More...
 
std::vector< unsigned > GetCategoricalFeatures () const
 get list of all categorical features that have appeared anywhere in tree
 

Public Attributes

int num_nodes
 number of nodes
 

Detailed Description

in-memory representation of a decision tree

Definition at line 22 of file tree.h.

Member Function Documentation

void AddChilds ( int  nid)
inline

add child nodes to node

Parameters
nidnode id to add children to

Definition at line 309 of file tree.h.

Node& operator[] ( int  nid)
inline

get node given nid

Parameters
nidnode id
Returns
reference to node

Definition at line 287 of file tree.h.

const Node& operator[] ( int  nid) const
inline

get node given nid (const version)

Parameters
nidnode id
Returns
const reference to node

Definition at line 295 of file tree.h.


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