Package com.jgalgo.alg
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 aLowestCommonAncestorOffline
computation.- Author:
- Barak Ugav
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description V
getLca(int queryIdx)
Get the lowest common ancestor of the given query.int
size()
Get the number of queries in this result.
-
-
-
Method Detail
-
getLca
V getLca(int queryIdx)
Get the lowest common ancestor of the given query.This result object was obtained by calling
LowestCommonAncestorOffline.findLCAs(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.findLCAs(Graph, Object, Queries)
.- Returns:
- the number of queries in this result
-
-