abc/src/bdd/cudd/cuddExact.c
/**Function********************************************************************

  Synopsis    [Gathers symmetry information.]

  Description [Translates the symmetry information stored in the next
  field of each subtable from level to indices. This procedure is called
  immediately after symmetric sifting, so that the next fields are correct.
  By translating this informaton in terms of indices, we make it independent
  of subsequent reorderings. The format used is that of the next fields:
  a circular list where each variable points to the next variable in the
  same symmetry group. Only the entries between lower and upper are
  considered.  The procedure returns a pointer to an array
  holding the symmetry information if successful; NULL otherwise.]

  SideEffects [None]

  SeeAlso     [checkSymmInfo]

******************************************************************************/
Function
Synopsis    [Gathers symmetry information.]

Description [Translates the symmetry information stored in the next
field of each subtable from level to indices. This procedure is called
immediately after symmetric sifting, so that the next fields are correct.
By translating this informaton in terms of indices, we make it independent
of subsequent reorderings. The format used is that of the next fields:
a circular list where each variable points to the next variable in the
same symmetry group. Only the entries between lower and upper are
considered.  The procedure returns a pointer to an array
holding the symmetry information if successful; NULL otherwise.]




Function Synopsis [ Gathers symmetry information . ] Description [ Translates the symmetry information stored in the next field of each subtable from level to indices . This procedure is called immediately after symmetric sifting so that the next fields are correct . By translating this informaton in terms of indices we make it independent of subsequent reorderings . The format used is that of the next fields : a circular list where each variable points to the next variable in the same symmetry group . Only the entries between lower and upper are considered . The procedure returns a pointer to an array holding the symmetry information if successful ; NULL otherwise . ]
static DdHalfWord *
initSymmInfo(
  DdManager * table,
  int  lower,
  int  upper)
{
    int level, index, next, nextindex;
    DdHalfWord *symmInfo;
    symmInfo =  ABC_ALLOC(DdHalfWord, table->size);
    if (symmInfo == NULL) return(NULL);
    for (level = lower; level <= upper; level++) {
        index = table->invperm[level];
        next =  table->subtables[level].next;
        nextindex = table->invperm[next];
        symmInfo[index] = nextindex;
    }
    return(symmInfo);
}
static DdHalfWord * initSymmInfo ( DdManager * table , int lower , int upper ) { int level , index , next , nextindex ; DdHalfWord * symmInfo ; symmInfo = ABC_ALLOC ( DdHalfWord , table -> size ) ; if ( symmInfo == NULL ) return ( NULL ) ; for ( level = lower ; level <= upper ; level ++ ) { index = table -> invperm [ level ] ; next = table -> subtables [ level ] . next ; nextindex = table -> invperm [ next ] ; symmInfo [ index ] = nextindex ; } return ( symmInfo ) ; }
Function
Synopsis    [Gathers symmetry information.]
Function Synopsis [ Gathers symmetry information . ]