[−][src]Trait net_ensembles::traits::Dot
Trait, which enables you to write a dot file
- Dot files can be used to visualize a graph
- To visualize, you can use something like
twopi dotfile.dot -Tpdf > dotfile.pdf
circo dotfile.dot -Tpdf > dotfile.pdf
You can also try some of the other roadmaps.
Required methods
fn dot_from_indices<F, W, S1, S2>(
&self,
writer: W,
dot_options: S1,
f: F
) -> Result<(), Error> where
S1: AsRef<str>,
S2: AsRef<str>,
W: Write,
F: FnMut(usize) -> S2,
&self,
writer: W,
dot_options: S1,
f: F
) -> Result<(), Error> where
S1: AsRef<str>,
S2: AsRef<str>,
W: Write,
F: FnMut(usize) -> S2,
- use function
f
to create labels depending on the index - for valid
dot_options
usedot_options!
macro and take a look at moduledot_constants
Provided methods
fn dot_string_from_indices<F, S1, S2>(&self, dot_options: S1, f: F) -> String where
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize) -> S2,
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize) -> S2,
- same as
self.dot_from_indices
but returns String instead
fn dot_with_indices<S, W>(&self, writer: W, dot_options: S) -> Result<(), Error> where
S: AsRef<str>,
W: Write,
S: AsRef<str>,
W: Write,
- use index as labels for the nodes
- default implementation uses
dot_from_indices
fn dot_string_with_indices<S>(&self, dot_options: S) -> String where
S: AsRef<str>,
S: AsRef<str>,
- same as
self.dot_with_indices
but returns String instead
fn dot<S, W>(&self, writer: W, dot_options: S) -> Result<(), Error> where
S: AsRef<str>,
W: Write,
S: AsRef<str>,
W: Write,
- create dot file with empty labels
- default implementation uses
dot_from_indices
fn dot_string<S>(&self, dot_options: S) -> String where
S: AsRef<str>,
S: AsRef<str>,
- same as
self.dot()
, but returns a String instead
Implementors
impl<T, A> Dot for GenericGraph<T, A> where
T: Node,
A: AdjContainer<T>,
[src]
T: Node,
A: AdjContainer<T>,