org.statcato.utils
Class MultidimensionalHash
- java.lang.Object
-
- org.statcato.utils.MultidimensionalHash
-
public class MultidimensionalHash extends java.lang.ObjectA multidimensional hash that contains the frequencies of multidimensional keys.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor and Description MultidimensionalHash(int dimensions)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intget(MultidimensionalHashKey key)Returns the frequency of the given key value.intgetDimensions()Returns the number of dimensions in the hash.voidput(MultidimensionalHashKey key)Increases the frequency of the given key value by one.
-
-
-
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
-
-
DMelt 3.0 © DataMelt by jWork.ORG