// Set the distance_from_source fields to the number of DP
// iterations needed to update it. Abort if the graph is not a DAG.
// Set the distance_from_source fields to the number of DP
// iterations needed to update it. Abort if the graph is not a DAG.