00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 2012 Chiyuan Zhang 00008 * Copyright (C) 2012 Chiyuan Zhang 00009 */ 00010 00011 #ifndef TREEMACHINE_H__ 00012 #define TREEMACHINE_H__ 00013 00014 #include <shogun/machine/BaseMulticlassMachine.h> 00015 #include <shogun/multiclass/tree/TreeMachineNode.h> 00016 00017 namespace shogun 00018 { 00019 00023 template <class T> class CTreeMachine: public CBaseMulticlassMachine 00024 { 00025 public: 00027 typedef CTreeMachineNode<T> node_t; 00028 00030 CTreeMachine() 00031 :m_root(NULL) 00032 { 00033 SG_ADD((CSGObject**)&m_root,"m_root", "tree structure", MS_NOT_AVAILABLE); 00034 } 00035 00037 virtual ~CTreeMachine() 00038 { 00039 SG_UNREF(m_root); 00040 } 00041 00043 virtual const char* get_name() const { return "TreeMachine"; } 00044 00045 protected: 00047 CTreeMachineNode<T> *m_root; 00048 }; 00049 00050 } /* shogun */ 00051 00052 #endif /* end of include guard: TREEMACHINE_H__ */ 00053