Struct rust_graph::graph::AdjListGraph
[−]
[src]
pub struct AdjListGraph<V = (), E = ()> { /* fields omitted */ }
Methods
impl<V: Clone, E: Clone + Ord> AdjListGraph<V, E>
[src]
pub fn new(is_directed: bool) -> AdjListGraph<V, E>
[src]
pub fn size(&self) -> usize
[src]
pub fn num_edges(&self) -> usize
[src]
pub fn is_directed(&self) -> bool
[src]
pub fn add_node(&mut self, n: usize)
[src]
pub fn add_node_with_prop(&mut self, n: usize, v: V)
[src]
pub fn add_nodes(&mut self, vertices: Vec<usize>)
[src]
pub fn add_nodes_with_prop(&mut self, vertices: Vec<(usize, V)>)
[src]
pub fn contains_node(&self, node: usize) -> bool
[src]
pub fn copy_node_to(&self, other: &mut AdjListGraph<V, E>, v: usize)
[src]
pub fn add_edge(&mut self, from: usize, to: usize)
[src]
pub fn add_edge_with_prop(&mut self, from: usize, to: usize, e: E)
[src]
pub fn add_edges(&mut self, edges: Vec<(usize, usize)>)
[src]
pub fn add_edges_with_prop(&mut self, edges: Vec<(usize, usize, E)>)
[src]
pub fn contains_edge(&self, from: usize, to: usize) -> bool
[src]
pub fn copy_edge_to(
&self,
other: &mut AdjListGraph<V, E>,
from: usize,
to: usize
)
[src]
&self,
other: &mut AdjListGraph<V, E>,
from: usize,
to: usize
)
pub fn node_prop(&self, node: usize) -> Option<V>
[src]
pub fn edge_prop(&self, from: usize, to: usize) -> Option<E>
[src]
pub fn nodes_iter<'a>(&'a self) -> Keys<'a, usize, Option<V>>
[src]
pub fn edges_iter<'a>(&'a self) -> Keys<'a, (usize, usize), Option<E>>
[src]
pub fn adj_iter<'a>(&'a self, from: usize) -> Iter<'a, usize>
[src]
Trait Implementations
impl<V: Clone + PartialEq, E: Clone + PartialEq + Ord> PartialEq for AdjListGraph<V, E>
[src]
fn eq(&self, other: &AdjListGraph<V, E>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<V: Clone + Eq, E: Clone + Eq + Ord> Eq for AdjListGraph<V, E>
[src]
impl<V: Clone, E: Clone + Ord + Debug> Debug for AdjListGraph<V, E>
[src]
Auto Trait Implementations
impl<V, E> Send for AdjListGraph<V, E> where
E: Send,
V: Send,
E: Send,
V: Send,
impl<V, E> Sync for AdjListGraph<V, E> where
E: Sync,
V: Sync,
E: Sync,
V: Sync,