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

  Synopsis    [Computes the scalar inverse of an ADD.]
  
  Description [Computes an n ADD where the discriminants are the
  multiplicative inverses of the corresponding discriminants of the
  argument ADD.  Returns a pointer to the resulting ADD in case of
  success. Returns NULL if any discriminants smaller than epsilon is
  encountered.]

  SideEffects [None]

******************************************************************************/
Function
Synopsis    [Computes the scalar inverse of an ADD.]

Description [Computes an n ADD where the discriminants are the
multiplicative inverses of the corresponding discriminants of the
argument ADD.  Returns a pointer to the resulting ADD in case of
success. Returns NULL if any discriminants smaller than epsilon is
encountered.]


Function Synopsis [ Computes the scalar inverse of an ADD . ] Description [ Computes an n ADD where the discriminants are the multiplicative inverses of the corresponding discriminants of the argument ADD . Returns a pointer to the resulting ADD in case of success . Returns NULL if any discriminants smaller than epsilon is encountered . ]
DdNode *
Cudd_addScalarInverse(
  DdManager * dd,
  DdNode * f,
  DdNode * epsilon)
{
    DdNode *res;
    if (!cuddIsConstant(epsilon)) {
        (void) fprintf(dd->err,"Invalid epsilon\n");
        return(NULL);
    }
    do {
        dd->reordered = 0;
        res  = cuddAddScalarInverseRecur(dd,f,epsilon);
    } while (dd->reordered == 1);
    return(res);
}
DdNode * Cudd_addScalarInverse ( DdManager * dd , DdNode * f , DdNode * epsilon ) { DdNode * res ; if ( ! cuddIsConstant ( epsilon ) ) { ( void ) fprintf ( dd -> err , " \n " ) ; return ( NULL ) ; } do { dd -> reordered = 0 ; res = cuddAddScalarInverseRecur ( dd , f , epsilon ) ; } while ( dd -> reordered == 1 ) ; return ( res ) ; }
Function
Synopsis    [Computes the scalar inverse of an ADD.]
Function Synopsis [ Computes the scalar inverse of an ADD . ]