From 6a1b67a37427b1c4977933626aca7d312b91b21b Mon Sep 17 00:00:00 2001 From: maakshishov Date: Tue, 15 Sep 2020 14:50:19 +0300 Subject: [PATCH] bug fixes in docs --- libs/main/math/pimathmatrix.h | 70 ++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/libs/main/math/pimathmatrix.h b/libs/main/math/pimathmatrix.h index 54a1904e..eb12f17e 100644 --- a/libs/main/math/pimathmatrix.h +++ b/libs/main/math/pimathmatrix.h @@ -75,9 +75,10 @@ inline bool _PIMathMatrixNullCompare(const complexd v) { #pragma pack(push, 1) //! \brief A class that works with square matrix operations, the input data of which are columns, rows and the data type of the matrix -//! @tparam Rows number of rows of matrix type uint -//! @tparam Сols number of columns of matrix type uint -//! @tparam Type is the data type of the matrix. There are can be basic C++ language data and different classes where the arithmetic operators of the C++ language are implemented +//! @tparam Rows rows number of matrix +//! @tparam Сols columns number of matrix +//! @tparam Type is the data type of the matrix. There are can be basic C++ language data and different classes where the arithmetic operators(=, +=, -=, *=, /=, ==, !=, +, -, *, /) +//! of the C++ language are implemented template class PIP_EXPORT PIMathMatrixT { typedef PIMathMatrixT _CMatrix; @@ -209,7 +210,7 @@ public: /** * @brief Method which returns the selected column in PIMathVectorT format. - * If you enter an index out of the border of the matrix behavior will be undefined + * If you enter an index out of the border of the matrix there will be "undefined behavior" * * @param index is the number of the selected column * @return column in PIMathVectorT format @@ -222,7 +223,7 @@ public: /** * @brief Method which returns the selected row in PIMathVectorT format - * If you enter an index out of the border of the matrix behavior will be undefined + * If you enter an index out of the border of the matrix there will be "undefined behavior" * * @param index is the number of the selected row * @return row in PIMathVectorT format @@ -235,7 +236,7 @@ public: /** * @brief Set the selected column in matrix. - * If you enter an index out of the border of the matrix behavior will be undefined + * If you enter an index out of the border of the matrix there will be "undefined behavior" * * @param index is the number of the selected column * @param v is a vector of the type _CMCol that needs to fill the column @@ -248,7 +249,7 @@ public: /** * @brief Set the selected row in matrix - * If you enter an index out of the border of the matrix behavior will be undefined + * If you enter an index out of the border of the matrix there will be "undefined behavior" * * @param index is the number of the selected row * @param v is a vector of the type _CMCol that needs to fill the row @@ -261,7 +262,7 @@ public: /** * @brief Method which changes selected rows in a matrix. - * If you enter an index out of the border of the matrix behavior will be undefined + * If you enter an index out of the border of the matrix there will be "undefined behavior" * * @param r0 is the number of the first selected row * @param r1 is the number of the second selected row @@ -279,7 +280,7 @@ public: /** * @brief Method which changes selected columns in a matrix. - * If you enter an index out of the border of the matrix behavior will be undefined + * If you enter an index out of the border of the matrix there will be "undefined behavior" * * @param c0 is the number of the first selected column * @param c1 is the number of the second selected column @@ -335,7 +336,7 @@ public: /** * @brief Full access to elements reference by row "row" and col "col". - * If you enter an index out of the border of the matrix behavior will be undefined + * If you enter an index out of the border of the matrix there will be "undefined behavior" * * @param row is a parameter that shows the row number of the matrix of the selected element * @param col is a parameter that shows the column number of the matrix of the selected element @@ -345,7 +346,7 @@ public: /** * @brief Full access to element by row "row" and col "col". - * If you enter an index out of the border of the matrix behavior will be undefined + * If you enter an index out of the border of the matrix there will be "undefined behavior" * * @param row is a parameter that shows the row number of the matrix of the selected element * @param col is a parameter that shows the column number of the matrix of the selected element @@ -354,7 +355,7 @@ public: Type at(uint row, uint col) const { return m[row][col]; } /** - * @brief Full access to the matrix row pointer. If you enter an index out of the border of the matrix behavior will be undefined + * @brief Full access to the matrix row pointer. If you enter an index out of the border of the matrix there will be "undefined behavior" * * @param row is a row of necessary matrix * @return matrix row pointer @@ -362,7 +363,7 @@ public: Type *operator[](uint row) { return m[row]; } /** - * @brief Read-only access to the matrix row pointer. If you enter an index out of the border of the matrix behavior will be undefined + * @brief Read-only access to the matrix row pointer. If you enter an index out of the border of the matrix there will be "undefined behavior" * * @param row is a row of necessary matrix * @return matrix row pointer @@ -487,7 +488,7 @@ public: } /** - * @brief Determinant of the matrix is ​​calculated + * @brief Determinant of the matrix is ​​calculated. Works only with square matrix, nonzero matrices and invertible matrix * * @param ok is a parameter with which we can find out if the method worked correctly * @return matrix determinant @@ -508,7 +509,7 @@ public: } /** - * @brief Transforming matrix to upper triangular + * @brief Transforming matrix to upper triangular. Works only with square matrix, nonzero matrices and invertible matrix * * @param ok is a parameter with which we can find out if the method worked correctly * @return copy of transformed upper triangular matrix @@ -551,7 +552,7 @@ public: } /** - * @brief Matrix inversion operation + * @brief Matrix inversion operation. Works only with square matrix, nonzero matrices and invertible matrix * * @param ok is a parameter with which we can find out if the method worked correctly * @return copy of inverted matrix @@ -605,7 +606,7 @@ public: } /** - * @brief Matrix inversion operation + * @brief Matrix inversion operation. Works only with square matrix, nonzero matrices and invertible matrix * * @param ok is a parameter with which we can find out if the method worked correctly * @return inverted matrix @@ -617,7 +618,7 @@ public: } /** - * @brief Matrix transposition operation + * @brief Matrix transposition operation. Works only with square matrix, nonzero matrices and invertible matrix * * @return transposed matrix */ @@ -748,7 +749,7 @@ inline PICout operator<<(PICout s, const PIMathMatrixT &m) { } /** -* @brief Multiplying matrices by each other. If you enter an index out of the border of the matrix behavior will be undefined +* @brief Multiplying matrices by each other. If you enter an index out of the border of the matrix there will be "undefined behavior" * * @param fm first matrix multiplier * @param sm second matrix multiplier @@ -771,7 +772,7 @@ inline PIMathMatrixT operator*(const PIMathMatrixT operator*(const PIMathMatrixT } /** -* @brief Multiplying vector and matrix. If you enter an index out of the border of the matrix behavior will be undefined +* @brief Multiplying vector and matrix. If you enter an index out of the border of the matrix there will be "undefined behavior" * * @param sv first vector multiplier * @param fm second matrix multiplier @@ -856,7 +857,8 @@ class PIMathMatrix; #define PIMM_FOR_R(v) for (uint v = 0; v < _V2D::rows_; ++v) //! \brief A class that works with matrix operations, the input data of which is the data type of the matrix -//! @tparam Type is the data type of the matrix. There are can be basic C++ language data and different classes where the arithmetic operators of the C++ language are implemented +//! @tparam There are can be basic C++ language data and different classes where the arithmetic operators(=, +=, -=, *=, /=, ==, !=, +, -, *, /) +//! of the C++ language are implemented template class PIP_EXPORT PIMathMatrix : public PIVector2D { typedef PIVector2D _V2D; @@ -940,7 +942,7 @@ public: /** * @brief Set the selected column in matrix. If there are more elements of the vector than elements in the column of the matrix - * or index larger than the number of columns otherwise there behavior will be undefined + * or index larger than the number of columns otherwise there will be "undefined behavior" * * @param index is the number of the selected column * @param v is a vector of the type _CMCol that needs to fill the column @@ -953,7 +955,7 @@ public: /** * @brief Set the selected row in matrix. If there are more elements of the vector than elements in the row of the matrix, - * or index larger than the number of rows otherwise there behavior will be undefined + * or index larger than the number of rows otherwise there will be "undefined behavior" * @param index is the number of the selected row * @param v is a vector of the type _CMCol that needs to fill the row * @return matrix type _CMatrix @@ -965,7 +967,7 @@ public: /** * @brief Method which replace selected columns in a matrix. You cannot use an index larger than the number of columns, - * otherwise there behavior will be undefined + * otherwise there will be "undefined behavior" * * @param r0 is the number of the first selected row * @param r1 is the number of the second selected row @@ -978,7 +980,7 @@ public: /** * @brief Method which replace selected rows in a matrix. You cannot use an index larger than the number of rows, - * otherwise there behavior will be undefined + * otherwise there will be "undefined behavior" * * @param c0 is the number of the first selected row * @param c1 is the number of the second selected row @@ -1152,7 +1154,7 @@ public: } /** - * @brief Determinant of the matrix is ​​calculated. Works only with square matrix + * @brief Determinant of the self matrix is ​​calculated. Works only with square matrix, nonzero matrices and invertible matrix * * @param ok is a parameter with which we can find out if the method worked correctly * @return matrix determinant @@ -1173,7 +1175,7 @@ public: } /** - * @brief Trace of the matrix is calculated. Works only with square matrix + * @brief Trace of the matrix is calculated. Works only with square matrix, nonzero matrices and invertible matrix * * @param ok is a parameter with which we can find out if the method worked correctly * @return matrix trace @@ -1192,7 +1194,7 @@ public: } /** - * @brief Transforming matrix to upper triangular. Works only with square matrix + * @brief Transforming matrix to upper triangular. Works only with square matrix, nonzero matrices and invertible matrix * * @param ok is a parameter with which we can find out if the method worked correctly * @return copy of transformed upper triangular matrix @@ -1235,7 +1237,7 @@ public: } /** - * @brief Matrix inversion operation. Works only with square matrix + * @brief Matrix inversion operation. Works only with square matrix, nonzero matrices and invertible matrix * * @param ok is a parameter with which we can find out if the method worked correctly * @param sv is a vector multiplier @@ -1297,7 +1299,7 @@ public: } /** - * @brief Matrix inversion operation + * @brief Matrix inversion operation. Works only with square matrix, nonzero matrices and invertible matrix * * @param ok is a parameter with which we can find out if the method worked correctly * @return inverted matrix @@ -1375,7 +1377,7 @@ inline PIByteArray &operator>>(PIByteArray &s, PIMathMatrix &v) { /** -* @brief Multiplying matrices by each other. If you enter an index out of the border of the matrix behavior will be undefined +* @brief Multiplying matrices by each other. If you enter an index out of the border of the matrix there will be "undefined behavior" * * @param fm first matrix multiplier * @param sm second matrix multiplier @@ -1400,7 +1402,7 @@ inline PIMathMatrix operator*(const PIMathMatrix &fm, } /** -* @brief Multiplying matrix and vector. If you enter an index out of the border of the matrix behavior will be undefined +* @brief Multiplying matrix and vector. If you enter an index out of the border of the matrix there will be "undefined behavior" * * @param fm first matrix multiplier * @param sv second vector multiplier @@ -1423,7 +1425,7 @@ inline PIMathVector operator*(const PIMathMatrix &fm, } /** -* @brief Multiplying vector and matrix. If you enter an index out of the border of the matrix behavior will be undefined +* @brief Multiplying vector and matrix. If you enter an index out of the border of the matrix there will be "undefined behavior" * * @param sv first vector multiplier * @param fm second matrix multiplier