general improvements

-default weights computed (length of edge) if no weight given
- function _sort_edges in the Grapgh class