Class IntArrayTrie<V>
java.lang.Object
com.simibubi.create.foundation.recipe.trie.IntArrayTrie<V>
A one-to-many, lookup-optimized data structure for storing
int[] -> V mappings,
which provides subset-to-many lookup.-
Constructor Details
-
IntArrayTrie
public IntArrayTrie()
-
-
Method Details
-
getMaxDepth
public int getMaxDepth() -
getNodeCount
public int getNodeCount() -
getValueCount
public int getValueCount() -
insert
Insert a key-value pair into the trie.- Parameters:
key- a sorted array of integersvalue- the value to associate with the key
-
lookup
Look up all values associated with a subset ofpool.- Parameters:
pool- the set of allowable keys. It SHOULD have O(1) lookup time.- Returns:
- all associated values
-
toString
-