Modifier and Type | Field and Description |
---|---|
protected TupleMask |
mask
The mask used to index the matchings
|
protected java.util.Map<Tuple,java.util.Collection<Tuple>> |
matchings
Counts the number of occurences of each pattern.
|
Constructor and Description |
---|
MaskedTupleMemory(TupleMask mask) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Tuple ps)
Adds a pattern occurence to the memory
|
boolean |
add(Tuple ps,
Tuple signature)
Adds a pattern occurence to the memory, with given signature
|
void |
clear()
Clear all partial matchings stored in memory
|
java.util.Collection<Tuple> |
get(Tuple signature)
Retrieves entries that have the specified signature
|
int |
getKeysetSize() |
java.util.Collection<Tuple> |
getSignatures()
Retrieves a read-only collection of exactly those signatures for which at least one tuple is stored
|
int |
getTotalSize() |
java.util.Iterator<Tuple> |
iterator() |
boolean |
remove(Tuple ps)
Removes a pattern occurence from the memory
|
boolean |
remove(Tuple ps,
Tuple signature)
Removes a pattern occurence from the memory, with given signature
|
java.lang.String |
toString() |
protected java.util.Map<Tuple,java.util.Collection<Tuple>> matchings
protected TupleMask mask
public MaskedTupleMemory(TupleMask mask)
mask
- The mask used to index the matchingspublic boolean add(Tuple ps)
ps
- public boolean add(Tuple ps, Tuple signature)
ps
- signature
- public boolean remove(Tuple ps)
public boolean remove(Tuple ps, Tuple signature)
public java.util.Collection<Tuple> get(Tuple signature)
public void clear()
Clearable
public java.util.Collection<Tuple> getSignatures()
public java.util.Iterator<Tuple> iterator()
iterator
in interface java.lang.Iterable<Tuple>
public java.lang.String toString()
toString
in class java.lang.Object
public int getTotalSize()
public int getKeysetSize()