src/GRAPHGEN/conact_code_generator.cpp
// This is the function to generate Thinning action code
This is the function to generate Thinning action code
This is the function to generate Thinning action code
void GenerateThinningActionsCode(ofstream& os, const rule_set& rs, bool with_continues = true) {
    os << "\n\n//Actions:\n";
    for (size_t a = 0; a < rs.actions.size(); ++a) {
        const auto& action = rs.actions[a];
        os << "#define ACTION_" + std::to_string(a + 1);
        if (action == "keep0") {
            os << " ; // keep0\n";
        }
        if (action == "keep1") {
            os << " img_row00[c] = 1; // keep1\n";
        }
        if (action == "change0") {
            os << " modified = true; // change0\n";
        }
    }
}
void GenerateThinningActionsCode ( ofstream & os , const rule_set & rs , bool with_continues = true ) { os << " \n \n \n " ; for ( size_t a = 0 ; a < rs . actions . size ( ) ; ++ a ) { const auto & action = rs . actions [ a ] ; os << " " + std :: to_string ( a + 1 ) ; if ( action == " " ) { os << " \n " ; } if ( action == " " ) { os << " \n " ; } if ( action == " " ) { os << " \n " ; } } }
This is the function to generate Thinning action code
This is the function to generate Thinning action code
// Actions: