Skip to content

Commit

Permalink
matrix: remove bold printing of diagonal elements
Browse files Browse the repository at this point in the history
As this was not working in NSH.

Signed-off-by: Silvan Fuhrer <[email protected]>
  • Loading branch information
sfuhrer committed Feb 23, 2024
1 parent 37a40d3 commit ac2d9de
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/lib/matrix/matrix/Matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,6 @@ class Matrix
for (unsigned j = 0; j < N; j++) {
double d = static_cast<double>(self(i, j));

// Matrix diagonal elements
if (N > 1 && M > 1 && i == j) {
// make diagonal elements bold (ANSI CSI n 1)
printf("\033[1m");
}

// if symmetric don't print upper triangular elements
if ((M == N) && (j > i) && (i < N) && (j < M)
&& (fabs(d - static_cast<double>(self(j, i))) < (double)eps)
Expand All @@ -417,12 +411,6 @@ class Matrix
printf("% 6.5f ", d);
}
}

// Matrix diagonal elements
if (N > 1 && M > 1 && i == j) {
// reset any formatting (ANSI CSI n 0)
printf("\033[0m");
}
}

printf("\n");
Expand Down

0 comments on commit ac2d9de

Please sign in to comment.