Guest User

Untitled

a guest
Jul 23rd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1. struct GrNode {
  2. ityp pos;
  3. tdata cmp;
  4. ityp node_yes;
  5. ityp node_not;
  6. ftyp value;
  7. };
  8. static ftyp GrNrNode( const GrNode nodes[] , cdata data[] ) {
  9. ityp nr = 0;
  10. for( ityp i=0 ; i<3; i++ )
  11. nr = data[ nodes[nr].pos ] <= nodes[nr].cmp ? nodes[nr].node_yes : nodes[nr].node_not;
  12. return nodes[nr].value;
  13. }
  14. static ftyp GrClassify( cdata data[] ) {
  15. const static GrNode nodes[] = {
  16. {43,1.5,2,0,308.965},
  17. {49,2.5,3,1,-12.3504},
  18. {39,1.5,1,2,-267.539},
  19. {17,2.5,0,2,-31.4059},
  20. {38,1.5,3,1,132.597},
  21. {39,1.5,0,3,-259.539},
  22. {33,0.5,2,0,188.224},
  23. {24,0.5,3,2,-63.6129},
  24. {48,3.5,3,2,-35.8216},
  25. {0,1.5,2,0,-37.1228},
  26. {18,1.5,1,2,37.0977},
  27. {8,5.5,3,2,33.516},
  28. {35,1.5,3,0,73.4675},
  29. {28,0.5,0,1,13.3011},
  30. {34,0.5,2,3,-176.771},
  31. {6,0.5,2,1,87.6714},
  32. {21,0.5,2,3,-3.88106},
  33. {37,1.5,3,0,137.985},
  34. {20,0.5,3,0,-53.9166},
  35. {22,0.5,1,2,-82.5183},
  36. {2,0.5,2,1,-42.0246},
  37. {44,0.5,0,2,51.0838},
  38. {48,5.5,0,3,-20.0458},
  39. {8,4.5,2,1,8.65581},
  40. {41,0.5,3,1,72.9202},
  41. {51,5.5,3,2,177.466},
  42. {44,1.5,1,2,118.379},
  43. {40,0.5,0,2,-371.096},
  44. {47,1.5,2,1,195.856},
  45. {40,0.5,2,1,-272.005},
  46. {30,0.5,3,1,-45.9769},
  47. {0,2.5,0,3,119.795},
  48. {36,0.5,2,3,74.487},
  49. {37,0.5,3,0,60.8671},
  50. {3,0.5,3,0,96.6547},
  51. {38,5.5,1,1,-234.34},
  52. {17,0.5,3,1,50.0098},
  53. {32,0.5,0,2,79.6661},
  54. {11,3.5,2,0,-2.77636},
  55. {16,0.5,0,1,-129.23},
  56. {28,0.5,3,1,-33.8126},
  57. {18,0.5,2,3,-78.0193},
  58. {37,0.5,1,0,-3.59189},
  59. {12,5.5,3,1,113.093},
  60. {6,1.5,0,1,92.1463},
  61. {36,2.5,3,2,-115.909},
  62. {17,0.5,1,2,8.35723},
  63. {21,1.5,3,1,13.0751},
  64. {27,0.5,3,1,122.875},
  65. {18,5.5,2,0,54.9245},
  66. {1,0.5,1,0,-47.2955},
  67. {10,0.5,1,3,-132.834},
  68. {40,3.5,1,0,13.4755},
  69. {29,0.5,1,2,67.3139},
  70. {28,0.5,2,3,-121.054},
  71. {1,6.5,0,0,37.9334},
  72. {8,0.5,1,3,-69.1815},
  73. {10,0.5,1,2,9.89491},
  74. {50,3.5,3,0,65.7122},
  75. {41,0.5,2,1,-8.75651},
  76. {22,0.5,2,1,47.7993},
  77. {4,0.5,0,2,-135.823},
  78. {14,0.5,1,3,147.1},
  79. {4,5.5,3,0,-61.4071},
  80. {37,0.5,1,2,60.1911},
  81. {4,0.5,2,3,122.948},
  82. {46,0.5,0,2,-246},
  83. {28,0.5,1,3,60.5304},
  84. {44,6.5,2,0,39.635},
  85. {14,0.5,2,3,6.77493},
  86. {0,2.5,1,3,-58.5551},
  87. {4,2.5,1,2,9.8144},
  88. {33,0.5,2,0,113.468},
  89. {1,3.5,3,0,-226.514},
  90. {34,3.5,3,1,109.21},
  91. {32,0.5,1,2,1.50476},
  92. {32,0.5,3,2,-29.6566},
  93. {10,3.5,0,1,-73.3657},
  94. {12,0.5,2,1,17.4214},
  95. {8,0.5,0,2,83.2701},
  96. {10,4.5,2,1,56.3308},
  97. {45,0.5,3,0,-66.9728},
  98. {36,2.5,2,1,18.1439},
  99. {36,0.5,3,1,-9.83261},
  100. {0,0.5,0,2,-115.546},
  101. {32,1.5,1,3,52.9357},
  102. {1,1.5,1,3,50.4657},
  103. {51,2.5,2,3,9.81363},
  104. {45,6.5,3,2,371.239},
  105. {45,0.5,0,1,-147.88},
  106. {20,2.5,1,3,-143.747},
  107. {44,0.5,1,2,-81.9434},
  108. {25,0.5,3,2,178.699},
  109. {24,0.5,0,2,-26.3969},
  110. {24,1.5,1,3,-59.3351},
  111. {8,4.5,2,3,-95.2983},
  112. };
  113. ftyp value=0;
  114. for( ityp i=0 ; i<24 ; i++ )
  115. value += GrNrNode( nodes + i*4 , data );
  116. return value;
  117. }
Add Comment
Please, Sign In to add comment