grass  7.8.6
About: GRASS (Geographic Resources Analysis Support System) is a raster- and vector-based GIS, image processing system, graphics production system and spatial modeling system.
  Fossies Dox: grass-7.8.6.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ccmath.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
Include dependency graph for ccmath.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  complex
 

Macros

#define XMATH   1
 
#define NULL   ((void *)0
 
#define CPX   1
 

Typedefs

typedef struct complex Cpx
 

Functions

int minv (double *a, int n)
 
int psinv (double *v, int n)
 
int ruinv (double *a, int n)
 
int solv (double *a, double *b, int n)
 
int solvps (double *s, double *x, int n)
 
int solvru (double *a, double *b, int n)
 
void solvtd (double *a, double *b, double *c, double *x, int m)
 
void eigen (double *a, double *eval, int n)
 
void eigval (double *a, double *eval, int n)
 
double evmax (double *a, double *u, int n)
 
int svdval (double *d, double *a, int m, int n)
 
int sv2val (double *d, double *a, int m, int n)
 
int svduv (double *d, double *a, double *u, int m, double *v, int n)
 
int sv2uv (double *d, double *a, double *u, int m, double *v, int n)
 
int svdu1v (double *d, double *a, int m, double *v, int n)
 
int sv2u1v (double *d, double *a, int m, double *v, int n)
 
void mmul (double *mat, double *a, double *b, int n)
 
void rmmult (double *mat, double *a, double *b, int m, int k, int n)
 
void vmul (double *vp, double *mat, double *v, int n)
 
double vnrm (double *u, double *v, int n)
 
void matprt (double *a, int n, int m, char *fmt)
 
void fmatprt (FILE *fp, double *a, int n, int m, char *fmt)
 
void trnm (double *a, int n)
 
void mattr (double *a, double *b, int m, int n)
 
void otrma (double *at, double *u, double *a, int n)
 
void otrsm (double *st, double *u, double *s0, int n)
 
void mcopy (double *a, double *b, int m)
 
void ortho (double *evc, int n)
 
void smgen (double *a, double *eval, double *evec, int n)
 
void house (double *a, double *d, double *ud, int n)
 
void housev (double *a, double *d, double *ud, int n)
 
int qreval (double *eval, double *ud, int n)
 
int qrevec (double *eval, double *evec, double *dp, int n)
 
int qrbdi (double *d, double *e, int n)
 
int qrbdv (double *d, double *e, double *u, int m, double *v, int n)
 
int qrbdu1 (double *d, double *e, double *u, int m, double *v, int n)
 
void ldumat (double *a, double *u, int m, int n)
 
void ldvmat (double *a, double *v, int n)
 
void atou1 (double *a, int m, int n)
 
void atovm (double *v, int n)
 
int cminv (Cpx *a, int n)
 
int csolv (Cpx *a, Cpx *b, int n)
 
void heigvec (Cpx *a, double *eval, int n)
 
void heigval (Cpx *a, double *eval, int n)
 
double hevmax (Cpx *a, Cpx *u, int n)
 
void cmmul (Cpx *c, Cpx *a, Cpx *b, int n)
 
void cmmult (Cpx *c, Cpx *a, Cpx *b, int m, int k, int n)
 
void cvmul (Cpx *vp, Cpx *mat, Cpx *v, int n)
 
Cpx cvnrm (Cpx *u, Cpx *v, int n)
 
void cmprt (Cpx *a, int n, int m, char *fmt)
 
void trncm (Cpx *a, int n)
 
void hconj (Cpx *u, int n)
 
void cmattr (Cpx *a, Cpx *b, int m, int n)
 
void utrncm (Cpx *at, Cpx *u, Cpx *a, int n)
 
void utrnhm (Cpx *ht, Cpx *u, Cpx *h0, int n)
 
void cmcpy (Cpx *a, Cpx *b, int n)
 
void unitary (Cpx *u, int n)
 
void hmgen (Cpx *h, double *eval, Cpx *u, int n)
 
void chouse (Cpx *a, double *d, double *ud, int n)
 
void chousv (Cpx *a, double *d, double *ud, int n)
 
void qrecvc (double *eval, Cpx *evec, double *ud, int n)
 

Macro Definition Documentation

◆ CPX

#define CPX   1

