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 cf97e36 commit 2e136ebCopy full SHA for 2e136eb
src/edu/stanford/nlp/semgraph/SemanticGraph.java
@@ -67,7 +67,7 @@ public class SemanticGraph implements Serializable {
67
/**
68
* The distinguished root vertices, if known.
69
*/
70
- private final Collection<IndexedWord> roots;
+ private final Set<IndexedWord> roots;
71
72
private final DirectedMultiGraph<IndexedWord, SemanticGraphEdge> graph;
73
@@ -791,6 +791,10 @@ public Collection<IndexedWord> getRoots() {
791
return roots;
792
}
793
794
+ public boolean isRoot(IndexedWord vertex) {
795
+ return roots.contains(vertex);
796
+ }
797
+
798
799
* Initially looks for nodes which have no incoming arcs. If there are any, it
800
* returns a list of them. If not, it looks for nodes from which every other
0 commit comments