pub struct SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,{ /* private fields */ }
Implementations§
source§impl<'a, G> SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
impl<'a, G> SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
pub fn add_edge(&mut self, e: <G as WithEdge>::Edge)
pub fn set_edges<I>(&mut self, iter: I)where
G: VertexList,
I: IntoIterator,
<I as IntoIterator>::Item: IntoOwned<<G as WithEdge>::Edge>,
pub fn add_edges<I>(&mut self, iter: I)where
I: IntoIterator,
<I as IntoIterator>::Item: IntoOwned<<G as WithEdge>::Edge>,
pub fn clear_edges(&mut self)where
G: VertexList,
pub fn replace_edge(
&mut self,
old: <G as WithEdge>::Edge,
new: <G as WithEdge>::Edge
)
pub fn remove_edge(&mut self, e: <G as WithEdge>::Edge)
Trait Implementations§
source§impl<'a, G> Adjacency for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
impl<'a, G> Adjacency for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
fn out_neighbors(
&self,
v: <SpanningSubgraph<'a, G> as WithVertex>::Vertex
) -> <SpanningSubgraph<'a, G> as VertexTypes<'_, SpanningSubgraph<'a, G>>>::OutNeighborIter
fn out_degree(&self, v: <SpanningSubgraph<'a, G> as WithVertex>::Vertex) -> usize
source§impl<'a, G> AsRef<G> for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
impl<'a, G> AsRef<G> for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
source§impl<'a, G> Choose for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>> + Choose,
impl<'a, G> Choose for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>> + Choose,
source§fn choose_vertex<R>(
&self,
rng: R
) -> Option<<SpanningSubgraph<'a, G> as WithVertex>::Vertex>where
R: Rng,
fn choose_vertex<R>(
&self,
rng: R
) -> Option<<SpanningSubgraph<'a, G> as WithVertex>::Vertex>where
R: Rng,
Returns a random vertex of this graph or
None
if the graph has no vertices.source§fn choose_out_neighbor<R>(
&self,
v: <SpanningSubgraph<'a, G> as WithVertex>::Vertex,
rng: R
) -> Option<<SpanningSubgraph<'a, G> as WithVertex>::Vertex>where
R: Rng,
fn choose_out_neighbor<R>(
&self,
v: <SpanningSubgraph<'a, G> as WithVertex>::Vertex,
rng: R
) -> Option<<SpanningSubgraph<'a, G> as WithVertex>::Vertex>where
R: Rng,
Returns a random neighbor vertex of
v
or None
if v
has no neighbors.source§fn choose_edge<R>(
&self,
rng: R
) -> Option<<SpanningSubgraph<'a, G> as WithEdge>::Edge>where
R: Rng,
fn choose_edge<R>(
&self,
rng: R
) -> Option<<SpanningSubgraph<'a, G> as WithEdge>::Edge>where
R: Rng,
Returns a random edge of this graph or
None
if the graph has no edges.source§fn choose_out_edge<R>(
&self,
v: <SpanningSubgraph<'a, G> as WithVertex>::Vertex,
rng: R
) -> Option<<SpanningSubgraph<'a, G> as WithEdge>::Edge>where
R: Rng,
fn choose_out_edge<R>(
&self,
v: <SpanningSubgraph<'a, G> as WithVertex>::Vertex,
rng: R
) -> Option<<SpanningSubgraph<'a, G> as WithEdge>::Edge>where
R: Rng,
Returns a random out edge of
v
or None
if v
has no out edges.source§fn choose_vertex_iter<R>(&self, rng: R) -> ChooseVertexIter<'_, Self, R> ⓘwhere
R: Rng,
fn choose_vertex_iter<R>(&self, rng: R) -> ChooseVertexIter<'_, Self, R> ⓘwhere
R: Rng,
Returns an iterator that repeatedly calls
choose_vertex
.source§fn choose_out_neighbor_iter<R>(
&self,
v: Self::Vertex,
rng: R
) -> ChooseOutNeighborIter<'_, Self, R> ⓘwhere
R: Rng,
fn choose_out_neighbor_iter<R>(
&self,
v: Self::Vertex,
rng: R
) -> ChooseOutNeighborIter<'_, Self, R> ⓘwhere
R: Rng,
Returns an iterator that repeatedly calls
choose_out_neighbor(v)
.source§fn choose_edge_iter<R>(&self, rng: R) -> ChooseEdgeIter<'_, Self, R> ⓘwhere
R: Rng,
fn choose_edge_iter<R>(&self, rng: R) -> ChooseEdgeIter<'_, Self, R> ⓘwhere
R: Rng,
Returns an iterator that repeatedly calls
choose_edge
.source§fn choose_out_edge_iter<R>(
&self,
v: Self::Vertex,
rng: R
) -> ChooseOutEdgeIter<'_, Self, R> ⓘwhere
R: Rng,
fn choose_out_edge_iter<R>(
&self,
v: Self::Vertex,
rng: R
) -> ChooseOutEdgeIter<'_, Self, R> ⓘwhere
R: Rng,
Returns an iterator that repeatedly calls
choose_out_edge(v)
.source§fn random_walk<R>(&self, rng: R) -> RandomWalk<'_, Self, R> ⓘwhere
R: Rng,
fn random_walk<R>(&self, rng: R) -> RandomWalk<'_, Self, R> ⓘwhere
R: Rng,
Returns a iterator that produces a sequence of random edges that forms a walk, that is, the
target vertex of the previous edge is the source vertex of the next edge. Read more
source§impl<'a, G> EdgeList for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
impl<'a, G> EdgeList for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
fn num_edges(&self) -> usize
fn edges(
&self
) -> <SpanningSubgraph<'a, G> as EdgeTypes<'_, SpanningSubgraph<'a, G>>>::EdgeIter
fn get_edge_by_ends(
&self,
u: <SpanningSubgraph<'a, G> as WithVertex>::Vertex,
v: <SpanningSubgraph<'a, G> as WithVertex>::Vertex
) -> Option<<SpanningSubgraph<'a, G> as WithEdge>::Edge>
fn edges_ends(&self) -> EdgesEnds<'_, Self, Self::EdgeIter> ⓘ
fn edges_with_ends(&self) -> EdgesWithEnds<'_, Self, Self::EdgeIter> ⓘ
fn edge_by_ends(&self, u: Self::Vertex, v: Self::Vertex) -> Self::Edge
source§impl<'a, 'b, G> EdgeTypes<'a, SpanningSubgraph<'b, G>> for SpanningSubgraph<'b, G>where
G: 'b + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
impl<'a, 'b, G> EdgeTypes<'a, SpanningSubgraph<'b, G>> for SpanningSubgraph<'b, G>where
G: 'b + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
source§impl<'a, G> Incidence for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
impl<'a, G> Incidence for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
fn out_edges(
&self,
v: <SpanningSubgraph<'a, G> as WithVertex>::Vertex
) -> <SpanningSubgraph<'a, G> as EdgeTypes<'_, SpanningSubgraph<'a, G>>>::OutEdgeIter
fn out_edges_ends(
&self,
v: Self::Vertex
) -> EdgesEnds<'_, Self, Self::OutEdgeIter> ⓘ
fn out_edges_with_ends(
&self,
v: Self::Vertex
) -> EdgesWithEnds<'_, Self, Self::OutEdgeIter> ⓘ
source§impl<'a, G> VertexList for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>> + VertexList,
impl<'a, G> VertexList for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>> + VertexList,
fn num_vertices(&self) -> usize
fn vertices(
&self
) -> <SpanningSubgraph<'a, G> as VertexTypes<'_, SpanningSubgraph<'a, G>>>::VertexIter
source§impl<'a, 'b, G> VertexTypes<'a, SpanningSubgraph<'b, G>> for SpanningSubgraph<'b, G>where
G: 'b + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
impl<'a, 'b, G> VertexTypes<'a, SpanningSubgraph<'b, G>> for SpanningSubgraph<'b, G>where
G: 'b + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
type VertexIter = <G as VertexTypes<'b, G>>::VertexIter
type OutNeighborIter = OutNeighborFromOutEdge<'b, G, <SpanningSubgraph<'b, G> as EdgeTypes<'a, SpanningSubgraph<'b, G>>>::OutEdgeIter>
source§impl<'a, G> WithEdge for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
impl<'a, G> WithEdge for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
type Kind = <G as WithEdge>::Kind
type Edge = <G as WithEdge>::Edge
type OptionEdge = <G as WithEdge>::OptionEdge
fn source(
&self,
e: <SpanningSubgraph<'a, G> as WithEdge>::Edge
) -> <SpanningSubgraph<'a, G> as WithVertex>::Vertex
fn target(
&self,
e: <SpanningSubgraph<'a, G> as WithEdge>::Edge
) -> <SpanningSubgraph<'a, G> as WithVertex>::Vertex
fn orientation(
&self,
e: <SpanningSubgraph<'a, G> as WithEdge>::Edge
) -> Orientation
fn end_vertices(
&self,
e: <SpanningSubgraph<'a, G> as WithEdge>::Edge
) -> (<SpanningSubgraph<'a, G> as WithVertex>::Vertex, <SpanningSubgraph<'a, G> as WithVertex>::Vertex)
fn opposite(
&self,
u: <SpanningSubgraph<'a, G> as WithVertex>::Vertex,
e: <SpanningSubgraph<'a, G> as WithEdge>::Edge
) -> <SpanningSubgraph<'a, G> as WithVertex>::Vertex
fn get_reverse(
&self,
e: <SpanningSubgraph<'a, G> as WithEdge>::Edge
) -> Option<<SpanningSubgraph<'a, G> as WithEdge>::Edge>
fn ends<'a, I, O>(&'a self, item: I) -> Owhere
I: Ends<'a, Self, O>,
fn with_ends<I>(
&self,
iter: I
) -> EdgesWithEnds<'_, Self, <I as IntoIterator>::IntoIter> ⓘwhere
I: IntoIterator,
<I as IntoIterator>::Item: IntoOwned<Self::Edge>,
fn is_incident(&self, v: Self::Vertex, e: Self::Edge) -> bool
fn edge_none() -> Self::OptionEdge
fn edge_some(e: Self::Edge) -> Self::OptionEdge
fn edge_prop<P, T>(&self, value: T) -> Pwhere
P: EdgePropMutNew<Self, T>,
T: Clone,
fn edge_prop_from_fn<P, F, T>(&self, fun: F) -> Pwhere
Self: EdgeList,
P: EdgePropMutNew<Self, T>,
F: FnMut(Self::Edge) -> T,
T: Default + Clone,
source§impl<'a, G, T> WithEdgeProp<T> for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>> + WithEdgeProp<T>,
impl<'a, G, T> WithEdgeProp<T> for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>> + WithEdgeProp<T>,
type EdgeProp = DelegateEdgeProp<G, T>
source§impl<'a, G> WithVertex for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
impl<'a, G> WithVertex for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>,
type Vertex = <G as WithVertex>::Vertex
type OptionVertex = <G as WithVertex>::OptionVertex
fn vertex_none() -> Self::OptionVertex
fn vertex_some(v: Self::Vertex) -> Self::OptionVertex
fn vertex_prop<P, T>(&self, value: T) -> Pwhere
P: VertexPropMutNew<Self, T>,
T: Clone,
source§impl<'a, G, T> WithVertexProp<T> for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>> + WithVertexProp<T>,
impl<'a, G, T> WithVertexProp<T> for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<<G as WithEdge>::Edge, Global>> + WithVertexProp<T>,
§type VertexProp = DelegateVertexProp<G, T>
type VertexProp = DelegateVertexProp<G, T>
The vertex property type.