Struct fera_graph::graphs::static_::Static
[−]
[src]
pub struct Static<V: Num, K: StaticEdgeKind> { /* fields omitted */ }
Trait Implementations
impl<V: Clone + Num, K: Clone + StaticEdgeKind> Clone for Static<V, K> where
K::Edge: Clone,
[src]
K::Edge: Clone,
fn clone(&self) -> Static<V, K>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<V: Debug + Num, K: Debug + StaticEdgeKind> Debug for Static<V, K> where
K::Edge: Debug,
[src]
K::Edge: Debug,
impl<V: PartialEq + Num, K: PartialEq + StaticEdgeKind> PartialEq for Static<V, K> where
K::Edge: PartialEq,
[src]
K::Edge: PartialEq,
fn eq(&self, __arg_0: &Static<V, K>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Static<V, K>) -> bool
[src]
This method tests for !=
.
impl<V: Num, K: StaticEdgeKind> WithBuilder for Static<V, K>
[src]
type Builder = StaticBuilder<V, K>
The builder for this graph type.
fn builder(num_vertices: usize, num_edges: usize) -> Self::Builder
[src]
Creates a new builder for a graph of this type with n
vertices and initial capacity for m
edges. Read more
fn new_with_edges<I>(n: usize, edges: I) -> Self where
I: IntoIterator<Item = (usize, usize)>,
[src]
I: IntoIterator<Item = (usize, usize)>,
Creates a new graph with n
vertices from edges
iterator. Read more
fn new_empty(n: usize) -> Self
[src]
Creates a graph with n
vertices and no edges.
fn new_complete(n: usize) -> Self where
Self: WithEdge<Kind = Undirected>,
[src]
Self: WithEdge<Kind = Undirected>,
Creates a complete graph with n
vertices. Read more
fn new_complete_binary_tree(h: u32) -> Self where
Self: WithEdge<Kind = Undirected>,
[src]
Self: WithEdge<Kind = Undirected>,
Creates a graph that is a complete binary tree with height h
. Read more
fn new_random_tree<R: Rng>(n: usize, rng: R) -> Self
[src]
Creates a graph with n
vertices that is a tree, that is, is connected and acyclic. Read more
fn new_random_tree_with_diameter<R: Rng>(n: u32, d: u32, rng: R) -> Option<Self>
[src]
Similar to [new_random_tree
] but creates a tree with diameter d
. Returns None
if the diameter is invalid. Read more
fn new_gn<R>(n: usize, rng: R) -> Self where
Self::Kind: UniformEdgeKind,
R: Rng,
[src]
Self::Kind: UniformEdgeKind,
R: Rng,
Creates a random graph with n
vertices.
fn new_gn_connected<R: Rng>(n: usize, rng: R) -> Self where
Self::Kind: UniformEdgeKind,
[src]
Self::Kind: UniformEdgeKind,
Creates a random connected graph with n
vertices.
fn new_gnm<R>(n: usize, m: usize, rng: R) -> Option<Self> where
Self::Kind: UniformEdgeKind,
R: Rng,
[src]
Self::Kind: UniformEdgeKind,
R: Rng,
Creates a random graph with n
vertices and m
edges. Read more
fn new_gnm_connected<R: Rng>(n: usize, m: usize, rng: R) -> Option<Self> where
Self::Kind: UniformEdgeKind,
[src]
Self::Kind: UniformEdgeKind,
Creates a random connected graph (weakly connected if Self
is a digraph) with n
vertices and m
edges. Read more
impl<V: Num, K: StaticEdgeKind> WithVertex for Static<V, K>
[src]
type Vertex = StaticVertex<V>
type OptionVertex = OptionalMax<StaticVertex<V>>
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<V: Num, K: StaticEdgeKind> WithEdge for Static<V, K>
[src]
type Kind = K::Kind
type Edge = K::Edge
type OptionEdge = OptionalMax<Self::Edge>
fn orientation(&self, _e: Edge<Self>) -> Orientation
[src]
fn source(&self, e: Edge<Self>) -> Vertex<Self>
[src]
fn target(&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 end_vertices(&self, e: Edge<Self>) -> (Vertex<Self>, Vertex<Self>)
[src]
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 opposite(&self, u: Vertex<Self>, e: Edge<Self>) -> Vertex<Self>
[src]
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, V: Num, K: StaticEdgeKind> VertexTypes<'a, Static<V, K>> for Static<V, K>
[src]
type VertexIter = V::Range
type OutNeighborIter = OutNeighborFromOutEdge<'a, Self, OutEdgeIter<'a, Self>>
impl<'a, V: Num, K: StaticEdgeKind> EdgeTypes<'a, Static<V, K>> for Static<V, K>
[src]
impl<V: Num, K: StaticEdgeKind> VertexList for Static<V, K>
[src]
fn num_vertices(&self) -> usize
[src]
fn vertices(&self) -> VertexIter<Self>
[src]
impl<V: Num, K: StaticEdgeKind> EdgeList for Static<V, K>
[src]
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<V: Num, K: StaticEdgeKind> Adjacency for Static<V, K>
[src]
fn out_neighbors(&self, v: Vertex<Self>) -> OutNeighborIter<Self>
[src]
fn out_degree(&self, v: Vertex<Self>) -> usize
[src]
impl<V: Num, K: StaticEdgeKind> Incidence for Static<V, K>
[src]
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<V: Num, K: StaticEdgeKind> WithVertexIndexProp for Static<V, K>
[src]
type VertexIndexProp = SVertexIndexProp
fn vertex_index(&self) -> VertexIndexProp<Self>
[src]
Creates an vertex index map.
impl<V: Num, K: StaticEdgeKind> WithEdgeIndexProp for Static<V, K>
[src]
type EdgeIndexProp = SEdgeIndexProp<K>
fn edge_index(&self) -> EdgeIndexProp<Self>
[src]
Creates an edge index map.
impl<T, V: Num, K: StaticEdgeKind> WithVertexProp<T> for Static<V, K>
[src]
type VertexProp = VecVertexProp<Self, 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<V: Num, K: StaticEdgeKind> BasicVertexProps for Static<V, K>
[src]
impl<T, V: Num, K: StaticEdgeKind> WithEdgeProp<T> for Static<V, K>
[src]
type EdgeProp = VecEdgeProp<Self, 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<V: Num, K: StaticEdgeKind> BasicEdgeProps for Static<V, K>
[src]
impl<V: Num, K: StaticEdgeKind> BasicProps for Static<V, K>
[src]
impl<V: Num, K: StaticEdgeKind> Choose for Static<V, K>
[src]
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