Skip to content

Instantly share code, notes, and snippets.

@thejefflarson
Created February 20, 2013 19:27
Show Gist options
  • Select an option

  • Save thejefflarson/4998499 to your computer and use it in GitHub Desktop.

Select an option

Save thejefflarson/4998499 to your computer and use it in GitHub Desktop.
def min_hash!
min = Infinity
freq.keys.each do |key|
min = key.hash if key.hash < min
end
self.min_hash = min == Infinity ? 0 : min
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment