Package com.semedy.reasoner.idb
Class RuleGraph
java.lang.Object
com.semedy.reasoner.idb.RuleGraph
- All Implemented Interfaces:
Iterable<RuleGraphNode>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllRules
(Collection<Rule> allrules) int
bottomUpConnectedRules
(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, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
RuleGraph
-
-
Method Details
-
getRules
-
getGraph
-
iterator
- Specified by:
iterator
in interfaceIterable<RuleGraphNode>
-
getNode
-
addAllRules
- Throws:
IOException
SemReasonerException
-
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
-