diff --git a/CustomMath_lib/QRMethod/QRMethod.cpp b/CustomMath_lib/QRMethod/QRMethod.cpp index 9071c8f..68048d3 100644 --- a/CustomMath_lib/QRMethod/QRMethod.cpp +++ b/CustomMath_lib/QRMethod/QRMethod.cpp @@ -39,7 +39,6 @@ QRMethodOutput QRMethod(const Matrix &matrix) { ull m = 0; ull k = 0; - ull l = 0; for (ull i = H.rows - 1; i != -1; i--) { if (i != 0) { @@ -67,7 +66,7 @@ QRMethodOutput QRMethod(const Matrix &matrix) { } } } - l = n - m - k; + auto l = n - m - k; if (m == n || n - m - l <= 2) { ITERATION_METHOD_TIMING_END @@ -160,7 +159,7 @@ std::vector AllEigenValues(const Matrix &R) { return result; } -void print_llc(const std::vector vec) { +void print_llc(const std::vector& vec) { for (auto i: vec) { std::cout << i.real << " + " << i.complex << "i" << std::endl; } diff --git a/CustomMath_lib/QRMethod/QRMethod.h b/CustomMath_lib/QRMethod/QRMethod.h index 8726a97..b7634a4 100644 --- a/CustomMath_lib/QRMethod/QRMethod.h +++ b/CustomMath_lib/QRMethod/QRMethod.h @@ -27,6 +27,6 @@ QRMethodOutput AllRootsForPolynomial(const Vector &coefficients); std::vector AllEigenValues(const Matrix &R); -void print_llc(const std::vector vec); +void print_llc(const std::vector& vec); #endif //NUMERICAL_ALGEBRA_QRMETHOD_H