public class BetaMemory
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
BetaMemory.IndexedConstraintMemory
A memory for an indexed constraint.
|
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Set |
resultmem
The result memory.
|
protected IOAVState |
state
The state.
|
protected java.util.Map |
xmems
The indexed memories (indexed constraint evaluator -> memory).
|
| Constructor and Description |
|---|
BetaMemory(IOAVState state)
Create a new beta memory.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addObject(java.lang.Object value,
java.lang.Object object,
ConstraintIndexer ci)
Add an value -> object pair to the object index.
|
boolean |
addResultTuple(Tuple tuple)
Add a tuple to the result.
|
void |
addTuple(java.lang.Object value,
Tuple tuple,
ConstraintIndexer ci)
Add an value -> object pair to the tuple index.
|
protected BetaMemory.IndexedConstraintMemory |
getIndexedMemory(ConstraintIndexer ci)
Get the indexed memory per constraint indexer.
|
java.util.Set |
getObjects(Tuple tuple,
ConstraintIndexer ci)
Get the indexed objects per tuple.
|
java.util.Collection |
getResultMemory()
Get the result memory.
|
java.util.Set |
getTuples(java.lang.Object object,
ConstraintIndexer ci)
Get the indexed tuples per object.
|
void |
removeObject(java.lang.Object object,
ConstraintIndexer ci)
Remove an object from the object index.
|
boolean |
removeResultTuple(Tuple tuple)
Remove from the result.
|
void |
removeTuple(Tuple tuple,
ConstraintIndexer ci)
Remove an value -> object pair from the tuple index.
|
int |
size()
Get the size of the beta memory (including indexed memories).
|
java.lang.String |
toString()
Get the string representation.
|
protected IOAVState state
protected java.util.Map xmems
protected java.util.Set resultmem
public BetaMemory(IOAVState state)
node - The beta node.public boolean addResultTuple(Tuple tuple)
tuple - The result node.public boolean removeResultTuple(Tuple tuple)
tuple - The tuple.public java.util.Collection getResultMemory()
public java.util.Set getObjects(Tuple tuple, ConstraintIndexer ci)
tuple - The indexed tuple.ci - The constraint indexer.public java.util.Set getTuples(java.lang.Object object,
ConstraintIndexer ci)
object - The indexed object.ci - The constraint indexer.public void addObject(java.lang.Object value,
java.lang.Object object,
ConstraintIndexer ci)
value - The value.object - The object.ci - The constraint indexer.public void removeObject(java.lang.Object object,
ConstraintIndexer ci)
object - The object.ci - The constraint indexer.public void addTuple(java.lang.Object value,
Tuple tuple,
ConstraintIndexer ci)
value - The value.tuple - The tuple.ci - The constraint indexer.public void removeTuple(Tuple tuple, ConstraintIndexer ci)
object - The object.ci - The constraint indexer.protected BetaMemory.IndexedConstraintMemory getIndexedMemory(ConstraintIndexer ci)
ci - The constraint indexer.public int size()
public java.lang.String toString()
toString in class java.lang.Object