Zog.Metrics (Zog v0.3.0)
View SourceNative graph metrics backed by Zog (Zig) via Zigler.
Summary
Functions
Computes the Approximate Neighborhood Function (ANF) and effective diameter.
Returns {:ok, %{neighborhood_sizes: [float()], effective_diameter: float()}} or {:error, any()}.
Computes degree assortativity.
Computes the average clustering coefficient.
Computes graph density.
Computes the local clustering coefficient for each node.
Counts the number of triangles in the graph.
Functions
@spec anf( Zog.SoA.t(), keyword() ) :: {:ok, %{neighborhood_sizes: [float()], effective_diameter: float()}} | {:error, any()}
Computes the Approximate Neighborhood Function (ANF) and effective diameter.
Returns {:ok, %{neighborhood_sizes: [float()], effective_diameter: float()}} or {:error, any()}.
Options
:max_steps- Maximum number of steps to traverse (defaults to30).:m- Number of registers (trials) per node (defaults to64).
Computes degree assortativity.
Computes the average clustering coefficient.
Computes graph density.
@spec local_clustering_coefficient(Zog.SoA.t()) :: %{ required(Zog.SoA.label()) => float() }
Computes the local clustering coefficient for each node.
@spec triangle_count(Zog.SoA.t()) :: non_neg_integer()
Counts the number of triangles in the graph.
@spec triangle_count( 0..18_446_744_073_709_551_615, [0..4_294_967_295] | <<_::_*32>>, [0..4_294_967_295] | <<_::_*32>>, [float()] | <<_::_*64>> ) :: 0..18_446_744_073_709_551_615