Package com.semedy.reasoner.api.edb
Interface Index
- All Known Subinterfaces:
MainMemoryIndex,SortedIndex
- All Known Implementing Classes:
AVLTree,HashIndex,InvertedList,PersistentSecondarySortedIndex,PrimaryHashIndex,PrimaryIndex
public interface Index
Secondary index for a relation of tuples
- Author:
- angele
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsTuple(long[] values) returns true if there exist matching valuesbooleancontainsTuple(TupleBuffer values) returns true if there exist matching valuesint[]Returns the indexed positionslonggetNumberOfMatchingTuples(long[] values) returns the number of matching tuplesselectMatchingTuples(long[] values) returns an enumerator for matching tuplesselectMatchingTuples(long[] values, TupleEnumerator it) returns an enumerator for matching tuples reuse tuple enumeratorselectMatchingTuples(TupleBuffer values) returns an enumerator for matching tupleslongsize()returns the number of indexed tupleslongReturns size in bytes used in main memory.
-
Method Details
-
selectMatchingTuples
returns an enumerator for matching tuples- Parameters:
values- , values for indexed positions- Returns:
- enumerator for matching tuples
- Throws:
IOExceptionEDBException
-
selectMatchingTuples
returns an enumerator for matching tuples- Parameters:
values- , values for indexed positions- Returns:
- enumerator for matching tuples
- Throws:
IOExceptionEDBException
-
selectMatchingTuples
TupleEnumerator selectMatchingTuples(long[] values, TupleEnumerator it) throws IOException, EDBException returns an enumerator for matching tuples reuse tuple enumerator- Parameters:
values-it-- Returns:
- Throws:
EDBExceptionIOException
-
containsTuple
returns true if there exist matching values- Parameters:
values- , values for indexed positions- Returns:
- boolean, true if there exist matching values
- Throws:
IOException
-
containsTuple
returns true if there exist matching values- Parameters:
values- , values for indexed positions- Returns:
- boolean, true if there exist matching values
- Throws:
IOException
-
getNumberOfMatchingTuples
returns the number of matching tuples- Parameters:
values- , values for indexed positions- Returns:
- number of matching tuples
- Throws:
EDBExceptionIOException
-
getIndexedPositions
int[] getIndexedPositions()Returns the indexed positions- Returns:
- the indexed positions
-
sizeInBytes
long sizeInBytes()Returns size in bytes used in main memory. Used for cache management- Returns:
-
size
long size()returns the number of indexed tuples- Returns:
-