![]() If (detail_sensativity >= min & detail_sensativity = alpha & detail_sensativity = alpha.end)ĭouble res = y0 + ((x - x0) / (x1 - x0)) * (y1 - y0) Std::vector::const_iterator it = std::find(alpha.begin(), alpha.end(), detail_sensativity) Įlse // we need linear interpolation/extrapolation.ĭouble max = *std::max_element(alpha.begin(), alpha.end()) ĭouble min = *std::min_element(alpha.begin(), alpha.end()) in case the interoplation point alraedy exists in the array ![]() ![]() double Model::Interp1(const std::vector& alpha, const std::vector& varSurf, double detail_sensativity) Please review the extrapolation part as I'm not quite sure about it and comment about the algorithm correctness. ![]()
0 Comments
Leave a Reply. |