src/GRAPHGEN/graph_code_generator.cpp
// This function defines and returns the string that should be put before each (main) 
// tree when generating the code for a forest of decision trees. The string contains 
// an if to check whether the end of a line is reached and a goto to the corresponding 
// tree in the end line forest. The string is specific for algorithms which exploit a 
// mask with a horizontal shift of two pixels like BBDT, DRAG, Spaghetti and so on. 
// When the end line forest is not generated a different string should be used, for 
// example replacing the goto with a continue and changing the if condition accordingly.
This function defines and returns the string that should be put before each (main)
tree when generating the code for a forest of decision trees. The string contains
an if to check whether the end of a line is reached and a goto to the corresponding
tree in the end line forest. The string is specific for algorithms which exploit a
mask with a horizontal shift of two pixels like BBDT, DRAG, Spaghetti and so on.
When the end line forest is not generated a different string should be used, for
example replacing the goto with a continue and changing the if condition accordingly.
This function defines and returns the string that should be put before each ( main ) tree when generating the code for a forest of decision trees . The string contains an if to check whether the end of a line is reached and a goto to the corresponding tree in the end line forest . The string is specific for algorithms which exploit a mask with a horizontal shift of two pixels like BBDT DRAG Spaghetti and so on . When the end line forest is not generated a different string should be used for example replacing the goto with a continue and changing the if condition accordingly .
BEFORE_AFTER_FUNC(BeforeMainShiftTwo)
{
    return prefix + "tree_" + to_string(index) + ": if ((c+=2) >= w - 2) { if (c > w - 2) { goto " +
           prefix + "break_0_" + to_string(mapping[0][index]) + "; } else { goto " +
           prefix + "break_1_" + to_string(mapping[1][index]) + "; } } \n";
}
BEFORE_AFTER_FUNC ( BeforeMainShiftTwo ) { return prefix + " " + to_string ( index ) + " " + prefix + " " + to_string ( mapping [ 0 ] [ index ] ) + " " + prefix + " " + to_string ( mapping [ 1 ] [ index ] ) + " \n " ; }
This function defines and returns the string that should be put before each (main)
tree when generating the code for a forest of decision trees.
This function defines and returns the string that should be put before each ( main ) tree when generating the code for a forest of decision trees .