Struct labelgraph::DirectedLabelGraph
source · pub struct DirectedLabelGraph<D> { /* private fields */ }
Expand description
Holds the nodes of the graph
Implementations
sourceimpl<D> DirectedLabelGraph<D>
impl<D> DirectedLabelGraph<D>
pub fn new() -> Self
pub fn check_node_exists(&self, node_label: &str) -> bool
pub fn create_node(&mut self, node_label: &str, node_data: D)
pub fn get_node_data(&self, node_label: &str) -> Option<&D>
pub fn get_mut_node_data(&mut self, node_label: &str) -> Option<&mut D>
pub fn unlink_nodes(&mut self, node_label_A: &str, _node_label_B: &str)
pub fn link_nodes(
&mut self,
from_node_label: &str,
to_node_label: &str,
weight: i64
)
pub fn get_inputs_for_node(
&self,
node_label: &str
) -> Option<Vec<LabelGraphEdge>>
pub fn get_outputs_for_node(
&self,
node_label: &str
) -> Option<Vec<LabelGraphEdge>>
Trait Implementations
sourceimpl<D: Clone> Clone for DirectedLabelGraph<D>
impl<D: Clone> Clone for DirectedLabelGraph<D>
sourcefn clone(&self) -> DirectedLabelGraph<D>
fn clone(&self) -> DirectedLabelGraph<D>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<D: Debug> Debug for DirectedLabelGraph<D>
impl<D: Debug> Debug for DirectedLabelGraph<D>
Auto Trait Implementations
impl<D> RefUnwindSafe for DirectedLabelGraph<D>where
D: RefUnwindSafe,
impl<D> Send for DirectedLabelGraph<D>where
D: Send,
impl<D> Sync for DirectedLabelGraph<D>where
D: Sync,
impl<D> Unpin for DirectedLabelGraph<D>
impl<D> UnwindSafe for DirectedLabelGraph<D>where
D: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more