Skip to main content

read_graph

Function read_graph 

Source
pub fn read_graph(
    path: &str,
    directed: bool,
    p: f32,
    q: f32,
) -> Result<Node2VecGraph, Box<dyn Error>>
Expand description

Helper function to read in a graph from CSV

§Params

  • path - Path to the CSV with a "from", "to" and "weight" column.
  • directed - Boolean. Shall the graph be treated as a directed or undirected graph.
  • p - p parameter in node2vec that controls probability to return
  • q - q parameter in node2vec that controls probability to reach out futher in the graph.

§Returns

The Node2VecGraph with adjacency stored in their and transition probabilities.