Definition at line 40 of file ccmath.h.

◆ NULL

#define NULL   ((void *)0

Definition at line 32 of file ccmath.h.

◆ XMATH

#define XMATH   1

Definition at line 21 of file ccmath.h.

Typedef Documentation

◆ Cpx

typedef struct complex Cpx

Definition at line 39 of file ccmath.h.

Function Documentation

◆ atou1()

void atou1 ( double *  a,
int  m,
int  n 
)

Definition at line 9 of file atou1.c.

References a, h, and s.

Referenced by sv2u1v(), and svdu1v().

◆ atovm()

void atovm ( double *  v,
int  n 
)

Definition at line 8 of file atovm.c.

References h, and s.

Referenced by sv2u1v().

◆ chouse()

void chouse ( Cpx a,
double *  d,
double *  ud,
int  n 
)

Definition at line 10 of file chouse.c.

References a, d, complex::im, complex::re, u, and x.

Referenced by heigval().

◆ chousv()

void chousv ( Cpx a,
double *  d,
double *  ud,
int  n 
)

Definition at line 10 of file chousv.c.

References a, d, complex::im, complex::re, u, and x.

Referenced by heigvec().

◆ cmattr()

void cmattr ( Cpx a,
Cpx b,
int  m,
int  n 
)

Definition at line 9 of file cmattr.c.

References a, and b.

◆ cmcpy()

void cmcpy ( Cpx a,
Cpx b,
int  n 
)

Definition at line 9 of file cmcpy.c.

References a, and b.

Referenced by hmgen().

◆ cminv()

int cminv ( Cpx a,
int  n 
)

Definition at line 10 of file cminv.c.

References a, h, complex::im, ps, complex::re, s, and t.

◆ cmmul()

void cmmul ( Cpx c,
Cpx a,
Cpx b,
int  n 
)

Definition at line 9 of file cmmul.c.

References a, b, c, complex::im, complex::re, s, and trncm().

Referenced by hmgen().

◆ cmmult()

void cmmult ( Cpx c,
Cpx a,
Cpx b,
int  m,
int  k,
int  n 
)

Definition at line 10 of file cmmult.c.

References a, b, complex::im, l, and complex::re.

◆ cmprt()

void cmprt ( Cpx a,
int  n,
int  m,
char *  fmt 
)

Definition at line 9 of file cmprt.c.

References a, complex::im, and complex::re.

◆ csolv()

int csolv ( Cpx a,
Cpx b,
int  n 
)

Definition at line 10 of file csolv.c.

References a, b, h, complex::im, ps, complex::re, s, and t.

◆ cvmul()

void cvmul ( Cpx vp,
Cpx mat,
Cpx v,
int  n 
)

Definition at line 9 of file cvmul.c.

References a, complex::im, complex::re, and u.

◆ cvnrm()

Cpx cvnrm ( Cpx u,
Cpx v,
int  n 
)

Definition at line 24 of file cvmul.c.

References complex::im, complex::re, and u.

◆ eigen()

void eigen ( double *  a,
double *  eval,
int  n 
)

Definition at line 10 of file eigen.c.

References a, housev(), qrevec(), and trnm().

Referenced by G_math_eigen().

◆ eigval()

void eigval ( double *  a,
double *  eval,
int  n 
)

Definition at line 10 of file eigval.c.

References a, house(), and qreval().

Referenced by G_math_eigval().

◆ evmax()

double evmax ( double *  a,
double *  u,
int  n 
)

Definition at line 10 of file evmax.c.

References a, c, h, r, s, t, and u.

Referenced by G_math_evmax().

◆ fmatprt()

void fmatprt ( FILE *  fp,
double *  a,
int  n,
int  m,
char *  fmt 
)

Definition at line 22 of file matprt.c.

References a.

◆ hconj()

void hconj ( Cpx u,
int  n 
)

Definition at line 9 of file hconj.c.

References a, complex::im, complex::re, and s.

Referenced by heigvec(), and hmgen().

◆ heigval()

void heigval ( Cpx a,
double *  eval,
int  n 
)

Definition at line 10 of file heigval.c.

References a, chouse(), and qreval().

◆ heigvec()

void heigvec ( Cpx a,
double *  eval,
int  n 
)

Definition at line 10 of file heigvec.c.

