Mercurial > hg > octave-thorsten
comparison liboctave/CmplxCHOL.cc @ 1251:97eac19837dc
[project @ 1995-04-11 15:58:32 by jwe]
author | jwe |
---|---|
date | Tue, 11 Apr 1995 15:58:32 +0000 |
parents | b6360f2d4fa6 |
children | bb67a902760b |
comparison
equal
deleted
inserted
replaced
1250:5cca5ae20299 | 1251:97eac19837dc |
---|---|
30 #include "lo-error.h" | 30 #include "lo-error.h" |
31 #include "f77-uscore.h" | 31 #include "f77-uscore.h" |
32 | 32 |
33 extern "C" | 33 extern "C" |
34 { | 34 { |
35 int F77_FCN (zpotrf) (const char*, const int*, Complex*, const int*, | 35 int F77_FCN (zpotrf) (const char*, const int&, Complex*, const int&, |
36 int*, long); | 36 int&, long); |
37 } | 37 } |
38 | 38 |
39 int | 39 int |
40 ComplexCHOL::init (const ComplexMatrix& a) | 40 ComplexCHOL::init (const ComplexMatrix& a) |
41 { | 41 { |
46 (*current_liboctave_error_handler) | 46 (*current_liboctave_error_handler) |
47 ("ComplexCHOL requires square matrix"); | 47 ("ComplexCHOL requires square matrix"); |
48 return -1; | 48 return -1; |
49 } | 49 } |
50 | 50 |
51 char uplo = 'U'; | |
52 | |
53 int n = a_nc; | 51 int n = a_nc; |
54 int info; | 52 int info; |
55 | 53 |
56 Complex *h = dup (a.data (), a.length ()); | 54 Complex *h = dup (a.data (), a.length ()); |
57 | 55 |
58 F77_FCN (zpotrf) (&uplo, &n, h, &n, &info, 1L); | 56 F77_FCN (zpotrf) ("U", n, h, n, info, 1L); |
59 | 57 |
60 chol_mat = ComplexMatrix (h, n, n); | 58 chol_mat = ComplexMatrix (h, n, n); |
61 | 59 |
62 // If someone thinks of a more graceful way of doing this (or faster for | 60 // If someone thinks of a more graceful way of doing this (or faster for |
63 // that matter :-)), please let me know! | 61 // that matter :-)), please let me know! |