Skip to content

function linspace(T1, T2, size_t, bool, cbool_t<truncated>) expressions

template <typename T = void, bool precise = false, bool truncated = false, typename T1, typename T2,
          typename Tout = or_type<T, ftype<std::common_type_t<T1, T2>>>>
KFR_INTRINSIC expression_linspace<Tout, truncated> linspace(T1 start, T2 stop, size_t size,
                                                            bool endpoint = false, cbool_t<truncated> = { … }

Returns evenly spaced numbers over a specified interval.

Parameters
start The starting value of the sequence
stop The end value of the sequence. if endpoint is false, the last value is excluded
size Number of samples to generate
endpoint If true, stop is the last sample. Otherwise, it is not included
Template parameters
truncated If true, linspace returns exactly size elements, otherwise, returns infinite sequence
precise No longer used since KFR5, calculations are always precise

Defined at base/basic_expressions.hpp:745