8#include "../fielddefines.h"
10#if defined(ENABLE_FIELD_BYTES_INT_1)
14#include "../int_utils.h"
15#include "../lintrans.h"
16#include "../sketch_impl.h"
23#ifdef ENABLE_FIELD_INT_2
26constexpr StatTableTRI2 SQR_TABLE_TRI2({0x1, 0x3});
27constexpr StatTableTRI2 QRT_TABLE_TRI2({0x2, 0});
28typedef FieldTri<uint8_t, 2, 1, StatTableTRI2, &SQR_TABLE_TRI2, &QRT_TABLE_TRI2, &QRT_TABLE_TRI2, &QRT_TABLE_TRI2, &QRT_TABLE_TRI2, &QRT_TABLE_TRI2, IdTrans, &ID_TRANS, &ID_TRANS> FieldTri2;
31#ifdef ENABLE_FIELD_INT_3
34constexpr StatTableTRI3 SQR_TABLE_TRI3({0x1, 0x4, 0x6});
35constexpr StatTableTRI3 QRT_TABLE_TRI3({0, 0x4, 0x6});
36typedef FieldTri<uint8_t, 3, 1, StatTableTRI3, &SQR_TABLE_TRI3, &QRT_TABLE_TRI3, &QRT_TABLE_TRI3, &QRT_TABLE_TRI3, &QRT_TABLE_TRI3, &QRT_TABLE_TRI3, IdTrans, &ID_TRANS, &ID_TRANS> FieldTri3;
39#ifdef ENABLE_FIELD_INT_4
42constexpr StatTableTRI4 SQR_TABLE_TRI4({0x1, 0x4, 0x3, 0xc});
43constexpr StatTableTRI4 QRT_TABLE_TRI4({0x6, 0xa, 0x8, 0});
44typedef FieldTri<uint8_t, 4, 1, StatTableTRI4, &SQR_TABLE_TRI4, &QRT_TABLE_TRI4, &QRT_TABLE_TRI4, &QRT_TABLE_TRI4, &QRT_TABLE_TRI4, &QRT_TABLE_TRI4, IdTrans, &ID_TRANS, &ID_TRANS> FieldTri4;
47#ifdef ENABLE_FIELD_INT_5
50constexpr StatTable5 SQR_TABLE_5({0x1, 0x4, 0x10, 0xa, 0xd});
51constexpr StatTable5 SQR2_TABLE_5({0x1, 0x10, 0xd, 0xe, 0x1b});
52constexpr StatTable5 QRT_TABLE_5({0x14, 0x8, 0xa, 0, 0xe});
53typedef Field<uint8_t, 5, 5, StatTable5, &SQR_TABLE_5, &SQR2_TABLE_5, &QRT_TABLE_5, &QRT_TABLE_5, &QRT_TABLE_5, &QRT_TABLE_5, IdTrans, &ID_TRANS, &ID_TRANS> Field5;
54typedef FieldTri<uint8_t, 5, 2, RecLinTrans<uint8_t, 5>, &SQR_TABLE_5, &SQR2_TABLE_5, &QRT_TABLE_5, &QRT_TABLE_5, &QRT_TABLE_5, &QRT_TABLE_5,
IdTrans, &
ID_TRANS, &
ID_TRANS> FieldTri5;
57#ifdef ENABLE_FIELD_INT_6
60constexpr StatTableTRI6 SQR_TABLE_TRI6({0x1, 0x4, 0x10, 0x3, 0xc, 0x30});
61constexpr StatTableTRI6 SQR2_TABLE_TRI6({0x1, 0x10, 0xc, 0x5, 0x13, 0x3c});
62constexpr StatTableTRI6 QRT_TABLE_TRI6({0x3a, 0x26, 0x24, 0x14, 0x20, 0});
63typedef FieldTri<uint8_t, 6, 1, StatTableTRI6, &SQR_TABLE_TRI6, &SQR2_TABLE_TRI6, &QRT_TABLE_TRI6, &QRT_TABLE_TRI6, &QRT_TABLE_TRI6, &QRT_TABLE_TRI6, IdTrans, &ID_TRANS, &ID_TRANS> FieldTri6;
66#ifdef ENABLE_FIELD_INT_7
69constexpr StatTableTRI7 SQR_TABLE_TRI7({0x1, 0x4, 0x10, 0x40, 0x6, 0x18, 0x60});
70constexpr StatTableTRI7 SQR2_TABLE_TRI7({0x1, 0x10, 0x6, 0x60, 0x14, 0x46, 0x78});
71constexpr StatTableTRI7 QRT_TABLE_TRI7({0, 0x14, 0x16, 0x72, 0x12, 0x40, 0x7a});
72typedef FieldTri<uint8_t, 7, 1, StatTableTRI7, &SQR_TABLE_TRI7, &SQR2_TABLE_TRI7, &QRT_TABLE_TRI7, &QRT_TABLE_TRI7, &QRT_TABLE_TRI7, &QRT_TABLE_TRI7, IdTrans, &ID_TRANS, &ID_TRANS> FieldTri7;
75#ifdef ENABLE_FIELD_INT_8
78constexpr StatTable8 SQR_TABLE_8({0x1, 0x4, 0x10, 0x40, 0x1b, 0x6c, 0xab, 0x9a});
79constexpr StatTable8 SQR2_TABLE_8({0x1, 0x10, 0x1b, 0xab, 0x5e, 0x97, 0xb3, 0xc5});
80constexpr StatTable8 QRT_TABLE_8({0xbc, 0x2a, 0x28, 0x86, 0x2c, 0xde, 0x8e, 0});
81typedef Field<uint8_t, 8, 27, StatTable8, &SQR_TABLE_8, &SQR2_TABLE_8, &QRT_TABLE_8, &QRT_TABLE_8, &QRT_TABLE_8, &QRT_TABLE_8, IdTrans, &ID_TRANS, &ID_TRANS> Field8;
87#ifdef ENABLE_FIELD_INT_5
90#ifdef ENABLE_FIELD_INT_8
99#ifdef ENABLE_FIELD_INT_2
102#ifdef ENABLE_FIELD_INT_3
105#ifdef ENABLE_FIELD_INT_4
108#ifdef ENABLE_FIELD_INT_5
111#ifdef ENABLE_FIELD_INT_6
114#ifdef ENABLE_FIELD_INT_7
The identity transformation.
A linear transformation constructed using LinTrans tables for sections of bits.
Abstract class for internal representation of a minisketch object.
Sketch * ConstructClMul1Byte(int bits, int implementation)
Sketch * ConstructClMulTri1Byte(int bits, int implementation)
constexpr IdTrans ID_TRANS
A singleton for the identity transformation.