comparison liboctave/array/dSparse.cc @ 27956:2310164737b3 stable

fix many spelling errors (bug #57613)
author John W. Eaton <jwe@octave.org>
date Fri, 17 Jan 2020 13:15:27 -0600
parents 50439c2e8bbf
children c20b7290c778
comparison
equal deleted inserted replaced
27950:19878c3adac3 27956:2310164737b3
54 #include "Sparse-diag-op-defs.h" 54 #include "Sparse-diag-op-defs.h"
55 55
56 #include "Sparse-perm-op-defs.h" 56 #include "Sparse-perm-op-defs.h"
57 57
58 // Define whether to use a basic QR solver or one that uses a Dulmange 58 // Define whether to use a basic QR solver or one that uses a Dulmange
59 // Mendelsohn factorization to seperate the problem into under-determined, 59 // Mendelsohn factorization to separate the problem into under-determined,
60 // well-determined and over-determined parts and solves them seperately 60 // well-determined and over-determined parts and solves them separately
61 #if ! defined (USE_QRSOLVE) 61 #if ! defined (USE_QRSOLVE)
62 # include "sparse-dmsolve.h" 62 # include "sparse-dmsolve.h"
63 #endif 63 #endif
64 64
65 SparseMatrix::SparseMatrix (const SparseBoolMatrix& a) 65 SparseMatrix::SparseMatrix (const SparseBoolMatrix& a)
532 532
533 SparseMatrix 533 SparseMatrix
534 SparseMatrix::concat (const SparseMatrix& rb, 534 SparseMatrix::concat (const SparseMatrix& rb,
535 const Array<octave_idx_type>& ra_idx) 535 const Array<octave_idx_type>& ra_idx)
536 { 536 {
537 // Don't use numel to avoid all possiblity of an overflow 537 // Don't use numel to avoid all possibility of an overflow
538 if (rb.rows () > 0 && rb.cols () > 0) 538 if (rb.rows () > 0 && rb.cols () > 0)
539 insert (rb, ra_idx(0), ra_idx(1)); 539 insert (rb, ra_idx(0), ra_idx(1));
540 return *this; 540 return *this;
541 } 541 }
542 542
733 retval.xcidx (i) = cx; 733 retval.xcidx (i) = cx;
734 retval.xridx (cx) = i; 734 retval.xridx (cx) = i;
735 retval.xdata (cx) = 1.0; 735 retval.xdata (cx) = 1.0;
736 cx++; 736 cx++;
737 737
738 // iterate accross columns of input matrix 738 // iterate across columns of input matrix
739 for (octave_idx_type j = i+1; j < nr; j++) 739 for (octave_idx_type j = i+1; j < nr; j++)
740 { 740 {
741 double v = 0.; 741 double v = 0.;
742 // iterate to calculate sum 742 // iterate to calculate sum
743 octave_idx_type colXp = retval.xcidx (i); 743 octave_idx_type colXp = retval.xcidx (i);
839 work[j] = 0.; 839 work[j] = 0.;
840 840
841 // place the 1 in the identity position 841 // place the 1 in the identity position
842 work[iidx] = 1.0; 842 work[iidx] = 1.0;
843 843
844 // iterate accross columns of input matrix 844 // iterate across columns of input matrix
845 for (octave_idx_type j = iidx+1; j < nr; j++) 845 for (octave_idx_type j = iidx+1; j < nr; j++)
846 { 846 {
847 double v = 0.; 847 double v = 0.;
848 octave_idx_type jidx = perm[j]; 848 octave_idx_type jidx = perm[j];
849 // iterate to calculate sum 849 // iterate to calculate sum