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

  Synopsis    [Counts the number of internal nodes of the group tree.]

  Description [Counts the number of internal nodes of the group tree.
  Returns the count.]

  SideEffects [None]

******************************************************************************/
Function
Synopsis    [Counts the number of internal nodes of the group tree.]

Description [Counts the number of internal nodes of the group tree.
Returns the count.]


Function Synopsis [ Counts the number of internal nodes of the group tree . ] Description [ Counts the number of internal nodes of the group tree . Returns the count . ]
static int
ddCountInternalMtrNodes(
  DdManager * table,
  MtrNode * treenode)
{
    MtrNode *auxnode;
    int     count,nodeCount;
    nodeCount = 0;
    auxnode = treenode;
    while (auxnode != NULL) {
        if (!(MTR_TEST(auxnode,MTR_TERMINAL))) {
            nodeCount++;
            count = ddCountInternalMtrNodes(table,auxnode->child);
            nodeCount += count;
        }
        auxnode = auxnode->younger;
    }
    return(nodeCount);
}
static int ddCountInternalMtrNodes ( DdManager * table , MtrNode * treenode ) { MtrNode * auxnode ; int count , nodeCount ; nodeCount = 0 ; auxnode = treenode ; while ( auxnode != NULL ) { if ( ! ( MTR_TEST ( auxnode , MTR_TERMINAL ) ) ) { nodeCount ++ ; count = ddCountInternalMtrNodes ( table , auxnode -> child ) ; nodeCount += count ; } auxnode = auxnode -> younger ; } return ( nodeCount ) ; }
Function
Synopsis    [Counts the number of internal nodes of the group tree.]
Function Synopsis [ Counts the number of internal nodes of the group tree . ]