Skip to content

Commit

Permalink
Fixing clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliusDiestra committed Dec 26, 2023
1 parent 67783f6 commit cbf3928
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace marsvin {

template<typename T>
void backward_substitution(const ::marsvin::Matrix<T>& U,
const ::marsvin::Vector<T>& b,
::marsvin::Vector<T>& x) {
const ::marsvin::Vector<T>& b,
::marsvin::Vector<T>& x) {
// Check U is square
if (!U.is_square()) {
throw marsvin::Exception(marsvin::StatusCode::TypeErrorSquareMatrix());
Expand All @@ -36,7 +36,7 @@ void backward_substitution(const ::marsvin::Matrix<T>& U,
// TBD : Add check if U.at(k,k) is close to Zero.
x.at(k) = b.at(k);
if (k >= 0) {
for (std::size_t j = k + 1; j <= U.rows() -1 ; ++j) {
for (std::size_t j = k + 1; j <= U.rows() - 1; ++j) {
x.at(k) = x.at(k) - U.at(k, j) * x.at(j);
}
}
Expand Down
3 changes: 2 additions & 1 deletion core/src/marsvin_exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ std::string Exception::StatusCodeToString(const StatusCode& status_code) {
case marsvin::StatusType::kErrorSolveLinearEquantionDimensions:
string_ =
"Error solving linear equation A*x=b. "
"Matrix number of rows or columns must be equal to vector size.";
"Matrix number of rows or columns must be equal to vector "
"size.";
break;
default:
string_ = "Unknown error.";
Expand Down

0 comments on commit cbf3928

Please sign in to comment.