Package com.jgalgo.alg
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 intfindLca(int u, int v)Find the lowest common ancestor of two vertices in the tree.default IntegerfindLca(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:
findLcain interfaceLowestCommonAncestorStatic.DataStructure<Integer,Integer>- Parameters:
u- the first vertexv- the second vertex- Returns:
- the lowest common ancestor of \(u\) and \(v\)
-
-