boost::openmethod::policies::fast_perfect_hash::fn::initialize

Finds the hash factors

Synopsis

Declared in <boost/openmethod/policies/fast_perfect_hash.hpp>

template<
    class Context,
    class... Options>
static
void
initialize(
    Context const& ctx,
    std::tuple<Options...> const& options);

Description

Attempts to find suitable values for the multiplication factor M and the shift amount S to that do not result in collisions for the specified input values.

If no suitable values are found, calls the error handler with a hash_error object then calls abort.

Use hash_range to retrieve the minimum and maximum hash values after calling this function.

Template Parameters

Name

Description

Context

An InitializeContext.

Parameters

Name

Description

ctx

A Context object.

options

A tuple of option objects.

Created with MrDocs