24[[nodiscard]]
constexpr uint64_t
order_key(
double value)
noexcept
29 const auto bits = std::bit_cast<uint64_t>(value + 0.0);
39 return std::numeric_limits<double>::quiet_NaN();
42 return std::bit_cast<double>(bits);
48inline void order_keys(std::span<const double> values, std::span<uint64_t> keys)
noexcept
50 const size_t count = std::min(values.size(), keys.size());
51 for (
size_t i = 0; i <
count; ++i) {
constexpr uint64_t order_sign_bit
constexpr uint64_t order_nan_key
constexpr uint64_t order_key(double value) noexcept
The order key of a value.
void order_keys(std::span< const double > values, std::span< uint64_t > keys) noexcept
Writes the order key of every value, stopping at the shorter span.
constexpr double from_order_key(uint64_t key) noexcept
The value of an order key.
std::vector< double > count(std::span< const double > data, size_t n_windows, uint32_t hop_size, uint32_t window_size)
Sample count per window (as double for pipeline uniformity).