4 #include "tableentry.h"
8 Table * allocTable(Set **domains, uint numDomain, Set * range){
9 Table* table = (Table*) ourmalloc(sizeof(Table));
10 allocInlineArrayInitSet(&table->domains, domains, numDomain);
15 void addNewTableEntry(Table* table, uint64_t* inputs, uint inputSize, uint64_t result){
16 ASSERT(getSizeVectorSet( table->domains) == inputSize);
17 pushVectorTableEntry(table->entries, allocTableEntry(inputs, inputSize, result));
20 void deleteTable(Table* table){
21 deleteInlineArraySet(&table->domains);
22 uint size = getSizeVectorTableEntry(table->entries);
23 for(uint i=0; i<size; i++){
24 deleteTableEntry(getVectorTableEntry(table->entries, i));
26 deleteVectorTableEntry(table->entries);