For each key, creates a list of all values.
For each key, creates a list of all values. This function is equivalent to:
pairs.groupBy(_._1).mapValues(_.map(_._2))
Invert the Common case of exactly one value for each key
Reverses a graph losslessly None key is for v's with no sources.
join the keys of two maps (similar to outer-join in a DB)
For each key, sum all the values.
For each key, sum all the values. Note that if V is a Monoid, the current implementation will drop from the output any key where the values are all Monoid.zero. If the Semigroup is a Monoid, This function is equivalent to:
pairs.filter(_._2 != Monoid.zero).groupBy(_._1).mapValues(_.map(_._2).sum)
Otherwise, the function is equivalent to:
pairs.groupBy(_._1).mapValues(_.map(_._2).sum)