pub struct UdGraph<T: GraphNode> { /* private fields */ }Expand description
Undirected graph
Implementations§
Source§impl<T: GraphNode> UdGraph<T>
impl<T: GraphNode> UdGraph<T>
pub fn new() -> Self
pub fn add_node(&mut self, node: T) -> u64
Sourcepub fn add_edge(&mut self, from: T, to: T)
pub fn add_edge(&mut self, from: T, to: T)
if any node is not in the graph, it will be added to the graph. the self to self edge adding will be ignored
pub fn add_edge_ref(&mut self, from: &T, to: &T)
pub fn nodes(&self) -> Values<'_, u64, T>
pub fn iter(&self) -> UdGraphIter<'_, T> ⓘ
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for UdGraph<T>
impl<T> RefUnwindSafe for UdGraph<T>where
T: RefUnwindSafe,
impl<T> Send for UdGraph<T>where
T: Send,
impl<T> Sync for UdGraph<T>where
T: Sync,
impl<T> Unpin for UdGraph<T>where
T: Unpin,
impl<T> UnwindSafe for UdGraph<T>where
T: 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