Replaced the node_distance_q items with boost::tuples, instead
of pairs.