use std::fs::File;
use std::vec::Vec;
pub trait IGraph<T> {
fn add_node(&mut self, elem: T);
fn node_exists(&self, node: T) -> bool;
fn is_connected(&self, from: T, to: T) -> bool;
fn is_directly_connected(&self, from: T, to: T) -> bool;
fn to_dot_string(&self, graph_name: &str) -> String;
fn to_dot_file(&self, file: &mut File, graph_name: &str);
fn is_empty(&self) -> bool;
fn count_nodes(&self) -> usize;
fn get_nodes(&self) -> Vec<T>;
}
pub trait IDiGraph<T> {
fn add_edge(&mut self, from: T, to: T);
fn all_simple_paths(&self, from: T, to: T) -> Vec<Vec<T>>;
fn get_neighbors(&self, from: T) -> Vec<T>;
}
pub trait IMultiDiGraph<T, E> {
fn add_edge(&mut self, from: T, to: T, edge: E);
fn is_directly_connected_by(&self, from: T, to: T, edge: E) -> bool;
fn all_simple_paths(&self, from: T, to: T) -> Vec<Vec<(T, T, E)>>;
fn get_neighbors(&self, from: T) -> Vec<(T, E)>;
}