A metric for graphs