ROOT
ROOT project
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
FixedPointStepper< T > Class Template Reference

The specialized Stepper to compute a step with the Fixed Point method. More...

#include <stepper_def.hpp>

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

Public Member Functions

 FixedPointStepper (std::function< double(double)> fun, bool aitken_mode, std::function< double(double)> g_fun)
 The specialized constructor - initializes the function and the fixed point function.
 
Eigen::Vector2d compute_step (Eigen::Vector2d previous_iteration) override
 Specialized method to compute and return a new step with FP.
 
 FixedPointStepper (std::function< double(double)> fun, bool aitken_mode, std::function< double(double)> g_fun)
 
Eigen::Vector2d compute_step (Eigen::Vector2d previous_iteration)
 Virtual function to compute the step for the method -> overridden by all the methods.
 
- Public Member Functions inherited from StepperBase< T >
 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.
 

Private Attributes

std::function< double(double)> fixed_point_function
 tores the fixed point to use in the steps
 

Additional Inherited Members

- Protected Member Functions inherited from StepperBase< T >
Eigen::Vector2d aitken_step (Eigen::Vector2d previous_iter)
 Method to handle the computation of a step using Aitken's acceleration.
 
- Protected Attributes inherited from StepperBase< T >
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 FixedPointStepper< T >

The specialized Stepper to compute a step with the Fixed Point method.

Constructor & Destructor Documentation

◆ FixedPointStepper() [1/2]

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

The specialized constructor - initializes the function and the fixed point function.

Parameters
funThe function to compute the root of
aitken_modeOption to use Aitken's acceleration
g_funThe fixed point function such that g_fun(x) = x, needed for FP method

◆ FixedPointStepper() [2/2]

FixedPointStepper< double >::FixedPointStepper ( std::function< double(double)>  fun,
bool  aitken_mode,
std::function< double(double)>  g_fun 
)

Member Function Documentation

◆ compute_step() [1/2]

Eigen::Vector2d FixedPointStepper< double >::compute_step ( Eigen::Vector2d  )
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

Implements StepperBase< T >.

◆ compute_step() [2/2]

template<typename T >
Eigen::Vector2d FixedPointStepper< T >::compute_step ( Eigen::Vector2d  previous_iteration)
overridevirtual

Specialized method to compute and return a new step with FP.

Parameters
previous_iteration2-dimensional vector storing x(i-1) and f(x(i-1)) - previous guesses
Returns
2-dimensional vector storing x(i) = g_fun(x(i-1)) - where g_fun is the fixed point function - and f(x(i))

Implements StepperBase< T >.

Member Data Documentation

◆ fixed_point_function

template<typename T >
std::function<double(double)> FixedPointStepper< T >::fixed_point_function
private

tores the fixed point to use in the steps


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