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

  Synopsis    [Accesses the i-th clause of a DD.]

  Description [Accesses the i-th clause of a DD given the clause set which
  must be already computed.  Returns 1 if successful; 0 if i is out of range,
  or in case of error.]

  SideEffects [the four components of a clause are returned as side effects.]

  SeeAlso     [Cudd_FindTwoLiteralClauses]

******************************************************************************/
Function
Synopsis    [Accesses the i-th clause of a DD.]

Description [Accesses the i-th clause of a DD given the clause set which
must be already computed.  Returns 1 if successful; 0 if i is out of range,
or in case of error.]

SideEffects [the four components of a clause are returned as side effects.]


Function Synopsis [ Accesses the i - th clause of a DD . ] Description [ Accesses the i - th clause of a DD given the clause set which must be already computed . Returns 1 if successful ; 0 if i is out of range or in case of error . ] SideEffects [ the four components of a clause are returned as side effects . ]
int
Cudd_ReadIthClause(
  DdTlcInfo * tlc,
  int i,
  DdHalfWord *var1,
  DdHalfWord *var2,
  int *phase1,
  int *phase2)
{
    if (tlc == NULL) return(0);
    if (tlc->vars == NULL || tlc->phases == NULL) return(0);
    if (i < 0 || (unsigned) i >= tlc->cnt) return(0);
    *var1 = tlc->vars[2*i];
    *var2 = tlc->vars[2*i+1];
    *phase1 = (int) bitVectorRead(tlc->phases, 2*i);
    *phase2 = (int) bitVectorRead(tlc->phases, 2*i+1);
    return(1);
}
int Cudd_ReadIthClause ( DdTlcInfo * tlc , int i , DdHalfWord * var1 , DdHalfWord * var2 , int * phase1 , int * phase2 ) { if ( tlc == NULL ) return ( 0 ) ; if ( tlc -> vars == NULL || tlc -> phases == NULL ) return ( 0 ) ; if ( i < 0 || ( unsigned ) i >= tlc -> cnt ) return ( 0 ) ; * var1 = tlc -> vars [ 2 * i ] ; * var2 = tlc -> vars [ 2 * i + 1 ] ; * phase1 = ( int ) bitVectorRead ( tlc -> phases , 2 * i ) ; * phase2 = ( int ) bitVectorRead ( tlc -> phases , 2 * i + 1 ) ; return ( 1 ) ; }
Function
Synopsis    [Accesses the i-th clause of a DD.]
Function Synopsis [ Accesses the i - th clause of a DD . ]