From 0ef8ec6e9435f48ecad9e5fb648a63119a7e0eca Mon Sep 17 00:00:00 2001 From: Krishna Vedala <7001608+kvedala@users.noreply.github.com> Date: Mon, 8 Jun 2020 20:21:56 -0400 Subject: [PATCH] fix matrix shift doc Signed-off-by: Krishna Vedala <7001608+kvedala@users.noreply.github.com> --- numerical_methods/qr_eigen_values.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/numerical_methods/qr_eigen_values.cpp b/numerical_methods/qr_eigen_values.cpp index f55a1bff3..581e02e4e 100644 --- a/numerical_methods/qr_eigen_values.cpp +++ b/numerical_methods/qr_eigen_values.cpp @@ -77,10 +77,10 @@ namespace qr_algorithm { /** Compute eigen values using iterative shifted QR decomposition algorithm as * follows: * 1. Use last diagonal element of A as eigen value approximation \f$c\f$ - * 2. Shift diagonals of matrix \f$A' = A + cI\f$ + * 2. Shift diagonals of matrix \f$A' = A - cI\f$ * 3. Decompose matrix \f$A'=QR\f$ * 4. Compute next approximation \f$A'_1 = RQ \f$ - * 5. Shift diagonals back \f$A_1 = A'_1 - cI\f$ + * 5. Shift diagonals back \f$A_1 = A'_1 + cI\f$ * 6. Termination condition check: last element below diagonal is almost 0 * 1. If not 0, go back to step 1 with the new approximation \f$A_1\f$ * 2. If 0, continue to step 7