References a, chousv(), hconj(), and qrecvc().

◆ hevmax()

double hevmax ( Cpx a,
Cpx u,
int  n 
)

Definition at line 10 of file hevmax.c.

References a, h, complex::im, complex::re, s, t, u, and x.

◆ hmgen()

void hmgen ( Cpx h,
double *  eval,
Cpx u,
int  n 
)

Definition at line 10 of file hmgen.c.

References cmcpy(), cmmul(), h, hconj(), complex::im, complex::re, and u.

◆ house()

void house ( double *  a,
double *  d,
double *  ud,
int  n 
)

Definition at line 10 of file house.c.

References a, d, h, and x.

Referenced by eigval().

◆ housev()

void housev ( double *  a,
double *  d,
double *  ud,
int  n 
)

Definition at line 10 of file housev.c.

References a, d, h, and x.

Referenced by eigen().

◆ ldumat()

void ldumat ( double *  a,
double *  u,
int  m,
int  n 
)

Definition at line 9 of file ldumat.c.

References a, h, s, and u.

Referenced by sv2uv(), and svduv().

◆ ldvmat()

void ldvmat ( double *  a,
double *  v,
int  n 
)

Definition at line 8 of file ldvmat.c.

References a, h, and s.

Referenced by sv2uv(), svdu1v(), and svduv().

◆ matprt()

void matprt ( double *  a,
int  n,
int  m,
char *  fmt 
)

Definition at line 9 of file matprt.c.

References a.

◆ mattr()

void mattr ( double *  a,
double *  b,
int  m,
int  n 
)

Definition at line 8 of file mattr.c.

References a, and b.

◆ mcopy()

void mcopy ( double *  a,
double *  b,
int  m 
)

Definition at line 8 of file mcopy.c.

References a, and b.

◆ minv()

int minv ( double *  a,
int  n 
)

Definition at line 10 of file minv.c.

References a, ps, s, and t.

Referenced by G_math_minv().

◆ mmul()

void mmul ( double *  mat,
double *  a,
double *  b,
int  n 
)

Definition at line 9 of file mmul.c.

References a, b, c, s, and trnm().

◆ ortho()

void ortho ( double *  evc,
int  n 
)

Definition at line 11 of file ortho.c.

References a, c, s, tpi, and unfl().

◆ otrma()

void otrma ( double *  at,
double *  u,
double *  a,
int  n 
)

Definition at line 9 of file otrma.c.

References a, b, c, s, and t.

◆ otrsm()

void otrsm ( double *  st,
double *  u,
double *  s0,
int  n 
)

Definition at line 9 of file otrsm.c.

References a, b, s, and t.

◆ psinv()

int psinv ( double *  v,
int  n 
)

Definition at line 9 of file psinv.c.

References r, s, t, and trnm().

Referenced by G_math_psinv().

◆ qrbdi()

int qrbdi ( double *  d,
double *  e,
int  n 
)

Definition at line 9 of file qrbdi.c.

References a, b, c, s, t, u, and x.

Referenced by sv2val(), and svdval().

◆ qrbdu1()

int qrbdu1 ( double *  d,
double *  e,
double *  u,
int  m,
double *  v,
int  n 
)

Definition at line 9 of file qrbdu1.c.

References a, b, c, s, t, u, and x.

Referenced by sv2u1v(), and svdu1v().

◆ qrbdv()

int qrbdv ( double *  d,
double *  e,
double *  u,
int  m,
double *  v,
int  n 
)

Definition at line 9 of file qrbdv.c.

References a, b, c, s, t, u, and x.

Referenced by sv2uv(), and svduv().

◆ qrecvc()

void qrecvc ( double *  eval,
Cpx evec,
double *  ud,
int  n 
)

Definition at line 9 of file qrecvc.c.

References d, h, complex::im, complex::re, and x.

Referenced by heigvec().

◆ qreval()

int qreval ( double *  eval,
double *  ud,
int  n 
)

Definition at line 9 of file qreval.c.

References d, h, and x.

Referenced by eigval(), and heigval().

◆ qrevec()

int qrevec ( double *  eval,
double *  evec,
double *  dp,
int  n 
)

Definition at line 9 of file qrevec.c.

References d, h, and x.

Referenced by eigen().

◆ rmmult()

