# HG changeset patch # User John W. Eaton # Date 1455639235 18000 # Node ID 230e186e292da6171164ab680a47725683f716ac # Parent 3c8a3d35661a6422812b35416970181128a5d12c make building without qrupdate work again * dMatrix.h (Matrix::hermitian): New function. * fMatrix.h (FloatMatrix::hermitian): New function. * liboctave/numeric/chol.cc: Fix function declarations, definition of zero, and names of imag and conj functions. diff -r 3c8a3d35661a -r 230e186e292d liboctave/array/dMatrix.h --- a/liboctave/array/dMatrix.h Tue Feb 16 02:47:29 2016 -0500 +++ b/liboctave/array/dMatrix.h Tue Feb 16 11:13:55 2016 -0500 @@ -122,6 +122,7 @@ friend class ComplexMatrix; + Matrix hermitian (void) const { return MArray::transpose (); } Matrix transpose (void) const { return MArray::transpose (); } // resize is the destructive equivalent for this one diff -r 3c8a3d35661a -r 230e186e292d liboctave/array/fMatrix.h --- a/liboctave/array/fMatrix.h Tue Feb 16 02:47:29 2016 -0500 +++ b/liboctave/array/fMatrix.h Tue Feb 16 11:13:55 2016 -0500 @@ -126,6 +126,7 @@ friend class FloatComplexMatrix; + FloatMatrix hermitian (void) const { return MArray::transpose (); } FloatMatrix transpose (void) const { return MArray::transpose (); } // resize is the destructive equivalent for this one diff -r 3c8a3d35661a -r 230e186e292d liboctave/numeric/chol.cc --- a/liboctave/numeric/chol.cc Tue Feb 16 02:47:29 2016 -0500 +++ b/liboctave/numeric/chol.cc Tue Feb 16 11:13:55 2016 -0500 @@ -27,17 +27,20 @@ #include - #include "CColVector.h" #include "CMatrix.h" +#include "CRowVector.h" #include "chol.h" #include "dColVector.h" #include "dMatrix.h" +#include "dRowVector.h" #include "f77-fcn.h" #include "fCColVector.h" #include "fCMatrix.h" +#include "fCRowVector.h" #include "fColVector.h" #include "fMatrix.h" +#include "fRowVector.h" #include "lo-error.h" #include "oct-locbuf.h" #include "oct-norm.h" @@ -449,7 +452,7 @@ template void -chol::update (const T::VT& u) +chol::update (const VT& u) { warn_qrupdate_once (); @@ -466,7 +469,7 @@ static bool singular (const T& a) { - static typename T::element_type zero (); + static typename T::element_type zero (0); for (octave_idx_type i = 0; i < a.rows (); i++) if (a(i,i) == zero) return true; return false; @@ -474,7 +477,7 @@ template octave_idx_type -chol::downdate (const T::VT& u) +chol::downdate (const VT& u) { warn_qrupdate_once (); @@ -499,9 +502,9 @@ template octave_idx_type -chol::insert_sym (const T::VT& u, octave_idx_type j) +chol::insert_sym (const VT& u, octave_idx_type j) { - static typename T::element_type zero (); + static typename T::element_type zero (0); warn_qrupdate_once (); @@ -516,7 +519,7 @@ if (singular (chol_mat)) info = 2; - else if (ximag (u(j)) != zero) + else if (imag (u(j)) != zero) info = 3; else { @@ -528,7 +531,7 @@ if (l == j) a1(k, l) = u(k); else if (k == j) - a1(k, l) = xconj (u(l)); + a1(k, l) = conj (u(l)); else a1(k, l) = a(k < j ? k : k-1, l < j ? l : l-1); }