- java.lang.Object
-
- org.logicng.knowledgecompilation.bdds.jbuddy.BDDCache
-
public class BDDCache extends Object
BDD Cache.- Since:
- 1.4.0
- Version:
- 2.0.0
-
-
Field Summary
Fields Modifier and Type Field Description protected org.logicng.knowledgecompilation.bdds.jbuddy.BDDCacheEntry[]table
-
Constructor Summary
Constructors Modifier Constructor Description protectedBDDCache(int cs)Constructs a new BDD cache of a given size (number of entries in the cache).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.logicng.knowledgecompilation.bdds.jbuddy.BDDCacheEntrylookup(int hash)Looks up a given hash value in the cache and returns the respective cache entry.protected voidreset()Resets (clears) the cache.protected voidresize(int ns)Resizes the cache to a new number of entries.
-
-
-
Method Detail
-
resize
protected void resize(int ns)
Resizes the cache to a new number of entries. The old cache entries are removed in this process.- Parameters:
ns- the new number of entries
-
reset
protected void reset()
Resets (clears) the cache.
-
lookup
protected org.logicng.knowledgecompilation.bdds.jbuddy.BDDCacheEntry lookup(int hash)
Looks up a given hash value in the cache and returns the respective cache entry.The return value is guaranteed to be non-null since every entry in the cache is always a
BDDCacheEntryobject.- Parameters:
hash- the hash value.- Returns:
- the respective entry in the cache
-
-