[gnumeric] EIGEN: fix termination condition.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] EIGEN: fix termination condition.
- Date: Wed, 9 Jan 2013 16:04:22 +0000 (UTC)
commit 86e758166f356515f24bb5d002e6a3888542ef11
Author: Morten Welinder <terra gnome org>
Date: Wed Jan 9 11:04:04 2013 -0500
EIGEN: fix termination condition.
ChangeLog | 5 +++++
NEWS | 1 +
src/mathfunc.c | 9 +++++++--
3 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 723fb81..673e32b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-01-09 Morten Welinder <terra gnome org>
+
+ * src/mathfunc.c (gnm_matrix_eigen): Silence warning. Document a
+ bit.
+
2013-01-07 Morten Welinder <terra gnome org>
* src/mathfunc.c (gnm_matrix_eigen): Detect underflow of the
diff --git a/NEWS b/NEWS
index 4fa55ef..d10787e 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,7 @@ Morten:
* Start working on warnings from newer gcc.
* Avoid using some deprecated symbols.
* Fix multihead issue with clipboard.
+ * Improve EIGEN. [#691378]
--------------------------------------------------------------------------
Gnumeric 1.12.0
diff --git a/src/mathfunc.c b/src/mathfunc.c
index 4df86aa..75ff768 100644
--- a/src/mathfunc.c
+++ b/src/mathfunc.c
@@ -6540,7 +6540,12 @@ gnm_matrix_eigen_update (guint k, gnm_float t, gnm_float *eigenvalues, gboolean
}
}
-/* Calculates the eigenvalues and eigenvectors of a real symmetric matrix.
+/*
+ * Calculates the eigenvalues and eigenvectors of a real symmetric matrix.
+ *
+ * This is the Jacobi iterative process in which we use a sequence of
+ * Jacobi rotations (two-sided Givens rotations) in order to reduce the
+ * magnitude of off-diagonal elements while preserving eigenvalues.
*/
gboolean
gnm_matrix_eigen (gnm_float **matrix, gnm_float **eigenvectors, gnm_float *eigenvalues, int size)
@@ -6586,7 +6591,7 @@ gnm_matrix_eigen (gnm_float **matrix, gnm_float **eigenvectors, gnm_float *eigen
pivot = matrix[m][l];
/* pivot is (m,l) */
if (pivot == 0) {
- g_printerr ("gnm_matrix_eigen underflow in pivot.\n");
+ /* All remaining off-diagonal elements are zero. We're done. */
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]