src/GRAPHGEN/drag2optimal.cpp
// Recursive auxiliary function for the conversion of a DAG into DAG with no equivalent subgraphs
Recursive auxiliary function for the conversion of a DAG into DAG with no equivalent subgraphs
Recursive auxiliary function for the conversion of a DAG into DAG with no equivalent subgraphs
void Dag2DagUsingIdentiesRec(BinaryDrag<conact>::node *n, BinaryDrag<conact>& t, std::map<BinaryDrag<conact>::node*, bool> &visited_n) {
    std::map<BinaryDrag<conact>::node*, bool> visited_fl;
    FindAndLinkIdentiesDagRec(n, t.GetRoot(), visited_fl);
    visited_n[n] = true;
    if (!n->isleaf()) {
        if (!visited_n[n->left])
            Dag2DagUsingIdentiesRec(n->left, t, visited_n);
        if (!visited_n[n->right])
            Dag2DagUsingIdentiesRec(n->right, t, visited_n);
    }
}
void Dag2DagUsingIdentiesRec ( BinaryDrag < conact > :: node * n , BinaryDrag < conact > & t , std :: map < BinaryDrag < conact > :: node * , bool > & visited_n ) { std :: map < BinaryDrag < conact > :: node * , bool > visited_fl ; FindAndLinkIdentiesDagRec ( n , t . GetRoot ( ) , visited_fl ) ; visited_n [ n ] = true ; if ( ! n -> isleaf ( ) ) { if ( ! visited_n [ n -> left ] ) Dag2DagUsingIdentiesRec ( n -> left , t , visited_n ) ; if ( ! visited_n [ n -> right ] ) Dag2DagUsingIdentiesRec ( n -> right , t , visited_n ) ; } }
Recursive auxiliary function for the conversion of a DAG into DAG with no equivalent subgraphs
Recursive auxiliary function for the conversion of a DAG into DAG with no equivalent subgraphs