added graph that incrementally removes cycles upon insertion of new weighted edges.