[Javabdd-devel] Ranges
Brought to you by:
joewhaley
From: Ricardo O. <n3...@ho...> - 2008-07-28 19:26:26
|
Hi, I'm having problem using the varRange() method of BDDDomain. If I create BDDDomain with these sizes: long sizes[] = new long[] {65535, 65535}; BDDDomain[] domain= bddFactory.extDomain(sizes); Every time I try to create a range for the maximum values (which should be inclusive): BDD bdd = domain[0].varRange(0, 65535); I get the following error: Exception in thread "main" net.sf.javabdd.BDDException: range is invalid at net.sf.javabdd.BDDDomain.varRange(BDDDomain.java:253) at net.sf.javabdd.BDDDomain.varRange(BDDDomain.java:249) If I try with: long sizes[] = new long[] {65536, 65536}; BDDDomain[] domain= bddFactory.extDomain(sizes); I get: Exception in thread "main" java.lang.ArithmeticException: Negative bit address at java.math.BigInteger.testBit(Unknown Source) at net.sf.javabdd.BDDDomain.varRange(BDDDomain.java:262) at net.sf.javabdd.BDDDomain.varRange(BDDDomain.java:249) One solution is using one extra bit (increasing the size to 65535*2), but I was really hoping this wouldn't be necessary. Perhaps I'm doing something incredibly stupid, but I can't see what at this point. Thank you very much for your help, Ricardo. _________________________________________________________________ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us |