Skip to main content

read_digraph

Function read_digraph 

Source
pub fn read_digraph<N, E, P>(
    path: P,
    format: GraphFormat,
    weighted: bool,
) -> Result<DiGraph<N, E>>
where N: Node + Debug + FromStr + Clone, E: EdgeWeight + Copy + Debug + Default + FromStr, P: AsRef<Path>,
Expand description

Reads a directed graph from a file

§Arguments

  • path - Path to the file
  • format - Format of the file
  • weighted - Whether the graph has edge weights

§Returns

  • Ok(DiGraph) - The directed graph read from the file
  • Err(GraphError) - If there was an error reading the file