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

  Synopsis    [Performs two-way disjunctive decomposition of a BDD.]

  Description [Performs two-way disjunctive decomposition of a BDD.
  Returns the number of disjuncts produced, that is, 2 if successful;
  1 if no meaningful decomposition was found; 0 otherwise. The
  disjuncts produced by this procedure tend to be imbalanced.]

  SideEffects [The two disjuncts are returned in an array as side effects.
  The array is allocated by this function. It is the caller's responsibility
  to free it. On successful completion, the disjuncts are already
  referenced. If the function returns 0, the array for the disjuncts is
  not allocated. If the function returns 1, the only factor equals the
  function to be decomposed.]

  SeeAlso     [Cudd_bddApproxConjDecomp Cudd_bddIterDisjDecomp
  Cudd_bddGenDisjDecomp Cudd_bddVarDisjDecomp]

******************************************************************************/
Function
Synopsis    [Performs two-way disjunctive decomposition of a BDD.]

Description [Performs two-way disjunctive decomposition of a BDD.
Returns the number of disjuncts produced, that is, 2 if successful;
1 if no meaningful decomposition was found; 0 otherwise. The
disjuncts produced by this procedure tend to be imbalanced.]

SideEffects [The two disjuncts are returned in an array as side effects.
The array is allocated by this function. It is the caller's responsibility
to free it. On successful completion, the disjuncts are already
referenced. If the function returns 0, the array for the disjuncts is
not allocated. If the function returns 1, the only factor equals the
function to be decomposed.]


Function Synopsis [ Performs two - way disjunctive decomposition of a BDD . ] Description [ Performs two - way disjunctive decomposition of a BDD . Returns the number of disjuncts produced that is 2 if successful ; 1 if no meaningful decomposition was found ; 0 otherwise . The disjuncts produced by this procedure tend to be imbalanced . ] SideEffects [ The two disjuncts are returned in an array as side effects . The array is allocated by this function . It is the caller ' s responsibility to free it . On successful completion the disjuncts are already referenced . If the function returns 0 the array for the disjuncts is not allocated . If the function returns 1 the only factor equals the function to be decomposed . ]
int
Cudd_bddApproxDisjDecomp(
  DdManager * dd ,
  DdNode * f ,
  DdNode *** disjuncts )
{
    int result, i;
    result = Cudd_bddApproxConjDecomp(dd,Cudd_Not(f),disjuncts);
    for (i = 0; i < result; i++) {
        (*disjuncts)[i] = Cudd_Not((*disjuncts)[i]);
    }
    return(result);
}
int Cudd_bddApproxDisjDecomp ( DdManager * dd , DdNode * f , DdNode * * * disjuncts ) { int result , i ; result = Cudd_bddApproxConjDecomp ( dd , Cudd_Not ( f ) , disjuncts ) ; for ( i = 0 ; i < result ; i ++ ) { ( * disjuncts ) [ i ] = Cudd_Not ( ( * disjuncts ) [ i ] ) ; } return ( result ) ; }
Function
Synopsis    [Performs two-way disjunctive decomposition of a BDD.]
Function Synopsis [ Performs two - way disjunctive decomposition of a BDD . ]
/* manager */ /* function to be decomposed */ /* address of the array of the disjuncts */