|
RcdMathLib_doc
Open Source Library for Linear and Non-linear Algebra
|
Implement the damped Newton–Raphson algorithm. More...
Go to the source code of this file.
Functions | |
| uint8_t | damped_newton_raphson (uint8_t f_length, uint8_t n, vector_t x0_arr[], double min_lamda, double eps, uint8_t max_it_num, vector_t est_x_arr[], void(*get_non_lin_sys)(vector_t x_arr[], vector_t f_vec[]), void(*get_jacobian)(vector_t x_arr[], matrix_t J[][n])) |
| Implements the damped Newton–Raphson algorithm. More... | |
| double | get_damped_norm (uint8_t m, uint8_t n, vector_t x_arr[], void(*get_non_lin_sys)(vector_t x_arr[], vector_t f_vec[]), void(*get_jacobian)(vector_t x_arr[], matrix_t J[][n])) |
| Compute the norm of the damped Newton–Raphson algorithm. More... | |
| void | get_delta_x (uint8_t m, uint8_t n, vector_t x_arr[], void(*get_non_lin_sys)(vector_t x_arr[], vector_t f_vec[]), void(*get_jacobian)(vector_t x_arr[], matrix_t J[][n]), vector_t delta_x_arr[]) |
| Compute the correction vector the damped Newton–Raphson algorithm. More... | |
Implement the damped Newton–Raphson algorithm.
The damped Newton–Raphson algorithm enables to solve multi-variant nonlinear equation systems.
Definition in file damped_newton_raphson.h.
| uint8_t damped_newton_raphson | ( | uint8_t | f_length, |
| uint8_t | n, | ||
| vector_t | x0_arr[], | ||
| double | min_lamda, | ||
| double | eps, | ||
| uint8_t | max_it_num, | ||
| vector_t | est_x_arr[], | ||
| void(*)(vector_t x_arr[], vector_t f_vec[]) | get_non_lin_sys, | ||
| void(*)(vector_t x_arr[], matrix_t J[][n]) | get_jacobian | ||
| ) |
Implements the damped Newton–Raphson algorithm.
The user should provide pointers to non-linear equation systems and Jacobian functions.
| [in] | f_length | length of the error functions vector. |
| [in] | n | length of the start vector. |
| [in] | x0_arr[] | start vector. |
| [in] | min_lamda | minimal damping factor. |
| [in] | eps | accuracy bound. |
| [in] | max_it_num | maximal iteration number of the damped Newton–Raphson algorithm. |
| [out] | est_x_arr[] | estimated (solution) vector. |
| [in] | (*get_non_lin_sys) | pointer to non-linear equation systems. |
| [in] | (*get_jacobian) | pointer to the Jacobian matrix. |
Definition at line 32 of file damped_newton_raphson.c.
References get_damped_norm(), get_delta_x(), vector_add(), vector_copy(), vector_get_norm2(), vector_scalar_mul(), and vector_t.
Referenced by fsolve().
| double get_damped_norm | ( | uint8_t | m, |
| uint8_t | n, | ||
| vector_t | x_arr[], | ||
| void(*)(vector_t x_arr[], vector_t f_vec[]) | get_non_lin_sys, | ||
| void(*)(vector_t x_arr[], matrix_t J[][n]) | get_jacobian | ||
| ) |
Compute the norm of the damped Newton–Raphson algorithm.
The user should provide pointers to non-linear equation systems and Jacobian functions.
| [in] | m | number of the non-linear equations. |
| [in] | n | length of the guess vector. |
| [in] | x_arr[] | guess vector. |
| [in] | (*get_non_lin_sys) | pointer to non-linear equation systems. |
| [in] | (*get_jacobian) | pointer to the Jacobian matrix. |
Definition at line 104 of file damped_newton_raphson.c.
References get_delta_x(), vector_get_norm2(), and vector_t.
Referenced by damped_newton_raphson().
| void get_delta_x | ( | uint8_t | m, |
| uint8_t | n, | ||
| vector_t | x_arr[], | ||
| void(*)(vector_t x_arr[], vector_t f_vec[]) | get_non_lin_sys, | ||
| void(*)(vector_t x_arr[], matrix_t J[][n]) | get_jacobian, | ||
| vector_t | delta_x_arr[] | ||
| ) |
Compute the correction vector the damped Newton–Raphson algorithm.
The user should provide pointers to non-linear equation systems and Jacobian functions.
| [in] | m | number of the non-linear equations. |
| [in] | n | length of the guess vector. |
| [in] | x_arr[] | guess vector. |
| [in] | (*get_non_lin_sys) | pointer to non-linear equation systems. |
| [in] | (*get_jacobian) | pointer to the Jacobian matrix. |
| [in,out] | delta_x_arr[] | the correction vector (term). |
Definition at line 120 of file damped_newton_raphson.c.
References matrix_mul_vec(), matrix_t, moore_penrose_get_pinv(), vector_in_place_scalar_mul(), and vector_t.
Referenced by damped_newton_raphson(), and get_damped_norm().