Packages

  • package root
    Definition Classes
    root
  • package it
    Definition Classes
    root
  • package unibo
    Definition Classes
    it
  • package scafi
    Definition Classes
    unibo
  • package macroswarm
    Definition Classes
    scafi
  • trait FastBlocks[E <: Dependency] extends AnyRef

    This trait provides a set of blocks that can be used to implement the fast gradient algorithm and share operator.

    This trait provides a set of blocks that can be used to implement the fast gradient algorithm and share operator. In the future, these blocks will be integrated into the standard library.

    E

    the incarnation of the aggregate system

    Definition Classes
    macroswarm
  • BlocksWithShare
  • ProcessFix

trait BlocksWithShare extends AnyRef

This trait provides a set of blocks that can be used to implement the fast gradient algorithm and share operator. These are twice as fast as the standard blocks.

Self Type
MacroSwarmSupport.BlocksWithShare with E.AggregateProgram with E.StandardSensors with E.BlocksWithGC with MacroSwarmSupport.ProcessFix
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BlocksWithShare
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def CWithShare[P, V](potential: P, accumulator: (V, V) => V, local: V, Null: V)(implicit arg0: Bounded[P]): V

    The C operator (collect-cast) used to collect values along a potential field.

    The C operator (collect-cast) used to collect values along a potential field. This means that can be used to collect values into leader nodes.

    P

    the type of the potential field

    V

    the type of the value

    potential

    the potential field (i.e., the result of a fast gradient)

    accumulator

    the accumulator function

    local

    the local value

    Null

    the null value (i.e. acc(Null, v) = v)

    returns

    the collected values along the potential field

  5. def GAlongWithShare[V](gradient: Double, field: V, accumulator: (V) => V, metric: E.Metric = nbrRange): V

    A generalize gradient operator to accumulate values along a potential field.

    A generalize gradient operator to accumulate values along a potential field.

    V

    the type of the field

    gradient

    the gradient value (i.e., the potential field)

    field

    the field to be accumulated

    accumulator

    the accumulator function

    metric

    the metric used to compute the distance between two devices

    returns

    the accumulated field along the gradient

  6. def GWithShare[V](source: Boolean, field: V, acc: (V) => V, metric: E.Metric = nbrRange): V

    A generalized version of the gradient operator that can be used to accumulate values along the gradient

    A generalized version of the gradient operator that can be used to accumulate values along the gradient

    V

    the type of the field

    source

    the source of the gradient (i.e., the device that has distance 0 from itself)

    field

    the field to be accumulated

    acc

    the accumulator function

    metric

    the metric used to compute the distance between two devices

    returns

    the accumulated field along the gradient

  7. def SWithShare(grain: Double, metric: E.Metric): Boolean

    Sparse choice algorithm used to compute sparse leader in a network.

    Sparse choice algorithm used to compute sparse leader in a network.

    grain

    the grain used to define the distance threshold

    metric

    the metric used to compute the distance between two devices

    returns

    true if the device is a leader, false otherwise

  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def breakUsingUidsWithShare(uid: (Double, E.ID), grain: Double, metric: E.Metric): Boolean

    This function is used to break the symmetry between devices with the same distance from the source.

    This function is used to break the symmetry between devices with the same distance from the source.

    uid

    the unique identifier of the device composed of the distance and the device identifier

    grain

    the grain used to define the distance threshold

    metric

    the metric used to compute the distance between two devices

    returns

    true if the device wins the competition, false otherwise

  10. def broadcastAlongWithShare[V](g: Double, value: V, metric: E.Metric = nbrRange): V

    A generalized version of the broadcast operator that can be used to broadcast values along the gradient

    A generalized version of the broadcast operator that can be used to broadcast values along the gradient

    V

    the type of the value

    g

    the gradient value (i.e., the potential field)

    value

    the value to be broadcasted

    metric

    the metric used to compute the distance between two devices

    returns

    the broadcasted value along the gradient

  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  12. def distanceCompetitionWithShare(nbrInfo: () => ((Double, E.ID), Double), localInfo: ((Double, E.ID), Double), grain: Double, metric: E.Metric): (Double, E.ID)

    This function is used to compute the distance competition between two devices.

    This function is used to compute the distance competition between two devices. The competition is based on the distance between the two devices and the grain. The grain is a parameter that is used to define the distance threshold. If the distance between the two devices is less than the grain, the competition is based on the distance. Otherwise, the competition is based on the distance between the device and the grain.

    nbrInfo

    the information of the neighbor computed through the share operator

    localInfo

    the information of the local device

    grain

    the grain used to define the distance threshold

    metric

    the metric used to compute the distance between two devices

    returns

    the information of the device that wins the competition (i.e., the leader)

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  15. def fastGradient(source: Boolean, metric: E.Metric = nbrRange): Double

    Tha gradient algorithm used to compute the distance from the source.

    Tha gradient algorithm used to compute the distance from the source. Internally it uses the share operator.

    source

    the source of the gradient (i.e., the device that has distance 0 from itself)

    metric

    the metric used to compute the distance between two devices

    returns

    the distance from the source

  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped