Zog.Connectivity (Zog v0.1.0)
View SourceNative graph connectivity algorithms backed by Zog (Zig) via Zigler.
Summary
Functions
Analyzes an undirected graph natively to find all bridges and articulation points.
Calculates all core numbers for all nodes in the graph natively.
Detects the k-core of a graph natively.
Finds strongly connected components in the graph natively. Returns a list of lists of node labels.
Types
@type bridge() :: {Zog.SoA.label(), Zog.SoA.label()}
Functions
@spec analyze(Zog.SoA.t()) :: %{ bridges: [bridge()], articulation_points: [Zog.SoA.label()] }
Analyzes an undirected graph natively to find all bridges and articulation points.
@spec core_numbers(Zog.SoA.t()) :: %{required(Zog.SoA.label()) => integer()}
Calculates all core numbers for all nodes in the graph natively.
Detects the k-core of a graph natively.
@spec nif_core_numbers( 0..18_446_744_073_709_551_615, [0..4_294_967_295] | <<_::_*32>>, [0..4_294_967_295] | <<_::_*32>>, [float()] | <<_::_*64>> ) :: [0..4_294_967_295]
@spec nif_strongly_connected_components( 0..18_446_744_073_709_551_615, [0..4_294_967_295] | <<_::_*32>>, [0..4_294_967_295] | <<_::_*32>>, [float()] | <<_::_*64>> ) :: [0..4_294_967_295]
@spec strongly_connected_components(Zog.SoA.t()) :: [[Zog.SoA.label()]]
Finds strongly connected components in the graph natively. Returns a list of lists of node labels.