From 4415cf5ede04c1f7169d73b7312e04d3c6e154e0 Mon Sep 17 00:00:00 2001 From: thomasKalts Date: Fri, 18 Dec 2020 16:24:01 +0200 Subject: [PATCH 1/2] first commit --- include/kitty/threshold_identification.hpp | 263 ++++++++++++++++++++- 1 file changed, 261 insertions(+), 2 deletions(-) mode change 100755 => 100644 include/kitty/threshold_identification.hpp diff --git a/include/kitty/threshold_identification.hpp b/include/kitty/threshold_identification.hpp old mode 100755 new mode 100644 index 02533d8e..b8efea47 --- a/include/kitty/threshold_identification.hpp +++ b/include/kitty/threshold_identification.hpp @@ -33,8 +33,24 @@ #pragma once #include -// #include /* uncomment this line to include lp_solve */ +#include +#include +#include /* uncomment this line to include lp_solve */ +//#include #include "traits.hpp" +#include "print.hpp" + +#include "static_truth_table.hpp" +#include "dynamic_truth_table.hpp" +#include "properties.hpp" +#include "bit_operations.hpp" +#include "operations.hpp" +#include "cube.hpp" +#include "isop.hpp" + +//using namespace std; + + namespace kitty { @@ -59,10 +75,253 @@ template::v bool is_threshold( const TT& tt, std::vector* plf = nullptr ) { std::vector linear_form; + // std::cout << to_binary(tt); /* TODO */ /* if tt is non-TF: */ - return false; + //return false; + + int variables = tt.num_vars(); //number of variables + TT new_truth_table = tt; + int variables_unateness[variables]; + + //std::cout << "num vars is" << variables << std::endl; + + + for (int i = 0; i Date: Fri, 18 Dec 2020 16:37:48 +0200 Subject: [PATCH 2/2] second commit --- include/kitty/threshold_identification.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/kitty/threshold_identification.hpp b/include/kitty/threshold_identification.hpp index b8efea47..f79ca143 100644 --- a/include/kitty/threshold_identification.hpp +++ b/include/kitty/threshold_identification.hpp @@ -83,7 +83,7 @@ bool is_threshold( const TT& tt, std::vector* plf = nullptr ) int variables = tt.num_vars(); //number of variables TT new_truth_table = tt; - int variables_unateness[variables]; + int variables_unateness[15]; //std::cout << "num vars is" << variables << std::endl;