Go to the source code of this file.
|
| type | digraph |
| | Directed graph with fixed vertex count and efficient cycle detection Stores edges in a dense adjacency matrix slice per vertex. Only the actually used portion of each row is tracked via list_sizes. More...
|
| |
|
| type(digraph) function | graph_new (vertices) |
| | Constructor.
|
| |
| subroutine | graph_add_edge (this, source, destination, exists) |
| | Add a directed edge from source → destination Silently ignores invalid indices. Optional exists flag indicates if edge was already present.
|
| |
| logical function | graph_has_cycle_dfs (this, start_vertex) |
| | Check whether a cycle exists in the graph reachable from start_vertex Uses standard DFS with recursion stack (back-edge detection).
|
| |
| recursive logical function | dfs_recursive (this, vertex, visited, recursion_stack) |
| | Internal recursive DFS worker for cycle detection.
|
| |
| subroutine | graph_final (this) |
| | Finalizer – automatically deallocate internal arrays when graph goes out of scope.
|
| |