Class TopDown
java.lang.Object
com.semedy.reasoner.reasoning.processes.ProcessImp
com.semedy.reasoner.reasoning.processes.TopDown
propagates intermediate results top down
-
Constructor Summary
ConstructorDescriptionTopDown
(InterruptFlag interruptflag, int[] mapping, long[] groundterms, int[] groundpositions, int destarity, Literal topLiteral, Literal magic, ProcessExecutor executor, ReasoningMonitor monitor) -
Method Summary
Modifier and TypeMethodDescriptionget the basic tuple storeboolean
receiveRelation
(ReasoningRelation tuples) receive a whole relationboolean
receiveTuple
(int tuple) receive a single tupleboolean
receiveTuple
(long[] tuple) receive a single tupletoString()
Methods inherited from class com.semedy.reasoner.reasoning.processes.ProcessImp
addNextReceiver, addRelation, clear, dispose, evaluate, evaluationFinished, evaluationFinished, getArity, getPriority, getStratum, isNotQueuedSetQueued, isQueued, nextReceiver, operationFinished, receiveTuple, setDataFlowGraph, setQueued, setStratum, startTuples, tuplesFinished, tuplesFinished
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.semedy.reasoner.api.reasoning.Receiver
receiveTuple, startTuples, tuplesFinished, tuplesFinished
-
Constructor Details
-
TopDown
public TopDown(InterruptFlag interruptflag, int[] mapping, long[] groundterms, int[] groundpositions, int destarity, Literal topLiteral, Literal magic, ProcessExecutor executor, ReasoningMonitor monitor)
-
-
Method Details
-
receiveRelation
public boolean receiveRelation(ReasoningRelation tuples) throws SemReasonerException, InterruptedException, IOException Description copied from interface:Receiver
receive a whole relation- Specified by:
receiveRelation
in interfaceReceiver
- Overrides:
receiveRelation
in classProcessImp
- Parameters:
tuples
- the whole relation to be received- Returns:
- true, if relation is later on dissolved, false otherwise
- Throws:
ReasoningException
InterruptedException
IOException
SemReasonerException
-
receiveTuple
Description copied from interface:Receiver
receive a single tuple- Specified by:
receiveTuple
in interfaceReceiver
- Overrides:
receiveTuple
in classProcessImp
- Parameters:
tuple
- the tuple to be received- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
InterruptedException
ReasoningException
-
receiveTuple
Description copied from interface:Receiver
receive a single tuple- Specified by:
receiveTuple
in interfaceReceiver
- Overrides:
receiveTuple
in classProcessImp
- Parameters:
tuple
- the tuple to be received- Returns:
- true if tuple has been used (tuple cannot be free'd up)
- Throws:
InterruptedException
ReasoningException
-
getTupleStore
Description copied from interface:Receiver
get the basic tuple store- Specified by:
getTupleStore
in interfaceProcess
- Specified by:
getTupleStore
in interfaceReceiver
- Overrides:
getTupleStore
in classProcessImp
- Returns:
- the tuple store
-
toString
-