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

  Synopsis    [Returns the BDD variable with index i.]

  Description [Retrieves the BDD variable with index i if it already
  exists, or creates a new BDD variable.  Returns a pointer to the
  variable if successful; NULL otherwise.]

  SideEffects [None]

  SeeAlso     [Cudd_bddNewVar Cudd_addIthVar Cudd_bddNewVarAtLevel
  Cudd_ReadVars]

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

Description [Retrieves the BDD variable with index i if it already
exists, or creates a new BDD variable.  Returns a pointer to the
variable if successful; NULL otherwise.]




Function Synopsis [ Returns the BDD variable with index i . ] Description [ Retrieves the BDD variable with index i if it already exists or creates a new BDD variable . Returns a pointer to the variable if successful ; NULL otherwise . ]
DdNode *
Cudd_bddIthVar(
  DdManager * dd,
  int  i)
{
    DdNode *res;
    if ((unsigned int) i >= CUDD_MAXINDEX - 1) return(NULL);
    if (i < dd->size) {
        res = dd->vars[i];
    } else {
        res = cuddUniqueInter(dd,i,dd->one,Cudd_Not(dd->one));
    }
    return(res);
}
DdNode * Cudd_bddIthVar ( DdManager * dd , int i ) { DdNode * res ; if ( ( unsigned int ) i >= CUDD_MAXINDEX - 1 ) return ( NULL ) ; if ( i < dd -> size ) { res = dd -> vars [ i ] ; } else { res = cuddUniqueInter ( dd , i , dd -> one , Cudd_Not ( dd -> one ) ) ; } return ( res ) ; }
Function
Synopsis    [Returns the BDD variable with index i.]
Function Synopsis [ Returns the BDD variable with index i . ]