variables(NULL),
encodingArray(NULL),
inUseArray(NULL),
+ edgeArray(NULL),
+ polarityArray(NULL),
encArraySize(0),
+ encoding(EENC_UNKNOWN),
numVars(0) {
}
ourfree(encodingArray);
if (inUseArray != NULL)
ourfree(inUseArray);
+ if (edgeArray != NULL)
+ ourfree(edgeArray);
+ if (polarityArray != NULL)
+ ourfree(polarityArray);
}
void ElementEncoding::allocEncodingArrayElement(uint size) {
}
void ElementEncoding::allocInUseArrayElement(uint size) {
- uint bytes = ((size + ((1 << 9) - 1)) >> 6) & ~7;//Depends on size of inUseArray
+ uint bytes = ((size + 63) >> 3) & ~7; //Depends on size of inUseArray
inUseArray = (uint64_t *) ourcalloc(1, bytes);
}
allocEncodingArrayElement(encSize);
allocInUseArrayElement(encSize);
for (uint i = 0; i < size; i++) {
- encodingArray[i] = set->getMemberAt(i);
+ encodingArray[i] = set->getElement(i);
setInUseElement(i);
}
}