Index
All Classes and Interfaces|All Packages
A
- addEdge(T, T) - Method in class com.shyarnis.topsort.Graph
-
Adds a directed edge from one node to another.
- addNode(T) - Method in class com.shyarnis.topsort.Graph
-
Adds a node to the graph.
C
- com.shyarnis.topsort - package com.shyarnis.topsort
-
Provides core classes and algorithms for topological sorting of directed graphs, including graph representation, cycle detection, and sorting utilities.
- com.shyarnis.topsort.utils - package com.shyarnis.topsort.utils
-
Contains utility classes for graph parsing and visualization, including file-based edge parsing and GraphViz DOT file generation.
- CycleDetector<T> - Class in com.shyarnis.topsort
-
Detects cycles in a directed graph using depth-first search (DFS).
E
- EdgeParser - Class in com.shyarnis.topsort.utils
-
Utility class for parsing edges from a text file and building a
Graph
from them.
G
- getAdjacencyList() - Method in class com.shyarnis.topsort.Graph
-
Returns an unmodifiable view of the full adjacency list of the graph.
- getNeighbors(T) - Method in class com.shyarnis.topsort.Graph
-
Returns the neighbors (i.e., directly connected outgoing nodes) of a given node.
- getNodes() - Method in class com.shyarnis.topsort.Graph
-
Returns the set of all nodes present in the graph.
- Graph<T> - Class in com.shyarnis.topsort
-
A simple generic directed graph representation using an adjacency list.
- Graph() - Constructor for class com.shyarnis.topsort.Graph
-
Constructs an empty directed graph.
- GraphVisualizer - Class in com.shyarnis.topsort.utils
-
Utility class for visualizing directed graphs in GraphViz DOT format and rendering them to PNG.
H
- hasCycle(Graph<T>) - Method in class com.shyarnis.topsort.CycleDetector
-
Checks whether the given graph contains a cycle.
P
- parseEdgesFromFile(String) - Static method in class com.shyarnis.topsort.utils.EdgeParser
-
Parses a text file containing edge definitions and constructs a directed
Graph
.
R
- renderDotToPng(String, String) - Static method in class com.shyarnis.topsort.utils.GraphVisualizer
-
Renders a GraphViz DOT file to a PNG image using the GraphViz CLI tool.
S
- sort() - Method in class com.shyarnis.topsort.TopologicalSort
-
Performs a topological sort on the graph.
T
- TopologicalSort<T> - Class in com.shyarnis.topsort
-
Performs a topological sort on a directed acyclic graph (DAG) using Kahn's algorithm.
- TopologicalSort(Graph<T>) - Constructor for class com.shyarnis.topsort.TopologicalSort
-
Constructs a new topological sorter for the given graph.
V
- visualizeOriginalGraph(Graph<T>, String) - Static method in class com.shyarnis.topsort.utils.GraphVisualizer
-
Generates a GraphViz DOT representation of the original directed graph.
- visualizeSortedGraph(List<T>, String) - Static method in class com.shyarnis.topsort.utils.GraphVisualizer
-
Generates a GraphViz DOT representation of a topologically sorted list of nodes, displaying them as a simple directed chain.
All Classes and Interfaces|All Packages