use std::borrow::Cow;
use crate::decomposition::indices::{GraphIndex, GraphIndexInteger};
pub mod implementations;
pub trait StaticGraph {
type IndexType: GraphIndexInteger;
type NodeIndex: GraphIndex;
type EdgeIndex: GraphIndex;
fn node_indices(&self) -> impl Iterator<Item = Self::NodeIndex>;
fn edge_indices(&self) -> impl Iterator<Item = Self::EdgeIndex>;
fn node_count(&self) -> usize;
fn edge_count(&self) -> usize;
fn node_name(&self, node_index: Self::NodeIndex) -> Cow<'_, str>;
fn incident_edges(&self, node: Self::NodeIndex) -> impl Iterator<Item = Self::EdgeIndex>;
fn edge_endpoints(&self, edge: Self::EdgeIndex) -> (Self::NodeIndex, Self::NodeIndex);
fn edges_between(
&self,
u: Self::NodeIndex,
v: Self::NodeIndex,
) -> impl Iterator<Item = Self::EdgeIndex>;
}
pub trait NamedNodeData {
fn name(&'_ self) -> Cow<'_, str>;
}
pub trait NamedEdgeData {
fn name(&'_ self) -> Cow<'_, str>;
}