57 template<
typename dtype>
69 return {
static_cast<double>(start) };
71 else if (num == 2 && endPoint)
73 return {
static_cast<double>(start),
static_cast<double>(stop)};
76 const auto base =
nth_root(stop / start, num - 1);
77 const auto logStart =
logb(start, base);
78 const auto logStop =
logb(stop, base);
79 return logspace(logStart, logStop, num, endPoint, base);
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:36
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition: StaticAsserts.hpp:50
bool essentiallyEqual(dtype inValue1, dtype inValue2) noexcept
Definition: essentiallyEqual.hpp:52
Definition: Coordinate.hpp:45
NdArray< double > logspace(dtype start, dtype stop, uint32 num=50, bool endPoint=true, double base=10.0)
Definition: logspace.hpp:57
auto logb(dtype inValue, dtype inBase) noexcept
Definition: logb.hpp:49
NdArray< double > geomspace(dtype start, dtype stop, uint32 num=50, bool endPoint=true)
Definition: geomspace.hpp:58
double nth_root(dtype1 inValue, dtype2 inRoot) noexcept
Definition: nth_root.hpp:46
std::uint32_t uint32
Definition: Types.hpp:40