Package com.jgalgo.alg
Interface LowestCommonAncestorOffline.IResult
-
- All Superinterfaces:
LowestCommonAncestorOffline.Result<Integer,Integer>
- Enclosing interface:
- LowestCommonAncestorOffline
public static interface LowestCommonAncestorOffline.IResult extends LowestCommonAncestorOffline.Result<Integer,Integer>
Result of aLowestCommonAncestorOffline
computation forIntGraph
.- Author:
- Barak Ugav
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default Integer
getLca(int queryIdx)
Deprecated.Please usegetLcaInt(int)
instead to avoid un/boxing.int
getLcaInt(int queryIdx)
Get the lowest common ancestor of the given query.-
Methods inherited from interface com.jgalgo.alg.LowestCommonAncestorOffline.Result
size
-
-
-
-
Method Detail
-
getLcaInt
int getLcaInt(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
-
getLca
@Deprecated default Integer getLca(int queryIdx)
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.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.- 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
-
-