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:
parent
6559e5fb32
commit
2297b0334b
7 changed files with 47 additions and 32 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue