16 #ifndef QM_DSP_TONALESTIMATOR_H 17 #define QM_DSP_TONALESTIMATOR_H 34 for (
int i = 0; i < int(size()); i++) {
35 std::cout << (*this)[i] <<
";";
37 std::cout << std::endl;
44 for (
size_t i = 0; i < 12; (dSum += std::abs((*
this)[i++]))) ;
45 for (
size_t i = 0; i < 12; dSum > 0.0000001?((*this)[i] /= dSum):(*
this)[i]=0.0, i++) ;
49 for (
size_t i = 0; i < 12; ++i) (*
this)[i] = 0.0;
63 for (
int i = 0; i < int(size()); i++) {
64 std::cout << (*this)[i] <<
";";
66 std::cout << std::endl;
72 for (
size_t i = 0; i < 6; i++) {
73 dMag += std::pow((*
this)[i], 2.0);
76 return std::sqrt(dMag);
88 std::valarray< std::valarray<double> >
m_Basis;
91 #endif // _TONALESTIMATOR_
std::valarray< std::valarray< double > > m_Basis
ChromaVector(size_t uSize=12)