pub struct Subgraph<'a, G>where
G: 'a + Graph,{ /* private fields */ }Trait Implementations§
Source§impl<'a, G> Adjacency for Subgraph<'a, G>where
G: 'a + Graph,
impl<'a, G> Adjacency for Subgraph<'a, G>where
G: 'a + Graph,
fn out_neighbors(&self, v: Vertex<Self>) -> OutNeighborIter<'_, Self>
fn out_degree(&self, v: Vertex<Self>) -> usize
Source§impl<'a, G> Choose for Subgraph<'a, G>where
G: 'a + IncidenceGraph,
impl<'a, G> Choose for Subgraph<'a, G>where
G: 'a + IncidenceGraph,
Source§fn 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.Source§fn 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.Source§fn 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.Source§fn 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.Source§fn 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.Source§fn 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).Source§fn 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.Source§fn 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).Source§fn 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.
Source§impl<'a, G> EdgeList for Subgraph<'a, G>where
G: 'a + Graph,
impl<'a, G> EdgeList for Subgraph<'a, G>where
G: 'a + Graph,
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>
Source§impl<'a, G> Incidence for Subgraph<'a, G>where
G: 'a + Graph,
impl<'a, G> Incidence for Subgraph<'a, G>where
G: 'a + Graph,
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>> ⓘ
Source§impl<'a, G> VertexList for Subgraph<'a, G>where
G: 'a + Graph,
impl<'a, G> VertexList for Subgraph<'a, G>where
G: 'a + Graph,
fn num_vertices(&self) -> usize
fn vertices(&self) -> VertexIter<'_, Self>
Source§impl<'a, 'b, G> VertexTypes<'a, Subgraph<'b, G>> for Subgraph<'b, G>where
G: 'b + Graph,
impl<'a, 'b, G> VertexTypes<'a, Subgraph<'b, G>> for Subgraph<'b, G>where
G: 'b + Graph,
type VertexIter = Cloned<Iter<'a, <G as WithVertex>::Vertex>>
type OutNeighborIter = OutNeighborFromOutEdge<'b, G, <Subgraph<'b, G> as EdgeTypes<'a, Subgraph<'b, G>>>::OutEdgeIter>
Source§impl<'a, G> WithEdge for Subgraph<'a, G>where
G: 'a + Graph,
impl<'a, G> WithEdge for Subgraph<'a, G>where
G: 'a + Graph,
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 reverse(&self, e: Edge<Self>) -> Edge<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> ⓘ
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) -> P
Source§impl<'a, G, T> WithEdgeProp<T> for Subgraph<'a, G>where
G: 'a + Graph + WithEdgeProp<T>,
impl<'a, G, T> WithEdgeProp<T> for Subgraph<'a, G>where
G: 'a + Graph + WithEdgeProp<T>,
type EdgeProp = DelegateEdgeProp<G, T>
Source§fn default_edge_prop(&self, value: T) -> DefaultEdgePropMut<Self, T>where
T: Clone,
fn default_edge_prop(&self, value: T) -> DefaultEdgePropMut<Self, T>where
T: Clone,
Creates a new default edge property where the initial value associated with each edge is
value.Source§fn default_edge_prop_from_fn<P, F>(&self, fun: F) -> P
fn default_edge_prop_from_fn<P, F>(&self, fun: F) -> P
Creates a new default edge property where the initial value associated with each edge
e
is produced by fun(e).Source§impl<'a, G> WithVertex for Subgraph<'a, G>where
G: 'a + Graph,
impl<'a, G> WithVertex for Subgraph<'a, G>where
G: 'a + Graph,
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,
fn vertex_prop_from_fn<P, T, F>(&self, fun: F) -> Pwhere
Self: VertexList,
P: VertexPropMutNew<Self, T>,
F: FnMut(Vertex<Self>) -> T,
T: Default + Clone,
Source§impl<'a, G, T> WithVertexProp<T> for Subgraph<'a, G>where
G: 'a + Graph + WithVertexProp<T>,
impl<'a, G, T> WithVertexProp<T> for Subgraph<'a, G>where
G: 'a + Graph + WithVertexProp<T>,
Source§type VertexProp = DelegateVertexProp<G, T>
type VertexProp = DelegateVertexProp<G, T>
The vertex property type.
Source§fn default_vertex_prop(&self, value: T) -> DefaultVertexPropMut<Self, T>where
T: Clone,
fn default_vertex_prop(&self, value: T) -> DefaultVertexPropMut<Self, T>where
T: Clone,
Creates a new default vertex property where the initial value associated with each vertex
is
value.Source§fn default_vertex_prop_from_fn<P, F>(&self, fun: F) -> Pwhere
Self: VertexList,
P: VertexPropMutNew<Self, T>,
F: FnMut(Vertex<Self>) -> T,
T: Default + Clone,
fn default_vertex_prop_from_fn<P, F>(&self, fun: F) -> Pwhere
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).impl<'a, G> BasicEdgeProps for Subgraph<'a, G>where
G: 'a + Graph,
impl<'a, G> BasicProps for Subgraph<'a, G>where
G: 'a + Graph,
impl<'a, G> BasicVertexProps for Subgraph<'a, G>where
G: 'a + Graph,
Auto Trait Implementations§
impl<'a, G> Freeze for Subgraph<'a, G>
impl<'a, G> RefUnwindSafe for Subgraph<'a, G>where
<G as WithVertexProp<Vec<<G as WithEdge>::Edge>>>::VertexProp: RefUnwindSafe,
G: RefUnwindSafe,
<G as WithVertex>::Vertex: RefUnwindSafe,
<G as WithEdge>::Edge: RefUnwindSafe,
impl<'a, G> Send for Subgraph<'a, G>where
<G as WithVertexProp<Vec<<G as WithEdge>::Edge>>>::VertexProp: Send,
G: Sync,
<G as WithVertex>::Vertex: Send,
<G as WithEdge>::Edge: Send,
impl<'a, G> Sync for Subgraph<'a, G>where
<G as WithVertexProp<Vec<<G as WithEdge>::Edge>>>::VertexProp: Sync,
G: Sync,
<G as WithVertex>::Vertex: Sync,
<G as WithEdge>::Edge: Sync,
impl<'a, G> Unpin for Subgraph<'a, G>where
<G as WithVertexProp<Vec<<G as WithEdge>::Edge>>>::VertexProp: Unpin,
<G as WithVertex>::Vertex: Unpin,
<G as WithEdge>::Edge: Unpin,
impl<'a, G> UnwindSafe for Subgraph<'a, G>where
<G as WithVertexProp<Vec<<G as WithEdge>::Edge>>>::VertexProp: UnwindSafe,
G: RefUnwindSafe,
<G as WithVertex>::Vertex: UnwindSafe,
<G as WithEdge>::Edge: UnwindSafe,
Blanket Implementations§
Source§impl<G> Bfs for Gwhere
G: WithEdge,
impl<G> Bfs for Gwhere
G: WithEdge,
fn bfs<V>(
&self,
vis: V,
) -> BfsAlg<&Self, V, AllVertices<'_, Self>, NewVertexProp<'_, Self, Color>, Owned<BfsQueue<Self>>>where
V: Visitor<Self>,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more