# HG changeset patch # User John W. Eaton # Date 1454102874 18000 # Node ID 9c61ab1f758891248612b8c96ecf405f54a4c984 # Parent 8ad3907b8fad29630286e25357cd4a90d1c6a68e eliminate unnecessary qrsolve functions * SparseCmplxQR.cc, SparseCmplxQR.h, SparseQR.cc, SparseQR.h (qrsolve): Eliminate versions that accept Matrix and ComplexMatrix arguments in favor of MArray and MArray. diff -r 8ad3907b8fad -r 9c61ab1f7588 liboctave/numeric/SparseCmplxQR.cc --- a/liboctave/numeric/SparseCmplxQR.cc Fri Jan 29 14:55:20 2016 -0500 +++ b/liboctave/numeric/SparseCmplxQR.cc Fri Jan 29 16:27:54 2016 -0500 @@ -253,7 +253,8 @@ } ComplexMatrix -qrsolve (const SparseComplexMatrix&a, const Matrix &b, octave_idx_type &info) +qrsolve (const SparseComplexMatrix& a, const MArray& b, + octave_idx_type& info) { info = -1; #ifdef HAVE_CXSPARSE @@ -496,8 +497,8 @@ } ComplexMatrix -qrsolve (const SparseComplexMatrix&a, const ComplexMatrix &b, - octave_idx_type &info) +qrsolve (const SparseComplexMatrix& a, const MArray& b, + octave_idx_type& info) { info = -1; #ifdef HAVE_CXSPARSE @@ -733,17 +734,3 @@ return SparseComplexMatrix (); #endif } - -ComplexMatrix -qrsolve (const SparseComplexMatrix &a, const MArray &b, - octave_idx_type &info) -{ - return qrsolve (a, Matrix (b), info); -} - -ComplexMatrix -qrsolve (const SparseComplexMatrix &a, const MArray &b, - octave_idx_type &info) -{ - return qrsolve (a, ComplexMatrix (b), info); -} diff -r 8ad3907b8fad -r 9c61ab1f7588 liboctave/numeric/SparseCmplxQR.h --- a/liboctave/numeric/SparseCmplxQR.h Fri Jan 29 14:55:20 2016 -0500 +++ b/liboctave/numeric/SparseCmplxQR.h Fri Jan 29 16:27:54 2016 -0500 @@ -128,7 +128,8 @@ ComplexMatrix Q (void) const { return rep->Q (); } - friend ComplexMatrix qrsolve (const SparseComplexMatrix &a, const Matrix &b, + friend ComplexMatrix qrsolve (const SparseComplexMatrix &a, + const MArray &b, octave_idx_type &info); friend SparseComplexMatrix qrsolve (const SparseComplexMatrix &a, @@ -136,7 +137,7 @@ octave_idx_type &info); friend ComplexMatrix qrsolve (const SparseComplexMatrix &a, - const ComplexMatrix &b, + const MArray &b, octave_idx_type &info); friend SparseComplexMatrix qrsolve (const SparseComplexMatrix &a, @@ -154,9 +155,6 @@ // Publish externally used friend functions. -extern ComplexMatrix qrsolve (const SparseComplexMatrix &a, const Matrix &b, - octave_idx_type &info); - extern ComplexMatrix qrsolve (const SparseComplexMatrix &a, const MArray &b, octave_idx_type &info); @@ -166,10 +164,6 @@ octave_idx_type &info); extern ComplexMatrix qrsolve (const SparseComplexMatrix &a, - const ComplexMatrix &b, - octave_idx_type &info); - -extern ComplexMatrix qrsolve (const SparseComplexMatrix &a, const MArray &b, octave_idx_type &info); diff -r 8ad3907b8fad -r 9c61ab1f7588 liboctave/numeric/SparseQR.cc --- a/liboctave/numeric/SparseQR.cc Fri Jan 29 14:55:20 2016 -0500 +++ b/liboctave/numeric/SparseQR.cc Fri Jan 29 16:27:54 2016 -0500 @@ -255,7 +255,7 @@ } Matrix -qrsolve (const SparseMatrix&a, const Matrix &b, octave_idx_type& info) +qrsolve (const SparseMatrix& a, const MArray& b, octave_idx_type& info) { info = -1; #ifdef HAVE_CXSPARSE @@ -480,7 +480,7 @@ } ComplexMatrix -qrsolve (const SparseMatrix&a, const ComplexMatrix &b, octave_idx_type &info) +qrsolve (const SparseMatrix& a, const MArray& b, octave_idx_type& info) { info = -1; #ifdef HAVE_CXSPARSE @@ -793,17 +793,3 @@ return SparseComplexMatrix (); #endif } - -Matrix -qrsolve (const SparseMatrix &a, const MArray &b, - octave_idx_type &info) -{ - return qrsolve (a, Matrix (b), info); -} - -ComplexMatrix -qrsolve (const SparseMatrix &a, const MArray &b, - octave_idx_type &info) -{ - return qrsolve (a, ComplexMatrix (b), info); -} diff -r 8ad3907b8fad -r 9c61ab1f7588 liboctave/numeric/SparseQR.h --- a/liboctave/numeric/SparseQR.h Fri Jan 29 14:55:20 2016 -0500 +++ b/liboctave/numeric/SparseQR.h Fri Jan 29 16:27:54 2016 -0500 @@ -129,13 +129,13 @@ Matrix Q (void) const { return rep->Q (); } - friend Matrix qrsolve (const SparseMatrix &a, const Matrix &b, + friend Matrix qrsolve (const SparseMatrix &a, const MArray &b, octave_idx_type &info); friend SparseMatrix qrsolve (const SparseMatrix &a, const SparseMatrix &b, octave_idx_type &info); - friend ComplexMatrix qrsolve (const SparseMatrix &a, const ComplexMatrix &b, + friend ComplexMatrix qrsolve (const SparseMatrix &a, const MArray &b, octave_idx_type &info); friend SparseComplexMatrix qrsolve (const SparseMatrix &a, @@ -153,18 +153,12 @@ // Publish externally used friend functions. -extern Matrix qrsolve (const SparseMatrix &a, const Matrix &b, - octave_idx_type &info); - extern Matrix qrsolve (const SparseMatrix &a, const MArray &b, octave_idx_type &info); extern SparseMatrix qrsolve (const SparseMatrix &a, const SparseMatrix &b, octave_idx_type &info); -extern ComplexMatrix qrsolve (const SparseMatrix &a, const ComplexMatrix &b, - octave_idx_type &info); - extern ComplexMatrix qrsolve (const SparseMatrix &a, const MArray &b, octave_idx_type &info);