quick start:This class is never used directly. It is inherited by all DecisionTree classes. Users will mainly interact with it indirectly by using some of the enumerations included in the class definition, and its protected data, which plays an important part in the control structure for all DecisionTree classes.
description:PhoneticDecisionTree pdt; pdt.setStopMode(DecisionTreeBase::DEPTH); pdt.setDepth(3);
static const String CLASS_NAME = L"DecisionTreeBase";
enum STOPMODE { PURE = 0, THRESH, DEPTH, DEF_STOPMODE = PURE };
enum RUNMODE { TRAIN = 0, TEST, DEF_RUNMODE = TRAIN };
static const NameMap STOPMODE_MAP = L"PURE = 0, THRESH, DEPTH, DEF_STOPMODE = PURE";
static const NameMap RUNMODE_MAP = L"TRAIN = 0, TEST, DEF_RUNMODE = TRAIN";
const String DecisionTreeBase::PARAM_DBGL(L"debug_level");
const String DecisionTreeBase::PARAM_STOPMODE(L"stopmode");
const String DecisionTreeBase::PARAM_RUNMODE(L"runmode");
static const long DEF_DEPTH = 0;
static const long ERR = 00100200;
typedef Pair<String, SingleLinkedList<String> > Attribute;
typedef SingleLinkedList<Attribute> Attributes;
STOPMODE stopmode_d;
RUNMODE runmode_d;
long depth_d;
DebugLevel debug_level_d;
static const SysString& name();
static boolean diagnose(Integral::DEBUG debug_level);
boolean setDebug(Integral::DEBUG level);
boolean debug(const unichar* message) const;
~DecisionTreeBase();
DecisionTreeBase();
DecisionTreeBase(const DecisionTreeBase& arg);
virtual boolean assign(const DecisionTreeBase& arg);
virtual long sofSize() const = 0;
virtual boolean read(Sof& sof, long tag, const String& name) = 0;
virtual boolean write(Sof& sof, long tag, const String& name) const = 0;
virtual boolean readData(Sof& sof, const String& pname, long size, boolean param, boolean nested) = 0;
virtual boolean writeData(Sof& sof, const String& pname) const = 0;
virtual boolean eq(const DecisionTreeBase& arg) const;
virtual boolean clear(Integral::CMODE ctype = Integral::DEF_CMODE);
virtual boolean setStopMode(STOPMODE stopmode);
virtual boolean setRunMode(RUNMODE runmode);
virtual boolean setDepth(long& depth);
STOPMODE getStopMode() const;
RUNMODE getRunMode() const;
long getDepth();
boolean getLeafNodes(BiGraphVertex<TObject>& node, SingleLinkedList<BiGraphVertex<TObject> >& leaf_nodes);
boolean getAllLeafNodes(BiGraphVertex<TObject>& node, SingleLinkedList<BiGraphVertex<TObject> >& leaf_nodes);
virtual boolean runDecisionTree() = 0;
virtual boolean setParser(SofParser* parser);