diff --git a/src/adiar/internal/algorithms/quantify.h b/src/adiar/internal/algorithms/quantify.h index 8fa14028d..4e6c57d00 100644 --- a/src/adiar/internal/algorithms/quantify.h +++ b/src/adiar/internal/algorithms/quantify.h @@ -1320,17 +1320,16 @@ namespace adiar::internal // Terminal Count Heuristics const size_t false_weight = - 1 + Policy::collapse_to_terminal(typename Policy::pointer_type(false)); + Policy::collapse_to_terminal(typename Policy::pointer_type(false)); const size_t true_weight = - 1 + Policy::collapse_to_terminal(typename Policy::pointer_type(true)); + Policy::collapse_to_terminal(typename Policy::pointer_type(true)); const double total_arcs = 2.0 * size; const double weighted_terminals = false_weight * false_terminals + true_weight * true_terminals; - const size_t exponent = 21.0 * (weighted_terminals / total_arcs) + 0.4; const typename Policy::label_type terminal_threshold = - (1u << std::min(exponent, log2(2 * Policy::max_label))) - 1u; + (200.0 * weighted_terminals) / total_arcs; // --------------------------------------------------------------------------------------------- // Shallow Variables Heuristic