Trait fera_graph::props::WithVertexProp
[−]
[src]
pub trait WithVertexProp<T>: WithVertex { type VertexProp: VertexPropMutNew<Self, T>; fn default_vertex_prop(&self, value: T) -> DefaultVertexPropMut<Self, T>
where
T: Clone, { ... } 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, { ... } }
A graph that has a default vertex property type, that is, has a default implementation to associated values with vertices.
Associated Types
type VertexProp: VertexPropMutNew<Self, T>
The vertex property type.
Provided Methods
fn default_vertex_prop(&self, value: T) -> DefaultVertexPropMut<Self, T> where
T: Clone,
T: Clone,
Creates a new default vertex property where the initial value associated with each vertex
is value
.
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,
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)
.
Implementations on Foreign Types
impl<'a, G: WithVertexProp<T>, T> WithVertexProp<T> for &'a G
[src]
type VertexProp = RefVertexProp<G, T>
fn default_vertex_prop(&self, value: T) -> DefaultVertexPropMut<Self, T> where
T: Clone,
[src]
T: Clone,
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,
Implementors
impl<'a, G, T> WithVertexProp<T> for Subgraph<'a, G> where
G: 'a + Graph + WithVertexProp<T>, type VertexProp = DelegateVertexProp<G, 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>;impl<V, K, T> WithVertexProp<T> for AdjSet<V, K> where
V: AdjSetVertex,
K: AdjSetEdgeKind<V>,
T: Clone, type VertexProp = HashMapProp<V, T>;impl<T, K: CompleteEdgeKind> WithVertexProp<T> for Complete<K> type VertexProp = VecVertexProp<Complete<K>, T>;
impl<T, V: Num, K: StaticEdgeKind> WithVertexProp<T> for Static<V, K> type VertexProp = VecVertexProp<Self, T>;