Skip to content

Add lax::open_hypergraph function to delete a node #14

@statusfailed

Description

@statusfailed

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions