public static class BetaMemory.IndexedConstraintMemory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Map |
objects
The map for (value -> objects).
|
protected java.util.Map |
ovalues
The cached values (object -> value).
|
protected java.util.Map |
tuples
The map for (value -> tuples).
|
protected java.util.Map |
tvalues
The cached values (tuple -> value).
|
Constructor and Description |
---|
IndexedConstraintMemory(IOAVState state)
Create a new constraint memory.
|
Modifier and Type | Method and Description |
---|---|
void |
addObject(java.lang.Object value,
java.lang.Object object)
Add an object to the memory.
|
void |
addTuple(java.lang.Object value,
Tuple tuple)
Add a tuple to the memory.
|
java.util.Set |
getObjects(java.lang.Object value)
Get object for value.
|
java.lang.Object |
getObjectValue(java.lang.Object object)
Get the value for an object.
|
java.util.Set |
getTuples(java.lang.Object value)
Get the tuples for a value.
|
java.lang.Object |
getTupleValue(Tuple tuple)
Get the value for a tuple.
|
void |
removeObject(java.lang.Object object)
Remove an object from the memory.
|
void |
removeTuple(Tuple tuple)
Remove a tuple from the memory.
|
int |
size()
Get the size of the beta memory (including indexed memories).
|
java.lang.String |
toString()
Create a string representation.
|
protected java.util.Map objects
protected java.util.Map tuples
protected java.util.Map ovalues
protected java.util.Map tvalues
public IndexedConstraintMemory(IOAVState state)
public java.util.Set getObjects(java.lang.Object value)
value
- The value.public java.util.Set getTuples(java.lang.Object value)
value
- The value.public java.lang.Object getObjectValue(java.lang.Object object)
object
- The object.public java.lang.Object getTupleValue(Tuple tuple)
tuple
- The tuple.public void addObject(java.lang.Object value, java.lang.Object object)
value
- The index.object
- The object.public void removeObject(java.lang.Object object)
object
- The object.public void addTuple(java.lang.Object value, Tuple tuple)
value
- The index.tuple
- The object.public void removeTuple(Tuple tuple)
tuple
- The tuple.public int size()
public java.lang.String toString()
toString
in class java.lang.Object