Interface LinkingRule

  • All Implemented Interfaces:
    java.io.Serializable

    
    public interface LinkingRule<T, P extends Position<out P>>
     implements Serializable
                        

    An interface that represent an auto-linking logic for nodes within an environment.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Neighborhood<T> computeNeighborhood(Node<T> center, Environment<T, P> environment) Produces a new neighborhood for specified node considering its position.
      abstract boolean isLocallyConsistent() Some rules may require to be evaluated against multiple nodes until the situations gets consistent.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • computeNeighborhood

         abstract Neighborhood<T> computeNeighborhood(Node<T> center, Environment<T, P> environment)

        Produces a new neighborhood for specified node considering its position.

        Parameters:
        center - the node to recompute
        environment - the node's environment
        Returns:

        a neighborhood

      • isLocallyConsistent

         abstract boolean isLocallyConsistent()

        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).

        Returns:

        true if this rule does not need to be recursively re-applied to neighbors to ensure global consistency.