nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
quantiz.hpp
Go to the documentation of this file.
1
3// toolboxes/comm/include/nk/comm/source/quantiz.hpp
4//
5// Scalar quantizer applier.
6
7#pragma once
8
9#include <memory_resource>
10#include <nk/value/value.hpp>
11
12namespace nk::comm {
13
16
17
29Value quantiz_indx(const Value &sig, const Value &partition,
30 std::pmr::memory_resource *mr = nullptr);
31
38
50quantiz(const Value &sig, const Value &partition, const Value &codebook,
51 std::pmr::memory_resource *mr = nullptr);
52
53
55} // namespace nk::comm
Core MATLAB-compatible multidimensional array and scalar value type.
Definition value.hpp:61
Value quantiz_indx(const Value &sig, const Value &partition, std::pmr::memory_resource *mr=nullptr)
One-output form of quantiz — bin index per sample (indx = quantiz(sig, partition)).
QuantizResult quantiz(const Value &sig, const Value &partition, const Value &codebook, std::pmr::memory_resource *mr=nullptr)
Three-output form of quantiz ([indx, quantv, distor] = quantiz(sig, partition, codebook)).
Result of the three-output form of quantiz.
Definition quantiz.hpp:33
double distor
mean((sig - quantv)^2).
Definition quantiz.hpp:36
Value indx
Bin index per sample.
Definition quantiz.hpp:34
Value quantv
codebook(indx + 1).
Definition quantiz.hpp:35