Added output for two-argument functions

This commit is contained in:
2019-12-13 19:11:16 +03:00
parent 114f8a491a
commit 6f53902d6c

View File

@@ -11,7 +11,7 @@
using namespace std; using namespace std;
typedef uint16_t Storage; typedef uint16_t Storage;
const size_t ARGS_COUNT = 4; const size_t ARGS_COUNT = 2;
const size_t FUNCTION_LEN = 1ll << ARGS_COUNT; const size_t FUNCTION_LEN = 1ll << ARGS_COUNT;
const size_t FUNCTIONS_COUNT = 1ll << FUNCTION_LEN; const size_t FUNCTIONS_COUNT = 1ll << FUNCTION_LEN;
typedef Function<Storage, FUNCTION_LEN> MyFunction; typedef Function<Storage, FUNCTION_LEN> MyFunction;
@@ -127,7 +127,11 @@ vector<MyFunction> get_function_class(MyFunction f, const vector< MyMatrix >& tr
vector<MyFunction> get_linear_components() { vector<MyFunction> get_linear_components() {
vector<MyFunction> res; vector<MyFunction> res;
if constexpr ( ARGS_COUNT == 3 ) { if constexpr ( ARGS_COUNT == 2 ) {
res.push_back(MyFunction("1111")); // f = 1
res.push_back(MyFunction("0011")); // f = x_1
res.push_back(MyFunction("0101")); // f = x_2
} else if constexpr ( ARGS_COUNT == 3 ) {
res.push_back(MyFunction("11111111")); // f = 1 res.push_back(MyFunction("11111111")); // f = 1
res.push_back(MyFunction("00001111")); // f = x_1 res.push_back(MyFunction("00001111")); // f = x_1
res.push_back(MyFunction("00110011")); // f = x_2 res.push_back(MyFunction("00110011")); // f = x_2