84 static char rcsid[]
DD_UNUSED =
"$Id: cuddAddWalsh.c,v 1.10 2008/04/17 21:17:11 fabio Exp $";
170 int i, j, k, t, residue, thisOne, previous, index;
174 if (n < 1 && m < 2)
return(NULL);
181 if (array[0] == NULL) {
186 if (array[1] == NULL) {
191 for (i = 0; i < m; i++) {
192 array[0][i] = array[1][i] = NULL;
196 for (i = 0; i < m; i++) {
199 for (j = 0; j < i; j++) {
212 for (k = 0; k < n; k++) {
215 previous = thisOne ^ 1;
224 for (j = 0; j < m; j++) {
232 for (i = 0; i < m; i ++) {
233 t = (i + residue) % m;
234 tmp =
Cudd_addIte(dd,var,array[previous][t],array[previous][i]);
236 for (j = 0; j < i; j++) {
239 for (j = 0; j < m; j++) {
247 array[thisOne][i] = tmp;
250 for (i = 0; i < m; i++) {
255 residue = (2 * residue) % m;
257 if (tc && (k == n - 1)) {
258 residue = (m - residue) % m;
263 for (i = 1; i < m; i++) {
266 res = array[(n - 1) & 1][0];
305 DdNode *t = NULL, *u = NULL, *t1, *u1, *v, *w;
309 if (n == 0)
return(one);
313 if (minusone == NULL)
return(NULL);
350 for (i=n-2; i>=0; i--) {
void Cudd_RecursiveDeref(DdManager *table, DdNode *n)
DdNode * cuddUniqueConst(DdManager *unique, CUDD_VALUE_TYPE value)
#define ABC_ALLOC(type, num)
#define ABC_NAMESPACE_IMPL_END
#define ABC_NAMESPACE_IMPL_START
DdNode * Cudd_addIte(DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
DdNode * Cudd_addWalsh(DdManager *dd, DdNode **x, DdNode **y, int n)
static ABC_NAMESPACE_IMPL_START char rcsid[] DD_UNUSED
DdNode * Cudd_addResidue(DdManager *dd, int n, int m, int options, int top)
DdNode * cuddUniqueInter(DdManager *unique, int index, DdNode *T, DdNode *E)
static DdNode * addWalshInt(DdManager *dd, DdNode **x, DdNode **y, int n)