From 6f53902d6c8b133bb701acf5145efe6f68a26565 Mon Sep 17 00:00:00 2001 From: Aleksey Lobanov Date: Fri, 13 Dec 2019 19:11:16 +0300 Subject: [PATCH] Added output for two-argument functions --- main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index db08b7d..a86fd01 100644 --- a/main.cpp +++ b/main.cpp @@ -11,7 +11,7 @@ using namespace std; 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 FUNCTIONS_COUNT = 1ll << FUNCTION_LEN; typedef Function MyFunction; @@ -127,7 +127,11 @@ vector get_function_class(MyFunction f, const vector< MyMatrix >& tr vector get_linear_components() { vector 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("00001111")); // f = x_1 res.push_back(MyFunction("00110011")); // f = x_2