zmatrix2.h 4.2 KB

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