7 //How much should we shift pointers when computing hash functions
8 //5 appears to be the minimum value for Ubuntu 64-bit
14 BooleanEdge() : b(NULL) {}
15 BooleanEdge(Boolean *_b) : b(_b) {}
16 BooleanEdge negate() {return BooleanEdge((Boolean *)(((uintptr_t) b) ^ 1));}
17 bool operator==(BooleanEdge e) { return b == e.b;}
18 bool operator!=(BooleanEdge e) { return b != e.b;}
19 bool isNegated() { return ((uintptr_t) b) & 1; }
20 Boolean *getBoolean() {return (Boolean *)(((uintptr_t)b) & ~((uintptr_t) 1));}
21 Boolean *getRaw() {return b;}
22 Boolean *operator->() {return getBoolean();}
24 return getBoolean() != NULL;
33 inline bool boolEdgeEquals(BooleanEdge b1, BooleanEdge b2) {
37 inline unsigned int boolEdgeHash(BooleanEdge b) {
38 return (unsigned int) (((uintptr_t)b.getRaw()) >> PTRSHIFT);
41 typedef Hashset<BooleanEdge, uintptr_t, PTRSHIFT, &boolEdgeHash, &boolEdgeEquals> HashsetBooleanEdge;
42 typedef Hashset<Order *, uintptr_t, PTRSHIFT> HashsetOrder;
43 typedef SetIterator<BooleanEdge, uintptr_t, PTRSHIFT, &boolEdgeHash, &boolEdgeEquals> SetIteratorBooleanEdge;
44 typedef SetIterator<Order *, uintptr_t, PTRSHIFT> SetIteratorOrder;