proteus  1.8.1
C/C++/Fortran libraries
Dsvbksb.cpp
Go to the documentation of this file.
1 #include "Allocation.h"
2 
3 void dsvbksb(double **u, double w[], double **v, int m, int n, double b[], double x[])
4 {
5  int jj,j,i;
6  double s,*tmp;
7 
8  tmp=dvector(1,n);
9  for (j=1;j<=n;j++) {
10  s=0.0;
11  if (w[j]) {
12  for (i=1;i<=m;i++) s += u[i][j]*b[i];
13  s /= w[j];
14  }
15  tmp[j]=s;
16  }
17  for (j=1;j<=n;j++) {
18  s=0.0;
19  for (jj=1;jj<=n;jj++) s += v[j][jj]*tmp[jj];
20  x[j]=s;
21  }
22  free_dvector(tmp,1,n);
23 }
dvector
double * dvector(long nl, long nh)
Definition: Util.cpp:7
w
#define w(x)
Definition: jf.h:22
dsvbksb
void dsvbksb(double **u, double w[], double **v, int m, int n, double b[], double x[])
Definition: Dsvbksb.cpp:3
Allocation.h
s
Double s
Definition: Headers.h:84
n
Int n
Definition: Headers.h:28
v
Double v
Definition: Headers.h:95
free_dvector
void free_dvector(double *v, long nl, long nh)
Definition: Util.cpp:38
u
Double u
Definition: Headers.h:89