isce3 0.25.0
Loading...
Searching...
No Matches
RootFind1dSecant.h
1// 1-D Secant Root finding class
2#pragma once
3
4#include <functional>
5#include <tuple>
6
7#include "detail/RootFind1dBase.h"
8
9namespace isce3 { namespace math {
10
17class RootFind1dSecant : public detail::RootFind1dBase {
18 // aliases
19protected:
20 using func_t = std::function<double(double)>;
21 using tuple4_t = std::tuple<double, double, bool, int>;
22
23public:
24 // inherit all constructors from base class
25 using detail::RootFind1dBase::RootFind1dBase;
26
38 std::tuple<double, double, bool, int> root(
39 const std::function<double(double)>& f, double x0, double x1) const;
40
41private:
55 tuple4_t _secant(const func_t& f, double x0, double x1) const;
56
71 tuple4_t _secant_strict(const func_t& f, double x0, double x1) const;
72};
73
74}} // namespace isce3::math
A class with root method to solve 1-D (single variable) equation f(x)=0 with at least one real-value ...
Definition RootFind1dSecant.h:17
std::tuple< double, double, bool, int > root(const std::function< double(double)> &f, double x0, double x1) const
Find a root of the function "f(x)" closest to its initial values via Secant approach.
Definition RootFind1dSecant.cpp:8
base interpolator is an abstract base class
Definition BinarySearchFunc.cpp:5

Generated for ISCE3.0 by doxygen 1.13.2.