Neighborhood

A neighborhood, namely the set of nodes to which a "central" node is connected to.

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(p: Consumer<in T>)
Link copied to clipboard
abstract fun getCenter(): Node<T>
Allows accessing the central node.
Link copied to clipboard
abstract fun getNeighbors(): ListSet<out Node<T>>
Allows directly accessing 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