comparison liboctave/SparseCmplxLU.cc @ 5203:dbeafbc0ff64

[project @ 2005-03-15 00:58:55 by jwe]
author jwe
date Tue, 15 Mar 2005 00:58:56 +0000
parents 57077d0ddc8e
children 23b37da9fd5b
comparison
equal deleted inserted replaced
5202:49de4e624020 5203:dbeafbc0ff64
35 #include "sparse-base-lu.h" 35 #include "sparse-base-lu.h"
36 #include "sparse-base-lu.cc" 36 #include "sparse-base-lu.cc"
37 37
38 template class sparse_base_lu <SparseComplexMatrix, Complex, SparseMatrix, double>; 38 template class sparse_base_lu <SparseComplexMatrix, Complex, SparseMatrix, double>;
39 39
40 #ifdef HAVE_UMFPACK
40 // Include the UMFPACK functions 41 // Include the UMFPACK functions
41 extern "C" { 42 extern "C" {
42 #include "umfpack.h" 43 #include <umfpack/umfpack.h>
43 } 44 }
45 #endif
44 46
45 SparseComplexLU::SparseComplexLU (const SparseComplexMatrix& a, 47 SparseComplexLU::SparseComplexLU (const SparseComplexMatrix& a,
46 double piv_thres) 48 double piv_thres)
47 { 49 {
50 #ifdef HAVE_UMFPACK
48 int nr = a.rows (); 51 int nr = a.rows ();
49 int nc = a.cols (); 52 int nc = a.cols ();
50 53
51 // Setup the control parameters 54 // Setup the control parameters
52 Matrix Control (UMFPACK_CONTROL, 1); 55 Matrix Control (UMFPACK_CONTROL, 1);
208 211
209 umfpack_zi_report_info (control, info); 212 umfpack_zi_report_info (control, info);
210 } 213 }
211 } 214 }
212 } 215 }
216 #else
217 (*current_liboctave_error_handler) ("UMFPACK not installed");
218 #endif
213 } 219 }
214 220
215 SparseComplexLU::SparseComplexLU (const SparseComplexMatrix& a, 221 SparseComplexLU::SparseComplexLU (const SparseComplexMatrix& a,
216 const ColumnVector& Qinit, 222 const ColumnVector& Qinit,
217 double piv_thres, bool FixedQ) 223 double piv_thres, bool FixedQ)
218 { 224 {
225 #ifdef HAVE_UMFPACK
219 int nr = a.rows (); 226 int nr = a.rows ();
220 int nc = a.cols (); 227 int nc = a.cols ();
221 228
222 // Setup the control parameters 229 // Setup the control parameters
223 Matrix Control (UMFPACK_CONTROL, 1); 230 Matrix Control (UMFPACK_CONTROL, 1);
393 400
394 umfpack_zi_report_info (control, info); 401 umfpack_zi_report_info (control, info);
395 } 402 }
396 } 403 }
397 } 404 }
405 #else
406 (*current_liboctave_error_handler) ("UMFPACK not installed");
407 #endif
398 } 408 }
399 409
400 /* 410 /*
401 ;;; Local Variables: *** 411 ;;; Local Variables: ***
402 ;;; mode: C++ *** 412 ;;; mode: C++ ***