ClosestN

open class ClosestN<T, P : Position<P>?> : LinkingRule<T, P>

Non local-consistent rule that connect the closest N nodes together. Two nodes get connected if either one belongs to the set of the ten devices closest to the other.

Parameters

<T>

Concentration type

<P>

Inheritors

Constructors

Link copied to clipboard
constructor(nodeCount: Int, expectedNodes: Int, maxNodes: Int)
constructor(nodeCount: Int, expectedNodes: Int)
constructor(nodeCount: Int)

Functions

Link copied to clipboard
fun computeNeighborhood(center: Node<T>, environment: Environment<T, P>): Neighborhood<T>
Produces a new neighborhood for specified node considering its position.
Link copied to clipboard
Some rules may require to be evaluated against multiple nodes until the situations gets consistent.
Link copied to clipboard
infix fun LinkingRule<*, *>.shouldEqual(other: LinkingRule<*, *>)