dummy-link

MinimalPerfectHashes

An implementation of minimal perfect hash function generation as described in Czech et. al. 1992.

Readme

Minimal Perfect Hashes

Build Status

A Julia module for generating minimal perfect hash functions for an array of strings:

julia> using MinimalPerfectHashes
julia> months = ["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]
julia> mph = MinimalPerfectHash(months)
julia> results = map((x) -> hash(x, mph), months)
12-element Int64 Array:
  1
  2
  3
  4
  5
  6
  5
  8
  9
 10
 11
 12

This is great for creating memory efficient lookup tables with an O(1) access time.

Requirements

Using MinimalPerfectHashes.jl requires that the following software be installed:

  • Julia — The Julia language itself.
  • Graphs.jl — Julia's graphs package, version 0.2.4 or greater.

Installation

MinimalPerfectHashes.jl should be available from METADATA.jl. To install MinimalPerfectHashes.jl, use the following:

Pkg.add("MinimalPerfectHashes")

If this does not work, git clone the repository in your ~/.julia/ directory.

MinimalPerfectHashes.jl has one main module named MinimalPerfectHashes. You can load it as:

using MinimalPerfectHashes

Support

You can check for @mweiden on the #julia IRC channel on Freenode.

Metadata

First Commit

07/25/2013

Last Touched

5 months ago

Commits

15 commits

Used By: