write_graphml_file

Function write_graphml_file 

Source
pub fn write_graphml_file<T, A>(
    graph: &Graph<T, A>,
    file: &str,
) -> Result<(), Error>
where T: Eq + Clone + PartialOrd + Ord + Hash + Send + Sync + Display, A: Clone,
Expand description

Writes a Graph to a GraphML-formatted file.

The only attributes that are currently written are a “weight” attribute for edges.

§Arguments

  • graph the Graph object to write to file
  • file the name of the file to write

§Examples

use graphrs::{generators, readwrite};
let graph = generators::social::karate_club_graph();
readwrite::graphml::write_graphml(&graph, "/some/file.graphml");