Class ClosestN

  • All Implemented Interfaces:
    it.unibo.alchemist.model.LinkingRule , java.io.Serializable

    
    public class ClosestN<T, P extends Position<P>>
     implements LinkingRule<T, P>
                        

    Non local-consistent rule that connect the closest N nodes together. Two nodes get connected if either one belongs to the set of the ten devices closest to the other.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      ClosestN(int n, int expectedNodes, int maxNodes)
      ClosestN(int n, int expectedNodes)
      ClosestN(int n)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

      • ClosestN

        ClosestN(int n, int expectedNodes, int maxNodes)
        Parameters:
        n - neighbors
        expectedNodes - how many nodes are expected to be inserted in the environment (used for optimization)
        maxNodes - the maximum number of nodes for which the connection range will be cached
      • ClosestN

        ClosestN(int n, int expectedNodes)
        Parameters:
        n - neighbors
        expectedNodes - how many nodes are expected to be inserted in the environment (used for optimization)
      • ClosestN

        ClosestN(int n)
        Parameters:
        n - neighbors