Mercurial > octave
comparison liboctave/CmplxLU.cc @ 5275:23b37da9fd5b
[project @ 2005-04-08 16:07:35 by jwe]
author | jwe |
---|---|
date | Fri, 08 Apr 2005 16:07:37 +0000 |
parents | e35b034d3523 |
children | 4c8a2e4e0717 |
comparison
equal
deleted
inserted
replaced
5274:eae7b40388e9 | 5275:23b37da9fd5b |
---|---|
38 // Define the constructor for this particular derivation. | 38 // Define the constructor for this particular derivation. |
39 | 39 |
40 extern "C" | 40 extern "C" |
41 { | 41 { |
42 F77_RET_T | 42 F77_RET_T |
43 F77_FUNC (zgetrf, ZGETRF) (const int&, const int&, Complex*, | 43 F77_FUNC (zgetrf, ZGETRF) (const octave_idx_type&, const octave_idx_type&, Complex*, |
44 const int&, int*, int&); | 44 const octave_idx_type&, octave_idx_type*, octave_idx_type&); |
45 } | 45 } |
46 | 46 |
47 ComplexLU::ComplexLU (const ComplexMatrix& a) | 47 ComplexLU::ComplexLU (const ComplexMatrix& a) |
48 { | 48 { |
49 int a_nr = a.rows (); | 49 octave_idx_type a_nr = a.rows (); |
50 int a_nc = a.cols (); | 50 octave_idx_type a_nc = a.cols (); |
51 int mn = (a_nr < a_nc ? a_nr : a_nc); | 51 octave_idx_type mn = (a_nr < a_nc ? a_nr : a_nc); |
52 | 52 |
53 ipvt.resize (mn); | 53 ipvt.resize (mn); |
54 int *pipvt = ipvt.fortran_vec (); | 54 octave_idx_type *pipvt = ipvt.fortran_vec (); |
55 | 55 |
56 a_fact = a; | 56 a_fact = a; |
57 Complex *tmp_data = a_fact.fortran_vec (); | 57 Complex *tmp_data = a_fact.fortran_vec (); |
58 | 58 |
59 int info = 0; | 59 octave_idx_type info = 0; |
60 | 60 |
61 F77_XFCN (zgetrf, ZGETRF, (a_nr, a_nc, tmp_data, a_nr, pipvt, info)); | 61 F77_XFCN (zgetrf, ZGETRF, (a_nr, a_nc, tmp_data, a_nr, pipvt, info)); |
62 | 62 |
63 if (f77_exception_encountered) | 63 if (f77_exception_encountered) |
64 (*current_liboctave_error_handler) ("unrecoverable error in zgetrf"); | 64 (*current_liboctave_error_handler) ("unrecoverable error in zgetrf"); |
65 else | 65 else |
66 ipvt -= 1; | 66 ipvt -= static_cast<octave_idx_type> (1); |
67 } | 67 } |
68 | 68 |
69 /* | 69 /* |
70 ;;; Local Variables: *** | 70 ;;; Local Variables: *** |
71 ;;; mode: C++ *** | 71 ;;; mode: C++ *** |