GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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.

Data Structures

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

#define CPX   1

Definition at line 40 of file ccmath.h.

#define NULL   ((void *)0

Definition at line 32 of file ccmath.h.

Referenced by G_str_replace(), G_strdup(), and G_strstr().

#define XMATH   1

Definition at line 21 of file ccmath.h.

Typedef Documentation

typedef struct complex Cpx

Definition at line 39 of file ccmath.h.

Function Documentation

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

Definition at line 9 of file atou1.c.

References free(), dialogs::h, n, forms::q, dialogs::s, and dialogs::w.

Referenced by sv2u1v(), and svdu1v().

void atovm ( double *  v,
int  n 
)

Definition at line 8 of file atovm.c.

References dialogs::h, n, forms::q, and dialogs::s.

Referenced by sv2u1v().

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

Definition at line 10 of file chouse.c.

References free(), complex::im, utils::im, n, complex::re, and y.

Referenced by heigval().

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

Definition at line 10 of file chousv.c.

References free(), complex::im, utils::im, n, forms::q, complex::re, and y.

Referenced by heigvec().

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

Definition at line 9 of file cmattr.c.

References b, and n.

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

Definition at line 9 of file cmcpy.c.

References n.

Referenced by hmgen().

int cminv ( Cpx a,
int  n 
)

Definition at line 10 of file cminv.c.

References free(), dialogs::h, complex::im, n, forms::q, complex::re, and dialogs::s.

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

Definition at line 9 of file cmmul.c.

References complex::im, n, forms::q, complex::re, dialogs::s, and trncm().

Referenced by hmgen().

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

Definition at line 10 of file cmmult.c.

References free(), complex::im, l, n, forms::q, and complex::re.

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

Definition at line 9 of file cmprt.c.

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

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

Definition at line 10 of file csolv.c.

References free(), dialogs::h, complex::im, n, forms::q, complex::re, and dialogs::s.

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

Definition at line 9 of file cvmul.c.

References complex::im, n, forms::q, and complex::re.

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

Definition at line 24 of file cvmul.c.

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

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

Definition at line 10 of file eigen.c.

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

Referenced by G_math_eigen().

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

Definition at line 10 of file eigval.c.

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

Referenced by G_math_eigval().

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

Definition at line 10 of file evmax.c.

References free(), dialogs::h, n, forms::q, r, and dialogs::s.

Referenced by G_math_evmax().

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

Definition at line 22 of file matprt.c.

References n.

void hconj ( Cpx u,
int  n 
)

Definition at line 9 of file hconj.c.

References complex::im, utils::im, n, forms::q, complex::re, and dialogs::s.

Referenced by heigvec(), and hmgen().

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

Definition at line 10 of file heigval.c.

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

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

Definition at line 10 of file heigvec.c.

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

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

Definition at line 10 of file hevmax.c.

References free(), dialogs::h, complex::im, n, complex::re, and dialogs::s.

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

Definition at line 10 of file hmgen.c.

References cmcpy(), cmmul(), free(), hconj(), complex::im, n, and complex::re.

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

Definition at line 10 of file house.c.

References free(), dialogs::h, n, and y.

Referenced by eigval().

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

Definition at line 10 of file housev.c.

References free(), dialogs::h, n, and y.

Referenced by eigen().

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

Definition at line 9 of file ldumat.c.

References free(), dialogs::h, n, forms::q, dialogs::s, and dialogs::w.

Referenced by sv2uv(), and svduv().

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

Definition at line 8 of file ldvmat.c.

References dialogs::h, n, forms::q, and dialogs::s.

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

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

Definition at line 9 of file matprt.c.

References n.

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

Definition at line 8 of file mattr.c.

References b, and n.

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

Definition at line 8 of file mcopy.c.

References forms::q.

int minv ( double *  a,
int  n 
)

Definition at line 10 of file minv.c.

References free(), malloc(), n, forms::q, and dialogs::s.

Referenced by G_math_minv().

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

Definition at line 9 of file mmul.c.

References n, forms::q, dialogs::s, and trnm().

void ortho ( double *  evc,
int  n 
)

Definition at line 11 of file ortho.c.

References n, forms::q, dialogs::s, and unfl().

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

