Update of /cvsroot/javabdd/JavaBDD/net/sf/javabdd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5421/net/sf/javabdd Modified Files: CALFactory.java TestBDDFactory.java JFactory.java JDDFactory.java MicroFactory.java CUDDFactory.java TypedBDDFactory.java Log Message: Changed return type of allsat(). Index: TestBDDFactory.java =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/net/sf/javabdd/TestBDDFactory.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TestBDDFactory.java 29 Apr 2005 02:25:28 -0000 1.7 --- TestBDDFactory.java 21 May 2005 08:47:09 -0000 1.8 *************** *** 7,11 **** import java.util.Iterator; import java.util.LinkedList; - import java.util.List; import java.io.IOException; import java.math.BigInteger; --- 7,10 ---- *************** *** 372,393 **** /* (non-Javadoc) - * @see net.sf.javabdd.BDD#allsat() - */ - public List allsat() { - List r1 = b1.allsat(); - List r2 = b2.allsat(); - assertSame(r1.size() == r2.size(), b1, b2, "allsat"); - List r = new LinkedList(); - Iterator i = r1.iterator(); - Iterator j = r2.iterator(); - while (i.hasNext()) { - BDD c1 = (BDD) i.next(); - BDD c2 = (BDD) j.next(); - r.add(new TestBDD(c1, c2)); - } - return r; - } - - /* (non-Javadoc) * @see net.sf.javabdd.BDD#replace(net.sf.javabdd.BDDPairing) */ --- 371,374 ---- Index: JFactory.java =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/net/sf/javabdd/JFactory.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** JFactory.java 11 May 2005 01:24:05 -0000 1.26 --- JFactory.java 21 May 2005 08:47:09 -0000 1.27 *************** *** 335,348 **** /* (non-Javadoc) - * @see net.sf.javabdd.BDD#allsat() - */ - public List allsat() { - int x = _index; - List result = new LinkedList(); - bdd_allsat(x, result); - return result; - } - - /* (non-Javadoc) * @see net.sf.javabdd.BDD#replace(net.sf.javabdd.BDDPairing) */ --- 335,338 ---- *************** *** 2775,2832 **** } - void bdd_allsat(int r, List result) { - int v; - - CHECK(r); - - allsatProfile = new byte[bddvarnum]; - - for (v = LEVEL(r) - 1; v >= 0; --v) - allsatProfile[bddlevel2var[v]] = -1; - - INITREF(); - - allsat_rec(r, result); - - free(allsatProfile); - allsatProfile = null; - } - - void allsat_rec(int r, List result) { - if (ISONE(r)) { - //allsatHandler(allsatProfile, bddvarnum); - byte[] b = new byte[bddvarnum]; - System.arraycopy(allsatProfile, 0, b, 0, bddvarnum); - result.add(b); - return; - } - - if (ISZERO(r)) - return; - - if (!ISZERO(LOW(r))) { - int v; - - allsatProfile[bddlevel2var[LEVEL(r)]] = 0; - - for (v = LEVEL(LOW(r)) - 1; v > LEVEL(r); --v) { - allsatProfile[bddlevel2var[v]] = -1; - } - - allsat_rec(LOW(r), result); - } - - if (!ISZERO(HIGH(r))) { - int v; - - allsatProfile[bddlevel2var[LEVEL(r)]] = 1; - - for (v = LEVEL(HIGH(r)) - 1; v > LEVEL(r); --v) { - allsatProfile[bddlevel2var[v]] = -1; - } - - allsat_rec(HIGH(r), result); - } - } double bdd_satcount(int r) { double size = 1; --- 2765,2768 ---- *************** *** 3304,3309 **** being clobbered by setjmp */ - byte[] allsatProfile; /* Variable profile for bdd_allsat() */ - void bdd_operator_init(int cachesize) { if (false) { --- 3240,3243 ---- Index: TypedBDDFactory.java =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/net/sf/javabdd/TypedBDDFactory.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TypedBDDFactory.java 29 Apr 2005 02:25:28 -0000 1.7 --- TypedBDDFactory.java 21 May 2005 08:47:10 -0000 1.8 *************** *** 8,12 **** import java.util.Iterator; import java.util.LinkedList; - import java.util.List; import java.util.Map; import java.util.Set; --- 8,11 ---- *************** *** 919,923 **** * @see net.sf.javabdd.BDD#allsat() */ ! public List allsat() { return bdd.allsat(); } --- 918,922 ---- * @see net.sf.javabdd.BDD#allsat() */ ! public AllSatIterator allsat() { return bdd.allsat(); } Index: JDDFactory.java =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/net/sf/javabdd/JDDFactory.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** JDDFactory.java 8 Apr 2005 05:27:52 -0000 1.5 --- JDDFactory.java 21 May 2005 08:47:10 -0000 1.6 *************** *** 5,9 **** import java.util.Collection; - import java.util.List; import java.math.BigInteger; --- 5,8 ---- *************** *** 409,419 **** /* (non-Javadoc) - * @see net.sf.javabdd.BDD#allsat() - */ - public List allsat() { - throw new BDDException(); - } - - /* (non-Javadoc) * @see net.sf.javabdd.BDD#pathCount() */ --- 408,411 ---- Index: CUDDFactory.java =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/net/sf/javabdd/CUDDFactory.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CUDDFactory.java 29 Apr 2005 02:25:28 -0000 1.6 --- CUDDFactory.java 21 May 2005 08:47:10 -0000 1.7 *************** *** 5,9 **** import java.util.Collection; - import java.util.List; import java.math.BigInteger; --- 5,8 ---- *************** *** 709,720 **** /* (non-Javadoc) - * @see net.sf.javabdd.BDD#allsat() - */ - public List allsat() { - // TODO Implement this. - throw new UnsupportedOperationException(); - } - - /* (non-Javadoc) * @see net.sf.javabdd.BDD#nodeCount() */ --- 708,711 ---- Index: MicroFactory.java =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/net/sf/javabdd/MicroFactory.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** MicroFactory.java 29 Apr 2005 06:43:31 -0000 1.10 --- MicroFactory.java 21 May 2005 08:47:10 -0000 1.11 *************** *** 9,13 **** import java.util.HashSet; import java.util.Iterator; - import java.util.LinkedList; import java.util.List; import java.util.Random; --- 9,12 ---- *************** *** 572,585 **** /* (non-Javadoc) - * @see net.sf.javabdd.BDD#allsat() - */ - public List allsat() { - int x = _index; - List result = new LinkedList(); - bdd_allsat(x, result); - return result; - } - - /* (non-Javadoc) * @see net.sf.javabdd.BDD#replace(net.sf.javabdd.BDDPairing) */ --- 571,574 ---- *************** *** 3313,3372 **** } - void bdd_allsat(int r, List result) { - int v; - - CHECK(r); - - allsatProfile = new byte[bddvarnum]; - - for (v = LEVEL(r) - 1; v >= 0; --v) - allsatProfile[bddlevel2var[v]] = -1; - - INITREF(); - - allsat_rec(r, result); - - allsatProfile = null; - } - - void allsat_rec(int r, List result) { - if (ISONE(r)) { - //allsatHandler(allsatProfile, bddvarnum); - byte[] b = new byte[bddvarnum]; - System.arraycopy(allsatProfile, 0, b, 0, bddvarnum); - result.add(b); - return; - } - - if (ISZERO(r)) return; - - int LOW_r = LOW(r); - int HIGH_r = HIGH(r); - int LEVEL_r = LEVEL(r); - if (!ISZERO(LOW_r)) { - int v; - - allsatProfile[bddlevel2var[LEVEL_r]] = 0; - - for (v = LEVEL(LOW_r) - 1; v > LEVEL_r; --v) { - allsatProfile[bddlevel2var[v]] = -1; - } - - allsat_rec(LOW_r, result); - } - - if (!ISZERO(HIGH_r)) { - int v; - - allsatProfile[bddlevel2var[LEVEL_r]] = 1; - - for (v = LEVEL(HIGH_r) - 1; v > LEVEL_r; --v) { - allsatProfile[bddlevel2var[v]] = -1; - } - - allsat_rec(HIGH_r, result); - } - } - double bdd_satcount(int r) { double size = 1; --- 3302,3305 ---- *************** *** 3792,3797 **** int satPolarity; - byte[] allsatProfile; /* Variable profile for bdd_allsat() */ - OpCache1 singlecache; /* not(), exist(), forAll() */ OpCache2 replacecache; /* replace(), veccompose() */ --- 3725,3728 ---- Index: CALFactory.java =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/net/sf/javabdd/CALFactory.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CALFactory.java 29 Apr 2005 02:25:28 -0000 1.6 --- CALFactory.java 21 May 2005 08:47:09 -0000 1.7 *************** *** 5,9 **** import java.util.Collection; - import java.util.List; import java.math.BigInteger; --- 5,8 ---- *************** *** 678,689 **** /* (non-Javadoc) - * @see net.sf.javabdd.BDD#allsat() - */ - public List allsat() { - // TODO Implement this. - throw new UnsupportedOperationException(); - } - - /* (non-Javadoc) * @see net.sf.javabdd.BDD#nodeCount() */ --- 677,680 ---- |