Function layered_label_propagation

Source
pub fn layered_label_propagation<R: RandomAccessGraph + Sync>(
    sym_graph: R,
    deg_cumul: &(impl Succ<Input = usize, Output = usize> + Send + Sync),
    gammas: Vec<f64>,
    num_threads: Option<usize>,
    chunk_size: Option<usize>,
    arc_granularity: Granularity,
    seed: u64,
    predicate: impl Predicate<PredParams>,
    work_dir: impl AsRef<Path>,
) -> Result<Box<[usize]>>
Expand description

Runs layered label propagation on the provided symmetric graph and returns the resulting labels.

Note that no symmetry check is performed, but in that case the algorithm usually will not give satisfactory results.

§Arguments

  • sym_graph - The symmetric graph to run LLP on.
  • deg_cumul - The degree cumulative distribution of the graph, as in par_apply.
  • gammas - The ɣ values to use in the LLP algorithm.
  • num_threads - The number of threads to use. If None, the number of threads is set to num_cpus::get.
  • chunk_size - The chunk size used to randomize the permutation. This is an advanced option: see par_apply.
  • granularity - The granularity of the parallel processing expressed as the number of arcs to process at a time. If None, the granularity is computed adaptively. This is an advanced option: see par_apply.
  • seed - The seed to use for pseudorandom number generation.
  • work_dir - The directory where the labels will be stored, if None, a temporary directory will be created.