Package protelis.coord.sparsechoice
Class Sparsechoice
-
- All Implemented Interfaces:
public final class Sparsechoice
-
-
Method Summary
Modifier and Type Method Description final static Unit
default()
final static Unit
breakUsingUids(Object uid, Object grain, Object metric)
final static Unit
distanceCompetition(Object d, Object nbrLead, Object uid, Object grain, Object metric)
final static Unit
randomUid()
final static Boolean
S(Number grain, Function1<Unit, Number> metric)
Devices compete against one another to become local leaders, resulting in a random Voronoi partition with a characteristic grain size. final static Boolean
boundedElection(Number localId, Number radius, Number strength, Function1<Unit, Number> metric)
Multi-leader election based on a symmetry breaking value, presented at ACSOS 2022. -
-
Method Detail
-
breakUsingUids
final static Unit breakUsingUids(Object uid, Object grain, Object metric)
-
distanceCompetition
final static Unit distanceCompetition(Object d, Object nbrLead, Object uid, Object grain, Object metric)
-
S
final static Boolean S(Number grain, Function1<Unit, Number> metric)
Devices compete against one another to become local leaders, resulting in a random Voronoi partition with a characteristic grain size.
- Parameters:
grain
- partition dimensionmetric
- estimate distance from the leader- Returns:
true if the current device is the leader, false otherwise
-
boundedElection
final static Boolean boundedElection(Number localId, Number radius, Number strength, Function1<Unit, Number> metric)
Multi-leader election based on a symmetry breaking value, presented at ACSOS 2022. Implemented from <i>Self-stabilising Priority-Based Multi-Leader Election and Network Partitioning</i>. Find more at https://ieeexplore.ieee.org/document/9935012
- Parameters:
localId
- local identifierradius
- extension of the local candidacystrength
- power of the local device candidacymetric
- estimated distance from neighbors- Returns:
true if the current device is the leader, false otherwise
-
-
-
-