Zog.Centrality (Zog v0.1.0)

View Source

Native centrality algorithms backed by Zog (Zig) via Zigler.

Summary

Functions

alpha_centrality(builder, opts \\ [])

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

Calculates Alpha Centrality for all nodes.

alpha_centrality(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)

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

betweenness_f64(builder)

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

Calculates weighted Betweenness Centrality for all nodes.

betweenness_f64(arg1, arg2, arg3, arg4)

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

betweenness_unweighted(builder)

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

Calculates unweighted Betweenness Centrality for all nodes.

betweenness_unweighted(arg1, arg2, arg3)

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

closeness_f64(builder)

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

Calculates Closeness Centrality for all nodes.

closeness_f64(arg1, arg2, arg3, arg4)

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

eigenvector(builder, opts \\ [])

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

Calculates Eigenvector Centrality for all nodes.

eigenvector(arg1, arg2, arg3, arg4, arg5, arg6)

@spec eigenvector(
  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,
  float()
) :: [float()]

harmonic_centrality_f64(builder)

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

Calculates Harmonic Centrality for all nodes.

harmonic_centrality_f64(arg1, arg2, arg3, arg4)

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

katz(builder, opts \\ [])

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

Calculates Katz Centrality for all nodes.

katz(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)

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

pagerank(builder, opts \\ [])

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

Calculates PageRank centrality for all nodes.

pagerank(arg1, arg2, arg3, arg4, arg5, arg6, arg7)

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