backtracking / ocamlgraph

OCaml graph library
http://backtracking.github.io/ocamlgraph/
Other
233 stars 60 forks source link

Graph.Pack: parse_dot_file numbers from 1, not from 0 #59

Open eponier opened 7 years ago

eponier commented 7 years ago

Contrary to Rand which starts from 0. This implies that doing in sequence dot_output then parse_dot_file produces a graph with nodes numbered differently. The culprit is https://github.com/backtracking/ocamlgraph/blob/726e8d6e31224eb70f75655579da9a374e910b98/src/pack.ml#L149.

backtracking commented 7 years ago

You're right, that's inconsistent. It would be easy to fix (replacing "let new_node = ref 0" with 1 instead) but I'm a bit afraid it would break existing codes. Still hesitating...