3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 10:55:50 +00:00
z3/src/ackermannization/ackr_helper.cpp
Nikolaj Bjorner b19f94ae5b make include paths uniformly use path relative to src. #534
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-31 13:24:11 -07:00

29 lines
599 B
C++

/*++
Copyright (c) 2016 Microsoft Corporation
Module Name:
ackr_helper.cpp
Abstract:
Author:
Mikolas Janota (MikolasJanota)
Revision History:
--*/
#include "ackermannization/ackr_helper.h"
double ackr_helper::calculate_lemma_bound(ackr_helper::fun2terms_map& occurrences) {
fun2terms_map::iterator it = occurrences.begin();
const fun2terms_map::iterator end = occurrences.end();
double total = 0;
for (; it != end; ++it) {
const unsigned fsz = it->m_value->size();
const double n2 = n_choose_2_chk(fsz);
total += n2;
}
return total;
}