Uses of Interface
com.jgalgo.graph.WeightFunction
Package
Description
Algorithms for solving connectivity problems, such as strongly/weakly connected components, minimum edge/vertex cuts,
ect.
Algorithms for solving set cover problems, such as minimum vertex/edge cover, dominating set, etc.
Algorithms solving cycles related problems, such as iterating over cycles in a graph, findings a cycle with the
minimum mean edge weight, etc.
Algorithms for computing the distance measures properties in graphs, such as the the diameter, the radius, the
eccentricity, the center, ect.
Algorithms for solving flow problems in graphs, such as maximum flow, min cost flow, and circulation problems.
Algorithms for computing matchings in graphs, such as maximum/minimum weight matchings, maximum cardinality
matchings, perfect matchings, ect.
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.
Algorithms for finding the minimum spanning trees and Steiner trees of graphs.
Algorithms for traversing graphs, such as depth-first search and breadth-first search.
Algorithms specifically for tree graphs, such as LCA or TPM.
Graphs object are the fundamental building blocks of the JGAlgo library.
-
Uses of WeightFunction in com.jgalgo.alg.connect
Modifier and TypeMethodDescriptiondefault <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.MinimumVertexCutAllGlobal.allMinimumCuts
(Graph<V, E> g, WeightFunction<V> w) Find all the minimum vertex-cuts in a graph.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) MinimumVertexCutAllGlobal.minimumCutsIter
(Graph<V, E> g, WeightFunction<V> w) Iterate over all the minimum vertex-cuts in a graph.MinimumVertexCutAllGlobalAbstract.minimumCutsIter
(Graph<V, E> g, WeightFunction<V> w) 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.MinimumVertexCutAllStAbstract.minimumCutsIter
(Graph<V, E> g, WeightFunction<V> w, V source, V sink) -
Uses of WeightFunction in com.jgalgo.alg.cover
Modifier and TypeMethodDescriptiondefault <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
Modifier and TypeMethodDescription<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.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.ChinesePostmanAbstract.computeShortestEdgeVisitorCircleIfExist
(Graph<V, E> g, WeightFunction<E> w) -
Uses of WeightFunction in com.jgalgo.alg.distancemeasures
Modifier and TypeMethodDescriptionstatic <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
Modifier and TypeMethodDescription<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!) flow in a network given a supply for each vertex and a lower bound for the edges flows.<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!) flow in a network given a supply for each vertex.<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
Modifier and TypeMethodDescription<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
Modifier and TypeMethodDescription<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) 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.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) Tsp.computeShortestTour
(Graph<V, E> g, WeightFunction<E> w) Compute the shortest tour that visit all vertices.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
Modifier and TypeMethodDescription<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
Modifier and TypeMethodDescriptionstatic <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
Modifier and TypeMethodDescription<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> boolean TreePathMaxima.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
Modifier and TypeInterfaceDescriptioninterface
Weight function that maps graph edges or vertices ofIntGraph
to weights.interface
Weight function that maps graph edges or vertices ofIntGraph
to integer weights.interface
Specific weights ofbyte
for int graphs.interface
Specific weights ofdouble
for int graphs.interface
Specific weights offloat
for int graphs.interface
Specific weights ofint
for int graphs.interface
Specific weights oflong
for int graphs.interface
Specific weights ofshort
for int graphs.interface
Weight function that maps graph edges or vertices to integer weights.interface
WeightsByte<K>
Specific weights ofbyte
.interface
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
.Modifier and TypeMethodDescriptionstatic <K> WeightFunction
<K> WeightFunction.replaceNullWeightFunc
(WeightFunction<K> weightFunc) Replacenull
weight function withCardinalityWeightFunction
.Modifier and TypeMethodDescriptionstatic 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.