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 aLowestCommonAncestorOfflinecomputation.- Author:
- Barak Ugav
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description VgetLca(int queryIdx)Get the lowest common ancestor of the given query.intsize()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.IQueriesobject. 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.IQueriesobject passed toLowestCommonAncestorOffline.findLCAs(Graph, Object, Queries).- Returns:
- the number of queries in this result
-
-