Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
cantaro86
GitHub Repository: cantaro86/Financial-Models-Numerical-Methods
Path: blob/master/src/C/SOR.h
1700 views
1
#ifndef SOR_H
2
#define SOR_H
3
4
5
#include <stdio.h>
6
#include <string.h>
7
#include <stdlib.h>
8
9
10
static const int N = 4;
11
12
void print_matrix(double arr[N][N]);
13
void print_array(double* arr);
14
15
double* SOR(double A[N][N], double* b, double w, double eps, int N_max);
16
double* SOR_trid(double A[N][N], double* b, double w, double eps, int N_max);
17
double* SOR_abc(double aa, double bb, double cc, double* b, int NN, double w, double eps, int N_max);
18
double* SOR_aabbcc(double aa, double bb, double cc, double *b, double *x0, double *x1,
19
int NN, double w, double eps, int N_max);
20
21
22
double dist_square(double* a, double* b);
23
double dist_square2(double* a, double* b, int NN);
24
void print_array_2(double* arr, int NN);
25
26
#endif
27
28