double CurveExponentialSkewNormal_Impl::evaluate(const std::vector<double>& x) const {
   OS_ASSERT(x.size() == 1u);
   double z1 = (x[0] - coefficient1C1()) / coefficient2C2();
   double z2 = (exp(coefficient3C3() * x[0]) * coefficient4C4() * x[0] - coefficient1C1()) / 
               coefficient2C2();
   double z3 = -coefficient1C1()/coefficient4C4();
   double numerator = 1.0 + (z2/abs(z2)) * boost::math::erf<double>(abs(z2)/sqrt(2.0));
   numerator *= exp(-0.5 * pow(z1,2));
   double denominator = 1.0 + (z3/abs(z3)) * boost::math::erf<double>(abs(z3)/sqrt(2.0));
   denominator *= exp(-0.5 * pow(z3,2));
   return numerator/denominator;
 }
 double CurveRectangularHyperbola1_Impl::evaluate(const std::vector<double>& x) const {
   OS_ASSERT(x.size() == 1u);
   double result = coefficient1C1() * x[0];
   double temp = coefficient2C2() + x[0];
   result /= temp;
   result += coefficient3C3();
   return result;
 }
 double CurveFanPressureRise_Impl::evaluate(const std::vector<double>& x) const {
   OS_ASSERT(x.size() == 2u);
   double Qfan = x[0];
   double Psm = x[1];
   double result = coefficient1C1() * pow(Qfan,2);
   result += coefficient2C2() * Qfan;
   result += coefficient3C3() * Qfan * sqrt(Psm);
   result += coefficient4C4() * Psm;
   return result;
 }
Example #4
0
 double CurveSigmoid_Impl::evaluate(const std::vector<double>& x) const {
   OS_ASSERT(x.size() == 1u);
   double result = coefficient2C2();
   double temp = coefficient3C3() - x[0];
   temp /= coefficient4C4();
   temp = exp(temp);
   temp = pow(temp,coefficient5C5());
   result /= (1.0 + temp);
   result += coefficient1C1();
   return result;
 }
 double CurveExponentialDecay_Impl::evaluate(const std::vector<double>& x) const {
   OS_ASSERT(x.size() == 1u);
   double result = coefficient1C1();
   result += coefficient2C2() * exp(coefficient3C3() * x[0]);
   return result;
 }