idhat
-
constexpr std::vector<Complex> dhat(const std::vector<Complex> &X, int type = 2) noexcept
Calculates the inverse discrete Hartley transform [1] of a complex sequence.
Parameters
Returns
The discrete inverse Hartley transform may be calculated by applying the discrete Hartley transform on the input sequence and scaling the result by \(1/N\).
Example
std::vector<Complex> X = {1 + 2_j, 2 + 3_j, 3, 4, 5};
std::vector<Complex> Y = idhat(X);
for(int i = 0; i < Y.size(); i++){
std::cout << Y[i] << "\n";
}
Output:
3 + 1j
-1.18819 + 1.15604j
-0.66246 + 0.267261j
-0.33754 - 0.438081j
0.188191 + 0.0147763j
References