boundedElection

inline fun <ID : Any, Distance : Comparable<Distance>, Strength : Comparable<Strength>> Aggregate<ID>.boundedElection(strength: Strength, bound: Distance, metric: Field<ID, Distance>, bottom: Distance, crossinline accumulateDistance: Reducer<Distance>, crossinline selectBest: Reducer<Candidacy<ID, Distance, Strength>> = ::maxOf): ID

Bounded election is a self-stabilizing and priority-based multi-leader election algorithm presented in a IEEE ACSOS 2022 paper.

strength defines the priority of the candidate. bound restricts how far the local candidacy can extend. metric is a field that defines the Distance between devices. bottom is the initial Distance of the local candidacy. accumulateDistance defines how Distances are accumulated. The triangular inequality must hold. Provided two candidates, selectBest selects the best Candidacy, defaulting to maxOf


inline fun <ID : Comparable<ID>, Distance : Comparable<Distance>> Aggregate<ID>.boundedElection(bound: Distance, metric: Field<ID, Distance>, bottom: Distance, crossinline accumulateDistance: Reducer<Distance>, crossinline selectBest: Reducer<Candidacy<ID, Distance, ID>> = ::maxOf): ID

Bounded election is a self-stabilizing and priority-based multi-leader election algorithm presented in a IEEE ACSOS 2022 paper.

This version uses the local ID as strength.

bound restricts how far the local candidacy can extend. metric is a field that defines the Distance between devices. bottom is the initial Distance of the local candidacy. accumulateDistance defines how Distances are accumulated. The triangular inequality must hold. Provided two candidates, selectBest selects the best Candidacy, defaulting to maxOf


inline fun <ID : Any, Strength : Comparable<Strength>> Aggregate<ID>.boundedElection(strength: Strength, bound: Double, metric: Field<ID, Double>, crossinline selectBest: Reducer<Candidacy<ID, Double, Strength>> = ::maxOf): ID
inline fun <ID : Any, Strength : Comparable<Strength>> Aggregate<ID>.boundedElection(strength: Strength, bound: Int, metric: Field<ID, Int> = hops(), crossinline selectBest: Reducer<Candidacy<ID, Int, Strength>> = ::maxOf): ID

Bounded election is a self-stabilizing and priority-based multi-leader election algorithm presented in a IEEE ACSOS 2022 paper.

strength defines the priority of the candidate. bound restricts how far the local candidacy can extend. metric is a field that defines the distance between devices. Provided two candidates, selectBest selects the best Candidacy, defaulting to maxOf


inline fun <ID : Comparable<ID>> Aggregate<ID>.boundedElection(bound: Double, metric: Field<ID, Double>, crossinline selectBest: Reducer<Candidacy<ID, Double, ID>> = ::maxOf): ID
inline fun <ID : Comparable<ID>> Aggregate<ID>.boundedElection(bound: Int, metric: Field<ID, Int> = hops(), crossinline selectBest: Reducer<Candidacy<ID, Int, ID>> = ::maxOf): ID

Bounded election is a self-stabilizing and priority-based multi-leader election algorithm presented in a IEEE ACSOS 2022 paper.

This version uses the local ID as strength.

bound restricts how far the local candidacy can extend. metric is a field that defines the distance between devices. Provided two candidates, selectBest selects the best Candidacy, defaulting to maxOf