Template Struct cyclic_parameter

Struct Documentation

template<typename T, T(*)() MIN, T(*)() MAX> Acts::cyclic_parameter

type for parameter with cyclic value range

This parameter type is useful to e.g. describe angles.

Template Parameters
  • T: type for boundary value (usually double)

  • MIN: pointer to a constexpr function returning the lower bound of the value range

  • MAX: pointer to a constexpr function returning the upper bound of the value range

Public Static Functions

template<typename U>
U getDifference(const U &first, const U &second)
template<typename U>
U getValue(const U &input)

retrieve value for constrained cyclic parameter value ranges

Return

parameter value in the range [bound_parameter<U,MIN,MAX>::min, bound_parameter<U,MIN,MAX>::max] taking into account the cycle of this parameter type.

Template Parameters
  • U: type of the input parameter

Parameters
  • input: input parameter value

Public Static Attributes

constexpr T max = {MAX()}

upper bound of range

constexpr bool may_modify_value{true}

parameter values may need adjustment

constexpr T min = {MIN()}

lower bound of range