Struct fera_graph::graphs::adaptors::SpanningSubgraph
source · pub struct SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,{ /* private fields */ }
Implementations
sourceimpl<'a, G> SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
impl<'a, G> SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
pub fn add_edge(&mut self, e: Edge<G>)
pub fn set_edges<I>(&mut self, iter: I)where
G: VertexList,
I: IntoIterator,
I::Item: IntoOwned<Edge<G>>,
pub fn add_edges<I>(&mut self, iter: I)where
I: IntoIterator,
I::Item: IntoOwned<Edge<G>>,
pub fn clear_edges(&mut self)where
G: VertexList,
pub fn replace_edge(&mut self, old: Edge<G>, new: Edge<G>)
pub fn remove_edge(&mut self, e: Edge<G>)
Trait Implementations
sourceimpl<'a, G> Adjacency for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
impl<'a, G> Adjacency for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
fn out_neighbors(&self, v: Vertex<Self>) -> OutNeighborIter<'_, Self>
fn out_degree(&self, v: Vertex<Self>) -> usize
sourceimpl<'a, G> AsRef<G> for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
impl<'a, G> AsRef<G> for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
sourceimpl<'a, G> Choose for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + Choose,
impl<'a, G> Choose for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + Choose,
sourcefn choose_vertex<R: Rng>(&self, rng: R) -> Option<Vertex<Self>>
fn choose_vertex<R: Rng>(&self, rng: R) -> Option<Vertex<Self>>
Returns a random vertex of this graph or
None
if the graph has no vertices.sourcefn choose_out_neighbor<R: Rng>(
&self,
v: Vertex<Self>,
rng: R
) -> Option<Vertex<Self>>
fn choose_out_neighbor<R: Rng>(
&self,
v: Vertex<Self>,
rng: R
) -> Option<Vertex<Self>>
Returns a random neighbor vertex of
v
or None
if v
has no neighbors.sourcefn choose_edge<R: Rng>(&self, rng: R) -> Option<Edge<Self>>
fn choose_edge<R: Rng>(&self, rng: R) -> Option<Edge<Self>>
Returns a random edge of this graph or
None
if the graph has no edges.sourcefn choose_out_edge<R: Rng>(&self, v: Vertex<Self>, rng: R) -> Option<Edge<Self>>
fn choose_out_edge<R: Rng>(&self, v: Vertex<Self>, rng: R) -> Option<Edge<Self>>
Returns a random out edge of
v
or None
if v
has no out edges.sourcefn choose_vertex_iter<R: Rng>(&self, rng: R) -> ChooseVertexIter<'_, Self, R> ⓘ
fn choose_vertex_iter<R: Rng>(&self, rng: R) -> ChooseVertexIter<'_, Self, R> ⓘ
Returns an iterator that repeatedly calls
choose_vertex
.sourcefn choose_out_neighbor_iter<R: Rng>(
&self,
v: Vertex<Self>,
rng: R
) -> ChooseOutNeighborIter<'_, Self, R> ⓘ
fn choose_out_neighbor_iter<R: Rng>(
&self,
v: Vertex<Self>,
rng: R
) -> ChooseOutNeighborIter<'_, Self, R> ⓘ
Returns an iterator that repeatedly calls
choose_out_neighbor(v)
.sourcefn choose_edge_iter<R: Rng>(&self, rng: R) -> ChooseEdgeIter<'_, Self, R> ⓘ
fn choose_edge_iter<R: Rng>(&self, rng: R) -> ChooseEdgeIter<'_, Self, R> ⓘ
Returns an iterator that repeatedly calls
choose_edge
.sourcefn choose_out_edge_iter<R: Rng>(
&self,
v: Vertex<Self>,
rng: R
) -> ChooseOutEdgeIter<'_, Self, R> ⓘ
fn choose_out_edge_iter<R: Rng>(
&self,
v: Vertex<Self>,
rng: R
) -> ChooseOutEdgeIter<'_, Self, R> ⓘ
Returns an iterator that repeatedly calls
choose_out_edge(v)
.sourcefn random_walk<R: Rng>(&self, rng: R) -> RandomWalk<'_, Self, R> ⓘ
fn random_walk<R: Rng>(&self, rng: R) -> RandomWalk<'_, Self, R> ⓘ
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
sourceimpl<'a, G> EdgeList for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
impl<'a, G> EdgeList for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
fn num_edges(&self) -> usize
fn edges(&self) -> EdgeIter<'_, Self>
fn get_edge_by_ends(&self, u: Vertex<Self>, v: Vertex<Self>) -> Option<Edge<Self>>
fn edges_ends(&self) -> EdgesEnds<'_, Self, EdgeIter<'_, Self>> ⓘ
fn edges_with_ends(&self) -> EdgesWithEnds<'_, Self, EdgeIter<'_, Self>> ⓘ
fn edge_by_ends(&self, u: Vertex<Self>, v: Vertex<Self>) -> Edge<Self>
sourceimpl<'a, 'b, G> EdgeTypes<'a, SpanningSubgraph<'b, G>> for SpanningSubgraph<'b, G>where
G: 'b + WithEdge + WithVertexProp<Vec<Edge<G>>>,
impl<'a, 'b, G> EdgeTypes<'a, SpanningSubgraph<'b, G>> for SpanningSubgraph<'b, G>where
G: 'b + WithEdge + WithVertexProp<Vec<Edge<G>>>,
sourceimpl<'a, G> Incidence for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
impl<'a, G> Incidence for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
fn out_edges(&self, v: Vertex<Self>) -> OutEdgeIter<'_, Self>
fn out_edges_ends(
&self,
v: Vertex<Self>
) -> EdgesEnds<'_, Self, OutEdgeIter<'_, Self>> ⓘ
fn out_edges_with_ends(
&self,
v: Vertex<Self>
) -> EdgesWithEnds<'_, Self, OutEdgeIter<'_, Self>> ⓘ
sourceimpl<'a, G> VertexList for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + VertexList,
impl<'a, G> VertexList for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + VertexList,
fn num_vertices(&self) -> usize
fn vertices(&self) -> VertexIter<'_, Self>
sourceimpl<'a, 'b, G> VertexTypes<'a, SpanningSubgraph<'b, G>> for SpanningSubgraph<'b, G>where
G: 'b + WithEdge + WithVertexProp<Vec<Edge<G>>>,
impl<'a, 'b, G> VertexTypes<'a, SpanningSubgraph<'b, G>> for SpanningSubgraph<'b, G>where
G: 'b + WithEdge + WithVertexProp<Vec<Edge<G>>>,
type VertexIter = <G as VertexTypes<'b, G>>::VertexIter
type OutNeighborIter = OutNeighborFromOutEdge<'b, G, <SpanningSubgraph<'b, G> as EdgeTypes<'a, SpanningSubgraph<'b, G>>>::OutEdgeIter>
sourceimpl<'a, G> WithEdge for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
impl<'a, G> WithEdge for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
type Kind = <G as WithEdge>::Kind
type Edge = <G as WithEdge>::Edge
type OptionEdge = <G as WithEdge>::OptionEdge
fn source(&self, e: Edge<Self>) -> Vertex<Self>
fn target(&self, e: Edge<Self>) -> Vertex<Self>
fn orientation(&self, e: Edge<Self>) -> Orientation
fn end_vertices(&self, e: Edge<Self>) -> (Vertex<Self>, Vertex<Self>)
fn opposite(&self, u: Vertex<Self>, e: Edge<Self>) -> Vertex<Self>
fn get_reverse(&self, e: Edge<Self>) -> Option<Edge<Self>>
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::IntoIter> ⓘwhere
I: IntoIterator,
I::Item: IntoOwned<Edge<Self>>,
fn is_incident(&self, v: Vertex<Self>, e: Edge<Self>) -> bool
fn edge_none() -> OptionEdge<Self>
fn edge_some(e: Edge<Self>) -> OptionEdge<Self>
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(Edge<Self>) -> T,
T: Default + Clone,
sourceimpl<'a, G, T> WithEdgeProp<T> for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + WithEdgeProp<T>,
impl<'a, G, T> WithEdgeProp<T> for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + WithEdgeProp<T>,
type EdgeProp = DelegateEdgeProp<G, T>
sourceimpl<'a, G> WithVertex for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
impl<'a, G> WithVertex for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
type Vertex = <G as WithVertex>::Vertex
type OptionVertex = <G as WithVertex>::OptionVertex
fn vertex_none() -> OptionVertex<Self>
fn vertex_some(v: Vertex<Self>) -> OptionVertex<Self>
fn vertex_prop<P, T>(&self, value: T) -> Pwhere
P: VertexPropMutNew<Self, T>,
T: Clone,
sourceimpl<'a, G, T> WithVertexProp<T> for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + WithVertexProp<T>,
impl<'a, G, T> WithVertexProp<T> for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + WithVertexProp<T>,
type VertexProp = DelegateVertexProp<G, T>
type VertexProp = DelegateVertexProp<G, T>
The vertex property type.
impl<'a, G> BasicEdgeProps for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + BasicEdgeProps,
impl<'a, G> BasicProps for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + BasicProps,
impl<'a, G> BasicVertexProps for SpanningSubgraph<'a, G>where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + BasicVertexProps,
Auto Trait Implementations
impl<'a, G> RefUnwindSafe for SpanningSubgraph<'a, G>where
G: RefUnwindSafe,
<G as WithEdge>::Edge: RefUnwindSafe,
<G as WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>>::VertexProp: RefUnwindSafe,
impl<'a, G> Send for SpanningSubgraph<'a, G>where
G: Sync,
<G as WithEdge>::Edge: Send,
<G as WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>>::VertexProp: Send,
impl<'a, G> Sync for SpanningSubgraph<'a, G>where
G: Sync,
<G as WithEdge>::Edge: Sync,
<G as WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>>::VertexProp: Sync,
impl<'a, G> Unpin for SpanningSubgraph<'a, G>where
<G as WithEdge>::Edge: Unpin,
<G as WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>>::VertexProp: Unpin,
impl<'a, G> UnwindSafe for SpanningSubgraph<'a, G>where
G: RefUnwindSafe,
<G as WithEdge>::Edge: UnwindSafe,
<G as WithVertexProp<Vec<<G as WithEdge>::Edge, Global>>>::VertexProp: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more