Function Dune::XT::Common::find_largest_by_bisection¶
-
double Dune::XT::Common::find_largest_by_bisection(const double &left, const double &right, const std::function<bool(const double&)> &condition, const double rel_error =
<recovery-expr>(), const double abs_error =<recovery-expr>())¶ Finds the largest number x between left and right, where condition(x) is true, but condition(y) is false for any y > x.
Note
Presumes that: if condition(x_1) == condition(x_2) == value, then there does not exist a x_1 < y < x_2, s.t. condition(y) == !value;