use crate::{GraphError, GraphView};
pub trait GraphMut<N, W>: GraphView<N, W> {
fn add_node(&mut self, node: N) -> Result<usize, GraphError>;
fn update_node(&mut self, index: usize, node: N) -> Result<(), GraphError>;
fn remove_node(&mut self, index: usize) -> Result<(), GraphError>;
fn add_edge(&mut self, a: usize, b: usize, weight: W) -> Result<(), GraphError>;
fn remove_edge(&mut self, a: usize, b: usize) -> Result<(), GraphError>;
fn add_root_node(&mut self, node: N) -> Result<usize, GraphError>;
fn clear(&mut self) -> Result<(), GraphError>;
}