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

  Synopsis    [Implements the solution of F(x,y) = 0.]

  Description [Implements the solution for F(x,y) = 0. The return
  value is the consistency condition. The y variables are the unknowns
  and the remaining variables are the parameters.  Returns the
  consistency condition if successful; NULL otherwise. Cudd_SolveEqn
  allocates an array and fills it with the indices of the
  unknowns. This array is used by Cudd_VerifySol.]

  SideEffects [The solution is returned in G; the indices of the y
  variables are returned in yIndex.]

  SeeAlso     [Cudd_VerifySol]

******************************************************************************/
Function
Synopsis    [Implements the solution of F(x,y) = 0.]

Description [Implements the solution for F(x,y) = 0. The return
value is the consistency condition. The y variables are the unknowns
and the remaining variables are the parameters.  Returns the
consistency condition if successful; NULL otherwise. Cudd_SolveEqn
allocates an array and fills it with the indices of the
unknowns. This array is used by Cudd_VerifySol.]

SideEffects [The solution is returned in G; the indices of the y
variables are returned in yIndex.]


Function Synopsis [ Implements the solution of F ( x y ) = 0 . ] Description [ Implements the solution for F ( x y ) = 0 . The return value is the consistency condition . The y variables are the unknowns and the remaining variables are the parameters . Returns the consistency condition if successful ; NULL otherwise . Cudd_SolveEqn allocates an array and fills it with the indices of the unknowns . This array is used by Cudd_VerifySol . ] SideEffects [ The solution is returned in G ; the indices of the y variables are returned in yIndex . ]
DdNode *
Cudd_SolveEqn(
  DdManager *  bdd,
  DdNode * F ,
  DdNode * Y ,
  DdNode ** G ,
  int ** yIndex ,
  int  n )
{
    DdNode *res;
    int *temp;
    *yIndex = temp = ABC_ALLOC(int, n);
    if (temp == NULL) {
        bdd->errorCode = CUDD_MEMORY_OUT;
        (void) fprintf(bdd->out,
                       "Cudd_SolveEqn: Out of memory for yIndex\n");
        return(NULL);
    }
    do {
        bdd->reordered = 0;
        res = cuddSolveEqnRecur(bdd, F, Y, G, n, temp, 0);
    } while (bdd->reordered == 1);
    return(res);
}
DdNode * Cudd_SolveEqn ( DdManager * bdd , DdNode * F , DdNode * Y , DdNode * * G , int * * yIndex , int n ) { DdNode * res ; int * temp ; * yIndex = temp = ABC_ALLOC ( int , n ) ; if ( temp == NULL ) { bdd -> errorCode = CUDD_MEMORY_OUT ; ( void ) fprintf ( bdd -> out , " \n " ) ; return ( NULL ) ; } do { bdd -> reordered = 0 ; res = cuddSolveEqnRecur ( bdd , F , Y , G , n , temp , 0 ) ; } while ( bdd -> reordered == 1 ) ; return ( res ) ; }
Function
Synopsis    [Implements the solution of F(x,y) = 0.]
Function Synopsis [ Implements the solution of F ( x y ) = 0 . ]
/* the left-hand side of the equation */ /* the cube of the y variables */ /* the array of solutions (return parameter) */ /* index of y variables */ /* numbers of unknowns */