diff options
Diffstat (limited to 'src/bdd/cudd/cuddBddCorr.c')
-rw-r--r-- | src/bdd/cudd/cuddBddCorr.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/bdd/cudd/cuddBddCorr.c b/src/bdd/cudd/cuddBddCorr.c index a532f31d..f3f017b0 100644 --- a/src/bdd/cudd/cuddBddCorr.c +++ b/src/bdd/cudd/cuddBddCorr.c @@ -33,6 +33,9 @@ #include "util_hack.h" #include "cuddInt.h" +ABC_NAMESPACE_IMPL_START + + /*---------------------------------------------------------------------------*/ /* Constant declarations */ @@ -80,7 +83,7 @@ static int num_calls; static double bddCorrelationAux ARGS((DdManager *dd, DdNode *f, DdNode *g, st_table *table)); static double bddCorrelationWeightsAux ARGS((DdManager *dd, DdNode *f, DdNode *g, double *prob, st_table *table)); static int CorrelCompare ARGS((const char *key1, const char *key2)); -static int CorrelHash ARGS((char *key, int modulus)); +static int CorrelHash ARGS((const char *key, int modulus)); static enum st_retval CorrelCleanUp ARGS((char *key, char *value, char *arg)); /**AutomaticEnd***************************************************************/ @@ -122,7 +125,7 @@ Cudd_bddCorrelation( table = st_init_table(CorrelCompare,CorrelHash); if (table == NULL) return((double)CUDD_OUT_OF_MEM); correlation = bddCorrelationAux(manager,f,g,table); - st_foreach(table, CorrelCleanUp, NIL(char)); + st_foreach(table, (ST_PFSR)CorrelCleanUp, NIL(char)); st_free_table(table); return(correlation); @@ -165,7 +168,7 @@ Cudd_bddCorrelationWeights( table = st_init_table(CorrelCompare,CorrelHash); if (table == NULL) return((double)CUDD_OUT_OF_MEM); correlation = bddCorrelationWeightsAux(manager,f,g,prob,table); - st_foreach(table, CorrelCleanUp, NIL(char)); + st_foreach(table, (ST_PFSR)CorrelCleanUp, NIL(char)); st_free_table(table); return(correlation); @@ -434,13 +437,13 @@ CorrelCompare( ******************************************************************************/ static int CorrelHash( - char * key, + const char * key, int modulus) { - HashEntry *entry; + const HashEntry *entry; int val = 0; - entry = (HashEntry *) key; + entry = (const HashEntry *) key; #if SIZEOF_VOID_P == 8 && SIZEOF_INT == 4 val = ((int) ((long)entry->f))*997 + ((int) ((long)entry->g)); #else @@ -479,3 +482,5 @@ CorrelCleanUp( } /* end of CorrelCleanUp */ +ABC_NAMESPACE_IMPL_END + |