weka.classifiers.kstar
Class LightHashTable

java.lang.Object
  |
  +--weka.classifiers.kstar.LightHashTable

public class LightHashTable
extends java.lang.Object


Constructor Summary
LightHashTable()
          Constructs a new hashtable with a default capacity and load factor.
 
Method Summary
 void clear()
          Clears this hashtable so that it contains no keys.
 boolean containsKey(double key)
          Tests if the specified double is a key in this hashtable.
 weka.classifiers.kstar.LightHashTable.TableEntry getEntry(double key)
          Returns the table entry to which the specified key is mapped in this hashtable.
 void insert(double key, double value, double pmiss)
          Inserts a new entry in the hashtable using the specified key.
 boolean isEmpty()
          Tests if this hashtable maps no keys to values.
protected  void rehash()
          Rehashes the contents of the hashtable into a hashtable with a larger capacity.
 int size()
          Returns the number of keys in this hashtable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LightHashTable

public LightHashTable()
Constructs a new hashtable with a default capacity and load factor.
Method Detail

containsKey

public boolean containsKey(double key)
Tests if the specified double is a key in this hashtable.

insert

public void insert(double key,
                   double value,
                   double pmiss)
Inserts a new entry in the hashtable using the specified key. If the key already exist in the hashtable, do nothing.

getEntry

public weka.classifiers.kstar.LightHashTable.TableEntry getEntry(double key)
Returns the table entry to which the specified key is mapped in this hashtable.

size

public int size()
Returns the number of keys in this hashtable.

isEmpty

public boolean isEmpty()
Tests if this hashtable maps no keys to values.

clear

public void clear()
Clears this hashtable so that it contains no keys.

rehash

protected void rehash()
Rehashes the contents of the hashtable into a hashtable with a larger capacity. This method is called automatically when the number of keys in the hashtable exceeds this hashtable's capacity and load factor.