Package org.graph4j
Class GraphAlgorithm
java.lang.Object
org.graph4j.GraphAlgorithm
- Direct Known Subclasses:
AStarAlgorithm,BacktrackLongestPathAlgoritm,BellmanFordShortestPath,BFSAllPairsShortestPath,BFSSinglePairShortestPath,BFSSingleSourceShortestPath,BidirectionalDijkstra,CycleFinder,DijkstraShortestPathBase,EdgeConnectivityAlgorithm,EulerianCircuitAlgorithmBase,FloydWarshallShortestPath,GraphMetrics,GreedyWeightedMatching,HierholzerEulerianTrail,JohnsonShortestPath,MaximalCardinalityMatching,MaximumInducedPath,MinimumSpanningTreeBase,ParallelFilterKruskal,PathFinder,SmallestDegreeLastOrdering,TreeExtremaCalculator,VertexConnectivityAlgorithm
Represents an algorithm that accepts any graph as input, directed or not.
For example, DFS or BFS traversal algorithms are implemented exactly the
same, regardless the fact that the graph is directed or not, by inspecting
the adjacency lists of the vertices provided by the
Graph data type.- Author:
- Cristian Frăsinaru
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGraphAlgorithm(Graph graph) Constructs an algorithm which will be executed on the input graph. -
Method Summary
-
Field Details
-
graph
-
directed
protected final boolean directed
-
-
Constructor Details
-
GraphAlgorithm
Constructs an algorithm which will be executed on the input graph.- Parameters:
graph- the input graph.
-
-
Method Details
-
getGraph
Returns the input graph on which the algorithm is executed.- Returns:
- the input graph.
-