Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_PREFIX |
static int |
INITIAL_SIZE_DEFAULT |
static String |
INITIAL_SIZE_KEY
Initial size for the memory store.
|
Constructor and Description |
---|
MemoryTermStore() |
MemoryTermStore(int initialSize) |
Modifier and Type | Method and Description |
---|---|
void |
add(GroundRule rule,
E term)
Add a term to the store that was generated from the given ground rule.
|
void |
clear()
Remove any existing terms and prepare for a new set.
|
void |
close()
Close down the term store, it will not be used any more.
|
void |
ensureCapacity(int capacity)
Ensure that the underlying stuctures can have the required capacity.
|
E |
get(int index) |
List<Integer> |
getTermIndices(WeightedGroundRule rule)
Get the indicies for all terms related to a specific rule.
|
Iterator<E> |
iterator() |
int |
size() |
void |
updateWeight(WeightedGroundRule rule) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static final String CONFIG_PREFIX
public static final String INITIAL_SIZE_KEY
public static final int INITIAL_SIZE_DEFAULT
public MemoryTermStore()
public MemoryTermStore(int initialSize)
public void add(GroundRule rule, E term)
TermStore
public void clear()
TermStore
public void close()
TermStore
public void ensureCapacity(int capacity)
TermStore
ensureCapacity
in interface TermStore<E extends Term>
public void updateWeight(WeightedGroundRule rule)
updateWeight
in interface TermStore<E extends Term>
public List<Integer> getTermIndices(WeightedGroundRule rule)
TermStore
getTermIndices
in interface TermStore<E extends Term>
Copyright © 2018 University of California, Santa Cruz. All rights reserved.