OffsetGraphStreamLinkingRule

class OffsetGraphStreamLinkingRule<T, P : Position<P>>(val offset: Int, val graph: <Error class: unknown class>) : LinkingRule<T, P>

A LinkingRule that statically connects nodes as they were configured by GraphStream. An offset is used to determine the id of the environment's nodes when compared to the one of the provided graph.

Constructors

Link copied to clipboard
constructor(offset: Int, graph: <Error class: unknown class>)

Properties

Link copied to clipboard
val graph: <Error class: unknown class>
Link copied to clipboard
val offset: Int

Functions

Link copied to clipboard
open override 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
open override fun isLocallyConsistent(): Boolean

Some rules may require to be evaluated against multiple nodes until the situations gets consistent. For instance, a rule that connects the closest 10 nodes must be evaluated multiple times to get to the correct result (this is because a change in one neighbor may require a disconnection from another node to maintain exactly 10 connections). Most rules do not need such machinery (e.g., connecting to nodes within some statically defined range).