HashFunction (Hadoop 1.2.1 API)
Date: 2013-07-22

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.util.bloom
Class HashFunction

    java.lang.Object
      org.apache.hadoop.util.bloom.HashFunction

    public final class HashFunction

extends Object

Implements a hash object that returns a certain number of hashed values.

See Also:
  `The general behavior of a key being stored in a filter`, `The general behavior of a filter`

Constructor Summary
`HashFunction(int maxValue, int nbHash, int hashType)` Constructor.

Method Summary
`void` | `clear()` Clears this hash function.
`int[]` | `hash(Key k)` Hashes a specified key into several integers.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HashFunction

    public HashFunction(int maxValue,
                        int nbHash,
                        int hashType)

  Constructor.

  Builds a hash function that must obey to a given maximum number of returned values and a highest value.

  Parameters:
    `maxValue` - The maximum highest returned value.
    `nbHash` - The number of resulting hashed values.
    `hashType` - type of the hashing function (see `Hash`).

Method Detail

### clear

    public void clear()

  Clears this hash function. A NOOP

### hash

    public int[] hash(Key k)

  Hashes a specified key into several integers.

  Parameters:
    `k` - The specified key.
  Returns:
    The array of hashed values.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation