use crate::{GraphError, GraphView};
pub trait GraphAlgorithms<N, W>: GraphView<N, W> {
fn find_cycle(&self) -> Result<Option<Vec<usize>>, GraphError>;
fn has_cycle(&self) -> Result<bool, GraphError>;
fn topological_sort(&self) -> Result<Option<Vec<usize>>, GraphError>;
fn is_reachable(&self, start_index: usize, stop_index: usize) -> Result<bool, GraphError>;
fn shortest_path_len(
&self,
start_index: usize,
stop_index: usize,
) -> Result<Option<usize>, GraphError>;
fn shortest_path(
&self,
start_index: usize,
stop_index: usize,
) -> Result<Option<Vec<usize>>, GraphError>;
}