Trait net_ensembles::traits::DotExtra
source · [−]pub trait DotExtra<T, A> {
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;
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;
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,
{ ... }
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,
{ ... }
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,
{ ... }
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,
{ ... }
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,
{ ... }
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,
{ ... }
}
Expand description
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
sourcefn 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,
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,
- create a dot representation
- you can use the indices and the container
A
(usually stored at each index) to create the lables
sourcefn 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,
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,
- 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
sourcefn dot_string_from_container_index<F, S1, S2>(
&self,
dot_options: S1,
f: F
) -> Stringwhere
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize, &A) -> S2,
fn dot_string_from_container_index<F, S1, S2>(
&self,
dot_options: S1,
f: F
) -> Stringwhere
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize, &A) -> S2,
- same as
self.dot_string_from_container_index
but returns String instead
sourcefn 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,
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,
- create a dot representation
- you can use the information of the container
A
(usually stored at each index) to create the lables
sourcefn dot_string_from_container<F, S1, S2>(&self, dot_options: S1, f: F) -> Stringwhere
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(&A) -> S2,
fn dot_string_from_container<F, S1, S2>(&self, dot_options: S1, f: F) -> Stringwhere
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(&A) -> S2,
- same as
self.dot_from_container
but returns String instead
sourcefn dot_string_from_contained_index<F, S1, S2>(
&self,
dot_options: S1,
f: F
) -> Stringwhere
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize, &T) -> S2,
fn dot_string_from_contained_index<F, S1, S2>(
&self,
dot_options: S1,
f: F
) -> Stringwhere
S1: AsRef<str>,
S2: AsRef<str>,
F: FnMut(usize, &T) -> S2,
- same as
self.dot_from_contained
but returns String instead
sourcefn 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,
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,
- create a dot representation
- you can use
T
(usually something contained inA
(seedot_from_container
) and stored at each vertex) to create the lables