euclideanDistance2D

inline fun <ID : Any> Aggregate<ID>.euclideanDistance2D(crossinline extractPosition: (ID) -> Point2D): Field<ID, Double>

Returns a field containing the Euclidean distance from the local node to each neighbor.

Parameters

extractPosition

a function that extracts the position of a node given its ID.


fun <ID : Any> Aggregate<ID>.euclideanDistance2D(localPosition: Point2D): Field<ID, Double>
fun <ID : Any> Aggregate<ID>.euclideanDistance2D(localPosition: Pair<Double, Double>): Field<ID, Double>

Returns a field containing the Euclidean distance from the local node to each neighbor.

Parameters

localPosition

a function that extracts the position of a node given its ID.