src/GRAPHGEN/conact_code_generator.cpp
// This is the version for CTBE algorithm, still very raw
This is the version for CTBE algorithm, still very raw
This is the version for CTBE algorithm still very raw
string CreateActionCodeCtbe(const string& action, const pixel_set& names, const string& assignment_variable) {
    if (action == "nothing") {
        return "NOTHING";
    }
    string action_ = action.substr(3);
    if (action_ == "newlabel") {
        return assignment_variable + " LabelsSolver::NewLabel()";
    }
    std::vector<std::string> pixels_names;
    StringSplit(action_, pixels_names);
    assert(pixels_names.size() > 0 && "Something wrong with actions");
    return assignment_variable + " " + CreateAssignmentCodeRec(pixels_names, names);
}
string CreateActionCodeCtbe ( const string & action , const pixel_set & names , const string & assignment_variable ) { if ( action == " " ) { return " " ; } string action_ = action . substr ( 3 ) ; if ( action_ == " " ) { return assignment_variable + " " ; } std :: vector < std :: string > pixels_names ; StringSplit ( action_ , pixels_names ) ; assert ( pixels_names . size ( ) > 0 && " " ) ; return assignment_variable + " " + CreateAssignmentCodeRec ( pixels_names , names ) ; }
This is the version for CTBE algorithm, still very raw
This is the version for CTBE algorithm still very raw