Skip to content

Node.update appears broken #1339

@cemerick

Description

@cemerick

Example:

module Test = struct
  open Core_kernel
  module G = Graphlib.Std.Graphlib.Make(Int)(String)
  let g = Graphlib.Std.Graphlib.create (module G) ~edges:[1, 2, "a"; 2, 3, "b"] ()
  let g' = G.Node.update 2 4 g
  let () = G.edges g'
        |> Sequence.iter ~f:G.Edge.(fun e -> Format.printf "%d %d %s@." (src e) (dst e) (label e))
end

This prints:

2 3 b
4 3 b

I would expect:

1 4 a
4 3 b

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions