use of fr.lirmm.graphik.graal.core.LabelRuleComparator in project graal by graphik-team.
the class DefaultGraphOfRuleDependencies method toString.
// /////////////////////////////////////////////////////////////////////////
// OVERRIDE METHODS
@Override
public String toString() {
StringBuilder s = new StringBuilder();
TreeSet<Rule> rules = new TreeSet<Rule>(new LabelRuleComparator());
for (Rule r : this.graph.vertexSet()) {
rules.add(r);
}
for (Rule src : rules) {
for (Integer e : this.graph.outgoingEdgesOf(src)) {
Rule dest = this.graph.getEdgeTarget(e);
s.append(src.getLabel());
s.append(" -");
if (this.computingUnifiers) {
for (Substitution sub : this.edgesValue.get(this.graph.getEdge(src, dest))) {
s.append(sub);
}
}
s.append("-> ");
s.append(dest.getLabel());
s.append('\n');
}
}
return s.toString();
}
Aggregations