let density graph = let n = float_of_int (G.nb_vertex graph) in let ps_edg = n *. (n -. 1.0) in float_of_int (G.nb_edges graph) /. ps_edg