Skip to content

Handle Graph::remove_node index-shifting behaviour #103

Open
@mitchmindtree

Description

@mitchmindtree

Graph::remove_node causes indices to shift if index isn't the last node.

Options to handle this are:

  1. Leave behaviour but document it.
  2. Make each Slot an Option<Slot> and simply make remove_node set the Option<Slot> to None. Document the assumption that user never calls add_node more than MAX_NODES number of times.

I'm currently leaning towards option 2 - any ideas / input appreciated :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions