From e7e0735b60808c86b170cddc2defdca38efab3ec Mon Sep 17 00:00:00 2001
From: "Dmitry Yu. Naumov" <github@naumov.de>
Date: Thu, 16 Jul 2015 01:47:57 +0000
Subject: [PATCH] [MaL] Eigen: cleanup and unify documentation.

Wrong parameter names.
Empty statements.
Unify comment style. /* */ vs ///
---
 MathLib/LinAlg/Eigen/EigenLinearSolver.h      |  9 +---
 MathLib/LinAlg/Eigen/EigenMatrix.h            | 20 ++++-----
 MathLib/LinAlg/Eigen/EigenOption.h            | 44 ++++++++-----------
 MathLib/LinAlg/Eigen/EigenVector.h            | 14 +++---
 .../LinAlg/EigenLis/EigenLisLinearSolver.h    |  7 +--
 5 files changed, 36 insertions(+), 58 deletions(-)

diff --git a/MathLib/LinAlg/Eigen/EigenLinearSolver.h b/MathLib/LinAlg/Eigen/EigenLinearSolver.h
index 8d428c88f4e..689960407ec 100644
--- a/MathLib/LinAlg/Eigen/EigenLinearSolver.h
+++ b/MathLib/LinAlg/Eigen/EigenLinearSolver.h
@@ -22,8 +22,6 @@ namespace MathLib
 
 class EigenMatrix;
 
-/**
- */
 class EigenLinearSolver final
 {
 public:
@@ -35,20 +33,17 @@ public:
     }
 
     /**
-     * configure linear solvers
-     * @param option
+     * parse linear solvers configuration
      */
     void setOption(const boost::property_tree::ptree &option);
 
     /**
-     * configure linear solvers
-     * @param option
+     * copy linear solvers options
      */
     void setOption(const EigenOption &option) { _option = option; }
 
     /**
      * get linear solver options
-     * @return
      */
     EigenOption &getOption() { return _option; }
 
diff --git a/MathLib/LinAlg/Eigen/EigenMatrix.h b/MathLib/LinAlg/Eigen/EigenMatrix.h
index 79b54e5cb0c..4cb2bbb4d51 100644
--- a/MathLib/LinAlg/Eigen/EigenMatrix.h
+++ b/MathLib/LinAlg/Eigen/EigenMatrix.h
@@ -36,7 +36,7 @@ public:
 
     /**
      * constructor
-     * @param n_rows the number of rows (that is equal to the number of columns)
+     * @param n the number of rows (that is equal to the number of columns)
      */
     explicit EigenMatrix(std::size_t n) :_mat(n, n) {}
 
@@ -95,16 +95,14 @@ public:
         this->add(indices.rows, indices.columns, sub_matrix, fkt);
     }
 
