double DMPTrajectoryGenerator::evaluateBasisFunctionNonExponential(double x, int fun) { int mypos = fun / sigmassize; int sigmapos = fun % sigmassize; double my = baseDef.at(mypos).getMy(); double sigma = baseDef.at(mypos).getSigmas().at(sigmapos); double base = exp( -pow( x - my , 2 ) / (2 * pow(sigma, 2)) ) * x; double normVal = computeNormalization(x); return base / normVal; }
void SHVector::staticInitialization() { m_normalization = new Float[SH_NORMTBL_SIZE*(SH_NORMTBL_SIZE+1)/2]; for (int l=0; l<SH_NORMTBL_SIZE; ++l) for (int m=0; m<=l; ++m) m_normalization[l*(l+1)/2 + m] = computeNormalization(l, m); }