max

fun <ID : Any, T : Comparable<T>> Field<ID, T>.max(reductionType: ReductionType = ExcludingSelf): FieldEntry<ID, T>?

Returns the entry with the maximum value in the field.

By default, the local entry is excluded from the comparison. It is included only if reductionType is it.unibo.collektive.stdlib.util.IncludingSelf.

If the field contains no applicable entries, the result is null.

Return

the entry with the highest value, or null if no neighbors exist.

Parameters

reductionType

specifies whether to include the local entry (default is ExcludingSelf).