LU decomposition: Difference between revisions

Content added Content deleted
(With Numeric.LinearAlgebra)
m (C++ bug fix)
Line 702: Line 702:
scalar_type max_value = 0;
scalar_type max_value = 0;
for (size_t i = j; i < n; ++i) {
for (size_t i = j; i < n; ++i) {
scalar_type value = std::abs(input1(i, j));
scalar_type value = std::abs(input1(perm[i], j));
if (value > max_value) {
if (value > max_value) {
max_index = i;
max_index = i;