In the impl for lax::hypergraph::Hypergraph, add a function to delete a list of nodes
pub fn delete_nodes(&mut self, ids: &[NodeId]) {
todo!()
}
You can assume that each id in ids is a valid NodeId for this Hypergraph (and panic if it's out-of-bounds).
You will need to:
- Remove each node from the list of node labels
- Remove old nodes and renumber remaining nodes in the adjacency list
- Renumber and remove nodes in the quotient map
NOTE: this method takes a slice of node ids, since removing them one-at-a-time will be less efficient.
In the
implforlax::hypergraph::Hypergraph, add a function to delete a list of nodesYou can assume that each
idinidsis a validNodeIdfor thisHypergraph(and panic if it's out-of-bounds).You will need to:
NOTE: this method takes a slice of node ids, since removing them one-at-a-time will be less efficient.