fork download
  1. CPairTree::CPairTree(){
  2.  
  3. }
  4.  
  5. CPairTree::CPairTree(const HyperParameters &hp)
  6. :m_hp( hp ), m_nTreeID(-1)
  7. {
  8. if (hp.useRandProj){
  9. m_rootNode = CPairNode::Ptr(new CPairNodeHyperPlane(hp, 0, 0));
  10. }
  11. else
  12. {
  13. if (hp.useInfoGain)
  14. {
  15. m_rootNode = CPairNode::Ptr(new CPairNodeInfoGain(hp, 0, 0));
  16. }
  17. else
  18. {
  19. m_rootNode = CPairNode::Ptr(new CPairNodeGini(hp, 0, 0));
  20. }
  21. }
  22. }
  23.  
  24. CPairTree::CPairTree(const HyperParameters &hp, const xmlNodePtr treeNode)
  25. :m_hp( hp ), m_nTreeID(-1)
  26. {
  27. xmlNodePtr cur = treeNode->xmlChildrenNode;
  28. while ( cur != 0 )
  29. {
  30. if ( xmlStrcmp( cur->name, reinterpret_cast<const xmlChar*>( "node" ) ) == 0 )
  31. {
  32. std::string nodeType = readStringProp( cur, "type" );
  33.  
  34. if (nodeType == NODE_PAIR_INFOGAIN)
  35. {
  36. m_rootNode = CPairNode::Ptr( new CPairNodeInfoGain( hp, 0, cur ) );
  37. }
  38. else if (nodeType == NODE_PAIR_HYPERPLANE) {
  39. m_rootNode = CPairNode::Ptr( new CPairNodeHyperPlane( hp, 0, cur ) );
  40. }
  41. else if (nodeType == NODE_PAIR_GINI)
  42. {
  43. m_rootNode = CPairNode::Ptr( new CPairNodeGini( hp, 0, cur ) );
  44. }
  45. }
  46. else if ( xmlStrcmp( cur->name, reinterpret_cast<const xmlChar*>( "constants" ) ) == 0 )
  47. {
  48. //Configurator::conf()->loadConstants( cur );
  49. }
  50. cur = cur->next;
  51. }
  52. }
  53.  
  54. CPairTree::CPairTree(const HyperParameters &hp, const xmlNodePtr treeNode, int treeID)
  55. :m_hp( hp ), m_nTreeID(treeID)
  56. {
  57. xmlNodePtr cur = treeNode->xmlChildrenNode;
  58. while ( cur != 0 )
  59. {
  60. if ( xmlStrcmp( cur->name, reinterpret_cast<const xmlChar*>( "node" ) ) == 0 )
  61. {
  62. std::string nodeType = readStringProp( cur, "type" );
  63.  
  64. if (nodeType == NODE_PAIR_INFOGAIN)
  65. {
  66. m_rootNode = CPairNode::Ptr( new CPairNodeInfoGain( hp, 0, cur ) );
  67. }
  68. else if (nodeType == NODE_PAIR_HYPERPLANE) {
  69. m_rootNode = CPairNode::Ptr( new CPairNodeHyperPlane( hp, 0, cur ) );
  70. }
  71. else if (nodeType == NODE_PAIR_GINI)
  72. {
  73. m_rootNode = CPairNode::Ptr( new CPairNodeGini( hp, 0, cur ) );
  74. }
  75. }
  76. else if ( xmlStrcmp( cur->name, reinterpret_cast<const xmlChar*>( "constants" ) ) == 0 )
  77. {
  78. //Configurator::conf()->loadConstants( cur );
  79. }
  80. cur = cur->next;
  81. }
  82. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:2: error: 'CPairTree' does not name a type
prog.cpp:5:2: error: 'CPairTree' does not name a type
prog.cpp:24:2: error: 'CPairTree' does not name a type
prog.cpp:54:2: error: 'CPairTree' does not name a type
stdout
Standard output is empty