Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph.clear doesn't resets ids #14

Open
lalo2302 opened this issue Feb 14, 2018 · 0 comments
Open

Graph.clear doesn't resets ids #14

lalo2302 opened this issue Feb 14, 2018 · 0 comments

Comments

@lalo2302
Copy link

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"]}}
lalo2302 pushed a commit to lalo2302/graphvix that referenced this issue Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant