public final class IdealCache extends CacheBase
Cache,
SimpleCache,
DoubleCache,
OptimizedCache| Modifier and Type | Field and Description |
|---|---|
int |
answer |
int |
hash_value |
| Constructor and Description |
|---|
IdealCache(String name,
int size,
int members,
int bdds)
the arguments are:
(size of elements, number of members.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
check_cache(int[] crap) |
double |
computeHitRate()
the hit rate, 0-100%
|
double |
computeLoadFactor()
the load factor, 0-100%
|
void |
free_or_grow() |
void |
free_or_grow(NodeTable nt) |
long |
getAccessCount()
number of times the cache was accessed
|
int |
getCacheSize()
size of the cache
|
int |
getNumberOfClears()
number of times cache was cleared
|
int |
getNumberOfGrows()
number of times cache was growed
|
int |
getNumberOfPartialClears()
number of times cache was partially
|
int |
getSize()
current size of the cache
|
void |
insert(int hash,
int key1,
int value) |
void |
insert(int hash,
int key1,
int key2,
int value) |
void |
insert(int hash,
int key1,
int key2,
int key3,
int value) |
void |
invalidate_cache()
just wipe the cache
|
void |
invalidate_cache(NodeTable nt) |
boolean |
lookup(int a) |
boolean |
lookup(int a,
int b) |
boolean |
lookup(int a,
int b,
int c) |
static void |
main(String[] args) |
void |
showStats() |
public IdealCache(String name, int size, int members, int bdds)
public int getSize()
public void invalidate_cache()
public void free_or_grow()
public void free_or_grow(NodeTable nt)
public void invalidate_cache(NodeTable nt)
public void insert(int hash,
int key1,
int value)
public void insert(int hash,
int key1,
int key2,
int value)
public final boolean lookup(int a)
public final boolean lookup(int a,
int b)
public void insert(int hash,
int key1,
int key2,
int key3,
int value)
public final boolean lookup(int a,
int b,
int c)
public double computeLoadFactor()
CacheBasecomputeLoadFactor in class CacheBasepublic double computeHitRate()
CacheBasecomputeHitRate in class CacheBasepublic long getAccessCount()
CacheBasegetAccessCount in class CacheBasepublic int getCacheSize()
CacheBasegetCacheSize in class CacheBasepublic int getNumberOfClears()
CacheBasegetNumberOfClears in class CacheBasepublic int getNumberOfPartialClears()
CacheBasegetNumberOfPartialClears in class CacheBasepublic int getNumberOfGrows()
CacheBasegetNumberOfGrows in class CacheBasepublic boolean check_cache(int[] crap)
public void showStats()
public static void main(String[] args)
This file is a part of the JDD package, a native Java Binary Decision Diagram Library.