RcdMathLib_doc
Open Source Library for Linear and Non-linear Algebra
damped_newton_raphson.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Zakaria Kasmi <zkasmi@inf.fu-berlin.de>
3  * 2020 Freie Universität Berlin
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser General
6  * Public License v2.1. See the file LICENSE in the top level directory for more
7  * details.
8  */
9 
24 #ifndef DAMPED_NEWTON_RAPHSON_H_
25 #define DAMPED_NEWTON_RAPHSON_H_
26 
27 #include "matrix.h"
28 #include "vector.h"
29 
49 uint8_t damped_newton_raphson(uint8_t f_length, uint8_t n, vector_t x0_arr[],
50  double min_lamda, double eps, uint8_t max_it_num,
51  vector_t est_x_arr[],
52  void (*get_non_lin_sys)(vector_t x_arr[],
53  vector_t f_vec[]),
54  void (*get_jacobian)(vector_t x_arr[],
55  matrix_t J[][n]));
70 double get_damped_norm(uint8_t m, uint8_t n, vector_t x_arr[],
71  void (*get_non_lin_sys)(vector_t x_arr[],
72  vector_t f_vec[]),
73  void (*get_jacobian)(vector_t x_arr[], matrix_t J[][n])
74  );
75 
89 void get_delta_x(uint8_t m, uint8_t n, vector_t x_arr[],
90  void (*get_non_lin_sys)(vector_t x_arr[], vector_t f_vec[]),
91  void (*get_jacobian)(vector_t x_arr[], matrix_t J[][n]),
92  vector_t delta_x_arr[]);
93 
94 #endif /* DAMPED_NEWTON_RAPHSON_H_ */
damped_newton_raphson
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.
Definition: damped_newton_raphson.c:32
vector_t
#define vector_t
Define the data type of the vector elements.
Definition: vector.h:33
matrix.h
Matrix computations.
matrix_t
#define matrix_t
Define the data type of the matrix elements.
Definition: matrix.h:38
vector.h
Vector computations.
get_damped_norm
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.
Definition: damped_newton_raphson.c:104
get_delta_x
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.
Definition: damped_newton_raphson.c:120