pub fn dot_graph(&self) -> String {
        let vertices = self
            .vertices
            .iter()
            .map(|v| {
                let label = v.1.dot_label().replace("\n", "\\l");
                let fill_color = v.1.dot_fill_color();
                let font_color = v.1.dot_font_color();
                format!(
                    "{} [shape=\"box\", label=\"{}\", style=\"filled\", fillcolor=\"{}\", fontcolor=\"{}\"];",
                    v.1.index(),
                    label,
                    fill_color,
                    font_color,
                )
            })
            .collect::<Vec<String>>();

        let edges = self
            .edges
            .iter()
            .map(|e| {
                let label = e.1.dot_label().replace("\n", "\\l");
                let style = e.1.dot_style();
                let fill_color = e.1.dot_fill_color();
                let font_color = e.1.dot_font_color();
                let pen_width = e.1.dot_pen_width();
                format!("{} -> {} [label=\"{}\", style=\"{}\", color=\"{}\", fontcolor=\"{}\", penwidth=\"{}\"];",
                        e.1.head(), e.1.tail(), label, style, fill_color, font_color, pen_width)
            })
            .collect::<Vec<String>>();

        let options = vec![
            "graph [fontname = \"Courier New\", splines=\"polyline\"]",
            "node [fontname = \"Courier New\"]",
            "edge [fontname = \"Courier New\"]",
        ];

        format!(
            "digraph G {{\n{}\n\n{}\n{}\n}}",
            options.join("\n"),
            vertices.join("\n"),
            edges.join("\n")
        )
    }
/// Returns a string in the graphviz format
Returns a string in the graphviz format
Returns a string in the graphviz format
pub fn dot_graph(&self) -> String {
        let vertices = self
            .vertices
            .iter()
            .map(|v| {
                let label = v.1.dot_label().replace("\n", "\\l");
                let fill_color = v.1.dot_fill_color();
                let font_color = v.1.dot_font_color();
                format!(
                    "{} [shape=\"box\", label=\"{}\", style=\"filled\", fillcolor=\"{}\", fontcolor=\"{}\"];",
                    v.1.index(),
                    label,
                    fill_color,
                    font_color,
                )
            })
            .collect::<Vec<String>>();
        let edges = self
            .edges
            .iter()
            .map(|e| {
                let label = e.1.dot_label().replace("\n", "\\l");
                let style = e.1.dot_style();
                let fill_color = e.1.dot_fill_color();
                let font_color = e.1.dot_font_color();
                let pen_width = e.1.dot_pen_width();
                format!("{} -> {} [label=\"{}\", style=\"{}\", color=\"{}\", fontcolor=\"{}\", penwidth=\"{}\"];",
                        e.1.head(), e.1.tail(), label, style, fill_color, font_color, pen_width)
            })
            .collect::<Vec<String>>();
        let options = vec![
            "graph [fontname = \"Courier New\", splines=\"polyline\"]",
            "node [fontname = \"Courier New\"]",
            "edge [fontname = \"Courier New\"]",
        ];
        format!(
            "digraph G {{\n{}\n\n{}\n{}\n}}",
            options.join("\n"),
            vertices.join("\n"),
            edges.join("\n")
        )
    }
pub fn dot_graph ( & self ) -> String { let vertices = self . vertices . iter ( ) . map ( | v | { let label = v . 1 . dot_label ( ) . replace ( " \n " , " \\ " ) ; let fill_color = v . 1 . dot_fill_color ( ) ; let font_color = v . 1 . dot_font_color ( ) ; format ! ( " \" \" \" \" \" \" \" \" \" \" " v 1 index ( ) label fill_color font_color ) } ) . collect :: < Vec < String > > ( ) ; let edges = self . edges . iter ( ) . map ( | e | { let label = e . 1 . dot_label ( ) . replace ( " \n " , " \\ " ) ; let style = e . 1 . dot_style ( ) ; let fill_color = e . 1 . dot_fill_color ( ) ; let font_color = e . 1 . dot_font_color ( ) ; let pen_width = e . 1 . dot_pen_width ( ) ; format ! ( " \" \" \" \" \" \" \" \" \" \" " e 1 head ( ) e 1 tail ( ) label style fill_color font_color pen_width ) } ) . collect :: < Vec < String > > ( ) ; let options = vec ! [ " \" \" \" \" " " \" \" " " \" \" " ] ; format ! ( " \n \n \n \n \n " options join ( " \n " ) vertices join ( " \n " ) edges join ( " \n " ) ) }
Returns a string in the graphviz format
Returns a string in the graphviz format
&self
&self