Package com.jgalgo.alg.tree
Interface LowestCommonAncestorOffline.Result<V,E>
- Type Parameters:
V
- the vertices typeE
- the edges type
- All Known Subinterfaces:
LowestCommonAncestorOffline.IResult
- Enclosing interface:
LowestCommonAncestorOffline
public static interface LowestCommonAncestorOffline.Result<V,E>
Result of a
LowestCommonAncestorOffline
computation.- Author:
- Barak Ugav
-
Method Summary
-
Method Details
-
getLca
Get the lowest common ancestor of the given query.This result object was obtained by calling
LowestCommonAncestorOffline.findLowestCommonAncestors(Graph, Object, Queries)
, which accept a set of multiple queries using theLowestCommonAncestorOffline.IQueries
object. This method return the answer to a single queries among them, by its index.- Parameters:
queryIdx
- index of the query. Must be in range[0, size())
- Returns:
- the lowest common ancestor of the given query
-
size
int size()Get the number of queries in this result.This number is the same as the number of queries in the
LowestCommonAncestorOffline.IQueries
object passed toLowestCommonAncestorOffline.findLowestCommonAncestors(Graph, Object, Queries)
.- Returns:
- the number of queries in this result
-