Package com.semedy.reasoner.idb
Class RuleGraph
java.lang.Object
com.semedy.reasoner.idb.RuleGraph
- All Implemented Interfaces:
Iterable<RuleGraphNode>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllRules(Collection<Rule> allrules) intbottomUpConnectedRules(Rule rule) feedingRules(Literal body) getBodyToHeads(Literal body) E.g. forgetGraph()getHeadToBodies(Rule rule) E.g. forRule[]getRules()iterator()selectRules(List<Rule> rules) toString()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
RuleGraph
-
-
Method Details
-
getRules
-
getGraph
-
iterator
- Specified by:
iteratorin interfaceIterable<RuleGraphNode>
-
getNode
-
addAllRules
- Throws:
IOExceptionSemReasonerException
-
feedingRules
-
getBodyToHeads
E.g. forr1: p(?X) :- q(?X). r2: q(?X) :- r(?X).
the result forgetBodyToHeads(q(?X))isr2.- Parameters:
body- the body- Returns:
- the connected rules
-
getHeadToBodies
E.g. forr1: p(?X) :- q(?X). r2: q(?X) :- r(?X).
the result forgetHeadToBodies(r2)isr1.- Parameters:
rule- the rule- Returns:
- the connected bodies
-
selectRules
-
bottomUpConnectedRules
-
toString
-