4 #include "tableentry.h"
8 Table * allocTable(Set **domains, uint numDomain, Set * range){
9 Table* table = (Table*) ourmalloc(sizeof(Table));
10 table->domains = allocDefVectorSet();
11 for(int i=0; i<numDomain; i++){
12 pushVectorSet(table->domains, domains[i]);
18 void addNewTableEntry(Table* table, uint64_t* inputs, uint inputSize, uint64_t result){
19 ASSERT(getSizeVectorSet( table->domains) == inputSize);
20 pushVectorTableEntry(table->entries, allocTableEntry(inputs, inputSize, result));
23 void deleteTable(Table* table){
24 uint size = getSizeVectorSet(table->domains);
25 for(uint i=0; i<size; i++){
26 deleteSet(getVectorSet(table->domains,i));
28 ourfree(table->domains);
29 ourfree(table->range);
30 size = getSizeVectorTableEntry(table->entries);
31 for(uint i=0; i<size; i++){
32 deleteTableEntry(getVectorTableEntry(table->entries, i));