23namespace vctr::generators
42 template <is::realNumber ElementType>
51 template <is::realNumber ElementType,
size_t num>
75 template <is::realNumber ElementType>
78 const auto distance = stop - start;
80 VCTR_ASSERT (distance - std::floor (distance) == 0);
82 const auto num = std::abs (
int (distance)) + 1;
83 return makeVector (start, stop, num, includeEnd);
The stack-based container type.
Definition: Array.h:53
constexpr void fillLinspace(ElementType start, ElementType stop, bool includeEnd=true)
Fills the vector with evenly spaced numbers between start and stop.
Definition: VctrBase.h:316
The heap-allocated container type.
Definition: Vector.h:99
Collection of static methods for generating evenly spaced numbers.
Definition: Linspace.h:27
static constexpr Array< ElementType, num > makeArray(ElementType start, ElementType stop, bool includeEnd=true)
Like makeVector, but returns an Array.
Definition: Linspace.h:52
static Vector< ElementType > makeVector(ElementType start, ElementType stop, size_t num, bool includeEnd=true)
Returns a Vector with evenly spaced numbers between start and stop.
Definition: Linspace.h:43
static Vector< ElementType > makeVector(ElementType start, ElementType stop, bool includeEnd=true)
Returns a Vector with values between start and stop and a step of 1.
Definition: Linspace.h:76