Skip to main content

tied_diffusion_parallel

Function tied_diffusion_parallel 

Source
pub fn tied_diffusion_parallel<T>(
    node_names: Vec<String>,
    from: Vec<String>,
    to: Vec<String>,
    weights: Option<&[T]>,
    summarisation_fun: String,
    personalise_vecs_1: &[Vec<T>],
    personalise_vecs_2: &[Vec<T>],
    undirected: bool,
    damping_factor: T,
    max_iter: usize,
    tol: T,
) -> Vec<Vec<T>>
where T: BixverseFloat + Sum,
Expand description

Calculates the tied diffusion between two graphs

Function is designed to handle permutations of the personalisation vectors and leverages parallel processing for efficiency.

§Params

  • node_names - The names of the nodes in the graph
  • from - The source nodes of the edges in the graph
  • to - The destination nodes of the edges in the graph
  • weights - The weights of the edges in the graph
  • summarisation_fun - The function used to summarise the personalisation vectors (i.e., the tied diffusion)
  • personalise_vecs_1 - The personalisation vectors for the first graph
  • personalise_vecs_2 - The personalisation vectors for the second graph
  • undirected - Whether the graph is undirected
  • damping_factor - PageRank damping factor, i.e. the probability of continuing the walk
  • max_iter - Maximum number of power iterations
  • tol - Convergence threshold on the L1 change between iterations

§Returns

  • Vec<Vec<T>> - The tied diffusion between the two graphs for all of the supplied personalisation vectors