Definition at line 9 of file otrma.c.

References free(), n, and dialogs::s.

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

Definition at line 9 of file otrsm.c.

References free(), n, and dialogs::s.

int psinv ( double *  v,
int  n 
)

Definition at line 9 of file psinv.c.

References n, forms::q, r, dialogs::s, and trnm().

Referenced by G_math_psinv().

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

Definition at line 9 of file qrbdi.c.

References b, n, dialogs::s, and y.

Referenced by sv2val(), and svdval().

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

Definition at line 9 of file qrbdu1.c.

References b, n, forms::q, dialogs::s, dialogs::w, and y.

Referenced by sv2u1v(), and svdu1v().

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

Definition at line 9 of file qrbdv.c.

References b, n, forms::q, dialogs::s, dialogs::w, and y.

Referenced by sv2uv(), and svduv().

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

Definition at line 9 of file qrecvc.c.

References dialogs::h, complex::im, n, complex::re, and y.

Referenced by heigvec().

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

Definition at line 9 of file qreval.c.

References dialogs::h, n, and y.

Referenced by eigval(), and heigval().

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

Definition at line 9 of file qrevec.c.

References dialogs::h, n, and y.

Referenced by eigen().

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

Definition at line 9 of file rmmult.c.

References free(), l, n, and forms::q.

int ruinv ( double *  a,
int  n 
)

Definition at line 8 of file ruinv.c.

References n, forms::q, r, and dialogs::s.

Referenced by G_math_ruinv().

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

Definition at line 8 of file smgen.c.

References n, forms::q, r, and dialogs::s.

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

Definition at line 10 of file solv.c.

References free(), n, forms::q, and dialogs::s.

Referenced by G_math_solv().

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

Definition at line 9 of file solvps.c.

References n, forms::q, r, and dialogs::s.

Referenced by G_math_solvps().

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

Definition at line 8 of file solvru.c.

References n, forms::q, and dialogs::s.

Referenced by G_math_solvru().

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

Definition at line 8 of file solvtd.c.

References dialogs::s.

Referenced by G_math_solvtd().

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

Definition at line 10 of file sv2u1v.c.

References atou1(), atovm(), free(), dialogs::h, n, forms::q, qrbdu1(), r, dialogs::s, and dialogs::w.

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

Definition at line 10 of file sv2uv.c.

References free(), dialogs::h, ldumat(), ldvmat(), n, forms::q, qrbdv(), r, dialogs::s, and dialogs::w.

Referenced by G_math_sv2uv().

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

Definition at line 10 of file sv2val.c.

References free(), dialogs::h, n, forms::q, qrbdi(), dialogs::s, and dialogs::w.

Referenced by G_math_sv2val().

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

Definition at line 10 of file svdu1v.c.

References atou1(), free(), dialogs::h, ldvmat(), n, forms::q, qrbdu1(), r, dialogs::s, and dialogs::w.

Referenced by G_math_svdu1v().

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

Definition at line 10 of file svduv.c.

References free(), dialogs::h, ldumat(), ldvmat(), n, forms::q, qrbdv(), r, dialogs::s, and dialogs::w.

Referenced by G_math_svduv().

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

Definition at line 10 of file svdval.c.

References free(), dialogs::h, n, forms::q, qrbdi(), dialogs::s, and dialogs::w.

Referenced by G_math_svdval().

void trncm ( Cpx a,
int  n 
)

Definition at line 9 of file trncm.c.

References n, forms::q, and dialogs::s.

Referenced by cmmul().

void trnm ( double *  a,
int  n 
)

Definition at line 8 of file trnm.c.

References n, forms::q, and dialogs::s.

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

void unitary ( Cpx u,
int  n 
)

Definition at line 16 of file unitary.c.

References free(), g, dialogs::h, complex::im, n, forms::q, r, complex::re, and unfl().

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

Definition at line 10 of file utrncm.c.

References free(), complex::im, n, complex::re, and dialogs::s.

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

Definition at line 10 of file utrnhm.c.

References free(), complex::im, n, complex::re, and dialogs::s.

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

Definition at line 8 of file vmul.c.

References n, forms::q, and dialogs::s.

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

Definition at line 21 of file vmul.c.

References n, and dialogs::s.