void rmmult ( double *  mat,
double *  a,
double *  b,
int  m,
int  k,
int  n 
)

Definition at line 9 of file rmmult.c.

References a, b, and l.

◆ ruinv()

int ruinv ( double *  a,
int  n 
)

Definition at line 8 of file ruinv.c.

References a, r, s, and t.

Referenced by G_math_ruinv().

◆ smgen()

void smgen ( double *  a,
double *  eval,
double *  evec,
int  n 
)

Definition at line 8 of file smgen.c.

References a, ps, r, s, and t.

◆ solv()

int solv ( double *  a,
double *  b,
int  n 
)

Definition at line 10 of file solv.c.

References a, b, ps, s, and t.

Referenced by G_math_solv().

◆ solvps()

int solvps ( double *  s,
double *  x,
int  n 
)

Definition at line 9 of file solvps.c.

References a, b, r, s, and t.

Referenced by G_math_solvps().

◆ solvru()

int solvru ( double *  a,
double *  b,
int  n 
)

Definition at line 8 of file solvru.c.

References a, b, s, and t.

Referenced by G_math_solvru().

◆ solvtd()

void solvtd ( double *  a,
double *  b,
double *  c,
double *  x,
int  m 
)

Definition at line 8 of file solvtd.c.

References a, b, c, s, and x.

Referenced by G_math_solvtd().

◆ sv2u1v()

int sv2u1v ( double *  d,
double *  a,
int  m,
double *  v,
int  n 
)

Definition at line 10 of file sv2u1v.c.

References a, atou1(), atovm(), d, h, qrbdu1(), r, s, and t.

◆ sv2uv()

int sv2uv ( double *  d,
double *  a,
double *  u,
int  m,
double *  v,
int  n 
)

Definition at line 10 of file sv2uv.c.

References a, d, h, ldumat(), ldvmat(), qrbdv(), r, s, t, and u.

Referenced by G_math_sv2uv().

◆ sv2val()

int sv2val ( double *  d,
double *  a,
int  m,
int  n 
)

Definition at line 10 of file sv2val.c.

References a, d, h, qrbdi(), s, and u.

Referenced by G_math_sv2val().

◆ svdu1v()

int svdu1v ( double *  d,
double *  a,
int  m,
double *  v,
int  n 
)

Definition at line 10 of file svdu1v.c.

References a, atou1(), d, h, ldvmat(), qrbdu1(), r, s, and t.

Referenced by G_math_svdu1v().

◆ svduv()

int svduv ( double *  d,
double *  a,
double *  u,
int  m,
double *  v,
int  n 
)

Definition at line 10 of file svduv.c.

References a, d, h, ldumat(), ldvmat(), qrbdv(), r, s, t, and u.

Referenced by G_math_svduv().

◆ svdval()

int svdval ( double *  d,
double *  a,
int  m,
int  n 
)

Definition at line 10 of file svdval.c.

References a, d, h, qrbdi(), s, and u.

Referenced by G_math_svdval().

◆ trncm()

void trncm ( Cpx a,
int  n 
)

Definition at line 9 of file trncm.c.

References a, and s.

Referenced by cmmul().

◆ trnm()

void trnm ( double *  a,
int  n 
)

Definition at line 8 of file trnm.c.

References a, and s.

Referenced by eigen(), mmul(), and psinv().

◆ unitary()

void unitary ( Cpx u,
int  n 
)

Definition at line 16 of file unitary.c.

References a, g, h, complex::im, r, complex::re, tpi, u, unfl(), and uortho().

◆ utrncm()

void utrncm ( Cpx at,
Cpx u,
Cpx a,
int  n 
)

Definition at line 10 of file utrncm.c.

References a, b, complex::im, complex::re, s, and t.

◆ utrnhm()

void utrnhm ( Cpx ht,
Cpx u,
Cpx h0,
int  n 
)

Definition at line 10 of file utrnhm.c.

References a, b, complex::im, complex::re, s, and t.

◆ vmul()

void vmul ( double *  vp,
double *  mat,
double *  v,
int  n 
)

Definition at line 8 of file vmul.c.

References s.

◆ vnrm()

double vnrm ( double *  u,
double *  v,
int  n 
)

Definition at line 21 of file vmul.c.

References s, and u.