Trait GraphBuilding

Source
pub trait GraphBuilding<T, W>
where T: Clone + Copy + Eq + Hash + PartialEq, W: Clone + Copy,
{ // Required methods fn add_edge(&mut self, from: T, to: T, weight: W); fn add_node(&mut self, node: T) -> bool; fn remove_edge(&mut self, from: T, to: T) -> Result<(), NodeNotFound>; fn remove_node(&mut self, node: T) -> Result<(), NodeNotFound>; fn has_edge(&self, from: T, to: T) -> bool; }

Required Methods§

Source

fn add_edge(&mut self, from: T, to: T, weight: W)

Source

fn add_node(&mut self, node: T) -> bool

Source

fn remove_edge(&mut self, from: T, to: T) -> Result<(), NodeNotFound>

Source

fn remove_node(&mut self, node: T) -> Result<(), NodeNotFound>

Source

fn has_edge(&self, from: T, to: T) -> bool

Implementors§

Source§

impl<T, W> GraphBuilding<T, W> for DiGraph<T, W>
where T: Clone + Copy + Eq + Hash + PartialEq, W: Clone + Copy,

Source§

impl<T, W> GraphBuilding<T, W> for DiGraphVecEdges<T, W>
where T: Clone + Copy + Eq + Hash + PartialEq, W: Clone + Copy,

Source§

impl<T, W> GraphBuilding<T, W> for UnGraph<T, W>
where T: Clone + Copy + Hash + Eq + PartialEq, W: Clone + Copy,

Source§

impl<T, W> GraphBuilding<T, W> for UnGraphVecEdges<T, W>
where T: Clone + Copy + Hash + Eq + PartialEq, W: Clone + Copy,