Use union in Boolean to save space
[satune.git] / src / Encoders / elementencoding.h
1 #ifndef ELEMENTENCODING_H
2 #define ELEMENTENCODING_H
3 #include "classlist.h"
4
5 enum ElementEncodingType {
6         ONEHOT, UNARY, BINARYINDEX, ONEHOTBINARY, BINARYVAL
7 };
8
9 typedef enum ElementEncodingType ElementEncodingType;
10
11 struct ElementEncoding {
12         ElementEncodingType type;
13         Element * element;
14         Boolean ** variables; /* List Variables Use To Encode Element */
15         uint64_t * encodingArray; /* List the Variables in the appropriate order */
16         uint numVars; /* Number of variables */
17 };
18
19 ElementEncoding * allocElementEncoding(ElementEncodingType type, Element *element);
20 void deleteElementEncoding(ElementEncoding *this);
21 #endif