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

  Synopsis    [Determines whether a given variable is essential with a
  given phase in a BDD.]

  Description [Determines whether a given variable is essential with a
  given phase in a BDD. Uses Cudd_bddIteConstant. Returns 1 if phase == 1
  and f-->x_id, or if phase == 0 and f-->x_id'.]

  SideEffects [None]

  SeeAlso     [Cudd_FindEssential]

******************************************************************************/
Function
Synopsis    [Determines whether a given variable is essential with a
given phase in a BDD.]

Description [Determines whether a given variable is essential with a
given phase in a BDD.




Function Synopsis [ Determines whether a given variable is essential with a given phase in a BDD . ] Description [ Determines whether a given variable is essential with a given phase in a BDD .
int
Cudd_bddIsVarEssential(
  DdManager * manager,
  DdNode * f,
  int  id,
  int  phase)
{
    DdNode      *var;
    int         res;
    var = Cudd_bddIthVar(manager, id);
    var = Cudd_NotCond(var,phase == 0);
    res = Cudd_bddLeq(manager, f, var);
    return(res);
}
int Cudd_bddIsVarEssential ( DdManager * manager , DdNode * f , int id , int phase ) { DdNode * var ; int res ; var = Cudd_bddIthVar ( manager , id ) ; var = Cudd_NotCond ( var , phase == 0 ) ; res = Cudd_bddLeq ( manager , f , var ) ; return ( res ) ; }
Function
Synopsis    [Determines whether a given variable is essential with a
given phase in a BDD.]
Function Synopsis [ Determines whether a given variable is essential with a given phase in a BDD . ]