Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct GrNode {
- ityp pos;
- tdata cmp;
- ityp node_yes;
- ityp node_not;
- ftyp value;
- };
- static ftyp GrNrNode( const GrNode nodes[] , cdata data[] ) {
- ityp nr = 0;
- for( ityp i=0 ; i<3; i++ )
- nr = data[ nodes[nr].pos ] <= nodes[nr].cmp ? nodes[nr].node_yes : nodes[nr].node_not;
- return nodes[nr].value;
- }
- static ftyp GrClassify( cdata data[] ) {
- const static GrNode nodes[] = {
- {43,1.5,2,0,308.965},
- {49,2.5,3,1,-12.3504},
- {39,1.5,1,2,-267.539},
- {17,2.5,0,2,-31.4059},
- {38,1.5,3,1,132.597},
- {39,1.5,0,3,-259.539},
- {33,0.5,2,0,188.224},
- {24,0.5,3,2,-63.6129},
- {48,3.5,3,2,-35.8216},
- {0,1.5,2,0,-37.1228},
- {18,1.5,1,2,37.0977},
- {8,5.5,3,2,33.516},
- {35,1.5,3,0,73.4675},
- {28,0.5,0,1,13.3011},
- {34,0.5,2,3,-176.771},
- {6,0.5,2,1,87.6714},
- {21,0.5,2,3,-3.88106},
- {37,1.5,3,0,137.985},
- {20,0.5,3,0,-53.9166},
- {22,0.5,1,2,-82.5183},
- {2,0.5,2,1,-42.0246},
- {44,0.5,0,2,51.0838},
- {48,5.5,0,3,-20.0458},
- {8,4.5,2,1,8.65581},
- {41,0.5,3,1,72.9202},
- {51,5.5,3,2,177.466},
- {44,1.5,1,2,118.379},
- {40,0.5,0,2,-371.096},
- {47,1.5,2,1,195.856},
- {40,0.5,2,1,-272.005},
- {30,0.5,3,1,-45.9769},
- {0,2.5,0,3,119.795},
- {36,0.5,2,3,74.487},
- {37,0.5,3,0,60.8671},
- {3,0.5,3,0,96.6547},
- {38,5.5,1,1,-234.34},
- {17,0.5,3,1,50.0098},
- {32,0.5,0,2,79.6661},
- {11,3.5,2,0,-2.77636},
- {16,0.5,0,1,-129.23},
- {28,0.5,3,1,-33.8126},
- {18,0.5,2,3,-78.0193},
- {37,0.5,1,0,-3.59189},
- {12,5.5,3,1,113.093},
- {6,1.5,0,1,92.1463},
- {36,2.5,3,2,-115.909},
- {17,0.5,1,2,8.35723},
- {21,1.5,3,1,13.0751},
- {27,0.5,3,1,122.875},
- {18,5.5,2,0,54.9245},
- {1,0.5,1,0,-47.2955},
- {10,0.5,1,3,-132.834},
- {40,3.5,1,0,13.4755},
- {29,0.5,1,2,67.3139},
- {28,0.5,2,3,-121.054},
- {1,6.5,0,0,37.9334},
- {8,0.5,1,3,-69.1815},
- {10,0.5,1,2,9.89491},
- {50,3.5,3,0,65.7122},
- {41,0.5,2,1,-8.75651},
- {22,0.5,2,1,47.7993},
- {4,0.5,0,2,-135.823},
- {14,0.5,1,3,147.1},
- {4,5.5,3,0,-61.4071},
- {37,0.5,1,2,60.1911},
- {4,0.5,2,3,122.948},
- {46,0.5,0,2,-246},
- {28,0.5,1,3,60.5304},
- {44,6.5,2,0,39.635},
- {14,0.5,2,3,6.77493},
- {0,2.5,1,3,-58.5551},
- {4,2.5,1,2,9.8144},
- {33,0.5,2,0,113.468},
- {1,3.5,3,0,-226.514},
- {34,3.5,3,1,109.21},
- {32,0.5,1,2,1.50476},
- {32,0.5,3,2,-29.6566},
- {10,3.5,0,1,-73.3657},
- {12,0.5,2,1,17.4214},
- {8,0.5,0,2,83.2701},
- {10,4.5,2,1,56.3308},
- {45,0.5,3,0,-66.9728},
- {36,2.5,2,1,18.1439},
- {36,0.5,3,1,-9.83261},
- {0,0.5,0,2,-115.546},
- {32,1.5,1,3,52.9357},
- {1,1.5,1,3,50.4657},
- {51,2.5,2,3,9.81363},
- {45,6.5,3,2,371.239},
- {45,0.5,0,1,-147.88},
- {20,2.5,1,3,-143.747},
- {44,0.5,1,2,-81.9434},
- {25,0.5,3,2,178.699},
- {24,0.5,0,2,-26.3969},
- {24,1.5,1,3,-59.3351},
- {8,4.5,2,3,-95.2983},
- };
- ftyp value=0;
- for( ityp i=0 ; i<24 ; i++ )
- value += GrNrNode( nodes + i*4 , data );
- return value;
- }
Add Comment
Please, Sign In to add comment