template<typename T>
fun::Robin struct

Round Robin.

Template parameters
T

The Robin class is implementing a round-robin algorithm. It is used to cycle through a sequence of elements in a circular manner. The constructor initializes the cycle with a specified number of parts, and each part is assigned a unique key. The exclude method returns an iterable wrapper that excludes a specified part from the cycle.

Constructors, destructors, conversion operators

Robin(T num_parts) explicit

Public functions

auto exclude(T from_part) const -> detail::RobinIterableWrapper< T > -> auto

Public variables

std::vector<detail::RobinSlNode<T>> cycle

Function documentation

template<typename T>
fun::Robin<T>::Robin(T num_parts) explicit

Parameters
num_parts in The parameter num_parts represents the number of parts or elements in the Robin object.

The Robin constructor initializes a cycle of objects with keys ranging from 0 to num_parts-1.

template<typename T>
auto fun::Robin<T>::exclude(T from_part) const -> detail::RobinIterableWrapper< T >

Parameters
from_part in The from_part parameter in the exclude method is the part of the cycle that you want to exclude. It is of type T, which is the same type as the elements in the cycle.
Returns The exclude method in the Robin class returns an iterable wrapper of type detail::RobinIterableWrapper<T>.

The exclude method in the Robin class returns an iterable wrapper that excludes a specified part from the cycle.