changeset 21270:230e186e292d

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.
author John W. Eaton <jwe@octave.org>
date Tue, 16 Feb 2016 11:13:55 -0500
parents 3c8a3d35661a
children 7e67c7f82fc1
files liboctave/array/dMatrix.h liboctave/array/fMatrix.h liboctave/numeric/chol.cc
diffstat 3 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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<double>::transpose (); }
   Matrix transpose (void) const { return MArray<double>::transpose (); }
 
   // resize is the destructive equivalent for this one
--- 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<float>::transpose (); }
   FloatMatrix transpose (void) const { return MArray<float>::transpose (); }
 
   // resize is the destructive equivalent for this one
--- 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 <vector>
 
-
 #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 <typename T>
 void
-chol<T>::update (const T::VT& u)
+chol<T>::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 <typename T>
 octave_idx_type
-chol<T>::downdate (const T::VT& u)
+chol<T>::downdate (const VT& u)
 {
   warn_qrupdate_once ();
 
@@ -499,9 +502,9 @@
 
 template <typename T>
 octave_idx_type
-chol<T>::insert_sym (const T::VT& u, octave_idx_type j)
+chol<T>::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);
           }