// cUpdateAngle.cpp: implementation of the cUpdateAngle class. // ////////////////////////////////////////////////////////////////////// #include #include "cCoeffMatrices.h" #include "cUpdateAngle.h" #include using namespace std; ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// cUpdateAngle::cUpdateAngle(cDataProbModel& DataProbModel): _data_prob_model(DataProbModel), _deriv_uxy(_data_prob_model. DerivAllUxy()) { } cUpdateAngle::~cUpdateAngle() { } double cUpdateAngle::ComputedPhi(size_t k) { cCoeffMatrices CoeffMatrices( _data_prob_model.ProbModel().Angles(),k ); map Theta; // cout<<"Theta=["; for ( cDRotationMatrix::tDrotType RotType = (cDRotationMatrix::tDrotType)0 ; RotType < cDRotationMatrix::NROTT ; RotType=(cDRotationMatrix::tDrotType) ++((int) RotType)) { cSquareMatrix MMat(CoeffMatrices.CoeffMatrix(RotType)); Theta[RotType] = _deriv_uxy.DotProduct(MMat); } double phi = _data_prob_model.ProbModel().Angles().get(k); return Theta[cDRotationMatrix::SIN]*cos( phi ) - Theta[cDRotationMatrix::COS]*sin( phi ); } double cUpdateAngle::ComputeNewPhi(size_t k) { cCoeffMatrices CoeffMatrices( _data_prob_model.ProbModel().Angles(),k ); map Theta; // cout<<"Theta=["; for ( cDRotationMatrix::tDrotType RotType = (cDRotationMatrix::tDrotType)0 ; RotType < cDRotationMatrix::NROTT ; RotType=(cDRotationMatrix::tDrotType) ++((int) RotType)) { cSquareMatrix MMat(CoeffMatrices.CoeffMatrix(RotType)); Theta[RotType] = _deriv_uxy.DotProduct(MMat); // cout<