|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IPredicateGraph
A graph to determine the dependencies of rules and predicates to each other.
$Id$
| Method Summary | |
|---|---|
void |
addRule(Collection<IRule> r)
Adds a collection of rules to the graph. |
void |
addRule(IRule rule)
Adds a rule to the graph. |
int |
countNegativesForCycle()
Returns the number of negative Literals in the cycle. |
boolean |
detectCycles()
Determines whether the rules are recursive. |
Set<LabeledEdge<IPredicate,Boolean>> |
findEdgesForCycle()
Determines the edges contained in the cycle. |
Set<IPredicate> |
findVertexesForCycle()
Determines the vertexes contained in the cycle. |
Set<IPredicate> |
getDepends(IPredicate p)
Returns a set of predicates the given one depends on. |
Comparator<IPredicate> |
getPredicateComparator()
Returns a compareator which compares two predicates depending on their dependencies of their rules. |
Comparator<IRule> |
getRuleComparator()
Returs a comparator which compares two rules depending on their dependencies of each other. |
| Method Detail |
|---|
void addRule(IRule rule)
rule - the rule to add
NullPointerException - if the rule is nullboolean detectCycles()
true if they are recursive, otherwise falseSet<IPredicate> findVertexesForCycle()
Set<LabeledEdge<IPredicate,Boolean>> findEdgesForCycle()
int countNegativesForCycle()
void addRule(Collection<IRule> r)
r - the collection of rules
NullPointerException - if the collections is or contains nullSet<IPredicate> getDepends(IPredicate p)
p - predicate for which to check for dependencies
NullPointerException - if the predicate is nullComparator<IPredicate> getPredicateComparator()
Returns a compareator which compares two predicates depending on their dependencies of their rules.
If one of the compared predicate isn't in the graph, or there isn't a
path from one predicate to the other 0 will be returned. If the
first predicate depends on the second one, the first one will be
determined to be bigger, and vice versa.
Comparator<IRule> getRuleComparator()
Returs a comparator which compares two rules depending on their dependencies of each other.
The rules will compared according to their headpredicates.
getPredicateComparator()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||