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 for
IntGraph
.- Author:
- Barak Ugav
-
Method Summary
-
Method Details
-
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.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\)
-
findLca(int, int)
instead to avoid un/boxing.