abc/src/bool/kit/cloud.c
/**Function********************************************************************

  Synopsis    [Performs the recursive step of Cloud_DagSize.]

  Description [Performs the recursive step of Cloud_DagSize. Returns the
  number of nodes in the graph rooted at n.]

  SideEffects [None]

******************************************************************************/
Function
Synopsis    [Performs the recursive step of Cloud_DagSize.]

Description [Performs the recursive step of Cloud_DagSize. Returns the
number of nodes in the graph rooted at n.]


Function Synopsis [ Performs the recursive step of Cloud_DagSize . ] Description [ Performs the recursive step of Cloud_DagSize . Returns the number of nodes in the graph rooted at n . ]
static int cloudDagSize( CloudManager * dd, CloudNode * n )
{
    int tval, eval;
    if ( cloudNodeIsMarked(n) )
        return 0;
    cloudNodeMark(n);
    if ( cloudIsConstant(n) )
        return 1;
    tval = cloudDagSize( dd, cloudT(n) );
    eval = cloudDagSize( dd, Cloud_Regular(cloudE(n)) );
    return tval + eval + 1;
}
static int cloudDagSize ( CloudManager * dd , CloudNode * n ) { int tval , eval ; if ( cloudNodeIsMarked ( n ) ) return 0 ; cloudNodeMark ( n ) ; if ( cloudIsConstant ( n ) ) return 1 ; tval = cloudDagSize ( dd , cloudT ( n ) ) ; eval = cloudDagSize ( dd , Cloud_Regular ( cloudE ( n ) ) ) ; return tval + eval + 1 ; }
Function
Synopsis    [Performs the recursive step of Cloud_DagSize.]
Function Synopsis [ Performs the recursive step of Cloud_DagSize . ]
// set visited flag