30 enum Type { kLinear = 0, kReverse, kFunction, kLookUpTable };
32 static XMap constructWithUserFunction(uint16_t length, XFunction xFunction,
37 static XMap constructWithLookUpTable(uint16_t length,
38 const uint16_t *lookUpTable,
42 XMap(uint16_t length,
bool is_reverse =
false, uint16_t offset = 0);
49 void convertToLookUpTable();
51 uint16_t mapToIndex(uint16_t x)
const;
53 uint16_t operator()(uint16_t x)
const {
return mapToIndex(x); }
55 uint16_t getLength()
const;
60 XMap(uint16_t length, Type type);
63 XFunction xFunction =
nullptr;
64 const uint16_t *mData =
nullptr;
65 fl::LUT16Ptr mLookUpTable;