58f63ac50032cc1335a1fb3e51bfd3a8b7707993
[satune.git] / src / Encoders / naiveelementencoder.c
1 #include "naiveelementencoder.h"
2 #include "elementencoding.h"
3 #include "element.h"
4 #include "set.h"
5 #include "common.h"
6 #include "structs.h"
7
8 void baseBinaryIndexElementAssign(ElementEncoding *This) {
9         Element * element=This->element;
10         Set * set=element->set;
11         ASSERT(set->isRange==false);
12         uint size=getSizeVectorInt(set->members);
13         This->encodingArray=ourmalloc(sizeof(uint64_t)*size);
14         for(uint i=0;i<size;i++) {
15                 This->encodingArray[i]=getVectorInt(set->members, i);
16         }
17         This->type=BINARYINDEX;
18 }