GRASS Programmer's Manual  6.4.4(2014)-r
svd.c File Reference
#include <math.h>
#include <grass/gis.h>
#include <grass/gmath.h>
Include dependency graph for svd.c:

Go to the source code of this file.

Macros

#define PYTHAG(a, b)
 
#define MAX(a, b)
 
#define SIGN(a, b)   ((b) >= 0.0 ? fabs(a) : -fabs(a))
 
#define TOL   1e-8
 

Functions

int G_svdcmp (double **a, int m, int n, double *w, double **v)
 
int G_svbksb (double **u, double w[], double **v, int m, int n, double b[], double x[])
 
int G_svelim (double *w, int n)
 

Macro Definition Documentation

#define MAX (   a,
  b 
)
Value:
(maxarg1=(a),maxarg2=(b),(maxarg1) > (maxarg2) ?\
(maxarg1) : (maxarg2))
float b
Definition: named_colr.c:8

Definition at line 12 of file svd.c.

Referenced by G_svdcmp().

#define PYTHAG (   a,
  b 
)
Value:
((at=fabs(a)) > (bt=fabs(b)) ? \
(ct=bt/at,at*sqrt(1.0+ct*ct)) : (bt ? (ct=at/bt,bt*sqrt(1.0+ct*ct)): 0.0))
float b
Definition: named_colr.c:8

Definition at line 7 of file svd.c.

Referenced by G_svdcmp().

#define SIGN (   a,
  b 
)    ((b) >= 0.0 ? fabs(a) : -fabs(a))

Definition at line 14 of file svd.c.

Referenced by G_svdcmp().

#define TOL   1e-8

Definition at line 264 of file svd.c.

Referenced by G_svelim().

Function Documentation

int G_svbksb ( double **  u,
double  w[],
double **  v,
int  m,
int  n,
double  b[],
double  x[] 
)

Definition at line 237 of file svd.c.

References G_alloc_vector(), G_free_vector(), and dialogs::s.

int G_svdcmp ( double **  a,
int  m,
int  n,
double *  w,
double **  v 
)

Definition at line 16 of file svd.c.

References tools::flag, g, G_alloc_vector(), G_free_vector(), dialogs::h, MAX, PYTHAG, dialogs::s, SIGN, and y.

int G_svelim ( double *  w,
int  n 
)

Definition at line 266 of file svd.c.

References TOL.