-    /**
-     * Add sub-matrix at positions \c row_pos and \c col_pos. If the entries doesn't
-     * exist in the matrix, the values are inserted.
-     * @param row_pos     a vector of row position indices. The vector size should
-     *                    equal to the number of rows in the given sub-matrix.
-     * @param col_pos     a vector of column position indices. The vector size should
-     *                    equal to the number of columns in the given sub-matrix.
-     * @param sub_matrix  a sub-matrix to be added
-     * @param fkt         a scaling factor applied to all entries in the sub-matrix
-     */
+    /// Add sub-matrix at positions \c row_pos and \c col_pos. If the entries doesn't
+    /// exist in the matrix, the values are inserted.
+    /// @param row_pos     a vector of row position indices. The vector size should
+    ///                    equal to the number of rows in the given sub-matrix.
+    /// @param col_pos     a vector of column position indices. The vector size should
+    ///                    equal to the number of columns in the given sub-matrix.
+    /// @param sub_matrix  a sub-matrix to be added
+    /// @param fkt         a scaling factor applied to all entries in the sub-matrix
     template <class T_DENSE_MATRIX>
     void add(std::vector<std::size_t> const& row_pos,
             std::vector<std::size_t> const& col_pos, const T_DENSE_MATRIX &sub_matrix,
diff --git a/MathLib/LinAlg/Eigen/EigenOption.h b/MathLib/LinAlg/Eigen/EigenOption.h
index a7ef314ff37..e38927baecb 100644
--- a/MathLib/LinAlg/Eigen/EigenOption.h
+++ b/MathLib/LinAlg/Eigen/EigenOption.h
@@ -15,9 +15,7 @@
 namespace MathLib
 {
 
-/**
- * \brief Option for Eigen sparse solver
- */
+/// \brief Option for Eigen sparse solver
 struct EigenOption final
 {
     /// Solver type
@@ -45,35 +43,29 @@ struct EigenOption final
     /// Error tolerance
     double error_tolerance;
 
-    /**
-     * Constructor
-     *
-     * Default options are CG, no preconditioner, iteration count 500 and
-     * tolerance 1e-10. Default matrix storage type is CRS.
-     */
+    /// Constructor
+    ///
+    /// Default options are CG, no preconditioner, iteration count 500 and
+    /// tolerance 1e-10. Default matrix storage type is CRS.
     EigenOption();
 
-    /**
-     * return a linear solver type from the solver name
-     *
-     * @param solver_name
-     * @return a linear solver type
-     *      If there is no solver type matched with the given name, INVALID
-     *      is returned.
-     */
+    /// return a linear solver type from the solver name
+    ///
+    /// @param solver_name
+    /// @return a linear solver type
+    ///      If there is no solver type matched with the given name, INVALID
+    ///      is returned.
     static SolverType getSolverType(const std::string &solver_name);
 
-    /**
-     * return a preconditioner type from the name
-     *
-     * @param precon_name
-     * @return a preconditioner type
-     *      If there is no preconditioner type matched with the given name, NONE
-     *      is returned.
-     */
+    /// return a preconditioner type from the name
+    ///
+    /// @param precon_name
+    /// @return a preconditioner type
+    ///      If there is no preconditioner type matched with the given name, NONE
+    ///      is returned.
     static PreconType getPreconType(const std::string &precon_name);
 
 };
 
 }
-#endif //LIS_OPTION_H_
+#endif // EIGENOPTION_H_
diff --git a/MathLib/LinAlg/Eigen/EigenVector.h b/MathLib/LinAlg/Eigen/EigenVector.h
index ca52dc1481c..373ed390640 100644
--- a/MathLib/LinAlg/Eigen/EigenVector.h
+++ b/MathLib/LinAlg/Eigen/EigenVector.h
@@ -21,18 +21,14 @@
 namespace MathLib
 {
 
-/**
- * Global vector based on Eigen vector
- */
+/// Global vector based on Eigen vector
 class EigenVector final
 {
 public:
     using RawVectorType = Eigen::VectorXd;
 
-    /**
-     * Constructor for initialization of the number of rows
-     * @param length number of rows
-     */
+    /// Constructor for initialization of the number of rows
+    /// @param length number of rows
     explicit EigenVector(std::size_t length) : _vec(length) {}
 
     /// copy constructor
@@ -88,10 +84,10 @@ public:
     void write (const std::string &filename) const { std::ofstream os(filename); os << _vec; }
 #endif
 
-    /// return a raw Lis vector object
+    /// return a raw Eigen vector object
     RawVectorType& getRawVector() {return _vec; }
 
-    /// return a raw Lis vector object
+    /// return a raw Eigen vector object
     const RawVectorType& getRawVector() const {return _vec; }
 
     /// vector operation: set data
diff --git a/MathLib/LinAlg/EigenLis/EigenLisLinearSolver.h b/MathLib/LinAlg/EigenLis/EigenLisLinearSolver.h
index 4629b9e8349..168e4dcca5d 100644
--- a/MathLib/LinAlg/EigenLis/EigenLisLinearSolver.h
+++ b/MathLib/LinAlg/EigenLis/EigenLisLinearSolver.h
@@ -38,20 +38,17 @@ public:
     EigenLisLinearSolver(EigenMatrix &A, boost::property_tree::ptree const*const option = nullptr);
 
     /**
-     * configure linear solvers
-     * @param option
+     * parse linear solvers configuration
      */
     void setOption(const boost::property_tree::ptree &option);
 
     /**
-     * configure linear solvers
-     * @param option
+     * copy linear solvers options
      */
     void setOption(const LisOption &option) { _option = option; }
 
     /**
      * get linear solver options
-     * @return
      */
     LisOption &getOption() { return _option; }
 
-- 
GitLab