[−][src]Trait net_ensembles::traits::DotExtra
Trait, which enables you to write a dot file
- similar to
Dot
trait, but lables are generated differently - 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_container_index<F, S1, S2, W>(
&self,
writer: W,
dot_options: S1,
f: F
) -> Result<(), Error> where
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize, &A) -> S2,
W: Write,
&self,
writer: W,
dot_options: S1,
f: F
) -> Result<(), Error> where
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize, &A) -> S2,
W: Write,
- create a dot representation
- you can use the indices and the container
A
(usually stored at for_each index) to create the lables
fn dot_from_contained_index<F, S1, S2, W>(
&self,
writer: W,
dot_options: S1,
f: F
) -> Result<(), Error> where
W: Write,
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize, &T) -> S2,
&self,
writer: W,
dot_options: S1,
f: F
) -> Result<(), Error> where
W: Write,
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize, &T) -> S2,
- create a dot representation
- you can use the indices and
T
(usually something contained inA
(seedot_from_container
) and stored at each vertex) to create the lables
Provided methods
fn dot_string_from_container_index<F, S1, S2>(
&self,
dot_options: S1,
f: F
) -> String where
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize, &A) -> S2,
&self,
dot_options: S1,
f: F
) -> String where
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize, &A) -> S2,
- same as
self.dot_string_from_container_index
but returns String instead
fn dot_from_container<F, S1, S2, W>(
&self,
writer: W,
dot_options: S1,
f: F
) -> Result<(), Error> where
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(&A) -> S2,
W: Write,
&self,
writer: W,
dot_options: S1,
f: F
) -> Result<(), Error> where
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(&A) -> S2,
W: Write,
- create a dot representation
- you can use the information of the container
A
(usually stored at each index) to create the lables
fn dot_string_from_container<F, S1, S2>(&self, dot_options: S1, f: F) -> String where
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(&A) -> S2,
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(&A) -> S2,
- same as
self.dot_from_container
but returns String instead
fn dot_string_from_contained_index<F, S1, S2>(
&self,
dot_options: S1,
f: F
) -> String where
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize, &T) -> S2,
&self,
dot_options: S1,
f: F
) -> String where
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize, &T) -> S2,
- same as
self.dot_from_contained
but returns String instead
fn dot_from_contained<F, S1, S2, W>(
&self,
writer: W,
dot_options: S1,
f: F
) -> Result<(), Error> where
W: Write,
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(&T) -> S2,
&self,
writer: W,
dot_options: S1,
f: F
) -> Result<(), Error> where
W: Write,
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(&T) -> S2,
- create a dot representation
- you can use
T
(usually something contained inA
(seedot_from_container
) and stored at each vertex) to create the lables
fn dot_string_from_contained<F, S1, S2>(&self, dot_options: S1, f: F) -> String where
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(&T) -> S2,
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(&T) -> S2,
- same as
self.dot_from_contained
but returns String
Implementors
impl<T, A> DotExtra<T, A> for GenericGraph<T, A> where
T: Node,
A: AdjContainer<T>,
[src]
T: Node,
A: AdjContainer<T>,
fn dot_from_container_index<F, S1, S2, W>(
&self,
writer: W,
dot_options: S1,
f: F
) -> Result<(), Error> where
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize, &A) -> S2,
W: Write,
[src]
&self,
writer: W,
dot_options: S1,
f: F
) -> Result<(), Error> where
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize, &A) -> S2,
W: Write,
fn dot_from_contained_index<F, S1, S2, W>(
&self,
writer: W,
dot_options: S1,
f: F
) -> Result<(), Error> where
W: Write,
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize, &T) -> S2,
[src]
&self,
writer: W,
dot_options: S1,
f: F
) -> Result<(), Error> where
W: Write,
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize, &T) -> S2,