Mercurial > hg > octave-lyh
comparison liboctave/sparse-dmsolve.cc @ 5792:eb90c83b4f91
[project @ 2006-05-04 20:14:49 by dbateman]
author | dbateman |
---|---|
date | Thu, 04 May 2006 20:14:50 +0000 |
parents | 6b9cec830d72 |
children | 1138ced03f14 |
comparison
equal
deleted
inserted
replaced
5791:70215aff5ccf | 5792:eb90c83b4f91 |
---|---|
385 // Cast away const on A, with full knowledge that CSparse won't touch it. | 385 // Cast away const on A, with full knowledge that CSparse won't touch it. |
386 // Prevents the methods below making a copy of the data. | 386 // Prevents the methods below making a copy of the data. |
387 csm.p = const_cast<octave_idx_type *>(a.cidx ()); | 387 csm.p = const_cast<octave_idx_type *>(a.cidx ()); |
388 csm.i = const_cast<octave_idx_type *>(a.ridx ()); | 388 csm.i = const_cast<octave_idx_type *>(a.ridx ()); |
389 | 389 |
390 #if defined(CS_VER) && (CS_VER >= 2) | |
391 CXSPARSE_DNAME (d) *dm = CXSPARSE_DNAME(_dmperm) (&csm, 0); | |
392 octave_idx_type *p = dm->p; | |
393 octave_idx_type *q = dm->q; | |
394 #else | |
390 CXSPARSE_DNAME (d) *dm = CXSPARSE_DNAME(_dmperm) (&csm); | 395 CXSPARSE_DNAME (d) *dm = CXSPARSE_DNAME(_dmperm) (&csm); |
391 octave_idx_type *p = dm->P; | 396 octave_idx_type *p = dm->P; |
392 octave_idx_type *q = dm->Q; | 397 octave_idx_type *q = dm->Q; |
398 #endif | |
393 OCTAVE_LOCAL_BUFFER (octave_idx_type, pinv, nr); | 399 OCTAVE_LOCAL_BUFFER (octave_idx_type, pinv, nr); |
394 for (octave_idx_type i = 0; i < nr; i++) | 400 for (octave_idx_type i = 0; i < nr; i++) |
395 pinv [p [i]] = i; | 401 pinv [p [i]] = i; |
396 RT btmp; | 402 RT btmp; |
397 dmsolve_permute (btmp, b, pinv); | 403 dmsolve_permute (btmp, b, pinv); |