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

  Synopsis    [Searches the subtables above node for a parent.]

  Description [Searches the subtables above node for a parent. Returns 1
  as soon as one parent is found. Returns 0 is the search is fruitless.]

  SideEffects [None]

  SeeAlso     []

******************************************************************************/
Function
Synopsis    [Searches the subtables above node for a parent.]

Description [Searches the subtables above node for a parent. Returns 1
as soon as one parent is found. Returns 0 is the search is fruitless.]




Function Synopsis [ Searches the subtables above node for a parent . ] Description [ Searches the subtables above node for a parent . Returns 1 as soon as one parent is found . Returns 0 is the search is fruitless . ]
static int
cuddFindParent(
  DdManager * table,
  DdNode * node)
{
    int         i,j;
    int         slots;
    DdNodePtr   *nodelist;
    DdNode      *f;
    for (i = cuddI(table,node->index) - 1; i >= 0; i--) {
        nodelist = table->subtables[i].nodelist;
        slots = table->subtables[i].slots;
        for (j = 0; j < slots; j++) {
            f = nodelist[j];
            while (cuddT(f) > node) {
                f = f->next;
            }
            while (cuddT(f) == node && Cudd_Regular(cuddE(f)) > node) {
                f = f->next;
            }
            if (cuddT(f) == node && Cudd_Regular(cuddE(f)) == node) {
                return(1);
            }
        }
    }
    return(0);
}
static int cuddFindParent ( DdManager * table , DdNode * node ) { int i , j ; int slots ; DdNodePtr * nodelist ; DdNode * f ; for ( i = cuddI ( table , node -> index ) - 1 ; i >= 0 ; i -- ) { nodelist = table -> subtables [ i ] . nodelist ; slots = table -> subtables [ i ] . slots ; for ( j = 0 ; j < slots ; j ++ ) { f = nodelist [ j ] ; while ( cuddT ( f ) > node ) { f = f -> next ; } while ( cuddT ( f ) == node && Cudd_Regular ( cuddE ( f ) ) > node ) { f = f -> next ; } if ( cuddT ( f ) == node && Cudd_Regular ( cuddE ( f ) ) == node ) { return ( 1 ) ; } } } return ( 0 ) ; }
Function
Synopsis    [Searches the subtables above node for a parent.]
Function Synopsis [ Searches the subtables above node for a parent . ]