Package com.jgalgo.alg
Interface TreePathMaxima.Result<V,E>
-
- Type Parameters:
V
- the vertices typeE
- the edges type
- All Known Subinterfaces:
TreePathMaxima.IResult
- Enclosing interface:
- TreePathMaxima
public static interface TreePathMaxima.Result<V,E>
A result object forTreePathMaxima
algorithm.- Author:
- Barak Ugav
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description E
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
E 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.IQueries
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.IQueries
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.IQueries
container passed to theTreePathMaxima
algorithm.- Returns:
- the number queries results this result object hold
-
-