3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

re-introduce simple implementation of linear monomial propagation for evaluation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2023-09-26 23:53:14 -07:00
parent 6559e5fb32
commit 2297b0334b
7 changed files with 47 additions and 32 deletions

View file

@ -378,6 +378,14 @@ bool all_of(S const& set, T const& p) {
return true;
}
template<typename S, typename R>
R find(S const& set, std::function<bool(R)> p) {
for (auto const& s : set)
if (p(s))
return s;
throw default_exception("element not found");
}
/**
\brief Iterator for the [0..sz[0]) X [0..sz[1]) X ... X [0..sz[n-1]).
it contains the current value.