Struct net_ensembles::dual_graph::DualGraph
source · [−]pub struct DualGraph<ADJ, T1, A1, T2, A2> { /* private fields */ }
Implementations
sourceimpl<ADJ, T1, A1, T2, A2> DualGraph<ADJ, T1, A1, T2, A2>where
ADJ: AdjTrait,
impl<ADJ, T1, A1, T2, A2> DualGraph<ADJ, T1, A1, T2, A2>where
ADJ: AdjTrait,
pub fn new(graph_1: GenericGraph<T1, A1>, graph_2: GenericGraph<T2, A2>) -> Self
pub fn graph_1(&self) -> &GenericGraph<T1, A1>
pub fn graph_2(&self) -> &GenericGraph<T2, A2>
pub fn graph_1_mut(&mut self) -> &mut GenericGraph<T1, A1>
pub fn graph_2_mut(&mut self) -> &mut GenericGraph<T2, A2>
pub fn adj_1(&self) -> &[ADJ]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
pub fn adj_2(&self) -> &[ADJ]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
pub fn size(&self) -> (usize, usize)
pub fn add_edge(
&mut self,
index_graph_1: usize,
index_graph_2: usize
) -> Result<(), AddEdgeError>
pub fn total_vertices(&self) -> usize
sourceimpl<ADJ, T1, A1, T2, A2> DualGraph<ADJ, T1, A1, T2, A2>where
A1: AdjContainer<T1>,
ADJ: AdjTrait,
impl<ADJ, T1, A1, T2, A2> DualGraph<ADJ, T1, A1, T2, A2>where
A1: AdjContainer<T1>,
ADJ: AdjTrait,
sourceimpl<ADJ, T1, A1, T2, A2> DualGraph<ADJ, T1, A1, T2, A2>where
A2: AdjContainer<T2>,
ADJ: AdjTrait,
impl<ADJ, T1, A1, T2, A2> DualGraph<ADJ, T1, A1, T2, A2>where
A2: AdjContainer<T2>,
ADJ: AdjTrait,
sourceimpl<T1, T2, A1, A2, ADJ> DualGraph<ADJ, T1, A1, T2, A2>where
A1: AdjContainer<T1>,
A2: AdjContainer<T2>,
ADJ: AdjTrait,
impl<T1, T2, A1, A2, ADJ> DualGraph<ADJ, T1, A1, T2, A2>where
A1: AdjContainer<T1>,
A2: AdjContainer<T2>,
ADJ: AdjTrait,
sourcepub fn dfs_index(&self, index: DualIndex) -> impl '_ + Iterator<Item = DualIndex>
pub fn dfs_index(&self, index: DualIndex) -> impl '_ + Iterator<Item = DualIndex>
Depth first search iterator starting at the node corresponding to index
Note that, this iterator will return indices from both graphs, the corresponding graph is given by the variant of DualIndex
sourcepub fn dfs_1_index(&self, index: usize) -> impl '_ + Iterator<Item = DualIndex>
pub fn dfs_1_index(&self, index: usize) -> impl '_ + Iterator<Item = DualIndex>
Depth first search iterator starting at the node in graph_1 corresponding to index
Note that, this iterator will return indices from both graphs, the corresponding graph is given by the variant of DualIndex
sourcepub fn dfs_2_index(&self, index: usize) -> impl '_ + Iterator<Item = DualIndex>
pub fn dfs_2_index(&self, index: usize) -> impl '_ + Iterator<Item = DualIndex>
Depth first search iterator starting at the node in graph_2 corresponding to index
Note that, this iterator will return indices from both graphs, the corresponding graph is given by the variant of DualIndex
pub fn bfs_index(
&self,
index: DualIndex
) -> impl '_ + Iterator<Item = (DualIndex, usize)>
pub fn is_connected(&self) -> bool
sourceimpl<T, A1, A2> DualGraph<AdjSingle, T1, A1, T2, A2>where
A1: AdjContainer<T> + AdjList<usize>,
A2: AdjContainer<T> + AdjList<usize>,
impl<T, A1, A2> DualGraph<AdjSingle, T1, A1, T2, A2>where
A1: AdjContainer<T> + AdjList<usize>,
A2: AdjContainer<T> + AdjList<usize>,
pub fn graph_1_contained_iter_neighbors_in_other_graph_mut(
&mut self,
index: usize
) -> impl Iterator<Item = &mut T>
pub fn graph_2_contained_iter_neighbors_in_other_graph_mut(
&mut self,
index: usize
) -> impl Iterator<Item = &mut T>
sourcepub fn graph_1_contained_iter_mut(
&mut self,
index: usize
) -> impl Iterator<Item = &mut T>
pub fn graph_1_contained_iter_mut(
&mut self,
index: usize
) -> impl Iterator<Item = &mut T>
Note: This will first iterate over all neighbors from this graph and then over all neighbors from the other graph
sourcepub fn graph_1_contained_iter(&self, index: usize) -> impl Iterator<Item = &T>
pub fn graph_1_contained_iter(&self, index: usize) -> impl Iterator<Item = &T>
Note: This will first iterate over all neighbors from this graph and then over all neighbors from the other graph
sourcepub fn graph_2_contained_iter(&self, index: usize) -> impl Iterator<Item = &T>
pub fn graph_2_contained_iter(&self, index: usize) -> impl Iterator<Item = &T>
Note: This will first iterate over all neighbors from this graph and then over all neighbors from the other graph
pub fn graph_1_contained_iter_mut_which_graph_with_index(
&mut self,
index: usize
) -> impl Iterator<Item = WhichGraph<(usize, &mut T)>>
pub fn graph_1_contained_iter_mut_which_graph(
&mut self,
index: usize
) -> impl Iterator<Item = WhichGraph<&mut T>>
pub fn graph_2_contained_iter_mut_which_graph(
&mut self,
index: usize
) -> impl Iterator<Item = WhichGraph<&mut T>>
pub fn graph_2_contained_iter_mut_which_graph_with_index(
&mut self,
index: usize
) -> impl Iterator<Item = WhichGraph<(usize, &mut T)>>
sourceimpl<T, A1, A2, ADJ> DualGraph<ADJ, T, A1, T, A2>where
A1: AdjContainer<T>,
A2: AdjContainer<T>,
ADJ: AdjTrait,
impl<T, A1, A2, ADJ> DualGraph<ADJ, T, A1, T, A2>where
A1: AdjContainer<T>,
A2: AdjContainer<T>,
ADJ: AdjTrait,
sourcepub fn contained_iter_neighbors_1(
&self,
index: usize
) -> impl Iterator<Item = &T>
pub fn contained_iter_neighbors_1(
&self,
index: usize
) -> impl Iterator<Item = &T>
Iterate over all neighbors of the node corresponding to index from graph_1. Note, that this also includes possible neighbors in the second graph
sourcepub fn contained_iter_neighbors_2(
&self,
index: usize
) -> impl Iterator<Item = &T>
pub fn contained_iter_neighbors_2(
&self,
index: usize
) -> impl Iterator<Item = &T>
Iterate over all neighbors of the node corresponding to index from graph_1. Note, that this also includes possible neighbors in the second graph
pub fn dfs_contained(
&self,
index: DualIndex
) -> DfsDualContained<'_, T, A1, A2, ADJ>ⓘNotable traits for DfsDualContained<'a, T, A1, A2, ADJ>impl<'a, T, A1, A2, ADJ> Iterator for DfsDualContained<'a, T, A1, A2, ADJ>where
T: 'a,
A1: AdjContainer<T>,
A2: AdjContainer<T>,
ADJ: AdjTrait, type Item = &'a T;
T: 'a,
A1: AdjContainer<T>,
A2: AdjContainer<T>,
ADJ: AdjTrait, type Item = &'a T;
pub fn dfs_1_contained(
&self,
index_graph_1: usize
) -> DfsDualContained<'_, T, A1, A2, ADJ>ⓘNotable traits for DfsDualContained<'a, T, A1, A2, ADJ>impl<'a, T, A1, A2, ADJ> Iterator for DfsDualContained<'a, T, A1, A2, ADJ>where
T: 'a,
A1: AdjContainer<T>,
A2: AdjContainer<T>,
ADJ: AdjTrait, type Item = &'a T;
T: 'a,
A1: AdjContainer<T>,
A2: AdjContainer<T>,
ADJ: AdjTrait, type Item = &'a T;
pub fn dfs_2_contained(
&self,
index_graph_2: usize
) -> DfsDualContained<'_, T, A1, A2, ADJ>ⓘNotable traits for DfsDualContained<'a, T, A1, A2, ADJ>impl<'a, T, A1, A2, ADJ> Iterator for DfsDualContained<'a, T, A1, A2, ADJ>where
T: 'a,
A1: AdjContainer<T>,
A2: AdjContainer<T>,
ADJ: AdjTrait, type Item = &'a T;
T: 'a,
A1: AdjContainer<T>,
A2: AdjContainer<T>,
ADJ: AdjTrait, type Item = &'a T;