4 #include "tableentry.h"
6 #include "mutableset.h"
9 Table * allocTable(Element **domains, uint numDomain, Element * range){
10 Table* table = (Table*) ourmalloc(sizeof(Table));
11 allocInlineArrayInitElement(&table->domains, domains, numDomain);
12 allocInlineDefVectorTableEntry(&table->entries);
17 void addNewTableEntry(Table* table, uint64_t* inputs, uint inputSize, uint64_t result){
18 ASSERT(getSizeArrayElement( &table->domains) == inputSize);
19 pushVectorTableEntry(&table->entries, allocTableEntry(inputs, inputSize, result));
22 void deleteTable(Table* table){
23 deleteInlineArrayElement(&table->domains);
24 uint size = getSizeVectorTableEntry(&table->entries);
25 for(uint i=0; i<size; i++){
26 deleteTableEntry(getVectorTableEntry(&table->entries, i));
28 deleteVectorArrayTableEntry(&table->entries);