Package com.semedy.reasoner.edb.ramstore
Class LinkedTupleLists
java.lang.Object
com.semedy.reasoner.edb.ramstore.LinkedTupleLists
Manages a set of tuple lists. A list is characterized by an int value
-
Constructor Summary
ConstructorDescriptionLinkedTupleLists
(TupleStore tuplestore, int arity, int initialSize, ReasoningMonitor monitor) -
Method Summary
Modifier and TypeMethodDescriptionint
addTuple
(int tuple, int list) void
clear()
int
containsTuple
(long[] tuple, int list) elements
(int list) Enumerate the elements in listint
getEntry
(int index) int
getFirstElement
(int list) int
getTuple
(long[] tuple, int list) Get the tuple address in the list.int
getTuple
(TupleBuffer tuple, int list) boolean
isEmpty()
int
newList
(int tuple) int
nextEntry
(int index) int
removeTuple
(int tuple, int list) Remove a tuple from a list.int
searchEntry
(int tuple, int list) int
searchEntry
(long[] tuple, int list) int
searchEntry
(TupleBuffer tuple, int list) int
size()
int
number of bytes used in main memory.
-
Constructor Details
-
LinkedTupleLists
public LinkedTupleLists(TupleStore tuplestore, int arity, int initialSize, ReasoningMonitor monitor)
-
-
Method Details
-
size
public int size() -
sizeInBytes
public int sizeInBytes()number of bytes used in main memory. Used for cache management- Returns:
-
clear
public void clear() -
removeTuple
public int removeTuple(int tuple, int list) Remove a tuple from a list. The return value is the new handle for the list- Parameters:
tuple
-list
-- Returns:
-
getTuple
public int getTuple(long[] tuple, int list) Get the tuple address in the list.- Parameters:
tuple
-list
-- Returns:
-
getTuple
-
addTuple
public int addTuple(int tuple, int list) -
newList
public int newList(int tuple) -
getEntry
public int getEntry(int index) -
nextEntry
public int nextEntry(int index) -
getFirstElement
public int getFirstElement(int list) -
searchEntry
public int searchEntry(int tuple, int list) -
searchEntry
public int searchEntry(long[] tuple, int list) -
searchEntry
-
containsTuple
public int containsTuple(long[] tuple, int list) -
elements
Enumerate the elements in list- Parameters:
list
-- Returns:
-
isEmpty
public boolean isEmpty()
-