[−][src]Struct generic_graph::SimpleVertex
A default implementation for vertexes. This implementation should be suitable for most of the problem one can encounter requiring graph.
Contrary to other graph implementation this library does not expect the vertexes to store if they have been visited, or if they were marked. The reason for this is that the author believes such an information should be stored in a structure extern and independent to the graph, this to ensure consistency between threads and to allow different algorithms to use different structures according to their needs
methods are self explanatory
Methods
impl<K: Hash + Eq + Clone, V> SimpleVertex<K, V>[src]
pub fn new(key: K, value: V) -> SimpleVertex<K, V>[src]
Trait Implementations
impl<K: Debug + Hash + Eq + Clone, V: Debug> Debug for SimpleVertex<K, V>[src]
impl<K: Hash + Eq + Clone, V, W: Sum + Sub + Eq + Ord + Copy> DirectedGraph<SimpleVertex<K, V>, DirectedEdge<K, W>, K, V, W, CompoundKey<K>> for AdjacencyGraph<K, V, W>[src]
fn adjacent(&self, from: &K, to: &K) -> bool[src]
fn neighbors(&self, from: &K) -> Vec<&K>[src]
fn leading_to(&self, to: &K) -> Vec<&K>[src]
fn get_vertex(&self, key: &K) -> Option<&SimpleVertex<K, V>>[src]
fn get_mutable_vertex(&mut self, key: &K) -> Option<&mut SimpleVertex<K, V>>[src]
fn get_edge(&self, pair: (&K, &K)) -> Option<&DirectedEdge<K, W>>[src]
fn get_mutable_edge(
&mut self,
pair: (&K, &K)
) -> Option<&mut DirectedEdge<K, W>>[src]
&mut self,
pair: (&K, &K)
) -> Option<&mut DirectedEdge<K, W>>
impl<K: Eq + Hash + Clone, V: Eq> Eq for SimpleVertex<K, V>[src]
impl<K: PartialEq + Hash + Eq + Clone, V: PartialEq> PartialEq<SimpleVertex<K, V>> for SimpleVertex<K, V>[src]
fn eq(&self, other: &SimpleVertex<K, V>) -> bool[src]
fn ne(&self, other: &SimpleVertex<K, V>) -> bool[src]
impl<K: Hash + Eq + Clone, V> StructuralEq for SimpleVertex<K, V>[src]
impl<K: Hash + Eq + Clone, V> StructuralPartialEq for SimpleVertex<K, V>[src]
impl<K: Hash + Eq + Clone, V> Vertex<K, V> for SimpleVertex<K, V>[src]
Auto Trait Implementations
impl<K, V> RefUnwindSafe for SimpleVertex<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for SimpleVertex<K, V> where
K: Send,
V: Send,
K: Send,
V: Send,
impl<K, V> Sync for SimpleVertex<K, V> where
K: Sync,
V: Sync,
K: Sync,
V: Sync,
impl<K, V> Unpin for SimpleVertex<K, V> where
K: Unpin,
V: Unpin,
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for SimpleVertex<K, V> where
K: UnwindSafe,
V: UnwindSafe,
K: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,