Package com.jgalgo.alg
Interface LowestCommonAncestorOffline.IQueries
-
- All Superinterfaces:
LowestCommonAncestorOffline.Queries<Integer,Integer>
- Enclosing interface:
- LowestCommonAncestorOffline
public static interface LowestCommonAncestorOffline.IQueries extends LowestCommonAncestorOffline.Queries<Integer,Integer>
Queries container forLowestCommonAncestorOfflinecomputations forIntGraph.- Author:
- Barak Ugav
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description voidaddQuery(int u, int v)Add a query for the lowest common ancestor ofuandv.default voidaddQuery(Integer u, Integer v)Deprecated.default IntegergetQuerySource(int idx)Deprecated.intgetQuerySourceInt(int idx)Get a query source by index.default IntegergetQueryTarget(int idx)Deprecated.intgetQueryTargetInt(int idx)Get a query target by index.static LowestCommonAncestorOffline.IQueriesnewInstance()Create an empty queries container.-
Methods inherited from interface com.jgalgo.alg.LowestCommonAncestorOffline.Queries
clear, size
-
-
-
-
Method Detail
-
newInstance
static LowestCommonAncestorOffline.IQueries newInstance()
Create an empty queries container.- Returns:
- a new queries container
-
addQuery
void addQuery(int u, int v)Add a query for the lowest common ancestor ofuandv.- Parameters:
u- the first vertexv- the second vertex
-
addQuery
@Deprecated default void addQuery(Integer u, Integer v)
Deprecated.Description copied from interface:LowestCommonAncestorOffline.QueriesAdd a query for the lowest common ancestor ofuandv.- Specified by:
addQueryin interfaceLowestCommonAncestorOffline.Queries<Integer,Integer>- Parameters:
u- the first vertexv- the second vertex
-
getQuerySourceInt
int getQuerySourceInt(int idx)
Get a query source by index.A query is composed of two vertices, the source and the target. This method return the source vertex of a query. Use
getQueryTargetInt(int)to get the target vertex.- Parameters:
idx- index of the query. Must be in range[0, size())- Returns:
- the first vertex of the query
- Throws:
IndexOutOfBoundsException- ifidx < 0oridx >= size()
-
getQuerySource
@Deprecated default Integer getQuerySource(int idx)
Deprecated.Description copied from interface:LowestCommonAncestorOffline.QueriesGet a query source by index.A query is composed of two vertices, the source and the target. This method return the source vertex of a query. Use
LowestCommonAncestorOffline.Queries.getQueryTarget(int)to get the target vertex.- Specified by:
getQuerySourcein interfaceLowestCommonAncestorOffline.Queries<Integer,Integer>- Parameters:
idx- index of the query. Must be in range[0, size())- Returns:
- the first vertex of the query
-
getQueryTargetInt
int getQueryTargetInt(int idx)
Get a query target by index.A query is composed of two vertices, the target and the source. This method return the target vertex of a query. Use
getQueryTargetInt(int)to get the source vertex.- Parameters:
idx- index of the query. Must be in range[0, size())- Returns:
- the second vertex of the query
- Throws:
IndexOutOfBoundsException- ifidx < 0oridx >= size()
-
getQueryTarget
@Deprecated default Integer getQueryTarget(int idx)
Deprecated.Description copied from interface:LowestCommonAncestorOffline.QueriesGet a query target by index.A query is composed of two vertices, the target and the source. This method return the target vertex of a query. Use
LowestCommonAncestorOffline.Queries.getQueryTarget(int)to get the source vertex.- Specified by:
getQueryTargetin interfaceLowestCommonAncestorOffline.Queries<Integer,Integer>- Parameters:
idx- index of the query. Must be in range[0, size())- Returns:
- the second vertex of the query
-
-