From 62f5025fa8218c10054388af28ff3da6fc0f3e94 Mon Sep 17 00:00:00 2001 From: Graham Lopez Date: Tue, 1 Oct 2019 12:38:10 -0400 Subject: [PATCH] resolve -Wcomment --- src/QMCWaveFunctions/tests/test_einset.cpp | 3 - src/formic/utils/matrix.h | 105 ++++----------------- 2 files changed, 18 insertions(+), 90 deletions(-) diff --git a/src/QMCWaveFunctions/tests/test_einset.cpp b/src/QMCWaveFunctions/tests/test_einset.cpp index 3d58b014d..7473555ab 100644 --- a/src/QMCWaveFunctions/tests/test_einset.cpp +++ b/src/QMCWaveFunctions/tests/test_einset.cpp @@ -112,9 +112,6 @@ TEST_CASE("Einspline SPO from HDF", "[wavefunction]") \ "; - // monoO - // \ - Libxml2Document doc; bool okay = doc.parseFromString(particles); REQUIRE(okay); diff --git a/src/formic/utils/matrix.h b/src/formic/utils/matrix.h index 1729521ca..d5c395c25 100644 --- a/src/formic/utils/matrix.h +++ b/src/formic/utils/matrix.h @@ -27,13 +27,13 @@ namespace formic { template class ColVec; template class RowVec; - //###############################################################################################\\ + /*###############################################################################################\\ //###############################################################################################\\ //############################## ########################################\\ //############################## Row and Col Iterators ########################################\\ //############################## ########################################\\ //###############################################################################################\\ - //###############################################################################################\\ + //###############################################################################################*/ /////////////////////////////////////////////////////////////////////////////////////////////////// /// \brief An iterator used for iterating over the elements of a matrix row. @@ -75,45 +75,13 @@ namespace formic { bool operator==(const RowIterator & other) const { return m_x == other.m_x; } }; -// /////////////////////////////////////////////////////////////////////////////////////////////////// -// /// \brief An iterator used for iterating over the elements of a matrix column. -// /// -// /////////////////////////////////////////////////////////////////////////////////////////////////// -// template class ColConstIterator { -// private: -// const S * m_x; -// public: -// ColConstIterator(const S * x) : m_x(x) {} -// const S & operator*() const { return *m_x; } -// ColConstIterator & operator++() { m_x += 1; return *this; } // prefix ++ -// ColConstIterator & operator--() { m_x -= 1; return *this; } // prefix -- -// ColConstIterator operator++(int) { ColConstIterator it(*this); ++(*this); return it; } // postfix ++ -// ColConstIterator operator--(int) { ColConstIterator it(*this); --(*this); return it; } // postfix -- -// }; -// -// /////////////////////////////////////////////////////////////////////////////////////////////////// -// /// \brief An iterator used for iterating over the elements of a matrix column. -// /// -// /////////////////////////////////////////////////////////////////////////////////////////////////// -// template class ColIterator { -// private: -// S * m_x; -// public: -// ColIterator(S * x) : m_x(x) {} -// S & operator*() const { return *m_x; } -// ColIterator & operator++() { m_x += 1; return *this; } // prefix ++ -// ColIterator & operator--() { m_x -= 1; return *this; } // prefix -- -// ColIterator operator++(int) { ColIterator it(*this); ++(*this); return it; } // postfix ++ -// ColIterator operator--(int) { ColIterator it(*this); --(*this); return it; } // postfix -- -// }; - - //###############################################################################################\\ + /*###############################################################################################\\ //###############################################################################################\\ //############################## ########################################\\ //############################## ConstMatrix class ########################################\\ //############################## ########################################\\ //###############################################################################################\\ - //###############################################################################################\\ + //###############################################################################################*/ /////////////////////////////////////////////////////////////////////////////////////////////////// /// \brief The base class for matrices and vectors. ConstMatrix cannot change the values of @@ -601,13 +569,13 @@ namespace formic { }; - //###############################################################################################\\ + /*###############################################################################################\\ //###############################################################################################\\ //############################## ########################################\\ //############################## Matrix class ########################################\\ //############################## ########################################\\ //###############################################################################################\\ - //###############################################################################################\\ + //###############################################################################################*/ /////////////////////////////////////////////////////////////////////////////////////////////////// /// \brief The base class for matrices and vectors that can modify their elements, which @@ -1105,29 +1073,15 @@ namespace formic { formic::xaxpy(mat.rows(), a, mat.col_begin(k-j), 1, this->col_begin(k) + i, 1); } - // !!!!! DEPRECATED! See inv function in ConstMatrix !!!!!! - ///// \brief invert the matrix - //formic::Matrix & invert() { - // if ( m_n != m_m ) - // throw formic::Exception("cannot invert a non-square matrix"); - // if ( this->size() > 0 ) { - // std::vector iwork(2 * m_n); - // formic::Matrix work = this->clone(); - // S det; - // formic::matrix_inverse_lu(m_n, det, this->begin(), work->begin(), &iwork(0)); - // } - // return *this; - //} - }; - //###############################################################################################\\ + /*###############################################################################################\\ //###############################################################################################\\ //############################## ########################################\\ //############################## VectorBase class ########################################\\ //############################## ########################################\\ //###############################################################################################\\ - //###############################################################################################\\ + //###############################################################################################*/ /////////////////////////////////////////////////////////////////////////////////////////////////// /// \brief A class that will be the base for column and row vectors. @@ -1310,13 +1264,13 @@ namespace formic { }; - //###############################################################################################\\ + /*###############################################################################################\\ //###############################################################################################\\ //############################## ########################################\\ //############################## ColVec class ########################################\\ //############################## ########################################\\ //###############################################################################################\\ - //###############################################################################################\\ + //###############################################################################################*/ /////////////////////////////////////////////////////////////////////////////////////////////////// /// \brief A class for column vectors, which are n by 1 matrices that inherit most of their @@ -1504,13 +1458,13 @@ namespace formic { }; - //###############################################################################################\\ + /*###############################################################################################\\ //###############################################################################################\\ //############################## ########################################\\ //############################## RowVec class ########################################\\ //############################## ########################################\\ //###############################################################################################\\ - //###############################################################################################\\ + //###############################################################################################*/ /////////////////////////////////////////////////////////////////////////////////////////////////// /// \brief A class for column vectors, which are n by 1 matrices that inherit most of their @@ -1679,13 +1633,13 @@ namespace formic { }; - //###############################################################################################\\ + /*###############################################################################################\\ //###############################################################################################\\ //########################### ##############################\\ //########################### Some Functions on Matrices ##############################\\ //########################### ##############################\\ //###############################################################################################\\ - //###############################################################################################\\ + //###############################################################################################*/ /// \brief check that the two matrices' dimensions allow them to be used together in matrix matrix multiplication template inline void check_dimensions_for_matrix_multiply(const formic::ConstMatrix & m1, const formic::ConstMatrix & m2) { @@ -1761,13 +1715,13 @@ namespace formic { } // end of namespace formic -//###############################################################################################\\ +/*###############################################################################################\\ //###############################################################################################\\ //########################### ################################\\ //########################### Matrix Arithmetic Operators ################################\\ //########################### ################################\\ //###############################################################################################\\ -//###############################################################################################\\ +//###############################################################################################*/ /// \brief the unary + operator returns a deep copy of the matrix template formic::Matrix formic::ConstMatrix::operator+() const { @@ -1866,37 +1820,14 @@ template<> inline formic::Matrix > operator*(const formic:: return retval; } -//template inline -//formic::Vector operator*(const formic::ConstMatrix & m1, const formic::Vector & v) { -// if ( m1.cols() != v.size() ) -// throw formic::Exception("cannot multiply: dimensions of (%i by %i) matrix and (%i by 1) vector do not match.") -// % m1.rows() % m1.cols() % v.size(); -// if ( v.size() == 0 ) -// throw formic::Exception("cannot multiply: vector is zero length"); -// if ( m1.rows() == 0 ) -// throw formic::Exception("cannot multiply: matrix has no rows"); -// return formic::Vector(m1.rows()) <<= &( m1 * formic::ConstMatrix(v.size(), 1, &v.at(0)) ).at(0,0); -//} -//template inline -//formic::Matrix operator*(const formic::Vector & v, const formic::ConstMatrix & m1) { -// if ( m1.rows() != v.size() ) -// throw formic::Exception("cannot multiply: dimensions of (1 by %i) vector and (%i by %i) matrix do not match.") -// % v.size() % m1.rows() % m1.cols(); -// if ( v.size() == 0 ) -// throw formic::Exception("cannot multiply: vector is zero length"); -// if ( m1.cols() == 0 ) -// throw formic::Exception("cannot multiply: matrix has no columns"); -// return formic::Vector(m1.cols()) <<= &( formic::ConstMatrix(1, v.size(), &v.at(0)) * m1 ).at(0,0); -//} - -//###############################################################################################\\ +/*###############################################################################################\\ //###############################################################################################\\ //########################### ################################\\ //########################### Member Function Definitions ################################\\ //########################### ################################\\ //###############################################################################################\\ -//###############################################################################################\\ +//###############################################################################################*/ /// \brief return a deep copy of the matrix template formic::Matrix formic::ConstMatrix::clone() const {