Package com.jgalgo.alg.tree
Interface LowestCommonAncestorStatic.IDataStructure
-
- All Superinterfaces:
LowestCommonAncestorStatic.DataStructure<Integer,Integer>
- Enclosing interface:
- LowestCommonAncestorStatic
public static interface LowestCommonAncestorStatic.IDataStructure extends LowestCommonAncestorStatic.DataStructure<Integer,Integer>
Data structure result created from a static LCA pre-processing forIntGraph
.- Author:
- Barak Ugav
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description int
findLca(int u, int v)
Find the lowest common ancestor of two vertices in the tree.default Integer
findLca(Integer u, Integer v)
Deprecated.Please usefindLca(int, int)
instead to avoid un/boxing.
-
-
-
Method Detail
-
findLca
int findLca(int u, int v)
Find the lowest common ancestor of two vertices in the tree.- Parameters:
u
- the first vertexv
- the second vertex- Returns:
- the lowest common ancestor of \(u\) and \(v\)
-
findLca
@Deprecated default Integer findLca(Integer u, Integer v)
Deprecated.Please usefindLca(int, int)
instead to avoid un/boxing.Find the lowest common ancestor of two vertices in the tree.- Specified by:
findLca
in interfaceLowestCommonAncestorStatic.DataStructure<Integer,Integer>
- Parameters:
u
- the first vertexv
- the second vertex- Returns:
- the lowest common ancestor of \(u\) and \(v\)
-
-