24 std::vector<double> x, std::vector<double> y)
29 OGS_FATAL(
"The given curve is not strong monotonic.");
37 if (std::abs(gradient0) < std::numeric_limits<double>::min())
44 { return this->getDerivative(p) * gradient0 <= 0.; });
49 std::size_t interval_idx = 0;
84 const double xi_1 =
supp_pnts_[interval_idx + 1];
90 const double m = (xi_1 - xi) / (yi_1 - yi);
94 return m * (y - yi) + xi;
std::vector< double > supp_pnts_
std::vector< double > values_at_supp_pnts_
double getDerivative(double const pnt_to_interpolate) const
Calculates derivative using quadratic interpolation and central difference quotient.
bool isStrongMonotonic() const
PiecewiseLinearMonotonicCurve(std::vector< double > x, std::vector< double > y)
double getInverseVariable(const double y) const