Package-level declarations

Functions

Link copied to clipboard
inline fun <ID : Any> Aggregate<ID>.distanceTo(source: Boolean, crossinline metric: () -> Field<ID, Double> = { neighboring(1.0) }): Double

Compute the distance from the closest source, using Doubles.

inline fun <ID : Any, Distance : Comparable<Distance>> Aggregate<ID>.distanceTo(source: Boolean, bottom: Distance, top: Distance, crossinline accumulateDistance: (Distance, Distance) -> Distance, crossinline metric: () -> Field<ID, Distance>): Distance

Compute the Distance from the closest source, starting from bottom and up to top.

Link copied to clipboard
@JvmName(name = "gradientCastDouble")
inline fun <ID : Any, Type> Aggregate<ID>.gradientCast(source: Boolean, local: Type, crossinline accumulateData: (Double, Double, Type) -> Type = { _, _, data -> data }, crossinline metric: () -> Field<ID, Double> = { neighboring(1.0) }): Type
@JvmName(name = "gradientCastInt")
inline fun <ID : Any, Type> Aggregate<ID>.gradientCast(source: Boolean, local: Type, crossinline accumulateData: (Int, Int, Type) -> Type = { _, _, data -> data }, crossinline metric: () -> Field<ID, Int> = { neighboring(1) }): Type
inline fun <ID : Any, Value, Distance : Comparable<Distance>> Aggregate<ID>.gradientCast(source: Boolean, local: Value, bottom: Distance, top: Distance, crossinline accumulateData: (Distance, Distance, Value) -> Value = { _, _, data -> data }, crossinline accumulateDistance: (Distance, Distance) -> Distance, crossinline metric: () -> Field<ID, Distance>): Value

Propagate local values across a spanning tree starting from the closest source.

Link copied to clipboard
inline fun <ID : Any> Aggregate<ID>.intDistanceTo(source: Boolean, crossinline metric: () -> Field<ID, Int> = { neighboring(1) }): Int

Compute the distance from the closest source, using Integers.