Package com.jgalgo
Interface TreePathMaxima.Result
-
- Enclosing interface:
- TreePathMaxima
public static interface TreePathMaxima.Result
A result object forTreePathMaxima
algorithm.- Author:
- Barak Ugav
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getHeaviestEdge(int queryIdx)
Get the heaviest edge found for a single query.int
size()
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.Queries
object. 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.Queries
object 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
-1
if 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.Queries
container passed to theTreePathMaxima
algorithm.- Returns:
- the number queries results this result object hold
-
-