Uses of Interface
com.jgalgo.graph.WeightFunction
-
Packages that use WeightFunction Package Description com.jgalgo.alg.connect Algorithms for solving connectivity problems, such as strongly/weakly connected components, minimum edge/vertex cuts, ect.com.jgalgo.alg.cover Algorithms for solving set cover problems, such as minimum vertex/edge cover, dominating set, etc.com.jgalgo.alg.cycle Algorithms solving cycles related problems, such as iterating over cycles in a graph, findings a cycle with the minimum mean edge weight, etc.com.jgalgo.alg.distancemeasures Algorithms for computing the distance measures properties in graphs, such as the the diameter, the radius, the eccentricity, the center, ect.com.jgalgo.alg.flow Algorithms for solving flow problems in graphs, such as maximum flow, min cost flow, and circulation problems.com.jgalgo.alg.match Algorithms for computing matchings in graphs, such as maximum/minimum weight matchings, maximum cardinality matchings, perfect matchings, ect.com.jgalgo.alg.shortestpath Algorithms for finding paths in graphs, such as shortest paths, iterating over all simple paths between two vertices, computing the Voronoi cells given a set of sites, ect.com.jgalgo.alg.span Algorithms for finding the minimum spanning trees and Steiner trees of graphs.com.jgalgo.alg.traversal Algorithms for traversing graphs, such as depth-first search and breadth-first search.com.jgalgo.alg.tree Algorithms specifically for tree graphs, such as LCA or TPM.com.jgalgo.graph Graphs object are the fundamental building blocks of the JGAlgo library. -
-
Uses of WeightFunction in com.jgalgo.alg.connect
Methods in com.jgalgo.alg.connect with parameters of type WeightFunction Modifier and Type Method Description default <V,E>
List<VertexBiPartition<V,E>>MinimumEdgeCutAllSt. allMinimumCuts(Graph<V,E> g, WeightFunction<E> w, V source, V sink)
Compute all the minimum edge-cuts in a graph between two terminal vertices.default <V,E>
List<Set<V>>MinimumVertexCutAllGlobal. allMinimumCuts(Graph<V,E> g, WeightFunction<V> w)
Find all the minimum vertex-cuts in a graph.default <V,E>
List<Set<V>>MinimumVertexCutAllSt. allMinimumCuts(Graph<V,E> g, WeightFunction<V> w, V source, V sink)
Compute all the minimum vertex-cuts in a graph between two terminal vertices.<V,E>
VertexBiPartition<V,E>MinimumEdgeCutGlobal. computeMinimumCut(Graph<V,E> g, WeightFunction<E> w)
Compute the global minimum edge-cut in a graph.<V,E>
VertexBiPartition<V,E>MinimumEdgeCutGlobalAbstract. computeMinimumCut(Graph<V,E> g, WeightFunction<E> w)
<V,E>
VertexBiPartition<V,E>MinimumEdgeCutSt. computeMinimumCut(Graph<V,E> g, WeightFunction<E> w, Collection<V> sources, Collection<V> sinks)
Compute the minimum edge-cut in a graph between two sets of vertices.<V,E>
VertexBiPartition<V,E>MinimumEdgeCutSt. computeMinimumCut(Graph<V,E> g, WeightFunction<E> w, V source, V sink)
Compute the minimum edge-cut in a graph between two terminal vertices.<V,E>
VertexBiPartition<V,E>MinimumEdgeCutStAbstract. computeMinimumCut(Graph<V,E> g, WeightFunction<E> w, Collection<V> sources, Collection<V> sinks)
<V,E>
VertexBiPartition<V,E>MinimumEdgeCutStAbstract. computeMinimumCut(Graph<V,E> g, WeightFunction<E> w, V source, V sink)
<V,E>
Set<V>MinimumVertexCutGlobal. computeMinimumCut(Graph<V,E> g, WeightFunction<V> w)
Compute the global minimum vertex-cut in a graph.<V,E>
Set<V>MinimumVertexCutGlobalAbstract. computeMinimumCut(Graph<V,E> g, WeightFunction<V> w)
<V,E>
Set<V>MinimumVertexCutSt. computeMinimumCut(Graph<V,E> g, WeightFunction<V> w, V source, V sink)
Compute the minimum vertex-cut in a graph between two terminal vertices.<V,E>
Set<V>MinimumVertexCutStAbstract. computeMinimumCut(Graph<V,E> g, WeightFunction<V> w, V source, V sink)
<V,E>
Iterator<VertexBiPartition<V,E>>MinimumEdgeCutAllSt. minimumCutsIter(Graph<V,E> g, WeightFunction<E> w, V source, V sink)
Iterate over all the minimum edge-cuts in a graph between two terminal vertices.<V,E>
Iterator<VertexBiPartition<V,E>>MinimumEdgeCutAllStAbstract. minimumCutsIter(Graph<V,E> g, WeightFunction<E> w, V source, V sink)
<V,E>
Iterator<Set<V>>MinimumVertexCutAllGlobal. minimumCutsIter(Graph<V,E> g, WeightFunction<V> w)
Iterate over all the minimum vertex-cuts in a graph.<V,E>
Iterator<Set<V>>MinimumVertexCutAllGlobalAbstract. minimumCutsIter(Graph<V,E> g, WeightFunction<V> w)
<V,E>
Iterator<Set<V>>MinimumVertexCutAllSt. minimumCutsIter(Graph<V,E> g, WeightFunction<V> w, V source, V sink)
Iterate over all the minimum vertex-cuts in a graph between two terminal vertices.<V,E>
Iterator<Set<V>>MinimumVertexCutAllStAbstract. minimumCutsIter(Graph<V,E> g, WeightFunction<V> w, V source, V sink)
-
Uses of WeightFunction in com.jgalgo.alg.cover
Methods in com.jgalgo.alg.cover with parameters of type WeightFunction Modifier and Type Method Description default <V,E>
Set<V>DominatingSetAlgo. computeMinimumDominationSet(Graph<V,E> g, WeightFunction<V> w)
Compute a minimum dominating set of the graph with respect to the in-degree + out-degree of the vertices.<V,E>
Set<V>DominatingSetAlgo. computeMinimumDominationSet(Graph<V,E> g, WeightFunction<V> w, EdgeDirection dominanceDirection)
Compute a minimum dominating set of the graph with respect to the given edges direction.<V,E>
Set<V>DominatingSetAlgoAbstract. computeMinimumDominationSet(Graph<V,E> g, WeightFunction<V> w, EdgeDirection dominanceDirection)
<V,E>
Set<E>EdgeCover. computeMinimumEdgeCover(Graph<V,E> g, WeightFunction<E> w)
Compute a minimum edge cover of a graph with respect to an edge weight function.<V,E>
Set<E>EdgeCoverAbstract. computeMinimumEdgeCover(Graph<V,E> g, WeightFunction<E> w)
<V,E>
Set<V>VertexCover. computeMinimumVertexCover(Graph<V,E> g, WeightFunction<V> w)
Compute a minimum vertex cover of a graph with respect to a vertex weight function.<V,E>
Set<V>VertexCoverAbstract. computeMinimumVertexCover(Graph<V,E> g, WeightFunction<V> w)
-
Uses of WeightFunction in com.jgalgo.alg.cycle
Methods in com.jgalgo.alg.cycle with parameters of type WeightFunction Modifier and Type Method Description <V,E>
Path<V,E>MinimumMeanCycle. computeMinimumMeanCycle(Graph<V,E> g, WeightFunction<E> w)
Compute the minimum mean cycle in a graph.<V,E>
Path<V,E>MinimumMeanCycleAbstract. computeMinimumMeanCycle(Graph<V,E> g, WeightFunction<E> w)
default <V,E>
Path<V,E>ChinesePostman. computeShortestEdgeVisitorCircle(Graph<V,E> g, WeightFunction<E> w)
Compute the shortest circuit that visits all edges in the graph at least once.<V,E>
Optional<Path<V,E>>ChinesePostman. computeShortestEdgeVisitorCircleIfExist(Graph<V,E> g, WeightFunction<E> w)
Compute the shortest circuit that visits all edges in the graph at least once, if it exist.<V,E>
Optional<Path<V,E>>ChinesePostmanAbstract. computeShortestEdgeVisitorCircleIfExist(Graph<V,E> g, WeightFunction<E> w)
-
Uses of WeightFunction in com.jgalgo.alg.distancemeasures
Methods in com.jgalgo.alg.distancemeasures with parameters of type WeightFunction Modifier and Type Method Description static <V,E>
DistanceMeasures<V,E>DistanceMeasures. of(Graph<V,E> g, WeightFunction<E> w)
Get a distance measures object of a graph. -
Uses of WeightFunction in com.jgalgo.alg.flow
Methods in com.jgalgo.alg.flow with parameters of type WeightFunction Modifier and Type Method Description <V,E>
Flow<V,E>MaximumFlow. computeMaximumFlow(Graph<V,E> g, WeightFunction<E> capacity, Collection<V> sources, Collection<V> sinks)
Calculate the maximum flow in a network between a set of sources and a set of sinks.<V,E>
Flow<V,E>MaximumFlow. computeMaximumFlow(Graph<V,E> g, WeightFunction<E> capacity, V source, V sink)
Calculate the maximum flow in a network between a source and a sink.<V,E>
Flow<V,E>MaximumFlowAbstract. computeMaximumFlow(Graph<V,E> g, WeightFunction<E> capacity, Collection<V> sources, Collection<V> sinks)
<V,E>
Flow<V,E>MaximumFlowAbstract. computeMaximumFlow(Graph<V,E> g, WeightFunction<E> capacity, V source, V sink)
<V,E>
Flow<V,E>MinimumCostFlow. computeMinCostFlow(Graph<V,E> g, WeightFunction<E> capacity, WeightFunction<E> cost, WeightFunction<E> lowerBound, WeightFunction<V> supply)
Compute the min-cost (not maximum!)<V,E>
Flow<V,E>MinimumCostFlow. computeMinCostFlow(Graph<V,E> g, WeightFunction<E> capacity, WeightFunction<E> cost, WeightFunction<V> supply)
Compute the min-cost (not maximum!)<V,E>
Flow<V,E>MinimumCostFlowAbstract. computeMinCostFlow(Graph<V,E> g, WeightFunction<E> capacity, WeightFunction<E> cost, WeightFunction<E> lowerBound, WeightFunction<V> supply)
<V,E>
Flow<V,E>MinimumCostFlowAbstract. computeMinCostFlow(Graph<V,E> g, WeightFunction<E> capacity, WeightFunction<E> cost, WeightFunction<V> supply)
<V,E>
Flow<V,E>MinimumCostFlow. computeMinCostMaxFlow(Graph<V,E> g, WeightFunction<E> capacity, WeightFunction<E> cost, WeightFunction<E> lowerBound, Collection<V> sources, Collection<V> sinks)
Compute the min-cost max-flow in a network between a set of sources and a set of sinks given a lower bound for the edges flows.<V,E>
Flow<V,E>MinimumCostFlow. computeMinCostMaxFlow(Graph<V,E> g, WeightFunction<E> capacity, WeightFunction<E> cost, WeightFunction<E> lowerBound, V source, V sink)
Compute the min-cost max-flow in a network between a source and a sink given a lower bound for the edges flows.<V,E>
Flow<V,E>MinimumCostFlow. computeMinCostMaxFlow(Graph<V,E> g, WeightFunction<E> capacity, WeightFunction<E> cost, Collection<V> sources, Collection<V> sinks)
Compute the min-cost max-flow in a network between a set of sources and a set of sinks.<V,E>
Flow<V,E>MinimumCostFlow. computeMinCostMaxFlow(Graph<V,E> g, WeightFunction<E> capacity, WeightFunction<E> cost, V source, V sink)
Compute the min-cost max-flow in a network between a source and a sink.<V,E>
Flow<V,E>MinimumCostFlowAbstract. computeMinCostMaxFlow(Graph<V,E> g, WeightFunction<E> capacity, WeightFunction<E> cost, WeightFunction<E> lowerBound, Collection<V> sources, Collection<V> sinks)
<V,E>
Flow<V,E>MinimumCostFlowAbstract. computeMinCostMaxFlow(Graph<V,E> g, WeightFunction<E> capacity, WeightFunction<E> cost, WeightFunction<E> lowerBound, V source, V sink)
<V,E>
Flow<V,E>MinimumCostFlowAbstract. computeMinCostMaxFlow(Graph<V,E> g, WeightFunction<E> capacity, WeightFunction<E> cost, Collection<V> sources, Collection<V> sinks)
<V,E>
Flow<V,E>MinimumCostFlowAbstract. computeMinCostMaxFlow(Graph<V,E> g, WeightFunction<E> capacity, WeightFunction<E> cost, V source, V sink)
double
Flow. getTotalCost(WeightFunction<E> cost)
Get the total cost of the flow. -
Uses of WeightFunction in com.jgalgo.alg.match
Methods in com.jgalgo.alg.match with parameters of type WeightFunction Modifier and Type Method Description <V,E>
Matching<V,E>MatchingAlgo. computeMaximumMatching(Graph<V,E> g, WeightFunction<E> w)
Compute the maximum weighted matching of a weighted undirected graph.<V,E>
Matching<V,E>MatchingAlgoAbstract. computeMaximumMatching(Graph<V,E> g, WeightFunction<E> w)
<V,E>
Matching<V,E>MatchingAlgo. computeMaximumPerfectMatching(Graph<V,E> g, WeightFunction<E> w)
Compute the maximum perfect matching of a weighted undirected graph.<V,E>
Matching<V,E>MatchingAlgoAbstract. computeMaximumPerfectMatching(Graph<V,E> g, WeightFunction<E> w)
<V,E>
Matching<V,E>MatchingAlgo. computeMinimumMatching(Graph<V,E> g, WeightFunction<E> w)
Compute the minimum weighted matching of a weighted undirected graph.<V,E>
Matching<V,E>MatchingAlgoAbstract. computeMinimumMatching(Graph<V,E> g, WeightFunction<E> w)
<V,E>
Matching<V,E>MatchingAlgo. computeMinimumPerfectMatching(Graph<V,E> g, WeightFunction<E> w)
Compute the minimum perfect matching of a weighted undirected graph.<V,E>
Matching<V,E>MatchingAlgoAbstract. computeMinimumPerfectMatching(Graph<V,E> g, WeightFunction<E> w)
-
Uses of WeightFunction in com.jgalgo.alg.shortestpath
Methods in com.jgalgo.alg.shortestpath with parameters of type WeightFunction Modifier and Type Method Description <V,E>
ShortestPathAllPairs.Result<V,E>ShortestPathAllPairs. computeAllShortestPaths(Graph<V,E> g, WeightFunction<E> w)
Compute the shortest path between each pair of vertices in a graph.<V,E>
ShortestPathAllPairs.Result<V,E>ShortestPathAllPairsAbstract. computeAllShortestPaths(Graph<V,E> g, WeightFunction<E> w)
<V,E>
List<Path<V,E>>KShortestPathsSt. computeKShortestPaths(Graph<V,E> g, WeightFunction<E> w, V source, V target, int k)
Compute the K shortest paths from a source vertex to a target vertex.<V,E>
List<Path<V,E>>KShortestPathsStAbstract. computeKShortestPaths(Graph<V,E> g, WeightFunction<E> w, V source, V target, int k)
<V,E>
Path<V,E>ShortestPathHeuristicSt. computeShortestPath(Graph<V,E> g, WeightFunction<E> w, V source, V target, ToDoubleFunction<V> vHeuristic)
Compute the shortest path between two vertices in a graph.<V,E>
Path<V,E>ShortestPathHeuristicStAbstract. computeShortestPath(Graph<V,E> g, WeightFunction<E> w, V source, V target, ToDoubleFunction<V> vHeuristic)
default <V,E>
Path<V,E>ShortestPathSt. computeShortestPath(Graph<V,E> g, WeightFunction<E> w, V source, V target)
Compute the shortest path from a source vertex to a target vertex.<V,E>
ObjectDoublePair<Path<V,E>>ShortestPathSt. computeShortestPathAndWeight(Graph<V,E> g, WeightFunction<E> w, V source, V target)
Compute the shortest path from a source vertex to a target vertex, and its weight.<V,E>
ObjectDoublePair<Path<V,E>>ShortestPathStAbstract. computeShortestPathAndWeight(Graph<V,E> g, WeightFunction<E> w, V source, V target)
<V,E>
ShortestPathSingleSource.Result<V,E>ShortestPathSingleSource. computeShortestPaths(Graph<V,E> g, WeightFunction<E> w, V source)
Compute the shortest paths from a source to any other vertex in a graph.<V,E>
ShortestPathSingleSource.Result<V,E>ShortestPathSingleSourceAbstract. computeShortestPaths(Graph<V,E> g, WeightFunction<E> w, V source)
<V,E>
Optional<Path<V,E>>Tsp. computeShortestTour(Graph<V,E> g, WeightFunction<E> w)
Compute the shortest tour that visit all vertices.<V,E>
Optional<Path<V,E>>TspAbstract. computeShortestTour(Graph<V,E> g, WeightFunction<E> w)
<V,E>
ShortestPathAllPairs.Result<V,E>ShortestPathAllPairs. computeSubsetShortestPaths(Graph<V,E> g, Collection<V> verticesSubset, WeightFunction<E> w)
Compute the shortest path between each pair of vertices in a given subset of the vertices of the graph.<V,E>
ShortestPathAllPairs.Result<V,E>ShortestPathAllPairsAbstract. computeSubsetShortestPaths(Graph<V,E> g, Collection<V> verticesSubset, WeightFunction<E> w)
<V,E>
VoronoiAlgo.Result<V,E>VoronoiAlgo. computeVoronoiCells(Graph<V,E> g, Collection<V> sites, WeightFunction<E> w)
Compute the Voronoi cells of a graph with respect to a set of sites and an edge weight function.<V,E>
VoronoiAlgo.Result<V,E>VoronoiAlgoAbstract. computeVoronoiCells(Graph<V,E> g, Collection<V> sites, WeightFunction<E> w)
-
Uses of WeightFunction in com.jgalgo.alg.span
Methods in com.jgalgo.alg.span with parameters of type WeightFunction Modifier and Type Method Description <V,E>
MinimumSpanningTree.Result<V,E>MinimumDirectedSpanningTree. computeMinimumDirectedSpanningTree(Graph<V,E> g, WeightFunction<E> w, V root)
Compute a minimum directed spanning tree (MDST) in a directed graph, rooted at the given vertex.<V,E>
MinimumSpanningTree.Result<V,E>MinimumDirectedSpanningTreeAbstract. computeMinimumDirectedSpanningTree(Graph<V,E> g, WeightFunction<E> w, V root)
<V,E>
MinimumSpanningTree.Result<V,E>MinimumSpanningTree. computeMinimumSpanningTree(Graph<V,E> g, WeightFunction<E> w)
Compute the minimum spanning tree (MST) of a given graph.<V,E>
MinimumSpanningTree.Result<V,E>MinimumSpanningTreeAbstract. computeMinimumSpanningTree(Graph<V,E> g, WeightFunction<E> w)
<V,E>
SteinerTreeAlgo.Result<V,E>SteinerTreeAlgo. computeSteinerTree(Graph<V,E> g, WeightFunction<E> w, Collection<V> terminals)
Compute the minimum Steiner tree of a given graph.<V,E>
SteinerTreeAlgo.Result<V,E>SteinerTreeAlgoAbstract. computeSteinerTree(Graph<V,E> g, WeightFunction<E> w, Collection<V> terminals)
-
Uses of WeightFunction in com.jgalgo.alg.traversal
Methods in com.jgalgo.alg.traversal with parameters of type WeightFunction Modifier and Type Method Description static <V,E>
RandomWalkIter<V,E>RandomWalkIter. newInstance(Graph<V,E> g, V source, WeightFunction<E> weights)
Create a new weighted random walk iterator. -
Uses of WeightFunction in com.jgalgo.alg.tree
Methods in com.jgalgo.alg.tree with parameters of type WeightFunction Modifier and Type Method Description <V,E>
TreePathMaxima.Result<V,E>TreePathMaxima. computeHeaviestEdgeInTreePaths(Graph<V,E> tree, WeightFunction<E> w, TreePathMaxima.Queries<V,E> queries)
Compute the heaviest edge in multiple tree paths.<V,E>
TreePathMaxima.Result<V,E>TreePathMaximaAbstract. computeHeaviestEdgeInTreePaths(Graph<V,E> tree, WeightFunction<E> w, TreePathMaxima.Queries<V,E> queries)
static <V,E>
booleanTreePathMaxima. verifyMst(Graph<V,E> g, WeightFunction<E> w, Collection<E> mstEdges, TreePathMaxima tpmAlgo)
Verify that the given edges actually form an MST of a graph. -
Uses of WeightFunction in com.jgalgo.graph
Subinterfaces of WeightFunction in com.jgalgo.graph Modifier and Type Interface Description interface
IWeightFunction
Weight function that maps graph edges or vertices ofIntGraph
to weights.interface
IWeightFunctionInt
Weight function that maps graph edges or vertices ofIntGraph
to integer weights.interface
IWeightsByte
Specific weights ofbyte
for int graphs.interface
IWeightsDouble
Specific weights ofdouble
for int graphs.interface
IWeightsFloat
Specific weights offloat
for int graphs.interface
IWeightsInt
Specific weights ofint
for int graphs.interface
IWeightsLong
Specific weights oflong
for int graphs.interface
IWeightsShort
Specific weights ofshort
for int graphs.interface
WeightFunctionInt<K>
Weight function that maps graph edges or vertices to integer weights.interface
WeightsByte<K>
Specific weights ofbyte
.interface
WeightsDouble<K>
Specific weights ofdouble
.interface
WeightsFloat<K>
Specific weights offloat
.interface
WeightsInt<K>
Specific weights ofint
.interface
WeightsLong<K>
Specific weights oflong
.interface
WeightsShort<K>
Specific weights ofshort
.Methods in com.jgalgo.graph that return WeightFunction Modifier and Type Method Description static <K> WeightFunction<K>
WeightFunction. replaceNullWeightFunc(WeightFunction<K> weightFunc)
Replacenull
weight function withCardinalityWeightFunction
.Methods in com.jgalgo.graph with parameters of type WeightFunction Modifier and Type Method Description static IWeightFunction
WeightFunctions. asIntGraphWeightFunc(WeightFunction<Integer> w)
Treat a given weight function as a weight function on a graph with integer vertices.static <K> IWeightFunction
IndexIdMaps. idToIndexWeightFunc(WeightFunction<K> w, IndexIdMap<K> map)
Create a weight function that accept elements indices, given a weight function that accept elements IDs.static boolean
WeightFunction. isCardinality(WeightFunction<?> weightFunc)
Check if the given weight function is the cardinality weight function.static boolean
WeightFunction. isInteger(WeightFunction<?> weightFunc)
Check if the given weight function is an integer weight function.static <K> WeightFunction<K>
WeightFunction. replaceNullWeightFunc(WeightFunction<K> weightFunc)
Replacenull
weight function withCardinalityWeightFunction
.static <K> double
WeightFunction. weightSum(WeightFunction<K> weightFunc, Iterable<K> elements)
Get the sum of the weights of multiple elements.
-