fix in Graph.pp

This commit is contained in:
Simon Cruanes 2013-03-05 12:06:43 +01:00
parent 9ce511156e
commit 8da095f76b

View file

@ -318,14 +318,13 @@ let pp ~name ?vertices
| None -> mk_v_table graph in
(* map from vertices to integers *)
let get_id =
let count_map = mk_v_table graph
and count = ref 0 in
let count = ref 0 in
fun vertex ->
try PHashtbl.find count_map vertex
try PHashtbl.find vertices vertex
with Not_found ->
let n = !count in
incr count;
PHashtbl.replace count_map vertex n;
PHashtbl.replace vertices vertex n;
n
(* print an attribute *)
and print_attribute formatter attr =