org.statcato.utils
Class MultidimensionalHash

java.lang.Object
  extended by org.statcato.utils.MultidimensionalHash

public class MultidimensionalHash
extends java.lang.Object

A multidimensional hash that contains the frequencies of multidimensional keys.

Since:
1.0
Version:
%I%, %G%
Author:
Margaret Yau

Constructor Summary
MultidimensionalHash(int dimensions)
          Constructor.
 
Method Summary
 int get(MultidimensionalHashKey key)
          Returns the frequency of the given key value.
 int getDimensions()
          Returns the number of dimensions in the hash.
 void put(MultidimensionalHashKey key)
          Increases the frequency of the given key value by one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultidimensionalHash

public MultidimensionalHash(int dimensions)
Constructor.

Parameters:
dimensions - the number of dimensions
Method Detail

put

public void put(MultidimensionalHashKey key)
Increases the frequency of the given key value by one.

Parameters:
key - a multidimensional hashkey

get

public int get(MultidimensionalHashKey key)
Returns the frequency of the given key value.

Parameters:
key - a multidimensional hashkey
Returns:
frequency of the given key

getDimensions

public int getDimensions()
Returns the number of dimensions in the hash.

Returns:
number of dimensions