Zog.Metrics (Zog v0.1.0)

View Source

Native graph metrics backed by Zog (Zig) via Zigler.

Summary

Functions

assortativity(builder)

@spec assortativity(Zog.SoA.t()) :: float()

Computes degree assortativity.

assortativity(arg1, arg2, arg3, arg4)

@spec assortativity(
  0..18_446_744_073_709_551_615,
  [0..4_294_967_295] | <<_::_*32>>,
  [0..4_294_967_295] | <<_::_*32>>,
  [float()] | <<_::_*64>>
) :: float()

average_clustering_coefficient(builder)

@spec average_clustering_coefficient(Zog.SoA.t()) :: float()

Computes the average clustering coefficient.

average_clustering_coefficient(arg1, arg2, arg3, arg4)

@spec average_clustering_coefficient(
  0..18_446_744_073_709_551_615,
  [0..4_294_967_295] | <<_::_*32>>,
  [0..4_294_967_295] | <<_::_*32>>,
  [float()] | <<_::_*64>>
) :: float()

density(builder)

@spec density(Zog.SoA.t()) :: float()

Computes graph density.

density(arg1, arg2, arg3, arg4)

@spec density(
  0..18_446_744_073_709_551_615,
  [0..4_294_967_295] | <<_::_*32>>,
  [0..4_294_967_295] | <<_::_*32>>,
  [float()] | <<_::_*64>>
) :: float()

local_clustering_coefficient(builder)

@spec local_clustering_coefficient(Zog.SoA.t()) :: %{
  required(Zog.SoA.label()) => float()
}

Computes the local clustering coefficient for each node.

local_clustering_coefficient(arg1, arg2, arg3, arg4)

@spec local_clustering_coefficient(
  0..18_446_744_073_709_551_615,
  [0..4_294_967_295] | <<_::_*32>>,
  [0..4_294_967_295] | <<_::_*32>>,
  [float()] | <<_::_*64>>
) :: [float()]

triangle_count(builder)

@spec triangle_count(Zog.SoA.t()) :: non_neg_integer()

Counts the number of triangles in the graph.

triangle_count(arg1, arg2, arg3, arg4)

@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