Neighborhood

interface Neighborhood<T>

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

Parameters

concentration type

Types

Link copied to clipboard
object Companion

Builders of Neighborhoods, whose neighbors are always sorted.

Properties

Link copied to clipboard
abstract val center: Node<T>

Allows accessing the central node.

Link copied to clipboard
open val isEmpty: Boolean
Link copied to clipboard
abstract val neighbors: PersistentList<Node<T>>

An ordered, read-only view of every node in the neighborhood.

Functions

Link copied to clipboard
open operator fun contains(node: Node<T>): Boolean

Checks whether node belongs to this neighborhood.

Link copied to clipboard
open operator fun minus(node: Node<T>): Neighborhood<T>

Returns a neighborhood without node.

Link copied to clipboard
open operator fun plus(node: Node<T>): Neighborhood<T>

Returns a neighborhood with node among its neighbors.