NEURON
zmatrix2.h
Go to the documentation of this file.
1 
2 /**************************************************************************
3 **
4 ** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved.
5 **
6 ** Meschach Library
7 **
8 ** This Meschach Library is provided "as is" without any express
9 ** or implied warranty of any kind with respect to this software.
10 ** In particular the authors shall not be liable for any direct,
11 ** indirect, special, incidental or consequential damages arising
12 ** in any way from use of the software.
13 **
14 ** Everyone is granted permission to copy, modify and redistribute this
15 ** Meschach Library, provided:
16 ** 1. All copies contain this copyright notice.
17 ** 2. All modified copies shall carry a notice stating who
18 ** made the last modification and the date of such modification.
19 ** 3. No charge is made for this software or works derived from it.
20 ** This clause shall not be construed as constraining other software
21 ** distributed on the same medium as this software, nor is a
22 ** distribution fee considered a charge.
23 **
24 ***************************************************************************/
25 
26 
27 /*
28  2nd header file for Meschach's complex routines.
29  This file contains declarations for complex factorisation/solve
30  routines.
31 
32 */
33 
34 
35 #ifndef ZMATRIX2H
36 #define ZMATRIX2H
37 
38 #include "zmatrix.h"
39 
40 #ifdef ANSI_C
41 extern ZVEC *zUsolve(ZMAT *matrix, ZVEC *b, ZVEC *out, double diag);
42 extern ZVEC *zLsolve(ZMAT *matrix, ZVEC *b, ZVEC *out, double diag);
43 extern ZVEC *zUAsolve(ZMAT *U, ZVEC *b, ZVEC *out, double diag);
44 extern ZVEC *zDsolve(ZMAT *A, ZVEC *b, ZVEC *x);
45 extern ZVEC *zLAsolve(ZMAT *L, ZVEC *b, ZVEC *out, double diag);
46 
47 extern ZVEC *zhhvec(ZVEC *,int,Real *,ZVEC *,complex *);
48 extern ZVEC *zhhtrvec(ZVEC *,double,int,ZVEC *,ZVEC *);
49 extern ZMAT *zhhtrrows(ZMAT *,int,int,ZVEC *,double);
50 extern ZMAT *zhhtrcols(ZMAT *,int,int,ZVEC *,double);
51 extern ZMAT *zHfactor(ZMAT *,ZVEC *);
52 extern ZMAT *zHQunpack(ZMAT *,ZVEC *,ZMAT *,ZMAT *);
53 
54 extern ZMAT *zQRfactor(ZMAT *A, ZVEC *diag);
55 extern ZMAT *zQRCPfactor(ZMAT *A, ZVEC *diag, PERM *px);
56 extern ZVEC *_zQsolve(ZMAT *QR, ZVEC *diag, ZVEC *b, ZVEC *x, ZVEC *tmp);
57 extern ZMAT *zmakeQ(ZMAT *QR, ZVEC *diag, ZMAT *Qout);
58 extern ZMAT *zmakeR(ZMAT *QR, ZMAT *Rout);
59 extern ZVEC *zQRsolve(ZMAT *QR, ZVEC *diag, ZVEC *b, ZVEC *x);
60 extern ZVEC *zQRAsolve(ZMAT *QR, ZVEC *diag, ZVEC *b, ZVEC *x);
61 extern ZVEC *zQRCPsolve(ZMAT *QR,ZVEC *diag,PERM *pivot,ZVEC *b,ZVEC *x);
62 extern ZVEC *zUmlt(ZMAT *U, ZVEC *x, ZVEC *out);
63 extern ZVEC *zUAmlt(ZMAT *U, ZVEC *x, ZVEC *out);
64 extern double zQRcondest(ZMAT *QR);
65 
66 extern ZVEC *zLsolve(ZMAT *, ZVEC *, ZVEC *, double);
67 extern ZMAT *zset_col(ZMAT *, int, ZVEC *);
68 
69 extern ZMAT *zLUfactor(ZMAT *A, PERM *pivot);
70 extern ZVEC *zLUsolve(ZMAT *A, PERM *pivot, ZVEC *b, ZVEC *x);
71 extern ZVEC *zLUAsolve(ZMAT *LU, PERM *pivot, ZVEC *b, ZVEC *x);
72 extern ZMAT *zm_inverse(ZMAT *A, ZMAT *out);
73 extern double zLUcondest(ZMAT *LU, PERM *pivot);
74 
75 extern void zgivens(complex, complex, Real *, complex *);
76 extern ZMAT *zrot_rows(ZMAT *A, int i, int k, double c, complex s,
77  ZMAT *out);
78 extern ZMAT *zrot_cols(ZMAT *A, int i, int k, double c, complex s,
79  ZMAT *out);
80 extern ZVEC *rot_zvec(ZVEC *x, int i, int k, double c, complex s,
81  ZVEC *out);
82 extern ZMAT *zschur(ZMAT *A,ZMAT *Q);
83 /* extern ZMAT *schur_vecs(ZMAT *T,ZMAT *Q,X_re,X_im) */
84 #else
85 extern ZVEC *zUsolve(), *zLsolve(), *zUAsolve(), *zDsolve(), *zLAsolve();
86 
87 extern ZVEC *zhhvec();
88 extern ZVEC *zhhtrvec();
89 extern ZMAT *zhhtrrows();
90 extern ZMAT *zhhtrcols();
91 extern ZMAT *zHfactor();
92 extern ZMAT *zHQunpack();
93 
94 
95 extern ZMAT *zQRfactor(), *zQRCPfactor();
96 extern ZVEC *_zQsolve();
97 extern ZMAT *zmakeQ(), *zmakeR();
98 extern ZVEC *zQRsolve(), *zQRAsolve(), *zQRCPsolve();
99 extern ZVEC *zUmlt(), *zUAmlt();
100 extern double zQRcondest();
101 
102 extern ZVEC *zLsolve();
103 extern ZMAT *zset_col();
104 
105 extern ZMAT *zLUfactor();
106 extern ZVEC *zLUsolve(), *zLUAsolve();
107 extern ZMAT *zm_inverse();
108 extern double zLUcondest();
109 
110 extern void zgivens();
111 extern ZMAT *zrot_rows(), *zrot_cols();
112 extern ZVEC *rot_zvec();
113 extern ZMAT *zschur();
114 /* extern ZMAT *schur_vecs(); */
115 #endif
116 
117 #endif
118 
double zQRcondest(ZMAT *QR)
Definition: zqrfctr.c:432
ZVEC * zLsolve(ZMAT *matrix, ZVEC *b, ZVEC *out, double diag)
Definition: zsolve.c:102
ZVEC * zUAmlt(ZMAT *U, ZVEC *x, ZVEC *out)
Definition: zqrfctr.c:399
ZMAT * zHQunpack(ZMAT *, ZVEC *, ZMAT *, ZMAT *)
Definition: zhessen.c:86
#define diag(s)
Definition: fmenu.cpp:188
#define Real
Definition: machine.h:189
static philox4x32_key_t k
Definition: nrnran123.cpp:11
ZMAT * zHfactor(ZMAT *, ZVEC *)
Definition: zhessen.c:45
ZVEC * zhhvec(ZVEC *, int, Real *, ZVEC *, complex *)
Definition: zhsehldr.c:49
ZVEC * rot_zvec(ZVEC *x, int i, int k, double c, complex s, ZVEC *out)
Definition: zgivens.c:79
Definition: zmatrix.h:50
ZMAT * zset_col(ZMAT *, int, ZVEC *)
Definition: zmatop.c:565
Definition: zmatrix.h:44
ZVEC * _zQsolve(ZMAT *QR, ZVEC *diag, ZVEC *b, ZVEC *x, ZVEC *tmp)
Definition: zqrfctr.c:187
ZMAT * zhhtrcols(ZMAT *, int, int, ZVEC *, double)
Definition: zhsehldr.c:169
ZVEC * zUAsolve(ZMAT *U, ZVEC *b, ZVEC *out, double diag)
Definition: zsolve.c:157
_CONST char * s
Definition: system.cpp:74
ZMAT * zmakeR(ZMAT *QR, ZMAT *Rout)
Definition: zqrfctr.c:276
void zgivens(complex, complex, Real *, complex *)
Definition: zgivens.c:52
ZMAT * zrot_cols(ZMAT *A, int i, int k, double c, complex s, ZMAT *out)
Definition: zgivens.c:154
ZVEC * zQRCPsolve(ZMAT *QR, ZVEC *diag, PERM *pivot, ZVEC *b, ZVEC *x)
Definition: zqrfctr.c:360
ZMAT * zhhtrrows(ZMAT *, int, int, ZVEC *, double)
Definition: zhsehldr.c:120
ZVEC * zLUAsolve(ZMAT *LU, PERM *pivot, ZVEC *b, ZVEC *x)
Definition: zlufctr.c:152
ZMAT * zQRfactor(ZMAT *A, ZVEC *diag)
Definition: zqrfctr.c:65
ZMAT * zmakeQ(ZMAT *QR, ZVEC *diag, ZMAT *Qout)
Definition: zqrfctr.c:227
ZVEC * zQRsolve(ZMAT *QR, ZVEC *diag, ZVEC *b, ZVEC *x)
Definition: zqrfctr.c:294
ZMAT * zschur(ZMAT *A, ZMAT *Q)
Definition: zschur.c:49
ZMAT * zrot_rows(ZMAT *A, int i, int k, double c, complex s, ZMAT *out)
Definition: zgivens.c:114
double zLUcondest(ZMAT *LU, PERM *pivot)
Definition: zlufctr.c:210
#define i
Definition: md1redef.h:12
#define A(i)
Definition: multisplit.cpp:61
#define c
ZVEC * zDsolve(ZMAT *A, ZVEC *b, ZVEC *x)
Definition: zsolve.c:218
ZVEC * zUsolve(ZMAT *matrix, ZVEC *b, ZVEC *out, double diag)
Definition: zsolve.c:46
ZVEC * zLAsolve(ZMAT *L, ZVEC *b, ZVEC *out, double diag)
Definition: zsolve.c:244
ZVEC * zhhtrvec(ZVEC *, double, int, ZVEC *, ZVEC *)
Definition: zhsehldr.c:89
ZVEC * zLUsolve(ZMAT *A, PERM *pivot, ZVEC *b, ZVEC *x)
Definition: zlufctr.c:134
Definition: matrix.h:87
ZMAT * zQRCPfactor(ZMAT *A, ZVEC *diag, PERM *px)
Definition: zqrfctr.c:101
ZMAT * zm_inverse(ZMAT *A, ZMAT *out)
Definition: zlufctr.c:172
ZVEC * zQRAsolve(ZMAT *QR, ZVEC *diag, ZVEC *b, ZVEC *x)
Definition: zqrfctr.c:320
ZVEC * zUmlt(ZMAT *U, ZVEC *x, ZVEC *out)
Definition: zqrfctr.c:379
ZMAT * zLUfactor(ZMAT *A, PERM *pivot)
Definition: zlufctr.c:46