org.deri.iris.utils
Class TotalIndex
java.lang.Object
org.deri.iris.utils.TotalIndex
public class TotalIndex
- extends Object
Helper class for the semi-naive evaluator.
An object of this class indexes an entire relation on every term to enable fast detection
of the existence of a tuple within a relation.
|
Method Summary |
boolean |
contains(ITuple tuple)
Discover if the indexed relation contains a specific tuple. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TotalIndex
public TotalIndex(IRelation relation)
- Constructor.
- Parameters:
relation - The relation to index.
contains
public boolean contains(ITuple tuple)
- Discover if the indexed relation contains a specific tuple.
- Parameters:
tuple - The tuple to test for.
- Returns:
- true, if a tuple with identical term values already exists in the relation.