use crate::interface::GraphBase;
pub trait SubgraphBase: GraphBase {
type RootGraph: GraphBase<
NodeData = Self::NodeData,
EdgeData = Self::EdgeData,
NodeIndex = Self::NodeIndex,
EdgeIndex = Self::EdgeIndex,
OptionalNodeIndex = Self::OptionalNodeIndex,
OptionalEdgeIndex = Self::OptionalEdgeIndex,
>;
fn root(&self) -> &Self::RootGraph;
}
pub trait MutableSubgraph: SubgraphBase {
fn clear(&mut self);
fn fill(&mut self);
fn enable_node(
&mut self,
node_index: <<Self as SubgraphBase>::RootGraph as GraphBase>::NodeIndex,
);
fn enable_edge(
&mut self,
edge_index: <<Self as SubgraphBase>::RootGraph as GraphBase>::EdgeIndex,
);
fn disable_node(
&mut self,
node_index: <<Self as SubgraphBase>::RootGraph as GraphBase>::NodeIndex,
);
fn disable_edge(
&mut self,
edge_index: <<Self as SubgraphBase>::RootGraph as GraphBase>::EdgeIndex,
);
}
pub trait EmptyConstructibleSubgraph<'a>: SubgraphBase {
fn new_empty(graph: &'a <Self as SubgraphBase>::RootGraph) -> Self;
}