Loading...
Searching...
No Matches
fpx_graph Module Reference

Derived types and interfaces

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...
 

Functions/Subroutines

type(digraph) function graph_new (vertices)
 
subroutine graph_add_edge (this, source, destination, exists)
 
logical function graph_has_cycle_dfs (this, start_vertex)
 
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.
 

Function/Subroutine Documentation

◆ dfs_recursive()

recursive logical function dfs_recursive ( class(digraph), intent(in) this,
integer, intent(in) vertex,
logical, dimension(:), intent(inout) visited,
logical, dimension(:), intent(inout) recursion_stack )
private

Internal recursive DFS worker for cycle detection.

Definition at line 160 of file graph.f90.

◆ graph_add_edge()

subroutine graph_add_edge ( class(digraph), intent(inout) this,
integer, intent(in) source,
integer, intent(in) destination,
logical, intent(out), optional exists )
private

Definition at line 115 of file graph.f90.

◆ graph_final()

subroutine graph_final ( type(digraph), intent(inout) this)
private

Finalizer – automatically deallocate internal arrays when graph goes out of scope.

Definition at line 188 of file graph.f90.

◆ graph_has_cycle_dfs()

logical function graph_has_cycle_dfs ( class(digraph), intent(in) this,
integer, intent(in) start_vertex )
private

Definition at line 141 of file graph.f90.

◆ graph_new()

type(digraph) function graph_new ( integer, intent(in) vertices)
private

Definition at line 97 of file graph.f90.