Package com.jgalgo.alg.tree
Interface LowestCommonAncestorOffline.IResult
- All Superinterfaces:
LowestCommonAncestorOffline.Result<Integer,
Integer>
- Enclosing interface:
LowestCommonAncestorOffline
public static interface LowestCommonAncestorOffline.IResult
extends LowestCommonAncestorOffline.Result<Integer,Integer>
Result of a
LowestCommonAncestorOffline
computation for IntGraph
.- Author:
- Barak Ugav
-
Method Summary
Methods inherited from interface com.jgalgo.alg.tree.LowestCommonAncestorOffline.Result
size
-
Method Details
-
getLcaInt
int getLcaInt(int queryIdx) 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
-
getLca
Deprecated.Please usegetLcaInt(int)
instead to avoid un/boxing.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.- Specified by:
getLca
in interfaceLowestCommonAncestorOffline.Result<Integer,
Integer> - Parameters:
queryIdx
- index of the query. Must be in range[0, size())
- Returns:
- the lowest common ancestor of the given query
-
getLcaInt(int)
instead to avoid un/boxing.