58 Bisection(
const double epsilon, std::function<
double(
double)>
f) noexcept :
72 Bisection(
const double epsilon,
const uint32 maxNumIterations, std::function<
double(
double)>
f) noexcept :
92 double solve(
double a,
double b)
95 checkAndFixAlgorithmCriteria(a, b);
97 double x = 0.5 * (a + b);
102 x = calculateX(x, a, b, fx);
113 const std::function<double(
double)> f_;
122 void checkAndFixAlgorithmCriteria(
double &a,
double &b)
const noexcept
141 static double calculateX(
double x,
double &a,
double &b,
double fx)
noexcept
152 return 0.5 * (a + b);
Definition: Bisection.hpp:49
Bisection(const double epsilon, const uint32 maxNumIterations, std::function< double(double)> f) noexcept
Definition: Bisection.hpp:72
double solve(double a, double b)
Definition: Bisection.hpp:92
~Bisection() override=default
Bisection(const double epsilon, std::function< double(double)> f) noexcept
Definition: Bisection.hpp:58
ABC for iteration classes to derive from.
Definition: Iteration.hpp:46
Iteration(double epsilon) noexcept
Definition: Iteration.hpp:54
const double epsilon_
Definition: Iteration.hpp:114
void resetNumberOfIterations() noexcept
Definition: Iteration.hpp:94
void incrementNumberOfIterations()
Definition: Iteration.hpp:103
dtype f(GeneratorType &generator, dtype inDofN, dtype inDofD)
Definition: f.hpp:56
Definition: Bisection.hpp:43
void swap(NdArray< dtype > &inArray1, NdArray< dtype > &inArray2) noexcept
Definition: swap.hpp:42
std::uint32_t uint32
Definition: Types.hpp:40