V - vertex the graph vertex typepublic interface LowestCommonAncestorAlgorithm<V>
| Modifier and Type | Method and Description |
|---|---|
default java.util.List<V> |
getBatchLCA(java.util.List<Pair<V,V>> queries)
Return a list of LCAs for a batch of queries
|
default java.util.List<java.util.Set<V>> |
getBatchLCASet(java.util.List<Pair<V,V>> queries)
Return a list of computed sets of LCAs for a batch of queries
|
V |
getLCA(V a,
V b)
Return the LCA of a and b
|
java.util.Set<V> |
getLCASet(V a,
V b)
Return the computed set of LCAs of a and b
|
V getLCA(V a, V b)
a - the first element to find LCA forb - the other element to find the LCA fordefault java.util.List<V> getBatchLCA(java.util.List<Pair<V,V>> queries)
queries - a list of pairs of verticesjava.util.Set<V> getLCASet(V a, V b)
a - the first element to find LCA forb - the other element to find the LCA forjava.lang.UnsupportedOperationException - - if the operation is not supported by the implementing
classdefault java.util.List<java.util.Set<V>> getBatchLCASet(java.util.List<Pair<V,V>> queries)
queries - a list of pairs of verticesCopyright © 2019. All Rights Reserved.