pub struct Node<'g> { /* private fields */ }Expand description
A node in the graph.
This is used to iterates throught the nodes of a graph.
Implementations§
Source§impl<'g> Node<'g>
impl<'g> Node<'g>
Sourcepub fn neighbors(&self) -> &IndexSet<usize>
pub fn neighbors(&self) -> &IndexSet<usize>
Returns the set of labels of the neighbors of the node.
Sourcepub fn degree(&self) -> usize
pub fn degree(&self) -> usize
Returns the degree of the node. That is, the number of neighbors.
Sourcepub fn has_neighbor(&self, label: usize) -> bool
pub fn has_neighbor(&self, label: usize) -> bool
Checks if a node a neighbor with the given label
Sourcepub fn is_variable(&self) -> bool
pub fn is_variable(&self) -> bool
Checks if a node is a variable.
Sourcepub fn is_constraint(&self) -> bool
pub fn is_constraint(&self) -> bool
Checks if a node is a constraint.
Trait Implementations§
impl<'g> Eq for Node<'g>
impl<'g> StructuralPartialEq for Node<'g>
Auto Trait Implementations§
impl<'g> Freeze for Node<'g>
impl<'g> RefUnwindSafe for Node<'g>
impl<'g> Send for Node<'g>
impl<'g> Sync for Node<'g>
impl<'g> Unpin for Node<'g>
impl<'g> UnsafeUnpin for Node<'g>
impl<'g> UnwindSafe for Node<'g>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.