Skip to content

Commit f569d12

Browse files
minor
1 parent 84e4355 commit f569d12

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

components-core/src/main/java/org/dllearner/utilities/graph/GraphUtils.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public static Graph<TypedOWLIndividual, OWLPropertyEdge> aboxToLabeledGraphWithT
133133
}
134134

135135

136-
public static void main(String[] args) throws OWLOntologyCreationException {
136+
public static void main(String[] args) throws Exception {
137137
ToStringRenderer.getInstance().setRenderer(new DLSyntaxObjectRenderer());
138138

139139
OWLOntology ont = OWLManager.createOWLOntologyManager().loadOntologyFromOntologyDocument(new File("/home/user/work/datasets/poker/poker_straight_flush_p5-n347.owl"));
@@ -155,6 +155,9 @@ public static void main(String[] args) throws OWLOntologyCreationException {
155155

156156
startNodes.forEach(node -> {
157157

158+
System.out.println("----------------------------------------------");
159+
System.out.println("node: " + node);
160+
158161
// compute all path up to length
159162
List<GraphPath<TypedOWLIndividual, OWLPropertyEdge>> paths = new AllPaths<>(g).getAllPaths(node, true, maxPathLength);
160163

@@ -170,9 +173,12 @@ public static void main(String[] args) throws OWLOntologyCreationException {
170173
// show just the distinct list of the edge sequences
171174
List<List<OWLObjectPropertyExpression>> pathEdgesDistinct = new ArrayList<>(new HashSet<>(pathEdges));
172175

173-
Comparator<List<OWLObjectPropertyExpression>> c = Comparator.<List<OWLObjectPropertyExpression>>comparingInt(List::size).thenComparing(Object::toString);
174-
176+
// sort by length
177+
Comparator<List<OWLObjectPropertyExpression>> c = Comparator
178+
.<List<OWLObjectPropertyExpression>>comparingInt(List::size)
179+
.thenComparing(Object::toString);
175180
Collections.sort(pathEdgesDistinct, c);
181+
176182
pathEdgesDistinct.forEach(System.out::println);
177183

178184
});

0 commit comments

Comments
 (0)