comparison src/DLD-FUNCTIONS/luinc.cc @ 11586:12df7854fa7c

strip trailing whitespace from source files
author John W. Eaton <jwe@octave.org>
date Thu, 20 Jan 2011 17:24:59 -0500
parents 01f703952eff
children 1577c6f80926
comparison
equal deleted inserted replaced
11585:1473d0cf86d2 11586:12df7854fa7c
190 if (zero_level) 190 if (zero_level)
191 error ("luinc: zero-level factorization not implemented"); 191 error ("luinc: zero-level factorization not implemented");
192 192
193 if (!error_state) 193 if (!error_state)
194 { 194 {
195 if (args(0).type_name () == "sparse matrix") 195 if (args(0).type_name () == "sparse matrix")
196 { 196 {
197 SparseMatrix sm = args(0).sparse_matrix_value (); 197 SparseMatrix sm = args(0).sparse_matrix_value ();
198 octave_idx_type sm_nr = sm.rows (); 198 octave_idx_type sm_nr = sm.rows ();
199 octave_idx_type sm_nc = sm.cols (); 199 octave_idx_type sm_nc = sm.cols ();
200 ColumnVector Qinit (sm_nc); 200 ColumnVector Qinit (sm_nc);
217 { 217 {
218 SparseMatrix P = fact.Pr (); 218 SparseMatrix P = fact.Pr ();
219 SparseMatrix L = P.transpose () * fact.L (); 219 SparseMatrix L = P.transpose () * fact.L ();
220 retval(1) = octave_value (fact.U (), 220 retval(1) = octave_value (fact.U (),
221 MatrixType (MatrixType::Upper)); 221 MatrixType (MatrixType::Upper));
222 retval(0) = octave_value (L, MatrixType 222 retval(0) = octave_value (L, MatrixType
223 (MatrixType::Permuted_Lower, 223 (MatrixType::Permuted_Lower,
224 sm_nr, fact.row_perm ())); 224 sm_nr, fact.row_perm ()));
225 } 225 }
226 } 226 }
227 break; 227 break;
228 228
271 } 271 }
272 break; 272 break;
273 } 273 }
274 } 274 }
275 } 275 }
276 else if (args(0).type_name () == "sparse complex matrix") 276 else if (args(0).type_name () == "sparse complex matrix")
277 { 277 {
278 SparseComplexMatrix sm = 278 SparseComplexMatrix sm =
279 args(0).sparse_complex_matrix_value (); 279 args(0).sparse_complex_matrix_value ();
280 octave_idx_type sm_nr = sm.rows (); 280 octave_idx_type sm_nr = sm.rows ();
281 octave_idx_type sm_nc = sm.cols (); 281 octave_idx_type sm_nc = sm.cols ();
282 ColumnVector Qinit (sm_nc); 282 ColumnVector Qinit (sm_nc);
283 283
290 { 290 {
291 case 0: 291 case 0:
292 case 1: 292 case 1:
293 case 2: 293 case 2:
294 { 294 {
295 SparseComplexLU fact (sm, Qinit, thresh, false, true, 295 SparseComplexLU fact (sm, Qinit, thresh, false, true,
296 droptol, milu, udiag); 296 droptol, milu, udiag);
297 297
298 298
299 if (! error_state) 299 if (! error_state)
300 { 300 {
301 SparseMatrix P = fact.Pr (); 301 SparseMatrix P = fact.Pr ();
302 SparseComplexMatrix L = P.transpose () * fact.L (); 302 SparseComplexMatrix L = P.transpose () * fact.L ();
303 retval(1) = octave_value (fact.U (), 303 retval(1) = octave_value (fact.U (),
304 MatrixType (MatrixType::Upper)); 304 MatrixType (MatrixType::Upper));
305 retval(0) = octave_value (L, MatrixType 305 retval(0) = octave_value (L, MatrixType
306 (MatrixType::Permuted_Lower, 306 (MatrixType::Permuted_Lower,
307 sm_nr, fact.row_perm ())); 307 sm_nr, fact.row_perm ()));
308 } 308 }
309 } 309 }
310 break; 310 break;
311 311