Struct newton_rootfinder::iteratives::IterativeParamsFD [−][src]
pub struct IterativeParamsFD { /* fields omitted */ }
Expand description
Extension of iteratives. FD stands for Finite-Difference
In addition to the already defined parameters of an iteratives, The fact that the jacobian is going to be evaluated with finite-differences leads to the necessity to parametrize the way the perturbation on the iteratives are made.
This functionality is provided thourgh the compute_perturbation()
method of the Iterative
trait
Implementations
pub fn new(
max_step_abs: f64,
max_step_rel: f64,
min_value: f64,
max_value: f64,
dx_abs: f64,
dx_rel: f64,
perturbation_method: PerturbationMethod
) -> Self
pub fn extend(
iterative_params: IterativeParams,
dx_abs: f64,
dx_rel: f64,
perturbation_method: PerturbationMethod
) -> Self
pub fn extend(
iterative_params: IterativeParams,
dx_abs: f64,
dx_rel: f64,
perturbation_method: PerturbationMethod
) -> Self
Transform a IterativeParms and extend it into a IterativeParamsFD
Trait Implementations
Returns the “default value” for a type. Read more
Compute a limited update step
This method points is a wrapper around the method of IterativeParams
.
Check its documentation for more details
Compute the perturbation for finite differences evaluation.
For a given f(x), this method compute the dx to use in the formula:
df/dx = (f(x+dx)-f(x))/dx
The parametrization here defines dx with regards to :
- dx_abs: the absolute perturbation step
- dx_rel: the relative perturbation step
For each case we would have :
- dx = dx_abs
- dx = dx_rel*abs(x)
The implementation here allows you to choose and combine the formulas:
- dx = max(dx_abs, dx_rel*abs(x))
- dx = dx_abs + dx_rel*abs(x)
This is achieved through the perturbation_method
field.
It is also possible to get one of the two basic cases by setting the other to 0:
- dx_abs = 0 implies dx = dx_rel*abs(x)
- dx_rel = 0 implies dx = dx_abs
Method to differente without panicking if it is working with finite differences
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for IterativeParamsFD
impl Send for IterativeParamsFD
impl Sync for IterativeParamsFD
impl Unpin for IterativeParamsFD
impl UnwindSafe for IterativeParamsFD
Blanket Implementations
Mutably borrows from an owned value. Read more
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.