1 #ifndef ELEMENTENCODING_H
2 #define ELEMENTENCODING_H
6 class ElementEncoding {
8 ElementEncoding(Element *element);
9 ElementEncodingType getElementEncodingType() {return type;}
11 void setElementEncodingType(ElementEncodingType type);
12 void deleteElementEncoding();
13 void allocEncodingArrayElement(uint size);
14 void allocInUseArrayElement(uint size);
15 uint numEncodingVars() {return numVars;}
16 bool isinUseElement(uint offset) { return (inUseArray[(offset >> 6)] >> (offset & 63)) & 0x1;}
17 void setInUseElement(uint offset) {inUseArray[(offset >> 6)] |= 1 << (offset & 63);}
18 void encodingArrayInitialization();
19 uint getSizeEncodingArray(uint setSize) {
22 return NEXTPOW2(setSize);
33 ElementEncodingType type;
35 Edge *variables;/* List Variables Used To Encode Element */
38 uint64_t *encodingArray; /* List the Variables in the appropriate order */
39 uint64_t *inUseArray; /* Bitmap to track variables in use */
43 uint64_t offset;/* Value = offset + encoded number (interpretted according to isBinaryValSigned) */
44 uint64_t low;/* Lowest value to encode */
45 uint64_t high;/* High value to encode. If low > high, we assume wrap around to include 0. */
47 bool isBinaryValSigned;
50 uint numVars; /* Number of variables */