Trait traitgraph::interface::subgraph::MutableSubgraph
source · 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§
sourcefn enable_node(
&mut self,
node_index: <<Self as SubgraphBase>::RootGraph as GraphBase>::NodeIndex
)
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.
sourcefn enable_edge(
&mut self,
edge_index: <<Self as SubgraphBase>::RootGraph as GraphBase>::EdgeIndex
)
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.
sourcefn disable_node(
&mut self,
node_index: <<Self as SubgraphBase>::RootGraph as GraphBase>::NodeIndex
)
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.
sourcefn disable_edge(
&mut self,
edge_index: <<Self as SubgraphBase>::RootGraph as GraphBase>::EdgeIndex
)
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.