DiFfRG
Loading...
Searching...
No Matches
DiFfRG::AbstractRootFinder< 1 > Class Referenceabstract

#include <root_finding.hh>

Inheritance diagram for DiFfRG::AbstractRootFinder< 1 >:
DiFfRG::BisectionRootFinder

Public Member Functions

 AbstractRootFinder (const FUN &f, const double abs_tol=1e-4, const int max_iter=1000)
 
 AbstractRootFinder (const FUN_ARR &f, const double abs_tol=1e-4, const int max_iter=1000)
 
void set_abs_tol (const double abs_tol)
 
void set_max_iter (const uint max_iter)
 
uint get_iter () const
 
double search ()
 

Protected Types

using FUN = std::function<bool(const double)>
 
using FUN_ARR = std::function<bool(const std::array<double, 1> &)>
 

Protected Member Functions

virtual std::array< double, 1 > search_impl ()=0
 

Protected Attributes

FUN_ARR f
 
double abs_tol
 
uint max_iter
 
uint iter
 

Member Typedef Documentation

◆ FUN

using DiFfRG::AbstractRootFinder< 1 >::FUN = std::function<bool(const double)>
protected

◆ FUN_ARR

using DiFfRG::AbstractRootFinder< 1 >::FUN_ARR = std::function<bool(const std::array<double, 1> &)>
protected

Constructor & Destructor Documentation

◆ AbstractRootFinder() [1/2]

DiFfRG::AbstractRootFinder< 1 >::AbstractRootFinder ( const FUN & f,
const double abs_tol = 1e-4,
const int max_iter = 1000 )
inline

◆ AbstractRootFinder() [2/2]

DiFfRG::AbstractRootFinder< 1 >::AbstractRootFinder ( const FUN_ARR & f,
const double abs_tol = 1e-4,
const int max_iter = 1000 )
inline

Member Function Documentation

◆ get_iter()

uint DiFfRG::AbstractRootFinder< 1 >::get_iter ( ) const
inline

◆ search()

double DiFfRG::AbstractRootFinder< 1 >::search ( )
inline

◆ search_impl()

virtual std::array< double, 1 > DiFfRG::AbstractRootFinder< 1 >::search_impl ( )
protectedpure virtual

Implemented in DiFfRG::BisectionRootFinder.

◆ set_abs_tol()

void DiFfRG::AbstractRootFinder< 1 >::set_abs_tol ( const double abs_tol)
inline

◆ set_max_iter()

void DiFfRG::AbstractRootFinder< 1 >::set_max_iter ( const uint max_iter)
inline

Member Data Documentation

◆ abs_tol

double DiFfRG::AbstractRootFinder< 1 >::abs_tol
protected

◆ f

◆ iter

uint DiFfRG::AbstractRootFinder< 1 >::iter
protected

◆ max_iter

uint DiFfRG::AbstractRootFinder< 1 >::max_iter
protected

The documentation for this class was generated from the following file: