Uses of Interface
org.jgrapht.GraphPath
-
Packages that use GraphPath Package Description org.jgrapht.alg.cycle Algorithms related to graph cycles.org.jgrapht.alg.interfaces Algorithm related interfaces.org.jgrapht.alg.shortestpath Shortest-path related algorithms.org.jgrapht.alg.tour Graph tours related algorithms.org.jgrapht.graph Implementations of various graphs. -
-
Uses of GraphPath in org.jgrapht.alg.cycle
Fields in org.jgrapht.alg.cycle declared as GraphPath Modifier and Type Field Description private GraphPath<V,E>
BergeGraphInspector. certificate
private GraphPath<V,E>
WeakChordalityInspector. certificate
Contains a hole or an anti-hole of the graph, if it isn't weakly chordalprivate GraphPath<V,E>
ChordalityInspector. hole
A hole contained in the inspectedgraph
.Methods in org.jgrapht.alg.cycle that return GraphPath Modifier and Type Method Description private GraphPath<V,E>
HowardMinimumMeanCycle. buildPath(V bestCycleVertex, int bestCycleLength, double bestCycleWeight)
Constructs cycle with minimum mean using information inpolicyGraph
.private GraphPath<V,E>
WeakChordalityInspector. findHole(Graph<V,E> graph, V sourceInSeparator, V source, V target, V targetInSeparator)
Finds a hole in the specifiedgraph
.GraphPath<V,E>
BergeGraphInspector. getCertificate()
Returns the certificate in the form of a hole or anti-hole in the inspected graph, when theBergeGraphInspector.isBerge(org.jgrapht.Graph<V, E>, boolean)
method is previously called withcomputeCertificate=true
.GraphPath<V,E>
WeakChordalityInspector. getCertificate()
Computes and returns the certificate in the form of a hole or anti-hole in the inspectedgraph
.GraphPath<V,E>
ChinesePostman. getCPPSolution(Graph<V,E> graph)
Solves the Chinese Postman Problem on the given graph.GraphPath<V,E>
HowardMinimumMeanCycle. getCycle()
Computes cycle with minimum mean.GraphPath<V,E>
HierholzerEulerianCycle. getEulerianCycle(Graph<V,E> g)
Compute an Eulerian cycle of a graph.GraphPath<V,E>
ChordalityInspector. getHole()
A graph which is not chordal, must contain a hole (chordless cycle on 4 or more vertices).private GraphPath<V,E>
BergeGraphInspector. getPathAvoidingX(Graph<V,E> g, V start, V end, java.util.Set<V> x)
Returns a path in g from start to end avoiding the vertices in Xprivate GraphPath<V,E>
BergeGraphInspector. p(Graph<V,E> g, GraphPath<V,E> pathS, GraphPath<V,E> pathT, V m, V b1, V b2, V b3, V s1, V s2, V s3)
Assembles a GraphPath of the Paths S and T.private GraphPath<V,E>
ChinesePostman. replaceShortcutEdges(Graph<V,E> inputGraph, GraphPath<V,E> pathWithShortcuts, java.util.Map<E,GraphPath<V,E>> shortcutEdges)
static <V,E>
GraphPath<V,E>Cycles. simpleCycleToGraphPath(Graph<V,E> graph, java.util.List<E> cycle)
Transform a simple cycle from an edge set representation to a graph path.private GraphPath<V,E>
ChinesePostman. solveCPPDirected(Graph<V,E> graph)
Solves the CPP for directed graphsprivate GraphPath<V,E>
ChinesePostman. solveCPPUndirected(Graph<V,E> graph)
Solves the CPP for undirected graphsMethods in org.jgrapht.alg.cycle with parameters of type GraphPath Modifier and Type Method Description private java.util.List<V>
BergeGraphInspector. intersectGraphPaths(GraphPath<V,E> p1, GraphPath<V,E> p2)
Lists the vertices which are covered by two pathsprivate GraphPath<V,E>
BergeGraphInspector. p(Graph<V,E> g, GraphPath<V,E> pathS, GraphPath<V,E> pathT, V m, V b1, V b2, V b3, V s1, V s2, V s3)
Assembles a GraphPath of the Paths S and T.private GraphPath<V,E>
ChinesePostman. replaceShortcutEdges(Graph<V,E> inputGraph, GraphPath<V,E> pathWithShortcuts, java.util.Map<E,GraphPath<V,E>> shortcutEdges)
Method parameters in org.jgrapht.alg.cycle with type arguments of type GraphPath Modifier and Type Method Description private GraphPath<V,E>
ChinesePostman. replaceShortcutEdges(Graph<V,E> inputGraph, GraphPath<V,E> pathWithShortcuts, java.util.Map<E,GraphPath<V,E>> shortcutEdges)
-
Uses of GraphPath in org.jgrapht.alg.interfaces
Fields in org.jgrapht.alg.interfaces with type parameters of type GraphPath Modifier and Type Field Description private java.util.Set<GraphPath<V,E>>
CycleBasisAlgorithm.CycleBasisImpl. graphPaths
private java.util.Set<GraphPath<V,E>>
TreeToPathDecompositionAlgorithm.PathDecompositionImpl. paths
Methods in org.jgrapht.alg.interfaces that return GraphPath Modifier and Type Method Description GraphPath<V,E>
MinimumCycleMeanAlgorithm. getCycle()
Computes cycle with minimum mean.GraphPath<V,E>
EulerianCycleAlgorithm. getEulerianCycle(Graph<V,E> graph)
Compute an Eulerian cycle of a graph.GraphPath<V,E>
ManyToManyShortestPathsAlgorithm.ManyToManyShortestPaths. getPath(V source, V target)
Return the path from thesource
vertex to thetarget
vertex.GraphPath<V,E>
ShortestPathAlgorithm. getPath(V source, V sink)
Get a shortest path from a source vertex to a sink vertex.GraphPath<V,E>
ShortestPathAlgorithm.SingleSourcePaths. getPath(V sink)
Return the path from the source vertex to the sink vertex.GraphPath<V,E>
HamiltonianCycleAlgorithm. getTour(Graph<V,E> graph)
Computes a tour.GraphPath<V,E>
HamiltonianCycleImprovementAlgorithm. improveTour(GraphPath<V,E> tour)
Improves a tour.Methods in org.jgrapht.alg.interfaces that return types with arguments of type GraphPath Modifier and Type Method Description java.util.Set<GraphPath<V,E>>
CycleBasisAlgorithm.CycleBasis. getCyclesAsGraphPaths()
Return the set of cycles of the cycle basis.java.util.Set<GraphPath<V,E>>
CycleBasisAlgorithm.CycleBasisImpl. getCyclesAsGraphPaths()
Return the set of cycles of the cycle basis.java.util.List<GraphPath<V,E>>
KShortestPathAlgorithm. getPaths(V source, V sink, int k)
Get a list of k-shortest paths from a source vertex to a sink vertex.java.util.List<GraphPath<V,E>>
MultiObjectiveShortestPathAlgorithm. getPaths(V source, V sink)
Get a shortest path from a source vertex to a sink vertex.java.util.List<GraphPath<V,E>>
MultiObjectiveShortestPathAlgorithm.MultiObjectiveSingleSourcePaths. getPaths(V sink)
Return the path from the source vertex to the sink vertex.java.util.Set<GraphPath<V,E>>
TreeToPathDecompositionAlgorithm.PathDecomposition. getPaths()
Set of disjoint paths of the decompositionjava.util.Set<GraphPath<V,E>>
TreeToPathDecompositionAlgorithm.PathDecompositionImpl. getPaths()
Methods in org.jgrapht.alg.interfaces with parameters of type GraphPath Modifier and Type Method Description GraphPath<V,E>
HamiltonianCycleImprovementAlgorithm. improveTour(GraphPath<V,E> tour)
Improves a tour. -
Uses of GraphPath in org.jgrapht.alg.shortestpath
Classes in org.jgrapht.alg.shortestpath that implement GraphPath Modifier and Type Class Description private class
EppsteinShortestPathIterator.EppsteinGraphPath
Represents a path that is generated during the computations.Fields in org.jgrapht.alg.shortestpath declared as GraphPath Modifier and Type Field Description private GraphPath<?,?>
NegativeCycleDetectedException. cycle
private GraphPath<V,E>
TransitNodeRoutingPrecomputation.AccessVertex. path
Path between a vertex $v$ this access vertex is computed for andvertex
.Fields in org.jgrapht.alg.shortestpath with type parameters of type GraphPath Modifier and Type Field Description private org.jheaps.AddressableHeap<java.lang.Double,Pair<GraphPath<V,E>,java.lang.Boolean>>
YenShortestPathIterator. candidatePaths
Heap of the candidate path generated so far and sorted my their weights.private java.util.Map<GraphPath<V,E>,V>
YenShortestPathIterator. firstDeviations
For each path $P$, stores its deviation point.private java.util.Map<GraphPath<V,E>,V>
YenShortestPathIterator. lastDeviations
For each path $P$ stores the vertex $u$ such that $pathValidator#isValidPath([start_vertex, u], (u,v)) = false$, where $[start_vertex, u]$ denotes the subpath of $P$ from its start to vertex $u$ and $v$ is the next vertex in $P$ after $u$.protected java.util.Map<V,java.util.List<GraphPath<V,E>>>
ListMultiObjectiveSingleSourcePathsImpl. paths
One path per vertexprotected java.util.Map<V,GraphPath<V,E>>
ListSingleSourcePathsImpl. paths
One path per vertexprivate java.util.Map<V,java.util.Map<V,GraphPath<V,E>>>
DefaultManyToManyShortestPaths.DefaultManyToManyShortestPathsImpl. pathsMap
Map with paths between sources and targets.private java.util.Map<V,java.util.Map<V,GraphPath<V,E>>>
TransitNodeRoutingPrecomputation.PathsUnpackingTask. pathsMap
Map where the unpacked paths will be stored.private java.util.List<GraphPath<V,E>>
YenShortestPathIterator. resultList
List of the paths returned so far via theYenShortestPathIterator.next()
method.Methods in org.jgrapht.alg.shortestpath that return GraphPath Modifier and Type Method Description private GraphPath<V,E>
AStarShortestPath. buildGraphPath(V startVertex, V targetVertex, double pathLength)
Builds the graph pathprotected abstract GraphPath<V,E>
BaseKDisjointShortestPathsAlgorithm. calculateShortestPath(V startVertex, V endVertex)
Calculates the shortest paths for the current iteration.protected GraphPath<V,E>
BhandariKDisjointShortestPaths. calculateShortestPath(V startVertex, V endVertex)
protected GraphPath<V,E>
SuurballeKDisjointShortestPaths. calculateShortestPath(V startVertex, V endVertex)
private GraphPath<V,E>
BellmanFordShortestPath. computeNegativeCycle(E edge, java.util.Map<V,E> pred)
Computes a negative weight cycle assuming that the algorithm has already determined that it exists.protected GraphPath<V,E>
BaseMultiObjectiveShortestPathAlgorithm. createEmptyPath(V source, V sink)
Create an empty path.protected GraphPath<V,E>
BaseShortestPathAlgorithm. createEmptyPath(V source, V sink)
Create an empty path.private GraphPath<V,E>
BaseKDisjointShortestPathsAlgorithm. createGraphPath(java.util.List<E> edgeList, V startVertex, V endVertex)
protected GraphPath<V,E>
BaseBidirectionalShortestPathAlgorithm. createPath(BaseBidirectionalShortestPathAlgorithm.BaseSearchFrontier<V,E> forwardFrontier, BaseBidirectionalShortestPathAlgorithm.BaseSearchFrontier<V,E> backwardFrontier, double weight, V source, V commonVertex, V sink)
Builds shortest path betweensource
andsink
based on the information provided by search frontiers and common vertex.private GraphPath<V,E>
ContractionHierarchyBidirectionalDijkstra. createPath(ContractionHierarchyBidirectionalDijkstra.ContractionSearchFrontier<ContractionHierarchyPrecomputation.ContractionVertex<V>,ContractionHierarchyPrecomputation.ContractionEdge<E>> forwardFrontier, ContractionHierarchyBidirectionalDijkstra.ContractionSearchFrontier<ContractionHierarchyPrecomputation.ContractionVertex<V>,ContractionHierarchyPrecomputation.ContractionEdge<E>> backwardFrontier, double weight, ContractionHierarchyPrecomputation.ContractionVertex<V> source, ContractionHierarchyPrecomputation.ContractionVertex<V> commonVertex, ContractionHierarchyPrecomputation.ContractionVertex<V> sink)
Builds shortest unpacked path betweensource
andsink
based on the information provided by search frontiers and common vertex.static <V,E>
GraphPath<V,E>BellmanFordShortestPath. findPathBetween(Graph<V,E> graph, V source, V sink)
Find a path between two vertices.static <V,E>
GraphPath<V,E>BFSShortestPath. findPathBetween(Graph<V,E> graph, V source, V sink)
Find a path between two vertices.static <V,E>
GraphPath<V,E>BidirectionalDijkstraShortestPath. findPathBetween(Graph<V,E> graph, V source, V sink)
Find a path between two vertices.static <V,E>
GraphPath<V,E>DijkstraShortestPath. findPathBetween(Graph<V,E> graph, V source, V sink)
Find a path between two vertices.static <E> GraphPath<java.lang.Integer,E>
IntVertexDijkstraShortestPath. findPathBetween(Graph<java.lang.Integer,E> graph, java.lang.Integer source, java.lang.Integer sink)
Find a path between two vertices.private GraphPath<V,E>
YenShortestPathIterator. getCandidatePath(GraphPath<V,E> path, int recoverVertexIndex, GraphPath<V,E> spurPath)
Builds a candidate path based on the information provided in the methods parameters.GraphPath<?,?>
NegativeCycleDetectedException. getCycle()
Get the actual negative cycle, or null if not provided.GraphPath<V,E>
AStarShortestPath. getPath(V sourceVertex, V targetVertex)
Calculates (and returns) the shortest path from the sourceVertex to the targetVertex.GraphPath<V,E>
BaseManyToManyShortestPaths. getPath(V source, V sink)
Get a shortest path from a source vertex to a sink vertex.GraphPath<V,E>
BellmanFordShortestPath. getPath(V source, V sink)
Get a shortest path from a source vertex to a sink vertex.GraphPath<V,E>
BFSShortestPath. getPath(V source, V sink)
Get a shortest path from a source vertex to a sink vertex.GraphPath<V,E>
BidirectionalAStarShortestPath. getPath(V source, V sink)
Get a shortest path from a source vertex to a sink vertex.GraphPath<V,E>
BidirectionalDijkstraShortestPath. getPath(V source, V sink)
GraphPath<V,E>
CHManyToManyShortestPaths.CHManyToManyShortestPathsImpl. getPath(V source, V target)
Return the path from thesource
vertex to thetarget
vertex.GraphPath<V,E>
ContractionHierarchyBidirectionalDijkstra. getPath(V source, V sink)
Get a shortest path from a source vertex to a sink vertex.GraphPath<V,E>
DefaultManyToManyShortestPaths.DefaultManyToManyShortestPathsImpl. getPath(V source, V target)
Return the path from thesource
vertex to thetarget
vertex.GraphPath<V,E>
DeltaSteppingShortestPath. getPath(V source, V sink)
Get a shortest path from a source vertex to a sink vertex.GraphPath<V,E>
DijkstraManyToManyShortestPaths.DijkstraManyToManyShortestPathsImpl. getPath(V source, V target)
Return the path from thesource
vertex to thetarget
vertex.GraphPath<V,E>
DijkstraShortestPath. getPath(V source, V sink)
Get a shortest path from a source vertex to a sink vertex.GraphPath<V,E>
FloydWarshallShortestPaths.FloydWarshallSingleSourcePaths. getPath(V sink)
GraphPath<V,E>
FloydWarshallShortestPaths. getPath(V a, V b)
Get a shortest path from a source vertex to a sink vertex.GraphPath<java.lang.Integer,E>
IntVertexDijkstraShortestPath.Algorithm. getPath(java.lang.Integer source, java.lang.Integer target)
GraphPath<java.lang.Integer,E>
IntVertexDijkstraShortestPath.ArrayBasedSingleSourcePathsImpl. getPath(java.lang.Integer targetVertex)
GraphPath<java.lang.Integer,E>
IntVertexDijkstraShortestPath. getPath(java.lang.Integer source, java.lang.Integer sink)
GraphPath<V,E>
JohnsonShortestPaths. getPath(V source, V sink)
Get a shortest path from a source vertex to a sink vertex.GraphPath<V,E>
JohnsonShortestPaths.JohnsonSingleSourcePaths. getPath(V sink)
GraphPath<V,E>
ListSingleSourcePathsImpl. getPath(V targetVertex)
Return the path from the source vertex to the sink vertex.GraphPath<V,E>
TransitNodeRoutingPrecomputation.AccessVertex. getPath()
Returns path between a vertex in the graph andvertex
.GraphPath<V,E>
TransitNodeRoutingShortestPath. getPath(V source, V sink)
Get a shortest path from a source vertex to a sink vertex.GraphPath<V,E>
TreeSingleSourcePathsImpl. getPath(V targetVertex)
Return the path from the source vertex to the sink vertex.private GraphPath<V,E>
AllDirectedPaths. makePath(java.util.List<E> edges)
Transform an ordered list of edges into a GraphPath.private GraphPath<V,E>
TransitNodeRoutingShortestPath. mergePaths(GraphPath<V,E> first, GraphPath<V,E> second, GraphPath<V,E> third)
Computes a path which consists offirst
,second
andthird
paths.GraphPath<V,E>
EppsteinShortestPathIterator. next()
GraphPath<V,E>
YenShortestPathIterator. next()
Methods in org.jgrapht.alg.shortestpath that return types with arguments of type GraphPath Modifier and Type Method Description private java.util.List<GraphPath<V,E>>
BaseKDisjointShortestPathsAlgorithm. buildPaths(V startVertex, V endVertex)
After removing overlapping edges, each path is not necessarily connecting start to end vertex.private java.util.Map<V,java.util.List<GraphPath<V,E>>>
MartinShortestPath. buildPaths(V source)
Build the actual paths from the final labels of each node.private java.util.List<GraphPath<V,E>>
AllDirectedPaths. generatePaths(java.util.Set<V> sourceVertices, java.util.Set<V> targetVertices, boolean simplePathsOnly, java.lang.Integer maxPathLength, java.util.Map<E,java.lang.Integer> edgeMinDistancesFromTargets)
Generate all paths from the sources to the targets, using pre-computed minimum distances.java.util.List<GraphPath<V,E>>
AllDirectedPaths. getAllPaths(java.util.Set<V> sourceVertices, java.util.Set<V> targetVertices, boolean simplePathsOnly, java.lang.Integer maxPathLength)
Calculate (and return) all paths from the source vertices to the target vertices.java.util.List<GraphPath<V,E>>
AllDirectedPaths. getAllPaths(V sourceVertex, V targetVertex, boolean simplePathsOnly, java.lang.Integer maxPathLength)
Calculate (and return) all paths from the source vertex to the target vertex.java.util.List<GraphPath<V,E>>
BaseKDisjointShortestPathsAlgorithm. getPaths(V startVertex, V endVertex, int k)
Returns the $k$ shortest simple paths in increasing order of weight.java.util.List<GraphPath<V,E>>
EppsteinKShortestPath. getPaths(V source, V sink, int k)
Computesk
shortest paths betweensource
andsink
.java.util.List<GraphPath<V,E>>
ListMultiObjectiveSingleSourcePathsImpl. getPaths(V targetVertex)
java.util.List<GraphPath<V,E>>
MartinShortestPath. getPaths(V source, V sink)
java.util.List<GraphPath<V,E>>
YenKShortestPath. getPaths(V source, V sink, int k)
Computesk
shortest loopless paths betweensource
andsink
.private java.util.List<GraphPath<V,E>>
BaseKDisjointShortestPathsAlgorithm. resolvePaths(V startVertex, V endVertex)
At the end of the search we have list of intermediate paths - not necessarily disjoint and may contain reversed edges.Methods in org.jgrapht.alg.shortestpath with parameters of type GraphPath Modifier and Type Method Description private int
YenShortestPathIterator. addDeviations(GraphPath<V,E> path)
Builds unique loopless deviations from the given path in thegraph
.private GraphPath<V,E>
YenShortestPathIterator. getCandidatePath(GraphPath<V,E> path, int recoverVertexIndex, GraphPath<V,E> spurPath)
Builds a candidate path based on the information provided in the methods parameters.private V
YenShortestPathIterator. getLastValidDeviation(GraphPath<V,E> path, V firstDeviation)
Computes vertex $u$ such that $pathValidator#isValidPath([start_vertex, u], (u,v)) = false$, where $[start_vertex, u]$ denotes the subpath of $P$ from its start to vertex $u$ and $v$ is the next vertex in $P$ after $u$.private Pair<java.util.Set<V>,java.util.Set<E>>
YenShortestPathIterator. getMaskedVerticesAndEdges(GraphPath<V,E> path, V pathDeviation, int pathDeviationIndex)
For the givenpath
builds sets of vertices and edges to be masked.boolean
PathValidator. isValidPath(GraphPath<V,E> partialPath, E edge)
Checks if an edge can be added to a previous path element.private GraphPath<V,E>
TransitNodeRoutingShortestPath. mergePaths(GraphPath<V,E> first, GraphPath<V,E> second, GraphPath<V,E> third)
Computes a path which consists offirst
,second
andthird
paths.void
NegativeCycleDetectedException. setCycle(GraphPath<?,?> cycle)
Set the negative cycle.Constructors in org.jgrapht.alg.shortestpath with parameters of type GraphPath Constructor Description AccessVertex(V vertex, GraphPath<V,E> path)
Constructs a new instance for the givenvertex
andpath
.NegativeCycleDetectedException(java.lang.String message, GraphPath<?,?> cycle)
Constructs a new exception with the specified detail message.Constructor parameters in org.jgrapht.alg.shortestpath with type arguments of type GraphPath Constructor Description DefaultManyToManyShortestPathsImpl(java.util.Set<V> sources, java.util.Set<V> targets, java.util.Map<V,java.util.Map<V,GraphPath<V,E>>> pathsMap)
Constructs an instance of the algorithm for the givensources
,targets
andpathsMap
.ListMultiObjectiveSingleSourcePathsImpl(Graph<V,E> graph, V source, java.util.Map<V,java.util.List<GraphPath<V,E>>> paths)
Construct a new instance.ListSingleSourcePathsImpl(Graph<V,E> graph, V source, java.util.Map<V,GraphPath<V,E>> paths)
Construct a new instance.PathsUnpackingTask(int taskId, java.util.List<V> transitVertices, java.util.Map<V,java.util.Map<V,GraphPath<V,E>>> pathsMap, ManyToManyShortestPathsAlgorithm.ManyToManyShortestPaths<V,E> shortestPaths)
Constructs a new instance for the giventaskId
,transitVertices
,pathsMap
andshortestPaths
.YenShortestPathIterator(Graph<V,E> graph, V source, V sink, java.util.function.Supplier<org.jheaps.AddressableHeap<java.lang.Double,Pair<GraphPath<V,E>,java.lang.Boolean>>> heapSupplier)
Constructs an instance of the algorithm for givengraph
,source
,sink
andheapSupplier
.YenShortestPathIterator(Graph<V,E> graph, V source, V sink, java.util.function.Supplier<org.jheaps.AddressableHeap<java.lang.Double,Pair<GraphPath<V,E>,java.lang.Boolean>>> heapSupplier, PathValidator<V,E> pathValidator)
Constructs an instance of the algorithm for givengraph
,source
,sink
,heapSupplier
andpathValidator
. -
Uses of GraphPath in org.jgrapht.alg.tour
Fields in org.jgrapht.alg.tour declared as GraphPath Modifier and Type Field Description private GraphPath<V,E>
NearestInsertionHeuristicTSP. subtour
Methods in org.jgrapht.alg.tour that return GraphPath Modifier and Type Method Description protected GraphPath<V,E>
HamiltonianCycleAlgorithmBase. closedVertexListToTour(java.util.List<V> tour, Graph<V,E> graph)
Transform from a closed List representation (first and last vertex element are the same) to a graph path.protected GraphPath<V,E>
HamiltonianCycleAlgorithmBase. edgeSetToTour(java.util.Set<E> tour, Graph<V,E> graph)
Transform from a Set representation to a graph path.protected GraphPath<V,E>
HamiltonianCycleAlgorithmBase. getSingletonTour(Graph<V,E> graph)
Creates a tour for a graph with 1 vertexGraphPath<V,E>
ChristofidesThreeHalvesApproxMetricTSP. getTour(Graph<V,E> graph)
Computes a $3/2$-approximate tour.GraphPath<V,E>
GreedyHeuristicTSP. getTour(Graph<V,E> graph)
Computes a tour using the greedy heuristic.GraphPath<V,E>
HeldKarpTSP. getTour(Graph<V,E> graph)
Computes a minimum-cost Hamiltonian tour.GraphPath<V,E>
NearestInsertionHeuristicTSP. getTour(Graph<V,E> graph)
Computes a tour using the nearest insertion heuristic.GraphPath<V,E>
NearestNeighborHeuristicTSP. getTour(Graph<V,E> graph)
Computes a tour using the nearest neighbour heuristic.GraphPath<V,E>
PalmerHamiltonianCycle. getTour(Graph<V,E> graph)
Computes a Hamiltonian tour.GraphPath<V,E>
RandomTourTSP. getTour(Graph<V,E> graph)
Computes a tour using the greedy heuristic.GraphPath<V,E>
TwoApproxMetricTSP. getTour(Graph<V,E> graph)
Computes a 2-approximate tour.GraphPath<V,E>
TwoOptHeuristicTSP. getTour(Graph<V,E> graph)
Computes a 2-approximate tour.GraphPath<V,E>
TwoOptHeuristicTSP. improveTour(GraphPath<V,E> tour)
Try to improve a tour by running the 2-opt heuristic.private GraphPath<V,E>
TwoOptHeuristicTSP. tourToPath(int[] tour)
Transform from an array representation to a graph path.protected GraphPath<V,E>
HamiltonianCycleAlgorithmBase. vertexListToTour(java.util.List<V> tour, Graph<V,E> graph)
Transform from a List representation to a graph path.Methods in org.jgrapht.alg.tour with parameters of type GraphPath Modifier and Type Method Description GraphPath<V,E>
TwoOptHeuristicTSP. improveTour(GraphPath<V,E> tour)
Try to improve a tour by running the 2-opt heuristic.private int[]
TwoOptHeuristicTSP. pathToTour(GraphPath<V,E> path)
Transform from a path representation to an array representation.Constructors in org.jgrapht.alg.tour with parameters of type GraphPath Constructor Description NearestInsertionHeuristicTSP(GraphPath<V,E> subtour)
Constructor Specifies an existing sub-tour that will be augmented to form a complete tour whenNearestInsertionHeuristicTSP.getTour(org.jgrapht.Graph)
is called -
Uses of GraphPath in org.jgrapht.graph
Classes in org.jgrapht.graph that implement GraphPath Modifier and Type Class Description class
GraphWalk<V,E>
A walk in a graph is an alternating sequence of vertices and edges, starting and ending at a vertex, in which each edge is adjacent in the sequence to its two endpoints.
-