convergeSum

inline fun <ID : Any, Potential : Comparable<Potential>> Aggregate<ID>.convergeSum(local: Int, potential: Field<ID, Potential>, selectParent: Comparator<FieldEntry<ID, Potential>> = defaultComparator()): Int
inline fun <ID : Any, Potential : Comparable<Potential>> Aggregate<ID>.convergeSum(local: Int, potential: Potential, selectParent: Comparator<FieldEntry<ID, Potential>> = defaultComparator()): Int

Sums all locals along a spanning tree built according descending the provided potential field. The parent of the current node is selected by picking the minimum as provided by the selectParent comparator.


inline fun <ID : Any, Potential : Comparable<Potential>> Aggregate<ID>.convergeSum(local: Double, potential: Field<ID, Potential>, selectParent: Comparator<FieldEntry<ID, Potential>> = defaultComparator()): Double
inline fun <ID : Any, Potential : Comparable<Potential>> Aggregate<ID>.convergeSum(local: Double, potential: Potential, selectParent: Comparator<FieldEntry<ID, Potential>> = defaultComparator()): Double

Sums all locals along a spanning tree built according descending the provided potential field. The parent of the current node is selected by picking the minimum as provided by the selectParent comparator.


inline fun <ID : Any> Aggregate<ID>.convergeSum(local: Int, sink: Boolean): Int

Sums all locals into the closest sink along a spanning tree built using hopDistanceTo.


inline fun <ID : Any> Aggregate<ID>.convergeSum(local: Double, sink: Boolean): Double

Sums all locals into the closest sink along a spanning tree built using hopDistanceTo.