Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <bop_ls.h>
Public Member Functions | |
NonOrderedSetHasher (absl::BitGenRef random) | |
void | Initialize (int size) |
Initializes the NonOrderedSetHasher to hash sets of integer in [0, n). | |
void | IgnoreElement (IntType e) |
uint64_t | Hash (const std::vector< IntType > &set) const |
uint64_t | Hash (IntType e) const |
bool | IsInitialized () const |
Returns true if Initialize() has been called with a non-zero size. | |
A simple and efficient class to hash a given set of integers in [0, n). It uses O(n) memory and produces a good hash (random linear function).
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
Ignores the given set element in all subsequent hash computation. Note that this will be reset by the next call to Initialize().
|
inline |
Initializes the NonOrderedSetHasher to hash sets of integer in [0, n).
|
inline |
Returns true if Initialize() has been called with a non-zero size.