Skip to main content

Module dot

Module dot 

Source
Expand description

DOT 格式导出(Graphviz)

支持将图导出为 Graphviz DOT 格式,用于可视化

§使用示例

use god_gragh::prelude::*;

let mut graph = Graph::<&str, f64>::directed();
let a = graph.add_node("A").unwrap();
let b = graph.add_node("B").unwrap();
graph.add_edge(a, b, 1.0).unwrap();

let dot = to_dot(&graph);
println!("{}", dot);

Structs§

DotOptions
DOT 格式导出选项

Functions§

to_dot
使用默认选项将图导出为 DOT 格式
to_dot_undirected
导出无向图的 DOT 格式
to_dot_with_options
使用自定义选项将图导出为 DOT 格式
write_dot_to_file
将 DOT 字符串写入文件