pub struct UndirectedGraph<N = String, V = i64>{ /* private fields */ }
Implementations§
Source§impl<N, V> UndirectedGraph<N, V>
impl<N, V> UndirectedGraph<N, V>
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
Trait Implementations§
Source§impl<N, V> AsMut<AdjacencyTable<N, V>> for UndirectedGraph<N, V>
impl<N, V> AsMut<AdjacencyTable<N, V>> for UndirectedGraph<N, V>
Source§fn as_mut(&mut self) -> &mut AdjacencyTable<N, V>
fn as_mut(&mut self) -> &mut AdjacencyTable<N, V>
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl<N, V> AsRef<AdjacencyTable<N, V>> for UndirectedGraph<N, V>
impl<N, V> AsRef<AdjacencyTable<N, V>> for UndirectedGraph<N, V>
Source§fn as_ref(&self) -> &AdjacencyTable<N, V>
fn as_ref(&self) -> &AdjacencyTable<N, V>
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<N, V> Clone for UndirectedGraph<N, V>
impl<N, V> Clone for UndirectedGraph<N, V>
Source§fn clone(&self) -> UndirectedGraph<N, V>
fn clone(&self) -> UndirectedGraph<N, V>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<N, V> Contain<Edge<N, V>> for UndirectedGraph<N, V>
impl<N, V> Contain<Edge<N, V>> for UndirectedGraph<N, V>
Source§fn contains(&self, elem: &Edge<N, V>) -> bool
fn contains(&self, elem: &Edge<N, V>) -> bool
Contain::contains returns true if the given element is in the Contain instance
Source§fn contains_all(&self, iter: impl IntoIterator<Item = T>) -> bool
fn contains_all(&self, iter: impl IntoIterator<Item = T>) -> bool
Contain::contains_all returns true if all elements in the given iterator are in the Contain instance
Source§fn contains_some(&self, iter: impl IntoIterator<Item = T>) -> bool
fn contains_some(&self, iter: impl IntoIterator<Item = T>) -> bool
Contain::contains_some returns true if any element in the given iterator is in the Contain instance
Source§impl<N, V> Contain<N> for UndirectedGraph<N, V>
impl<N, V> Contain<N> for UndirectedGraph<N, V>
Source§fn contains(&self, elem: &N) -> bool
fn contains(&self, elem: &N) -> bool
Contain::contains returns true if the given element is in the Contain instance
Source§fn contains_all(&self, iter: impl IntoIterator<Item = T>) -> bool
fn contains_all(&self, iter: impl IntoIterator<Item = T>) -> bool
Contain::contains_all returns true if all elements in the given iterator are in the Contain instance
Source§fn contains_some(&self, iter: impl IntoIterator<Item = T>) -> bool
fn contains_some(&self, iter: impl IntoIterator<Item = T>) -> bool
Contain::contains_some returns true if any element in the given iterator is in the Contain instance
Source§impl<N, V> Debug for UndirectedGraph<N, V>
impl<N, V> Debug for UndirectedGraph<N, V>
Source§impl<N, V> Default for UndirectedGraph<N, V>
impl<N, V> Default for UndirectedGraph<N, V>
Source§fn default() -> UndirectedGraph<N, V>
fn default() -> UndirectedGraph<N, V>
Returns the “default value” for a type. Read more
Source§impl<'de, N, V> Deserialize<'de> for UndirectedGraph<N, V>
impl<'de, N, V> Deserialize<'de> for UndirectedGraph<N, V>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<N, V> From<AdjacencyTable<N, V>> for UndirectedGraph<N, V>
impl<N, V> From<AdjacencyTable<N, V>> for UndirectedGraph<N, V>
Source§fn from(store: AdjacencyTable<N, V>) -> Self
fn from(store: AdjacencyTable<N, V>) -> Self
Converts to this type from the input type.
Source§impl<N, V> Graph<N, V> for UndirectedGraph<N, V>
impl<N, V> Graph<N, V> for UndirectedGraph<N, V>
Source§fn store_mut(&mut self) -> &mut AdjacencyTable<N, V>
fn store_mut(&mut self) -> &mut AdjacencyTable<N, V>
Graph::store_mut returns an owned, mutable instance of the AdjacencyTable
Source§fn store(&self) -> &AdjacencyTable<N, V>
fn store(&self) -> &AdjacencyTable<N, V>
Graph::store returns an owned instance of the AdjacencyTable
Source§fn add_edges(&mut self, iter: impl IntoIterator<Item = Edge<N, V>>)
fn add_edges(&mut self, iter: impl IntoIterator<Item = Edge<N, V>>)
Graph::add_edges insert several edges into the graph
Source§fn add_node(&mut self, node: N) -> bool
fn add_node(&mut self, node: N) -> bool
Graph::add_node if the given Node is not already in the Graph, insert the Node and return true; else return false
Source§fn add_nodes(&mut self, iter: impl IntoIterator<Item = N>)
fn add_nodes(&mut self, iter: impl IntoIterator<Item = N>)
Graph::add_nodes insert several nodes into the graph
Source§fn contains_edge(&self, edge: &Edge<N, V>) -> bool
fn contains_edge(&self, edge: &Edge<N, V>) -> bool
Graph::contains_edge returns true if the given Edge is in the graph
Source§fn contains_node(&self, node: &N) -> bool
fn contains_node(&self, node: &N) -> bool
Graph::contains_node returns true if the given Node is in the graph
Source§fn degree(&self, node: &N) -> Result<usize, GraphError>
fn degree(&self, node: &N) -> Result<usize, GraphError>
Graph::degree returns the degree of the given Node
Source§fn edges(&self) -> Vec<Edge<N, V>>
fn edges(&self) -> Vec<Edge<N, V>>
Graph::edges returns all of the edges persisting within the graph
Source§fn edges_from(&self, node: &N) -> Result<Vec<Edge<N, V>>, GraphError>
fn edges_from(&self, node: &N) -> Result<Vec<Edge<N, V>>, GraphError>
Graph::edges_from returns all of the edges originating from the given Node
Source§fn edges_to(&self, node: &N) -> Result<Vec<Edge<N, V>>, GraphError>
fn edges_to(&self, node: &N) -> Result<Vec<Edge<N, V>>, GraphError>
Graph::edges_to returns all of the edges terminating at the given Node
Source§fn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Graph::is_connected returns true if the graph is connected
Source§impl<N, V> Index<N> for UndirectedGraph<N, V>
impl<N, V> Index<N> for UndirectedGraph<N, V>
Source§impl<N, V> IndexMut<N> for UndirectedGraph<N, V>
impl<N, V> IndexMut<N> for UndirectedGraph<N, V>
Source§impl<N, V> PartialEq for UndirectedGraph<N, V>
impl<N, V> PartialEq for UndirectedGraph<N, V>
Source§impl<N, V> Serialize for UndirectedGraph<N, V>
impl<N, V> Serialize for UndirectedGraph<N, V>
Source§impl<N, V> Subgraph<N, V> for UndirectedGraph<N, V>
impl<N, V> Subgraph<N, V> for UndirectedGraph<N, V>
fn is_subgraph(&self, graph: impl Graph<N, V>) -> bool
impl<N, V> Eq for UndirectedGraph<N, V>
impl<N, V> GraphExt<N, V> for UndirectedGraph<N, V>
impl<N, V> StructuralPartialEq for UndirectedGraph<N, V>
Auto Trait Implementations§
impl<N, V> Freeze for UndirectedGraph<N, V>
impl<N, V> RefUnwindSafe for UndirectedGraph<N, V>where
N: RefUnwindSafe,
V: RefUnwindSafe,
impl<N, V> Send for UndirectedGraph<N, V>
impl<N, V> Sync for UndirectedGraph<N, V>
impl<N, V> Unpin for UndirectedGraph<N, V>
impl<N, V> UnwindSafe for UndirectedGraph<N, V>where
N: UnwindSafe,
V: UnwindSafe,
Blanket Implementations§
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