abc/src/aig/gia/giaEquiv.c
// input is a set of equivalent node pairs in any order
// output is the mapping of each node into the equiv node with the smallest ID
input is a set of equivalent node pairs in any order
output is the mapping of each node into the equiv node with the smallest ID
input is a set of equivalent node pairs in any order output is the mapping of each node into the equiv node with the smallest ID
void Gia_ManOrigIdsRemapPairsInsert( Vec_Int_t * vMap, int One, int Two )
{
    int Smo = One < Two ? One : Two;
    int Big = One < Two ? Two : One;
    assert( Smo != Big );
    if ( Vec_IntEntry(vMap, Big) == -1 )
        Vec_IntWriteEntry( vMap, Big, Smo );
    else
        Gia_ManOrigIdsRemapPairsInsert( vMap, Smo, Vec_IntEntry(vMap, Big) );
}
void Gia_ManOrigIdsRemapPairsInsert ( Vec_Int_t * vMap , int One , int Two ) { int Smo = One < Two ? One : Two ; int Big = One < Two ? Two : One ; assert ( Smo != Big ) ; if ( Vec_IntEntry ( vMap , Big ) == -1 ) Vec_IntWriteEntry ( vMap , Big , Smo ) ; else Gia_ManOrigIdsRemapPairsInsert ( vMap , Smo , Vec_IntEntry ( vMap , Big ) ) ; }
input is a set of equivalent node pairs in any order
output is the mapping of each node into the equiv node with the smallest ID
input is a set of equivalent node pairs in any order output is the mapping of each node into the equiv node with the smallest ID