-
Notifications
You must be signed in to change notification settings - Fork 55
[newchem-cpp] transcribe gaussj #393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: newchem-cpp
Are you sure you want to change the base?
[newchem-cpp] transcribe gaussj #393
Conversation
…_dust' into gen2024_transcribe_gaussj
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a quick look to investigate why CI is failing. (I haven't had a chance to look at everything in context yet, but let's get CI working first)
I made a few suggestions to address the issues:
- you aren't including
<cmath>(to take absolute values). Plus, I don't think you need to be including <numeric> - I suggested the use of
std::fabsoverstd::abs(this isn't essential, but I generally think it is a little less confusing to people more familiar with C)
You are also going to need to adjust the loops. CI is complaining about mixing unsigned indices with signed loop bounds
After you do all that, you are going to need to format this file (this is why pre-commit.ci is failing). I would strongly recommend that you use pre-commit for this rather than directly invoking clang-format.1 The easiest thing to do is add a GitHub comment that just says:
pre-commit.ci autofix
The continuous integration will then push a commit to your branch to adjusti the formatting. (If you really want to run it locally, the documentation provides additional context)
Footnotes
-
If you choose to manually invoke clang-format, you'll need to match the exact version of clang-format referenced in the pre-commit file. ↩
…s for readability
…gs due to comparison with matrix size type
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
| // See LICENSE file for license and copyright information | ||
|
|
||
| /// @file gaussj_g.hpp | ||
| /// @brief Implementation of Gauss-Jordan elimination for solving linear systems |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // See LICENSE file for license and copyright information | |
| /// @file gaussj_g.hpp | |
| /// @brief Implementation of Gauss-Jordan elimination for solving linear systems | |
| //===----------------------------------------------------------------------===// | |
| // | |
| // See the LICENSE file for license and copyright information | |
| // SPDX-License-Identifier: NCSA AND BSD-3-Clause | |
| // | |
| //===----------------------------------------------------------------------===// | |
| /// | |
| /// @file | |
| /// Declares the function for Gauss-Jordan elimination | |
| /// | |
| //===----------------------------------------------------------------------===// |
| @@ -0,0 +1,77 @@ | |||
| #include <cmath> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| #include <cmath> | |
| //===----------------------------------------------------------------------===// | |
| // | |
| // See the LICENSE file for license and copyright information | |
| // SPDX-License-Identifier: NCSA AND BSD-3-Clause | |
| // | |
| //===----------------------------------------------------------------------===// | |
| /// | |
| /// @file | |
| /// Implementation of Gauss-Jordan elimination for solving linear systems | |
| /// | |
| //===----------------------------------------------------------------------===// | |
| #include <cmath> |
Uh oh!
There was an error while loading. Please reload this page.