We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e43a098 commit e40ba30Copy full SHA for e40ba30
src/main/java/io/github/bldl/graph/ClassHierarchyGraph.java
@@ -60,6 +60,13 @@ public Iterable<T> getVertices() {
60
return vertices;
61
}
62
63
+ /**
64
+ * Determines whether one node is a descendant of another
65
+ *
66
+ * @param ancestor the presumed ancestor
67
+ * @param descendant the presumed descendant
68
+ * @return whether {@code descendant} is a descendant of {@code ancestor}
69
+ */
70
public boolean isDescendant(T ancestor, T descendant) {
71
Set<T> visited = new HashSet<>();
72
dfs(ancestor, visited);
0 commit comments