Skip to content

Generator expressions


gen_cossin function

template <typename T1, typename T2,
          typename TF = ftype<std::common_type_t<T1, T2>>>
generator_cossin<TF> gen_cossin(T1 start, T2 step)

Returns template expression that generates values using the following formula:

\[ x_i= \begin{cases} \cos(start + i \cdot step), & \text{if } i \text{ is even}\\ \sin(start + i \cdot step), & \text{otherwise} \end{cases} \]

gen_exp function

template <typename T1, typename T2,
          typename TF = ftype<std::common_type_t<T1, T2>>>
generator_exp<TF> gen_exp(T1 start, T2 step)

Returns template expression that generates values using the following formula:

\[ x_i = e^{ start + i \cdot step } \]

gen_exp2 function

template <typename T1, typename T2,
          typename TF = ftype<std::common_type_t<T1, T2>>>
generator_exp2<TF> gen_exp2(T1 start, T2 step)

Returns template expression that generates values using the following formula:

\[ x_i = 2^{ start + i \cdot step } \]

gen_expj function

template <typename T1, typename T2,
          typename TF =
              complex<ftype<std::common_type_t<T1, T2>>>>
generator_expj<TF> gen_expj(T1 start, T2 step)

Returns template expression that generates values using the following formula:

\[ x_i = e^{ j ( start + i \cdot step ) } \]

gen_linear function

template <typename T1, typename T2,
          typename TF = ftype<std::common_type_t<T1, T2>>>
generator_linear<TF> gen_linear(T1 start, T2 step)

Returns template expression that generates values starting from the start and using the step as the increment between numbers.

\[ x_i = start + i \cdot step \]

gen_sin function

template <typename T1, typename T2,
          typename TF = ftype<std::common_type_t<T1, T2>>>
generator_sin<TF> gen_sin(T1 start, T2 step)

Returns template expression that generates values using the following formula:

\[ x_i = \sin( start + i \cdot step ) \]

Auto-generated from sources, Revision 6aea976a464de59d522d0c629e64bf0c044e6777, https://github.com/kfrlib/kfr/blob/6aea976a464de59d522d0c629e64bf0c044e6777/include/kfr/