diff --git a/main.cpp b/main.cpp index 324a058..752d56a 100644 --- a/main.cpp +++ b/main.cpp @@ -13,11 +13,11 @@ using namespace std; -typedef uint16_t Storage; +typedef uint32_t Storage; const size_t ARGS_COUNT = 4; const size_t FUNCTION_LEN = 1ll << ARGS_COUNT; const size_t FUNCTIONS_COUNT = 1ll << FUNCTION_LEN; -const bool ONLY_CREATE_CLASSES = true; +const bool ONLY_CREATE_CLASSES = false; typedef Function MyFunction; typedef BoolSquareMatrix MyMatrix; @@ -104,6 +104,18 @@ Function get_function_from_callable(Callable I return Function(function_values); } +template +void print_lens(CONTAINER len_map) { + map counter; + for (const auto el: len_map) { + if ( counter.find(el) == counter.end() ) + counter[el] = 0; + ++counter[el]; + } + for (auto&& el: counter) + cout << "len " << el.first << " count " << el.second << endl; +} + vector< MyMatrix > get_good_matrices() { vector< MyMatrix > res; for (size_t cur_val = 1ll << (ARGS_COUNT * ARGS_COUNT); cur_val != 0; --cur_val) { @@ -278,6 +290,7 @@ size_t recover_ranks(vector< vector >& ranks, vector& used_m buf /= 2; } } + ranks.back().shrink_to_fit(); } } @@ -378,6 +391,8 @@ void fill_ranks(vector monomials) { return; } + print_lens(used_map); + auto possible_tranformations = get_good_matrices(); cout << "Total " << possible_tranformations.size() << " linear tranformations" << endl;