pub trait MutableSubgraph: SubgraphBase {
    // Required methods
    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
    );
}
Expand description

A type that represents a mutable subgraph, to which nodes and edges existing in the parent graph can be added, and nodes and edges can be removed.

Required Methods§

source

fn clear(&mut self)

Removes all nodes and edges from the subgraph.

source

fn fill(&mut self)

Adds all nodes and edges from the parent graph to this subgraph.

source

fn enable_node( &mut self, node_index: <<Self as SubgraphBase>::RootGraph as GraphBase>::NodeIndex )

Enables the given node index that exists in the root graph in this subgraph. This method should only be called for nodes that are enabled in the parent of this subgraph.

source

fn enable_edge( &mut self, edge_index: <<Self as SubgraphBase>::RootGraph as GraphBase>::EdgeIndex )

Enables the given edge index that exists in the root graph in this subgraph. This method should only be called for edges that are enabled in the parent of this subgraph.

source

fn disable_node( &mut self, node_index: <<Self as SubgraphBase>::RootGraph as GraphBase>::NodeIndex )

Disables the given node index that exists in the root graph in this subgraph. This method should only be called for nodes that are enabled in the parent of this subgraph.

source

fn disable_edge( &mut self, edge_index: <<Self as SubgraphBase>::RootGraph as GraphBase>::EdgeIndex )

Disables the given edge index that exists in the root graph in this subgraph. This method should only be called for edges that are enabled in the parent of this subgraph.

Implementors§

source§

impl<'a, Graph: ImmutableGraphContainer + SubgraphBase> MutableSubgraph for InducedBitVectorSubgraph<'a, Graph>where Self: GraphBase<NodeIndex = <Graph as GraphBase>::NodeIndex, EdgeIndex = <Graph as GraphBase>::EdgeIndex>,

source§

impl<Graph: ImmutableGraphContainer + SubgraphBase> MutableSubgraph for BitVectorSubgraph<'_, Graph>where Self: GraphBase<NodeIndex = <Graph as GraphBase>::NodeIndex, EdgeIndex = <Graph as GraphBase>::EdgeIndex>,

source§

impl<Graph: ImmutableGraphContainer + SubgraphBase> MutableSubgraph for IncrementalSubgraph<'_, Graph>