Package com.jgalgo
Interface TreePathMaxima.Result
-
- Enclosing interface:
- TreePathMaxima
public static interface TreePathMaxima.ResultA result object forTreePathMaximaalgorithm.- Author:
- Barak Ugav
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetHeaviestEdge(int queryIdx)Get the heaviest edge found for a single query.intsize()Get the number queries results this result object hold.
-
-
-
Method Detail
-
getHeaviestEdge
int getHeaviestEdge(int queryIdx)
Get the heaviest edge found for a single query.This result object was obtained by calling
TreePathMaxima.computeHeaviestEdgeInTreePaths(Graph, WeightFunction, Queries), which accept a set of multiple queries using theTreePathMaxima.Queriesobject. This method return the answer to a single queries among them, by its index.- Parameters:
queryIdx- the index of the query \((u, v)\) in theTreePathMaxima.Queriesobject passed toTreePathMaxima.computeHeaviestEdgeInTreePaths(Graph, WeightFunction, Queries)- Returns:
- the edge identifier of the heaviest on the path from \(u\) to \(v\) (the query vertices) in
the tree passed to the algorithm, or
-1if no such path exists
-
size
int size()
Get the number queries results this result object hold.This number always much the size of the
TreePathMaxima.Queriescontainer passed to theTreePathMaximaalgorithm.- Returns:
- the number queries results this result object hold
-
-