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

  Synopsis    [Computes the cofactor of f with respect to g.]

  Description [Computes the cofactor of f with respect to g; g must be
  the BDD or the ADD of a cube. Returns a pointer to the cofactor if
  successful; NULL otherwise.]

  SideEffects [None]

  SeeAlso     [Cudd_bddConstrain Cudd_bddRestrict]

******************************************************************************/
Function
Synopsis    [Computes the cofactor of f with respect to g.]

Description [Computes the cofactor of f with respect to g; g must be
the BDD or the ADD of a cube. Returns a pointer to the cofactor if
successful; NULL otherwise.]




Function Synopsis [ Computes the cofactor of f with respect to g . ] Description [ Computes the cofactor of f with respect to g ; g must be the BDD or the ADD of a cube . Returns a pointer to the cofactor if successful ; NULL otherwise . ]
DdNode *
Cudd_Cofactor(
  DdManager * dd,
  DdNode * f,
  DdNode * g)
{
    DdNode *res,*zero;
    zero = Cudd_Not(DD_ONE(dd));
    if (g == zero || g == DD_ZERO(dd)) {
        (void) fprintf(dd->err,"Cudd_Cofactor: Invalid restriction 1\n");
        dd->errorCode = CUDD_INVALID_ARG;
        return(NULL);
    }
    do {
        dd->reordered = 0;
        res = cuddCofactorRecur(dd,f,g);
    } while (dd->reordered == 1);
    return(res);
}
DdNode * Cudd_Cofactor ( DdManager * dd , DdNode * f , DdNode * g ) { DdNode * res , * zero ; zero = Cudd_Not ( DD_ONE ( dd ) ) ; if ( g == zero || g == DD_ZERO ( dd ) ) { ( void ) fprintf ( dd -> err , " \n " ) ; dd -> errorCode = CUDD_INVALID_ARG ; return ( NULL ) ; } do { dd -> reordered = 0 ; res = cuddCofactorRecur ( dd , f , g ) ; } while ( dd -> reordered == 1 ) ; return ( res ) ; }
Function
Synopsis    [Computes the cofactor of f with respect to g.]
Function Synopsis [ Computes the cofactor of f with respect to g . ]