|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.lazy.kstar.KStarCache.CacheTable
A custom hashtable class to support the caching system.
Field Summary | |
private float |
DEFAULT_LOAD_FACTOR
The default load factor for the hashtable |
private int |
DEFAULT_TABLE_SIZE
The default size of the hashtable |
private double |
EPSILON
Accuracy value for equality |
private int |
m_Count
The total number of entries in the hash table. |
private float |
m_LoadFactor
The load factor for the hashtable. |
private KStarCache.TableEntry[] |
m_Table
The hash table data. |
private int |
m_Threshold
Rehashes the table when count exceeds this threshold. |
Constructor Summary | |
KStarCache.CacheTable()
Constructs a new hashtable with a default capacity and load factor. |
|
KStarCache.CacheTable(int size,
float loadFactor)
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. |
KStarCache.TableEntry |
getEntry(double key)
Returns the table entry to which the specified key is mapped in this hashtable. |
private int |
hashCode(double key)
Returns the hash code of the specified double. |
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. |
private 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 |
Field Detail |
private KStarCache.TableEntry[] m_Table
private int m_Count
private int m_Threshold
private float m_LoadFactor
private final int DEFAULT_TABLE_SIZE
private final float DEFAULT_LOAD_FACTOR
private final double EPSILON
Constructor Detail |
public KStarCache.CacheTable(int size, float loadFactor)
public KStarCache.CacheTable()
Method Detail |
public boolean containsKey(double key)
public void insert(double key, double value, double pmiss)
public KStarCache.TableEntry getEntry(double key)
public int size()
public boolean isEmpty()
public void clear()
private void rehash()
private int hashCode(double key)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |