Struct fera_graph::prelude::SpanningSubgraph
[−]
[src]
pub struct SpanningSubgraph<'a, G> where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>, { /* fields omitted */ }
Methods
impl<'a, G> SpanningSubgraph<'a, G> where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
[src]
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
fn add_edge(&mut self, e: Edge<G>)
[src]
fn set_edges<I>(&mut self, iter: I) where
G: VertexList,
I: IntoIterator,
I::Item: IntoOwned<Edge<G>>,
[src]
G: VertexList,
I: IntoIterator,
I::Item: IntoOwned<Edge<G>>,
fn add_edges<I>(&mut self, iter: I) where
I: IntoIterator,
I::Item: IntoOwned<Edge<G>>,
[src]
I: IntoIterator,
I::Item: IntoOwned<Edge<G>>,
fn clear_edges(&mut self) where
G: VertexList,
[src]
G: VertexList,
fn replace_edge(&mut self, old: Edge<G>, new: Edge<G>)
[src]
fn remove_edge(&mut self, e: Edge<G>)
[src]
Trait Implementations
impl<'a, G> AsRef<G> for SpanningSubgraph<'a, G> where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
[src]
G: 'a + 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>>>,
[src]
G: 'b + WithEdge + WithVertexProp<Vec<Edge<G>>>,
type VertexIter = VertexIter<'b, G>
type OutNeighborIter = OutNeighborFromOutEdge<'b, G, OutEdgeIter<'a, Self>>
impl<'a, G> WithVertex for SpanningSubgraph<'a, G> where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
[src]
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
type Vertex = Vertex<G>
type OptionVertex = OptionVertex<G>
fn vertex_none() -> OptionVertex<Self>
[src]
fn vertex_some(v: Vertex<Self>) -> OptionVertex<Self>
[src]
fn vertex_prop<P, T>(&self, value: T) -> P where
P: VertexPropMutNew<Self, T>,
T: Clone,
[src]
P: VertexPropMutNew<Self, T>,
T: Clone,
fn vertex_prop_from_fn<P, T, F>(&self, fun: F) -> P where
Self: VertexList,
P: VertexPropMutNew<Self, T>,
F: FnMut(Vertex<Self>) -> T,
T: Default + Clone,
[src]
Self: VertexList,
P: VertexPropMutNew<Self, T>,
F: FnMut(Vertex<Self>) -> T,
T: Default + Clone,
impl<'a, 'b, G> EdgeTypes<'a, SpanningSubgraph<'b, G>> for SpanningSubgraph<'b, G> where
G: 'b + WithEdge + WithVertexProp<Vec<Edge<G>>>,
[src]
G: 'b + WithEdge + WithVertexProp<Vec<Edge<G>>>,
impl<'a, G> WithEdge for SpanningSubgraph<'a, G> where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
[src]
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
type Kind = G::Kind
type Edge = Edge<G>
type OptionEdge = OptionEdge<G>
fn source(&self, e: Edge<Self>) -> Vertex<Self>
[src]
fn target(&self, e: Edge<Self>) -> Vertex<Self>
[src]
fn orientation(&self, e: Edge<Self>) -> Orientation
[src]
fn end_vertices(&self, e: Edge<Self>) -> (Vertex<Self>, Vertex<Self>)
[src]
fn opposite(&self, u: Vertex<Self>, e: Edge<Self>) -> Vertex<Self>
[src]
fn get_reverse(&self, e: Edge<Self>) -> Option<Edge<Self>>
[src]
fn ends<'a, I, O>(&'a self, item: I) -> O where
I: Ends<'a, Self, O>,
[src]
I: Ends<'a, Self, O>,
fn with_ends<I>(&self, iter: I) -> EdgesWithEnds<Self, I::IntoIter> where
I: IntoIterator,
I::Item: IntoOwned<Edge<Self>>,
[src]
I: IntoIterator,
I::Item: IntoOwned<Edge<Self>>,
fn is_incident(&self, v: Vertex<Self>, e: Edge<Self>) -> bool
[src]
fn reverse(&self, e: Edge<Self>) -> Edge<Self> where
Self: WithEdge<Kind = Undirected>,
[src]
Self: WithEdge<Kind = Undirected>,
fn edge_none() -> OptionEdge<Self>
[src]
fn edge_some(e: Edge<Self>) -> OptionEdge<Self>
[src]
fn edge_prop<P, T>(&self, value: T) -> P where
P: EdgePropMutNew<Self, T>,
T: Clone,
[src]
P: EdgePropMutNew<Self, T>,
T: Clone,
fn edge_prop_from_fn<P, F, T>(&self, fun: F) -> P where
Self: EdgeList,
P: EdgePropMutNew<Self, T>,
F: FnMut(Edge<Self>) -> T,
T: Default + Clone,
[src]
Self: EdgeList,
P: EdgePropMutNew<Self, T>,
F: FnMut(Edge<Self>) -> T,
T: Default + Clone,
impl<'a, G> VertexList for SpanningSubgraph<'a, G> where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + VertexList,
[src]
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + VertexList,
fn num_vertices(&self) -> usize
[src]
fn vertices(&self) -> VertexIter<Self>
[src]
impl<'a, G> EdgeList for SpanningSubgraph<'a, G> where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
[src]
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
fn num_edges(&self) -> usize
[src]
fn edges(&self) -> EdgeIter<Self>
[src]
fn get_edge_by_ends(
&self,
u: Vertex<Self>,
v: Vertex<Self>
) -> Option<Edge<Self>>
[src]
&self,
u: Vertex<Self>,
v: Vertex<Self>
) -> Option<Edge<Self>>
fn edges_ends(&self) -> EdgesEnds<Self, EdgeIter<Self>>
[src]
fn edges_with_ends(&self) -> EdgesWithEnds<Self, EdgeIter<Self>>
[src]
fn edge_by_ends(&self, u: Vertex<Self>, v: Vertex<Self>) -> Edge<Self>
[src]
impl<'a, G> Adjacency for SpanningSubgraph<'a, G> where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
[src]
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
fn out_neighbors(&self, v: Vertex<Self>) -> OutNeighborIter<Self>
[src]
fn out_degree(&self, v: Vertex<Self>) -> usize
[src]
impl<'a, G> Incidence for SpanningSubgraph<'a, G> where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
[src]
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>>,
fn out_edges(&self, v: Vertex<Self>) -> OutEdgeIter<Self>
[src]
fn out_edges_ends(&self, v: Vertex<Self>) -> EdgesEnds<Self, OutEdgeIter<Self>>
[src]
fn out_edges_with_ends(
&self,
v: Vertex<Self>
) -> EdgesWithEnds<Self, OutEdgeIter<Self>>
[src]
&self,
v: Vertex<Self>
) -> EdgesWithEnds<Self, OutEdgeIter<Self>>
impl<'a, G, T> WithVertexProp<T> for SpanningSubgraph<'a, G> where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + WithVertexProp<T>,
[src]
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + WithVertexProp<T>,
type VertexProp = DelegateVertexProp<G, T>
The vertex property type.
fn default_vertex_prop(&self, value: T) -> DefaultVertexPropMut<Self, T> where
T: Clone,
[src]
T: Clone,
Creates a new default vertex property where the initial value associated with each vertex is value
. Read more
fn default_vertex_prop_from_fn<P, F>(&self, fun: F) -> P where
Self: VertexList,
P: VertexPropMutNew<Self, T>,
F: FnMut(Vertex<Self>) -> T,
T: Default + Clone,
[src]
Self: VertexList,
P: VertexPropMutNew<Self, T>,
F: FnMut(Vertex<Self>) -> T,
T: Default + Clone,
Creates a new default vertex property where the initial value associated with each vertex v
is produced by fun(v)
. Read more
impl<'a, G, T> WithEdgeProp<T> for SpanningSubgraph<'a, G> where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + WithEdgeProp<T>,
[src]
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + WithEdgeProp<T>,
type EdgeProp = DelegateEdgeProp<G, T>
fn default_edge_prop(&self, value: T) -> DefaultEdgePropMut<Self, T> where
T: Clone,
[src]
T: Clone,
Creates a new default edge property where the initial value associated with each edge is value
. Read more
fn default_edge_prop_from_fn<P, F>(&self, fun: F) -> P where
Self: EdgeList,
P: EdgePropMutNew<Self, T>,
F: FnMut(Edge<Self>) -> T,
T: Default + Clone,
[src]
Self: EdgeList,
P: EdgePropMutNew<Self, T>,
F: FnMut(Edge<Self>) -> T,
T: Default + Clone,
Creates a new default edge property where the initial value associated with each edge e
is produced by fun(e)
. Read more
impl<'a, G> BasicVertexProps for SpanningSubgraph<'a, G> where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + BasicVertexProps,
[src]
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + BasicVertexProps,
impl<'a, G> BasicEdgeProps for SpanningSubgraph<'a, G> where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + BasicEdgeProps,
[src]
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,
[src]
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + BasicProps,
impl<'a, G> Choose for SpanningSubgraph<'a, G> where
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + Choose,
[src]
G: 'a + WithEdge + WithVertexProp<Vec<Edge<G>>> + Choose,
fn choose_vertex<R: Rng>(&self, rng: R) -> Option<Vertex<Self>>
[src]
Returns a random vertex of this graph or None
if the graph has no vertices.
fn choose_out_neighbor<R: Rng>(
&self,
v: Vertex<Self>,
rng: R
) -> Option<Vertex<Self>>
[src]
&self,
v: Vertex<Self>,
rng: R
) -> Option<Vertex<Self>>
Returns a random neighbor vertex of v
or None
if v
has no neighbors.
fn choose_edge<R: Rng>(&self, rng: R) -> Option<Edge<Self>>
[src]
Returns a random edge of this graph or None
if the graph has no edges.
fn choose_out_edge<R: Rng>(&self, v: Vertex<Self>, rng: R) -> Option<Edge<Self>>
[src]
Returns a random out edge of v
or None
if v
has no out edges.
fn choose_vertex_iter<R: Rng>(&self, rng: R) -> ChooseVertexIter<Self, R>
[src]
Returns an iterator that repeatedly calls choose_vertex
.
fn choose_out_neighbor_iter<R: Rng>(
&self,
v: Vertex<Self>,
rng: R
) -> ChooseOutNeighborIter<Self, R>
[src]
&self,
v: Vertex<Self>,
rng: R
) -> ChooseOutNeighborIter<Self, R>
Returns an iterator that repeatedly calls choose_out_neighbor(v)
.
fn choose_edge_iter<R: Rng>(&self, rng: R) -> ChooseEdgeIter<Self, R>
[src]
Returns an iterator that repeatedly calls choose_edge
.
fn choose_out_edge_iter<R: Rng>(
&self,
v: Vertex<Self>,
rng: R
) -> ChooseOutEdgeIter<Self, R>
[src]
&self,
v: Vertex<Self>,
rng: R
) -> ChooseOutEdgeIter<Self, R>
Returns an iterator that repeatedly calls choose_out_edge(v)
.
fn random_walk<R: Rng>(&self, rng: R) -> RandomWalk<Self, R>
[src]
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