make heap support all iteratiable object, set the distance of disconected vertices to zero in graph