ROOT
ROOT project
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
StepperBase< T > Class Template Referenceabstract

The virtual mother stepper class which defines constructor and method in common for all the methods. More...

#include <stepper_def.hpp>

Inheritance diagram for StepperBase< T >:
Inheritance graph
Collaboration diagram for StepperBase< T >:
Collaboration graph

Public Member Functions

 StepperBase (std::function< double(double)> fun, bool aitken_mode)
 Constructor for virtual Stepper class, which will be inherited by the daughters.
 
virtual ~StepperBase ()=default
 
Eigen::Vector2d step (Eigen::Vector2d previous_step)
 Method handling all the steps involved in computing the new guess.
 

Protected Member Functions

virtual Eigen::Vector2d compute_step (Eigen::Vector2d)=0
 Virtual function to compute the step for the method -> overridden by all the methods.
 
Eigen::Vector2d aitken_step (Eigen::Vector2d previous_iter)
 Method to handle the computation of a step using Aitken's acceleration.
 

Protected Attributes

std::function< double(double)> function
 Function to compute the root of.
 
bool aitken_requirement
 Option to use Aitken's acceleration.
 

Detailed Description

template<typename T>
class StepperBase< T >

The virtual mother stepper class which defines constructor and method in common for all the methods.

Constructor & Destructor Documentation

◆ StepperBase()

template<typename T >
StepperBase< T >::StepperBase ( std::function< double(double)>  fun,
bool  aitken_mode 
)

Constructor for virtual Stepper class, which will be inherited by the daughters.

Parameters
funFunction to compute the root of
aitken_modeOption to apply or not the Aitken's acceleration

◆ ~StepperBase()

template<typename T >
virtual StepperBase< T >::~StepperBase ( )
virtualdefault

Member Function Documentation

◆ aitken_step()

template<typename T >
Eigen::Vector2d StepperBase< T >::aitken_step ( Eigen::Vector2d  previous_iter)
protected

Method to handle the computation of a step using Aitken's acceleration.

Parameters
previous_iter2-dimensional vector storing x(i-1) and f(x(i-1))
Returns
2-dimensional vector storing x(i) - computed with the 3 Aitken's steps - and f(x(i))

◆ compute_step()

template<typename T >
virtual Eigen::Vector2d StepperBase< T >::compute_step ( Eigen::Vector2d  )
protectedpure virtual

Virtual function to compute the step for the method -> overridden by all the methods.

Parameters
previous_iteration2-dimensional vector storing x(i-1) and f(x(i-1)) - previous guesses
Returns
2-dimensional vector storing x(i) and f(x(i)) - new guesses

Implemented in ChordsStepper< T >, BisectionStepper< T >, NewtonRaphsonStepper< T >, FixedPointStepper< T >, NewtonRaphsonStepper< T >, FixedPointStepper< T >, ChordsStepper< T >, and BisectionStepper< T >.

◆ step()

template<typename T >
Eigen::Vector2d StepperBase< T >::step ( Eigen::Vector2d  previous_step)

Method handling all the steps involved in computing the new guess.

Parameters
previous_step2-dimensional vector storing x(i-1) and f(x(i-1)) previous guesses of the method
Returns
2-dimensional vector storing x(i) and f(x(i)) new guesses of the method

Member Data Documentation

◆ aitken_requirement

template<typename T >
bool StepperBase< T >::aitken_requirement
protected

Option to use Aitken's acceleration.

◆ function

template<typename T >
std::function<double(double)> StepperBase< T >::function
protected

Function to compute the root of.


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