Uses of Interface
com.jgalgo.graph.Graph
-
Packages that use Graph Package Description com.jgalgo.adapt.guava Adapters from Guava to JGalgo, and from JGalgo to Guava.com.jgalgo.adapt.jgrapht Adapters from JGraphT to JGalgo, and from JGalgo to JGraphT.com.jgalgo.alg.bipartite Algorithms for solving bipartite graph problems.com.jgalgo.alg.clique Algorithms for solving cliques and independent sets problems.com.jgalgo.alg.closure Algorithms for findings closures in graphs.com.jgalgo.alg.color Algorithms for solving graph coloring problems.com.jgalgo.alg.common Package for common classes and interfaces used by the algorithms in the JGAlgo library.com.jgalgo.alg.connect Algorithms for solving connectivity problems, such as strongly/weakly connected components, minimum edge/vertex cuts, ect.com.jgalgo.alg.cores Algorithms for computing the cores of graphs.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.dag Algorithms specifically designed for directed acyclic graphs (DAGs).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.euler Algorithms for finding Eulerian paths and cycles in graphs.com.jgalgo.alg.flow Algorithms for solving flow problems in graphs, such as maximum flow, min cost flow, and circulation problems.com.jgalgo.alg.hamilton Algorithms for solving Hamiltonian path problems.com.jgalgo.alg.isomorphism Algorithms for determining isomorphism between graphs.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.gen Graph generators used to generate (possibly random) graphs with different distributions and structures.com.jgalgo.graph Graphs object are the fundamental building blocks of the JGAlgo library.com.jgalgo.io The I/O classes provide varies ways to read/write graphs from/to files. -
-
Uses of Graph in com.jgalgo.adapt.guava
Classes in com.jgalgo.adapt.guava that implement Graph Modifier and Type Class Description class
GuavaNetworkWrapper<V,E>
An adapter from Guava Network to JGAlgo Graph.Constructors in com.jgalgo.adapt.guava with parameters of type Graph Constructor Description GuavaGraphAdapter(Graph<V,E> graph)
Constructs a new adapter from the given JGAlgo graph.GuavaMutableGraphAdapter(Graph<V,E> graph)
Constructs a new mutable adapter from the given JGAlgo graph.GuavaMutableNetworkAdapter(Graph<V,E> graph)
Constructs a new mutable adapter from the given JGAlgo graph.GuavaMutableValueGraphAdapter(Graph<V,E> graph, String edgeWeightKey)
Constructs a new adapter from the given JGAlgo graph.GuavaNetworkAdapter(Graph<V,E> graph)
Constructs a new adapter from the given JGAlgo graph.GuavaValueGraphAdapter(Graph<V,E> graph, String edgeWeightKey)
Constructs a new adapter from the given JGAlgo graph. -
Uses of Graph in com.jgalgo.adapt.jgrapht
Classes in com.jgalgo.adapt.jgrapht that implement Graph Modifier and Type Class Description class
JGraphTWrapper<V,E>
An adapter from JGraphT graph to JGAlgo graph.Constructors in com.jgalgo.adapt.jgrapht with parameters of type Graph Constructor Description JGraphTAdapter(Graph<V,E> graph)
Constructs a new unweighted adapter from the given JGAlgo graph.JGraphTAdapter(Graph<V,E> graph, String edgeWeightKey)
Constructs a new adapter from the given JGAlgo graph, optionally weighted. -
Uses of Graph in com.jgalgo.alg.bipartite
Methods in com.jgalgo.alg.bipartite with parameters of type Graph Modifier and Type Method Description static <V,E>
Optional<VertexBiPartition<V,E>>BipartiteGraphs. findPartition(Graph<V,E> g)
Find a bipartite partition of the given graph (if one exists).static <V,E>
Optional<VertexBiPartition<V,E>>BipartiteGraphs. findPartition(Graph<V,E> g, boolean addPartitionWeights)
Find a bipartite partition of the given graph (if one exists), and optionally add the partition as vertex weights.static <V,E>
Optional<VertexBiPartition<V,E>>BipartiteGraphs. getExistingPartition(Graph<V,E> g)
Get the existing bipartite partition of the given graph from the vertices weights.static <V,E>
booleanBipartiteGraphs. isBipartite(Graph<V,E> g)
Check whether the given graph is bipartite or not. -
Uses of Graph in com.jgalgo.alg.clique
Methods in com.jgalgo.alg.clique with parameters of type Graph Modifier and Type Method Description <V,E>
Iterator<Set<V>>MaximalCliquesEnumerator. maximalCliquesIter(Graph<V,E> g)
Iterate over all maximal cliques in a graph.<V,E>
Iterator<Set<V>>MaximalCliquesEnumeratorAbstract. maximalCliquesIter(Graph<V,E> g)
<V,E>
Iterator<Set<V>>MaximalIndependentSetsEnumerator. maximalIndependentSetsIter(Graph<V,E> g)
Iterate over all maximal independent sets in a graph.<V,E>
Iterator<Set<V>>MaximalIndependentSetsEnumeratorAbstract. maximalIndependentSetsIter(Graph<V,E> g)
-
Uses of Graph in com.jgalgo.alg.closure
Methods in com.jgalgo.alg.closure with parameters of type Graph Modifier and Type Method Description <V,E>
Iterator<Set<V>>ClosuresEnumerator. closuresIter(Graph<V,E> g)
Iterate over all closures in the given graph.<V,E>
Iterator<Set<V>>ClosuresEnumeratorAbstract. closuresIter(Graph<V,E> g)
static <V,E>
booleanClosuresEnumerator. isClosure(Graph<V,E> g, Collection<V> c)
Check whether the given set of vertices is a closure in the given graph. -
Uses of Graph in com.jgalgo.alg.color
Methods in com.jgalgo.alg.color with parameters of type Graph Modifier and Type Method Description <V,E>
VertexPartition<V,E>ColoringAlgo. computeColoring(Graph<V,E> g)
Assign a color to each vertex of the given graph, while minimizing the number of different colors.<V,E>
VertexPartition<V,E>ColoringAlgoAbstract. computeColoring(Graph<V,E> g)
static <V,E>
booleanColoringAlgo. isColoring(Graph<V,E> g, ToIntFunction<V> mapping)
Check whether a given mapping is a valid coloring of a graph. -
Uses of Graph in com.jgalgo.alg.common
Methods in com.jgalgo.alg.common that return Graph Modifier and Type Method Description default Graph<Integer,E>
VertexPartition. blocksGraph()
Create a new graph representing the edges between the blocks.Graph<Integer,E>
VertexPartition. blocksGraph(boolean parallelEdges, boolean selfEdges)
Create a new graph representing the edges between the blocks.default Graph<V,E>
VertexPartition. blockSubGraph(int block)
Create a new graph that contains only the vertices and edges that are contained in a block.default Graph<V,E>
VertexPartition. blockSubGraph(int block, boolean copyVerticesWeights, boolean copyEdgesWeights)
Create a new graph that contains only the vertices and edges that are contained in a block with option to copy weights.Graph<V,E>
Path. graph()
Get the graph this path is defined on.Graph<V,E>
VertexPartition. graph()
Get the graph that the partition is defined on.Methods in com.jgalgo.alg.common with parameters of type Graph Modifier and Type Method Description static <V,E>
Path<V,E>Path. findPath(Graph<V,E> g, V source, V target)
Find a valid path from \(u\) to \(v\).static <V,E>
VertexBiPartition<V,E>VertexBiPartition. fromMap(Graph<V,E> g, Map<V,Boolean> map)
Create a new vertex bi-partition from a vertex-side map.static <V,E>
VertexPartition<V,E>VertexPartition. fromMap(Graph<V,E> g, Object2IntMap<V> map)
Create a new vertex partition from a vertex-blockIndex map.static <V,E>
VertexBiPartition<V,E>VertexBiPartition. fromMapping(Graph<V,E> g, Predicate<V> mapping)
Create a new vertex bi-partition from a vertex-side mapping function.static <V,E>
VertexPartition<V,E>VertexPartition. fromMapping(Graph<V,E> g, ToIntFunction<V> mapping)
Create a new vertex partition from a vertex-blockIndex mapping function.static <V,E>
VertexBiPartition<V,E>VertexBiPartition. fromWeights(Graph<V,E> g, WeightsBool<V> weights)
Create a new vertex bi-partition from a vertex-side weights container.static <V,E>
booleanVertexBiPartition. isPartition(Graph<V,E> g, Predicate<V> mapping)
Check if a mapping is a valid bi-partition of the vertices of a graph.static <V,E>
booleanVertexPartition. isPartition(Graph<V,E> g, ToIntFunction<V> mapping)
Check if a mapping is a valid partition of the vertices of a graph.static <V,E>
booleanPath. isPath(Graph<V,E> g, V source, V target, List<E> edges)
Check whether the given edge list is a valid path in the given graph.static <V,E>
VertexBiPartition<V,E>VertexBiPartition. partitionFromIndexPartition(Graph<V,E> g, IVertexBiPartition indexPartition)
Create a vertex bi-partition view from a vertex bi-partition of the index graph of the given graph.static <V,E>
VertexPartition<V,E>VertexPartition. partitionFromIndexPartition(Graph<V,E> g, IVertexPartition indexPartition)
Create a vertex partition view from a vertex partition of the index graph of the given graph.static <V,E>
Path<V,E>Path. pathFromIndexPath(Graph<V,E> g, IPath indexPath)
Create a path view from a path in the index graph of the given graph.static <V,E>
Set<V>Path. reachableVertices(Graph<V,E> g, Iterator<V> sources)
Find all the vertices reachable from a given set of source vertices.static <V,E>
Set<V>Path. reachableVertices(Graph<V,E> g, V source)
Find all the vertices reachable from a given source vertex.static <V,E>
Path<V,E>Path. valueOf(Graph<V,E> g, V source, V target, List<E> edges)
Create a new path from an edge list, a source and a target vertices.static <V,E>
Iterator<V>Path. verticesIter(Graph<V,E> g, V source, List<E> edges)
Create an iterator that iterate over the vertices visited by an edge path. -
Uses of Graph in com.jgalgo.alg.connect
Methods in com.jgalgo.alg.connect with parameters of type Graph 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>
VertexPartition<V,E>KEdgeConnectedComponentsAlgo. computeKEdgeConnectedComponents(Graph<V,E> g, int k)
Compute the k-edge connected components of a graph.<V,E>
VertexPartition<V,E>KEdgeConnectedComponentsAlgoAbstract. computeKEdgeConnectedComponents(Graph<V,E> g, int k)
<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>
BiConnectedComponentsAlgo.Result<V,E>BiConnectedComponentsAlgo. findBiConnectedComponents(Graph<V,E> g)
Compute all maximal bi-connected components of a graph.<V,E>
BiConnectedComponentsAlgo.Result<V,E>BiConnectedComponentsAlgoAbstract. findBiConnectedComponents(Graph<V,E> g)
<V,E>
List<Set<V>>KVertexConnectedComponentsAlgo. findKVertexConnectedComponents(Graph<V,E> g, int k)
Find all k-vertex connected components in a graph.<V,E>
List<Set<V>>KVertexConnectedComponentsAlgoAbstract. findKVertexConnectedComponents(Graph<V,E> g, int k)
<V,E>
VertexPartition<V,E>StronglyConnectedComponentsAlgo. findStronglyConnectedComponents(Graph<V,E> g)
Find all strongly connected components in a graph.<V,E>
VertexPartition<V,E>StronglyConnectedComponentsAlgoAbstract. findStronglyConnectedComponents(Graph<V,E> g)
<V,E>
VertexPartition<V,E>WeaklyConnectedComponentsAlgo. findWeaklyConnectedComponents(Graph<V,E> g)
Compute all weakly connected components in a graph.<V,E>
VertexPartition<V,E>WeaklyConnectedComponentsAlgoAbstract. findWeaklyConnectedComponents(Graph<V,E> g)
static <V,E>
booleanMinimumVertexCutGlobal. isCut(Graph<V,E> g, Collection<V> cut)
Check whether the given vertices form a vertex cut in the graph.<V,E>
booleanStronglyConnectedComponentsAlgo. isStronglyConnected(Graph<V,E> g)
Check whether a graph is strongly connected.<V,E>
booleanStronglyConnectedComponentsAlgoAbstract. isStronglyConnected(Graph<V,E> g)
<V,E>
booleanWeaklyConnectedComponentsAlgo. isWeaklyConnected(Graph<V,E> g)
Check whether a graph is weakly connected.<V,E>
booleanWeaklyConnectedComponentsAlgoAbstract. isWeaklyConnected(Graph<V,E> g)
<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 Graph in com.jgalgo.alg.cores
Methods in com.jgalgo.alg.cores with parameters of type Graph Modifier and Type Method Description default <V,E>
CoresAlgo.Result<V,E>CoresAlgo. computeCores(Graph<V,E> g)
Compute the cores of the graph with respect to both in and out degree of the vertices.<V,E>
CoresAlgo.Result<V,E>CoresAlgo. computeCores(Graph<V,E> g, EdgeDirection degreeType)
Compute the cores of the graph with respect the given degree type.<V,E>
CoresAlgo.Result<V,E>CoresAlgoAbstract. computeCores(Graph<V,E> g, EdgeDirection degreeType)
-
Uses of Graph in com.jgalgo.alg.cover
Methods in com.jgalgo.alg.cover with parameters of type Graph 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)
static <V,E>
booleanEdgeCover. isCover(Graph<V,E> g, Collection<E> edges)
Check whether a set of edges is a edge cover of a graph.static <V,E>
booleanVertexCover. isCover(Graph<V,E> g, Collection<V> vertices)
Check whether a set of vertices is a vertex cover of a graph.static <V,E>
booleanDominatingSetAlgo. isDominatingSet(Graph<V,E> g, Collection<V> dominatingSet, EdgeDirection dominanceDirection)
Check whether a given set of vertices is a dominating set of a graph. -
Uses of Graph in com.jgalgo.alg.cycle
Methods in com.jgalgo.alg.cycle with parameters of type Graph 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)
<V,E>
Iterator<Path<V,E>>CyclesEnumerator. cyclesIter(Graph<V,E> g)
Iterate over all cycles in the given graph.<V,E>
Iterator<Path<V,E>>CyclesEnumeratorAbstract. cyclesIter(Graph<V,E> g)
-
Uses of Graph in com.jgalgo.alg.dag
Methods in com.jgalgo.alg.dag with parameters of type Graph Modifier and Type Method Description default <V,E>
TopologicalOrderAlgo.Result<V,E>TopologicalOrderAlgo. computeTopologicalSorting(Graph<V,E> g)
Compute the topological order of the vertices in a DAG graph.<V,E>
Optional<TopologicalOrderAlgo.Result<V,E>>TopologicalOrderAlgo. computeTopologicalSortingIfExist(Graph<V,E> g)
Compute the topological order of the vertices, if the graph is DAG.<V,E>
Optional<TopologicalOrderAlgo.Result<V,E>>TopologicalOrderAlgoAbstract. computeTopologicalSortingIfExist(Graph<V,E> g)
-
Uses of Graph in com.jgalgo.alg.distancemeasures
Methods in com.jgalgo.alg.distancemeasures with parameters of type Graph 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 Graph in com.jgalgo.alg.euler
Methods in com.jgalgo.alg.euler with parameters of type Graph Modifier and Type Method Description default <V,E>
Path<V,E>EulerianTourAlgo. computeEulerianTour(Graph<V,E> g)
Compute an Eulerian tour in the graph that visit all edges exactly once.<V,E>
Optional<Path<V,E>>EulerianTourAlgo. computeEulerianTourIfExist(Graph<V,E> g)
Compute an Eulerian tour in the graph that visit all edges exactly once if one exists.default <V,E>
booleanEulerianTourAlgo. isEulerian(Graph<V,E> g)
Check whether a graph is Eulerian.static <V,E>
booleanEulerianTourAlgo. isEulerianTour(Graph<V,E> g, List<E> tour)
Check if the given tour is an Eulerian tour in the given graph. -
Uses of Graph in com.jgalgo.alg.flow
Methods in com.jgalgo.alg.flow with parameters of type Graph 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)
-
Uses of Graph in com.jgalgo.alg.hamilton
Methods in com.jgalgo.alg.hamilton with parameters of type Graph Modifier and Type Method Description default <V,E>
Optional<Path<V,E>>HamiltonianPathAlgo. hamiltonianCycle(Graph<V,E> g)
Find a Hamiltonian cycle in the given graph.<V,E>
Iterator<Path<V,E>>HamiltonianPathAlgo. hamiltonianCyclesIter(Graph<V,E> g)
Iterate over all Hamiltonian cycles in the given graph.<V,E>
Iterator<Path<V,E>>HamiltonianPathAlgoAbstract. hamiltonianCyclesIter(Graph<V,E> g)
default <V,E>
Optional<Path<V,E>>HamiltonianPathAlgo. hamiltonianPath(Graph<V,E> g)
Find a Hamiltonian path in the given graph.default <V,E>
Optional<Path<V,E>>HamiltonianPathAlgo. hamiltonianPath(Graph<V,E> g, V source, V target)
Find a Hamiltonian path in the given graph that start and end at two given vertices.<V,E>
Iterator<Path<V,E>>HamiltonianPathAlgo. hamiltonianPathsIter(Graph<V,E> g)
Iterate over all Hamiltonian paths in the given graph.<V,E>
Iterator<Path<V,E>>HamiltonianPathAlgo. hamiltonianPathsIter(Graph<V,E> g, V source, V target)
Iterate over all Hamiltonian paths in the given graph that start and end at two given vertices.<V,E>
Iterator<Path<V,E>>HamiltonianPathAlgoAbstract. hamiltonianPathsIter(Graph<V,E> g)
<V,E>
Iterator<Path<V,E>>HamiltonianPathAlgoAbstract. hamiltonianPathsIter(Graph<V,E> g, V source, V target)
static <V,E>
booleanHamiltonianPathAlgo. isHamiltonianPath(Graph<V,E> g, List<E> path)
Check whether the given path is a Hamiltonian path (or cycle) in the given graph. -
Uses of Graph in com.jgalgo.alg.isomorphism
Methods in com.jgalgo.alg.isomorphism that return Graph Modifier and Type Method Description Graph<V1,E1>
IsomorphismMapping. sourceGraph()
Get the source graph.Graph<V2,E2>
IsomorphismMapping. targetGraph()
Get the target graph.Methods in com.jgalgo.alg.isomorphism with parameters of type Graph Modifier and Type Method Description default <V1,E1,V2,E2>
Optional<IsomorphismMapping<V1,E1,V2,E2>>IsomorphismTester. isomorphicMapping(Graph<V1,E1> g1, Graph<V2,E2> g2)
Get an induced sub graph isomorphism mapping between two graphs if one exists.default <V1,E1,V2,E2>
Optional<IsomorphismMapping<V1,E1,V2,E2>>IsomorphismTester. isomorphicMapping(Graph<V1,E1> g1, Graph<V2,E2> g2, boolean induced)
Get a sub graph isomorphism mapping between two graphs if one exists, optionally induced.default <V1,E1,V2,E2>
Iterator<IsomorphismMapping<V1,E1,V2,E2>>IsomorphismTester. isomorphicMappingsIter(Graph<V1,E1> g1, Graph<V2,E2> g2)
Get an iterator over all the induced sub graph isomorphism mappings between two graphs.default <V1,E1,V2,E2>
Iterator<IsomorphismMapping<V1,E1,V2,E2>>IsomorphismTester. isomorphicMappingsIter(Graph<V1,E1> g1, Graph<V2,E2> g2, boolean induced)
Get an iterator over all the sub graph isomorphism mappings between two graphs, optionally induced.<V1,E1,V2,E2>
Iterator<IsomorphismMapping<V1,E1,V2,E2>>IsomorphismTester. isomorphicMappingsIter(Graph<V1,E1> g1, Graph<V2,E2> g2, boolean induced, BiPredicate<? super V1,? super V2> vertexMatcher, BiPredicate<? super E1,? super E2> edgeMatcher)
Get an iterator over all the sub graph isomorphism mappings between two graphs, optionally induced, with vertex and/or edge matchers.<V1,E1,V2,E2>
Iterator<IsomorphismMapping<V1,E1,V2,E2>>IsomorphismTesterAbstract. isomorphicMappingsIter(Graph<V1,E1> g1, Graph<V2,E2> g2, boolean induced, BiPredicate<? super V1,? super V2> vertexMatcher, BiPredicate<? super E1,? super E2> edgeMatcher)
-
Uses of Graph in com.jgalgo.alg.match
Methods in com.jgalgo.alg.match with parameters of type Graph 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)
static <V,E>
booleanMatching. isMatching(Graph<V,E> g, Collection<E> edges)
Check whether the given collection of edges form a valid matching in the graph. -
Uses of Graph in com.jgalgo.alg.shortestpath
Methods in com.jgalgo.alg.shortestpath that return Graph Modifier and Type Method Description Graph<V,E>
ShortestPathSingleSource.Result. graph()
Get the graph on which the shortest paths were computed on.default Graph<V,E>
ShortestPathSingleSource.Result. shortestPathTree()
Get the shortest path tree.default Graph<V,E>
ShortestPathSingleSource.Result. shortestPathTree(boolean directed)
Get the shortest path tree, optionally directed or undirected.Methods in com.jgalgo.alg.shortestpath with parameters of type Graph Modifier and Type Method Description default <V,E>
List<Path<V,E>>SimplePathsEnumerator. allSimplePaths(Graph<V,E> g, V source, V target)
Find all the simple paths between a source and a target vertices in the given graph.<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)
<V,E>
Path<V,E>NegativeCycleException. cycle(Graph<V,E> g)
Get the negative cycle that was found in the graph in type generic safe way.<V,E>
Iterator<Path<V,E>>SimplePathsEnumerator. simplePathsIter(Graph<V,E> g, V source, V target)
Iterate over all the simple paths between a source and a target vertices in the given graph.<V,E>
Iterator<Path<V,E>>SimplePathsEnumeratorAbstract. simplePathsIter(Graph<V,E> g, V source, V target)
Constructors in com.jgalgo.alg.shortestpath with parameters of type Graph Constructor Description NegativeCycleException(Graph<V,E> graph, Path<V,E> cycle)
Create a new instance of the exception. -
Uses of Graph in com.jgalgo.alg.span
Methods in com.jgalgo.alg.span with parameters of type Graph 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)
static <V,E>
booleanMinimumSpanningTree. isSpanningForest(Graph<V,E> g, Collection<E> edges)
Check whether a given set of edges is a spanning forest of a given graph.static <V,E>
booleanMinimumSpanningTree. isSpanningTree(Graph<V,E> g, Collection<E> edges)
Check whether a given set of edges is a spanning tree of a given graph.static <V,E>
booleanSteinerTreeAlgo. isSteinerTree(Graph<V,E> g, Collection<V> terminals, Collection<E> edges)
Check whether a given set of edges is a valid Steiner tree for a given graph and terminals. -
Uses of Graph in com.jgalgo.alg.traversal
Methods in com.jgalgo.alg.traversal that return Graph Modifier and Type Method Description static <V,E>
Graph<V,E>BfsIter. bfsTree(Graph<V,E> g, V source)
Create a tree from all the vertices and edges traversed by a bread first search.static <V,E>
Graph<V,E>BfsIter. bfsTree(Graph<V,E> g, V source, boolean directed)
Create a tree from all the vertices and edges traversed by a bread first search, optionally directed or undirected.static <V,E>
Graph<V,E>DfsIter. dfsTree(Graph<V,E> g, V source)
Create a tree from all the vertices and edges traversed by a depth first search.static <V,E>
Graph<V,E>DfsIter. dfsTree(Graph<V,E> g, V source, boolean directed)
Create a tree from all the vertices and edges traversed by a depth first search, optionally directed or undirected.Methods in com.jgalgo.alg.traversal with parameters of type Graph Modifier and Type Method Description static <V,E>
List<Set<V>>BfsIter. bfsLayers(Graph<V,E> g, V source)
Compute all the layers of the vertices in a graph.static <V,E>
Graph<V,E>BfsIter. bfsTree(Graph<V,E> g, V source)
Create a tree from all the vertices and edges traversed by a bread first search.static <V,E>
Graph<V,E>BfsIter. bfsTree(Graph<V,E> g, V source, boolean directed)
Create a tree from all the vertices and edges traversed by a bread first search, optionally directed or undirected.static <V,E>
Graph<V,E>DfsIter. dfsTree(Graph<V,E> g, V source)
Create a tree from all the vertices and edges traversed by a depth first search.static <V,E>
Graph<V,E>DfsIter. dfsTree(Graph<V,E> g, V source, boolean directed)
Create a tree from all the vertices and edges traversed by a depth first search, optionally directed or undirected.static <V,E>
BfsIter<V,E>BfsIter. newInstance(Graph<V,E> g, V source)
Create a BFS iterator.static <V,E>
DfsIter<V,E>DfsIter. newInstance(Graph<V,E> g, V source)
Create a DFS iterator.static <V,E>
RandomWalkIter<V,E>RandomWalkIter. newInstance(Graph<V,E> g, V source)
Create a new random walk iterator.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 Graph in com.jgalgo.alg.tree
Methods in com.jgalgo.alg.tree with parameters of type Graph 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)
<V,E>
LowestCommonAncestorOffline.Result<V,E>LowestCommonAncestorOffline. findLowestCommonAncestors(Graph<V,E> tree, V root, LowestCommonAncestorOffline.Queries<V,E> queries)
Find the lowest common ancestors of the given queries.<V,E>
LowestCommonAncestorOffline.Result<V,E>LowestCommonAncestorOfflineAbstract. findLowestCommonAncestors(Graph<V,E> tree, V root, LowestCommonAncestorOffline.Queries<V,E> queries)
static <V,E>
booleanTrees. isForest(Graph<V,E> g)
Check if a graph is a forest.static <V,E>
booleanTrees. isTree(Graph<V,E> g)
Check if an undirected graph is a tree.static <V,E>
booleanTrees. isTree(Graph<V,E> g, V root)
Check if a graph is a tree rooted as some vertex.static <V,E>
LowestCommonAncestorOffline.Queries<V,E>LowestCommonAncestorOffline.Queries. newInstance(Graph<V,E> g)
Create an empty queries container.static <V,E>
TreePathMaxima.Queries<V,E>TreePathMaxima.Queries. newInstance(Graph<V,E> g)
Create an empty queries container.<V,E>
LowestCommonAncestorStatic.DataStructure<V,E>LowestCommonAncestorStatic. preProcessTree(Graph<V,E> tree, V root)
Perform a static pre processing of a tree for future LCA (Lowest common ancestor) queries.<V,E>
LowestCommonAncestorStatic.DataStructure<V,E>LowestCommonAncestorStaticAbstract. preProcessTree(Graph<V,E> tree, V root)
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 Graph in com.jgalgo.gen
Methods in com.jgalgo.gen that return Graph Modifier and Type Method Description static <V,E>
Graph<V,E>EmptyGraphGenerator. emptyGraph(Collection<? extends V> vertices)
Generate a new empty undirected graph.default Graph<V,E>
GraphGenerator. generate()
Generates an immutable graph.default Graph<V,E>
GraphGenerator. generateMutable()
Generates a mutable graph.Methods in com.jgalgo.gen with parameters of type Graph Modifier and Type Method Description ComplementGraphGenerator<V,E>
ComplementGraphGenerator. graph(Graph<V,?> graph)
Set the input graph whose complement graph will be generated.LineGraphGenerator<V,E>
LineGraphGenerator. graph(Graph<?,V> graph)
Set the input graph whose line graph this generator should generate.DifferenceGraphGenerator<V,E>
DifferenceGraphGenerator. graphs(Graph<V,E> graph1, Graph<V,E> graph2)
Set the input graphs whose difference graph will be generated.IntersectionGraphGenerator<V,E>
IntersectionGraphGenerator. graphs(Graph<V,E>... graphs)
Set the input graphs whose intersection graph will be generated.SymmetricDifferenceGraphGenerator<V,E>
SymmetricDifferenceGraphGenerator. graphs(Graph<V,E> graph1, Graph<V,E> graph2)
Set the input graphs whose symmetric difference graph will be generated.UnionGraphGenerator<V,E>
UnionGraphGenerator. graphs(Graph<V,E>... graphs)
Set the input graphs whose union graph will be generated (variable arguments version).Method parameters in com.jgalgo.gen with type arguments of type Graph Modifier and Type Method Description IntersectionGraphGenerator<V,E>
IntersectionGraphGenerator. graphs(Collection<? extends Graph<V,E>> graphs)
Set the input graphs whose intersection graph will be generated.UnionGraphGenerator<V,E>
UnionGraphGenerator. graphs(Collection<? extends Graph<V,E>> graphs)
Set the input graphs whose union graph will be generated. -
Uses of Graph in com.jgalgo.graph
Subinterfaces of Graph in com.jgalgo.graph Modifier and Type Interface Description interface
IndexGraph
A graph whose vertices and edges identifiers are indices.interface
IntGraph
A discrete graph withint
vertices and edges.Classes in com.jgalgo.graph that implement Graph Modifier and Type Class Description class
AbstractGraph<V,E>
Abstract implementation ofGraph
.Methods in com.jgalgo.graph that return Graph Modifier and Type Method Description Graph<V,E>
GraphBuilder. build()
Build a new immutable graph with the builder vertices and edges.Graph<V,E>
GraphBuilder. buildMutable()
Build a new mutable graph with the builder vertices and edges.default Graph<V,E>
Graph. copy()
Create a copy of this graph, with the same vertices and edges, without copying weights.default Graph<V,E>
Graph. copy(boolean copyVerticesWeights, boolean copyEdgesWeights)
Create a copy of this graph, with the same vertices and edges, with/without copying weights.default Graph<V,E>
Graph. immutableCopy()
Create an immutable copy of this graph, with the same vertices and edges, without copying weights.default Graph<V,E>
Graph. immutableCopy(boolean copyVerticesWeights, boolean copyEdgesWeights)
Create an immutable copy of this graph, with the same vertices and edges, with/without copying weights.default Graph<V,E>
Graph. immutableView()
Get an immutable view of this graph.default Graph<V,E>
GraphFactory. newCopyOf(Graph<V,E> g)
Create a copy of a given graph, with the same vertices and edges, without copying weights.Graph<V,E>
GraphFactory. newCopyOf(Graph<V,E> g, boolean copyVerticesWeights, boolean copyEdgesWeights)
Create a copy of a given graph, with the same vertices and edges, with/without copying weights.static <V,E>
Graph<V,E>Graph. newDirected()
Create a new directed empty graph.Graph<V,E>
GraphFactory. newGraph()
Create a new empty graph.default Graph<V,E>
GraphFactory. newImmutableCopyOf(Graph<V,E> g)
Create a new immutable copy of a given graph, with the same vertices and edges, without copying weights.Graph<V,E>
GraphFactory. newImmutableCopyOf(Graph<V,E> g, boolean copyVerticesWeights, boolean copyEdgesWeights)
Create a new immutable copy of a given graph, with the same vertices and edges, with/without copying weights.static <V,E>
Graph<V,E>Graph. newUndirected()
Create a new undirected empty graph.default Graph<V,E>
Graph. reverseView()
Get a reversed view of this graph.static <V,E>
Graph<V,E>Graphs. subGraph(Graph<V,E> g, Collection<V> vertices)
Create a new graph that is an induced subgraph of the given graph.static <V,E>
Graph<V,E>Graphs. subGraph(Graph<V,E> g, Collection<V> vertices, Collection<E> edges)
Create a new graph that is a subgraph of the given graph.static <V,E>
Graph<V,E>Graphs. subGraph(Graph<V,E> g, Collection<V> vertices, Collection<E> edges, boolean copyVerticesWeights, boolean copyEdgesWeights)
Create a new graph that is a subgraph of the given graph, with option to copy weights.default Graph<V,E>
Graph. subGraphCopy(Collection<V> vertices, Collection<E> edges)
Create a new graph that is a subgraph of this graph.default Graph<V,E>
Graph. undirectedView()
Get an undirected view of this (directed) graph.Methods in com.jgalgo.graph with parameters of type Graph Modifier and Type Method Description static <V,E>
EdgeSet<V,E>EdgeSet. allOf(Graph<V,E> g)
Create an edge set object of all the edges in a graph.static <V,E>
booleanGraphs. containsParallelEdges(Graph<V,E> g)
Check whether a graph contain parallel edges.static <E,T,WeightsT extends Weights<E,T>>
WeightsTWeights. createExternalEdgesWeights(Graph<?,E> g, Class<? super T> type)
Create an external edge weights container.static <E,T,WeightsT extends Weights<E,T>>
WeightsTWeights. createExternalEdgesWeights(Graph<?,E> g, Class<? super T> type, T defVal)
Create an external edge weights container with default values.static <V,T,WeightsT extends Weights<V,T>>
WeightsTWeights. createExternalVerticesWeights(Graph<V,?> g, Class<? super T> type)
Create an external vertex weights container.static <V,T,WeightsT extends Weights<V,T>>
WeightsTWeights. createExternalVerticesWeights(Graph<V,?> g, Class<? super T> type, T defVal)
Create an external vertex weights container with default values.static <V,E>
EdgeIter<V,E>IndexIdMaps. indexToIdEdgeIter(Graph<V,E> g, IEdgeIter indexIter)
static <V,E>
EdgeSet<V,E>IndexIdMaps. indexToIdEdgeSet(IEdgeSet indexSet, Graph<V,E> g)
Create an edge set of IDs from an edge set of indices.default GraphBuilder<V,E>
GraphFactory. newBuilderCopyOf(Graph<V,E> g)
Create a new graph builder with the factory parameters initialized with an existing graph vertices and edges, without copying the weights.GraphBuilder<V,E>
GraphFactory. newBuilderCopyOf(Graph<V,E> g, boolean copyVerticesWeights, boolean copyEdgesWeights)
Create a new graph builder with the factory parameters initialized with an existing graph vertices and edges, with/without copying the weights.default IndexGraphBuilder
IndexGraphFactory. newBuilderCopyOf(Graph<Integer,Integer> g)
Create a new graph builder with the factory parameters initialized with an existing graph vertices and edges, without copying the weights.IndexGraphBuilder
IndexGraphFactory. newBuilderCopyOf(Graph<Integer,Integer> g, boolean copyVerticesWeights, boolean copyEdgesWeights)
Create a new graph builder with the factory parameters initialized with an existing graph vertices and edges, with/without copying the weights.default IntGraphBuilder
IntGraphFactory. newBuilderCopyOf(Graph<Integer,Integer> g)
IntGraphBuilder
IntGraphFactory. newBuilderCopyOf(Graph<Integer,Integer> g, boolean copyVerticesWeights, boolean copyEdgesWeights)
static <V,E>
GraphBuilder<V,E>GraphBuilder. newCopyOf(Graph<V,E> g)
Create a new builder initialized with an existing graph vertices and edges, without copying the weights.static <V,E>
GraphBuilder<V,E>GraphBuilder. newCopyOf(Graph<V,E> g, boolean copyVerticesWeights, boolean copyEdgesWeights)
Create a new builder initialized with an existing graph vertices and edges, with/without copying the weights.default Graph<V,E>
GraphFactory. newCopyOf(Graph<V,E> g)
Create a copy of a given graph, with the same vertices and edges, without copying weights.Graph<V,E>
GraphFactory. newCopyOf(Graph<V,E> g, boolean copyVerticesWeights, boolean copyEdgesWeights)
Create a copy of a given graph, with the same vertices and edges, with/without copying weights.default IndexGraph
IndexGraphFactory. newCopyOf(Graph<Integer,Integer> g)
IndexGraph
IndexGraphFactory. newCopyOf(Graph<Integer,Integer> g, boolean copyVerticesWeights, boolean copyEdgesWeights)
static IntGraphBuilder
IntGraphBuilder. newCopyOf(Graph<Integer,Integer> g)
Create a new builder initialized with an existing graph vertices and edges, without copying the weights.static IntGraphBuilder
IntGraphBuilder. newCopyOf(Graph<Integer,Integer> g, boolean copyVerticesWeights, boolean copyEdgesWeights)
Create a new builder initialized with an existing graph vertices and edges, with/without copying the weights.default IntGraph
IntGraphFactory. newCopyOf(Graph<Integer,Integer> g)
IntGraph
IntGraphFactory. newCopyOf(Graph<Integer,Integer> g, boolean copyVerticesWeights, boolean copyEdgesWeights)
default Graph<V,E>
GraphFactory. newImmutableCopyOf(Graph<V,E> g)
Create a new immutable copy of a given graph, with the same vertices and edges, without copying weights.Graph<V,E>
GraphFactory. newImmutableCopyOf(Graph<V,E> g, boolean copyVerticesWeights, boolean copyEdgesWeights)
Create a new immutable copy of a given graph, with the same vertices and edges, with/without copying weights.default IndexGraph
IndexGraphFactory. newImmutableCopyOf(Graph<Integer,Integer> g)
IndexGraph
IndexGraphFactory. newImmutableCopyOf(Graph<Integer,Integer> g, boolean copyVerticesWeights, boolean copyEdgesWeights)
default IntGraph
IntGraphFactory. newImmutableCopyOf(Graph<Integer,Integer> g)
IntGraph
IntGraphFactory. newImmutableCopyOf(Graph<Integer,Integer> g, boolean copyVerticesWeights, boolean copyEdgesWeights)
static <V,E>
EdgeSet<V,E>EdgeSet. of(Set<E> edges, Graph<V,E> g)
Create an edge set object from a plain set of edges.static <E> E
Graphs. randEdge(Graph<?,E> g, Random rand)
Get a random edge from the given graph.static <V> V
Graphs. randVertex(Graph<V,?> g, Random rand)
Get a random vertex from the given graph.static <V,E>
Set<E>Graphs. selfEdges(Graph<V,E> g)
Get a view of all the self edges in a graph.static <V,E>
Graph<V,E>Graphs. subGraph(Graph<V,E> g, Collection<V> vertices)
Create a new graph that is an induced subgraph of the given graph.static <V,E>
Graph<V,E>Graphs. subGraph(Graph<V,E> g, Collection<V> vertices, Collection<E> edges)
Create a new graph that is a subgraph of the given graph.static <V,E>
Graph<V,E>Graphs. subGraph(Graph<V,E> g, Collection<V> vertices, Collection<E> edges, boolean copyVerticesWeights, boolean copyEdgesWeights)
Create a new graph that is a subgraph of the given graph, with option to copy weights. -
Uses of Graph in com.jgalgo.io
Methods in com.jgalgo.io that return Graph Modifier and Type Method Description default Graph<V,E>
GraphReader. readGraph(File file)
Read a graph from a file.default Graph<V,E>
GraphReader. readGraph(Reader reader)
Read a graph from an I/O reader.default Graph<V,E>
GraphReader. readGraph(String path)
Read a graph from a file, given a path to it.Methods in com.jgalgo.io with parameters of type Graph Modifier and Type Method Description default void
GraphWriter. writeGraph(Graph<V,E> graph, File file)
Write a graph to a file.void
GraphWriter. writeGraph(Graph<V,E> graph, Writer writer)
Write a graph to an I/O writer.default void
GraphWriter. writeGraph(Graph<V,E> graph, String path)
Write a graph to a file, given its path.void
DimacsGraphWriter. writeGraphImpl(Graph<Integer,Integer> graph, Writer writer)
void
GmlGraphWriter. writeGraphImpl(Graph<V,E> graph, Writer writer)
void
LedaGraphWriter. writeGraphImpl(Graph<Integer,Integer> graph, Writer writer)
-