Neighborhood

The type which describes the concentration of a molecule Interface for a neighborhood. When implementing it in a real class, please remember to correctly implement also the equals method inherited from Object.

Parameters

<T>

concentration type

Functions

Link copied to clipboard
abstract fun add(node: Node<T>): Neighborhood<T>
Link copied to clipboard
abstract fun contains(n: Node<T>): Boolean
Verifies if a node is contained inside a neighborhood.
Link copied to clipboard
open fun forEach(action: Consumer<in T>)
Link copied to clipboard
abstract fun getCenter(): Node<T>
Allows to access the central node.
Link copied to clipboard
abstract fun getNeighbors(): ListSet<out Node<T>>
Allows to directly access every node in the neighborhood.
Link copied to clipboard
abstract fun isEmpty(): Boolean
Link copied to clipboard
abstract fun iterator(): Iterator<T>
Link copied to clipboard
abstract fun remove(node: Node<T>): Neighborhood<T>
Link copied to clipboard
abstract fun size(): Int
Link copied to clipboard