16 #ifndef _TONALESTIMATOR_
17 #define _TONALESTIMATOR_
29 { resize(uSize, 0.0f); }
35 for (
int i = 0; i < int(size()); i++)
37 std::cout << (*this)[i] <<
";";
40 std::cout << std::endl;
48 for (
size_t i = 0; i < 12; (dSum += std::abs((*
this)[i++]))) ;
49 for (
size_t i = 0; i < 12; dSum > 0.0000001?((*this)[i] /= dSum):(*
this)[i]=0.0, i++) ;
55 for (
size_t i = 0; i < 12; ++i) (*
this)[i] = 0.0;
71 for (
int i = 0; i < int(size()); i++)
73 std::cout << (*this)[i] <<
";";
76 std::cout << std::endl;
83 for (
size_t i = 0; i < 6; i++)
85 dMag += std::pow((*
this)[i], 2.0);
88 return std::sqrt(dMag);
102 std::valarray< std::valarray<double> >
m_Basis;
ChromaVector(size_t uSize=12)
TCSVector transform2TCS(const ChromaVector &rVector)
virtual ~TonalEstimator()
std::valarray< std::valarray< double > > m_Basis