MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
ranges.hpp File Reference
#include <cstddef>
#include <cstdint>
#include <cmath>
#include <stdexcept>
#include <type_traits>
#include <mtl/vec/dense_vector.hpp>

Namespaces

namespace  mtl
namespace  mtl::generators

Functions

template<typename T = double>
vec::dense_vector< T > mtl::generators::arange (std::int64_t start, std::int64_t stop, std::int64_t step=1)
 arange: integer-strided sequence projected into T over the half-open interval [start, stop) (NumPy semantics – the stop value is excluded).
template<typename T = double>
vec::dense_vector< T > mtl::generators::linspace (const T &start, const T &stop, std::size_t steps, bool endpoint=true)
 linspace: steps evenly spaced samples over the interval [start, stop].
template<typename T = double>
vec::dense_vector< T > mtl::generators::logspace (const T &start, const T &stop, std::size_t steps, bool endpoint=true, const T &base=T(10))
 logspace: steps samples whose exponents are evenly spaced over [start, stop]; element i equals base^exponent_i.
template<typename T = double>
vec::dense_vector< T > mtl::generators::geomspace (const T &start, const T &stop, std::size_t steps, bool endpoint=true)
 geomspace: steps samples in a geometric progression from start to stop (NumPy semantics – start and stop are the actual endpoints).