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);
11 allocInlineDefVectorTableEntry(&table->entries);
16 void addNewTableEntry(Table* table, uint64_t* inputs, uint inputSize, uint64_t result){
17 ASSERT(getSizeVectorSet( table->domains) == inputSize);
18 pushVectorTableEntry(&table->entries, allocTableEntry(inputs, inputSize, result));
21 void deleteTable(Table* table){
22 deleteInlineArraySet(&table->domains);
23 uint size = getSizeVectorTableEntry(&table->entries);
24 for(uint i=0; i<size; i++){
25 deleteTableEntry(getVectorTableEntry(&table->entries, i));
27 deleteVectorArrayTableEntry(&table->entries);