Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Array_Matrix mbed SerialTxRxIntr F446_AD_DA UIT_FFT_Real
MySpectrogram/LinearPrediction.hpp
- Committer:
- MikamiUitOpen
- Date:
- 2019-11-24
- Revision:
- 7:5ba884060d3b
- Parent:
- 0:a539141b9dec
File content as of revision 7:5ba884060d3b:
//-----------------------------------------------------
// Class for linear prediction (Header)
//
// 2017/02/11, Copyright (c) 2017 MIKAMI, Naoki
//-----------------------------------------------------
#ifndef LINEAR_PREDICTION_HPP
#define LINEAR_PREDICTION_HPP
#include "Array.hpp"
namespace Mikami
{
class LinearPred
{
public:
LinearPred(int nData, int order);
~LinearPred() {}
bool Execute(const float x[], float a[], float &em);
private:
const uint16_t N_DATA_;
uint16_t order_;
Array<float> r_; // for auto-correlation
Array<float> k_; // for PARCOR coefficients
Array<float> am_; // working area
void AutoCorr(const float x[]);
bool Durbin(float a[], float &em);
// disallow copy constructor and assignment operator
LinearPred(const LinearPred& );
LinearPred& operator=(const LinearPred& );
};
}
#endif // LINEAR_PREDICTION_HPP