Package-level declarations

Types

Link copied to clipboard
interface Field<out T>

A field is a map of messages where the key is the ID of a node and T the associated value.

Functions

Link copied to clipboard
fun <T, V, R> combine(field1: Field<T>, field: Field<V>, transform: (T, V) -> R): Field<R>

Combine two fields with a transform function. The two fields must be aligned, otherwise an error is thrown.

Link copied to clipboard
fun <T : Comparable<T>> Field<T>.max(includingSelf: Boolean = true): T

Get the maximum value of a field.

Link copied to clipboard
fun <T : Comparable<T>> Field<T>.min(includingSelf: Boolean = true): T

Get the minimum value of a field.

Link copied to clipboard
operator fun <T : Number> Field<T>.minus(value: T): Field<T>

Operator to subtract a value to all the values of the field.

operator fun <T : Number> Field<T>.minus(other: Field<T>): Field<T>

Subtract a field with other field. The two fields must be aligned, otherwise an error is thrown.

Link copied to clipboard
operator fun <T : Number> Field<T>.plus(value: T): Field<T>

Operator to sum a value to all the values of the field.

operator fun <T : Number> Field<T>.plus(other: Field<T>): Field<T>

Sum a field with other field. The two fields must be aligned, otherwise an error is thrown.