3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 10:25:18 +00:00

fix weak hash function

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-01-06 12:04:01 -08:00
parent 2920ee56e9
commit 685138e43f

View file

@ -112,7 +112,7 @@ namespace sat {
}
binary():x(null_literal), y(null_literal), use_list(nullptr) {}
struct hash {
unsigned operator()(binary const& t) const { return t.x.hash() + 2* t.y.hash(); }
unsigned operator()(binary const& t) const { return mk_mix(t.x.index(), t.y.index(), 3); }
};
struct eq {
bool operator()(binary const& a, binary const& b) const {