 |
NumCpp
1.0
A C++ implementation of the Python Numpy library
|
Go to the documentation of this file.
61 const std::function<
double(
double)>&
f,
62 const std::function<
double(
double)>& fPrime) noexcept :
78 const uint32 maxNumIterations,
79 const std::function<
double(
double)>&
f,
80 const std::function<
double(
double)>& fPrime) noexcept :
104 double fxPrime = fPrime_(x);
108 x = calculateX(x, fx, fxPrime);
111 fxPrime = fPrime_(x);
121 const std::function<double(
double)> f_;
122 const std::function<double(
double)> fPrime_;
133 double calculateX(
double x,
double fx,
double fxPrime) noexcept
135 return x - fx / fxPrime;
Iteration(double epsilon) noexcept
Definition: Iteration.hpp:56
ABC for iteration classes to derive from.
Definition: Iteration.hpp:47
void incrementNumberOfIterations()
Definition: Iteration.hpp:105
std::uint32_t uint32
Definition: Types.hpp:41
const double epsilon_
Definition: Iteration.hpp:115
void resetNumberOfIterations() noexcept
Definition: Iteration.hpp:94
Definition: Coordinate.hpp:45
~Newton() noexcept=default
Newton(const double epsilon, const uint32 maxNumIterations, const std::function< double(double)> &f, const std::function< double(double)> &fPrime) noexcept
Definition: Newton.hpp:77
dtype f(dtype inDofN, dtype inDofD)
Definition: f.hpp:58
double solve(double x)
Definition: Newton.hpp:99
Newton(const double epsilon, const std::function< double(double)> &f, const std::function< double(double)> &fPrime) noexcept
Definition: Newton.hpp:60
Definition: Newton.hpp:49