Skip to content

Graph.clear doesn't resets ids #14

@lalo2302

Description

@lalo2302

After creating 1..n nodes, clearing a graph and making a new one with new nodes, the node ids aren't reseted.

Replicate

alias Graphvix.{Graph, Node, Edge}

Graph.new(:test)
Node.new(label: "1")
Node.new(label: "2")
Node.new(label: "3")
Graph.get

iex> ...nodes: %{
    1 => %{attrs: [label: "1"]},
    2 => %{attrs: [label: "2"]},
    3 => %{attrs: [label: "3"]}
  }...

Graph.clear
Graph.new(:test2)
Node.new(label: "1")
iex> {4, %{attrs: [label: "2"]}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions