pub use super::error::Error;
pub trait Graph {
fn is_empty(&self) -> bool;
fn order(&self) -> usize;
fn size(&self) -> usize;
fn ids(&self) -> Box<dyn Iterator<Item=usize> + '_>;
fn neighbors(
&self, id: usize
) -> Result<Box<dyn Iterator<Item=usize> + '_>, Error>;
fn has_id(&self, id: usize) -> bool;
fn degree(&self, id: usize) -> Result<usize, Error>;
fn edges(&self) -> Box<dyn Iterator<Item=(usize, usize)> + '_>;
fn has_edge(&self, sid: usize, tid: usize) -> Result<bool, Error>;
}