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

  Synopsis    [Returns the ADD variable with index i.]

  Description [Retrieves the ADD variable with index i if it already
  exists, or creates a new ADD variable.  Returns a pointer to the
  variable if successful; NULL otherwise.  An ADD variable differs from
  a BDD variable because it points to the arithmetic zero, instead of
  having a complement pointer to 1. ]

  SideEffects [None]

  SeeAlso     [Cudd_addNewVar Cudd_bddIthVar Cudd_addConst
  Cudd_addNewVarAtLevel]

******************************************************************************/
Function
Synopsis    [Returns the ADD variable with index i.]

Description [Retrieves the ADD variable with index i if it already
exists, or creates a new ADD variable.  Returns a pointer to the
variable if successful; NULL otherwise.  An ADD variable differs from
a BDD variable because it points to the arithmetic zero, instead of
having a complement pointer to 1.




Function Synopsis [ Returns the ADD variable with index i . ] Description [ Retrieves the ADD variable with index i if it already exists or creates a new ADD variable . Returns a pointer to the variable if successful ; NULL otherwise . An ADD variable differs from a BDD variable because it points to the arithmetic zero instead of having a complement pointer to 1 .
DdNode *
Cudd_addIthVar(
  DdManager * dd,
  int  i)
{
    DdNode *res;
    if ((unsigned int) i >= CUDD_MAXINDEX - 1) return(NULL);
    do {
        dd->reordered = 0;
        res = cuddUniqueInter(dd,i,DD_ONE(dd),DD_ZERO(dd));
    } while (dd->reordered == 1);
    return(res);
}
DdNode * Cudd_addIthVar ( DdManager * dd , int i ) { DdNode * res ; if ( ( unsigned int ) i >= CUDD_MAXINDEX - 1 ) return ( NULL ) ; do { dd -> reordered = 0 ; res = cuddUniqueInter ( dd , i , DD_ONE ( dd ) , DD_ZERO ( dd ) ) ; } while ( dd -> reordered == 1 ) ; return ( res ) ; }
Function
Synopsis    [Returns the ADD variable with index i.]
Function Synopsis [ Returns the ADD variable with index i . ]