PIMathMatrix.h documentation correction

This commit is contained in:
2020-09-25 13:42:09 +03:00
parent 5da9d6e43b
commit 8bc421dc30

View File

@@ -235,12 +235,12 @@ public:
}
/**
* @brief Set the selected column in matrix.
* @brief Set the selected column in this matrix.
* 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
* @return matrix type _CMatrix
* @return reference to this
*/
_CMatrix &setCol(uint index, const _CMCol &v) {
PIMM_FOR_R(i) m[i][index] = v[i];
@@ -248,12 +248,12 @@ public:
}
/**
* @brief Set the selected row in matrix
* @brief Set the selected row in this matrix
* 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
* @return matrix type _CMatrix
* @return reference to this
*/
_CMatrix &setRow(uint index, const _CMRow &v) {
PIMM_FOR_C(i) m[index][i] = v[i];
@@ -261,12 +261,12 @@ public:
}
/**
* @brief Method which changes selected rows in a matrix.
* @brief Method which changes selected rows in this matrix.
* 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
* @return matrix type _CMatrix
* @return reference to this
*/
_CMatrix &swapRows(uint r0, uint r1) {
Type t;
@@ -279,12 +279,12 @@ public:
}
/**
* @brief Method which changes selected columns in a matrix.
* @brief Method which changes selected columns in this matrix.
* 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
* @return matrix type _CMatrix
* @return reference to this
*/
_CMatrix &swapCols(uint c0, uint c1) {
Type t;
@@ -297,10 +297,10 @@ public:
}
/**
* @brief Method which fills the matrix with selected value
* @brief Method which set this matrix elements with selected value
*
* @param v is a parameter the type and value of which is selected and later filled into the matrix
* @return filled matrix type _CMatrix
* @return reference to this
*/
_CMatrix &fill(const Type &v) {
PIMM_FOR_WB(r, c) m[r][c] = v;
@@ -374,7 +374,7 @@ public:
* @brief Matrix assignment to matrix "sm"
*
* @param sm matrix for the assigment
* @return matrix equal with sm
* @return this matrix equal with sm
*/
_CMatrix &operator=(const _CMatrix &sm) {
memcpy(m, sm.m, sizeof(Type) * Cols * Rows);
@@ -512,7 +512,7 @@ public:
* @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
* @return reference to this of transformed upper triangular matrix
*/
_CMatrix &toUpperTriangular(bool *ok = 0) {
if (Cols != Rows) {
@@ -554,8 +554,7 @@ public:
/**
* @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
* @param ok is a parameter with which we can find out if the method worked correct * @return reference to this inverted matrix
*/
_CMatrix &invert(bool *ok = 0) {
static_assert(Cols == Rows, "Only square matrix invertable");
@@ -941,12 +940,12 @@ public:
static _CMatrix matrixCol(const PIMathVector<Type> &val) { return _CMatrix(1, val.size(), val.toVector()); }
/**
* @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 will be "undefined behavior"
* @brief Set the selected column in this 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 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
* @return matrix type _CMatrix
* @return reference to this
*/
_CMatrix &setCol(uint index, const _CMCol &v) {
PIMM_FOR_R(i) _V2D::element(i, index) = v[i];
@@ -954,11 +953,11 @@ public:
}
/**
* @brief Set the selected row in matrix. If there are more elements of the vector than elements in the row of the matrix,
* @brief Set the selected row in this 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 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
* @return reference to this
*/
_CMatrix &setRow(uint index, const _CMCol &v) {
PIMM_FOR_C(i) _V2D::element(index, i) = v[i];
@@ -966,12 +965,12 @@ public:
}
/**
* @brief Method which replace selected columns in a matrix. You cannot use an index larger than the number of columns,
* @brief Method which replace selected columns in this matrix. You cannot use an index larger than the number of columns,
* 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
* @return matrix type _CMatrix
* @return reference to this
*/
_CMatrix &swapCols(uint r0, uint r1) {
PIMM_FOR_C(i) { piSwap(_V2D::element(i, r0), _V2D::element(i, r1)); }
@@ -979,12 +978,12 @@ public:
}
/**
* @brief Method which replace selected rows in a matrix. You cannot use an index larger than the number of rows,
* @brief Method which replace selected rows in this matrix. You cannot use an index larger than the number of rows,
* 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
* @return matrix type _CMatrix
* @return reference to this
*/
_CMatrix &swapRows(uint c0, uint c1) {
PIMM_FOR_R(i) { piSwap(_V2D::element(c0, i), _V2D::element(c1, i)); }
@@ -992,10 +991,10 @@ public:
}
/**
* @brief Method which fills the matrix with selected value
* @brief Method which set this matrix elements with selected value
*
* @param v is a parameter the type and value of which is selected and later filled into the matrix
* @return filled matrix type _CMatrix
* @return reference to this
*/
_CMatrix &fill(const Type &v) {
PIMM_FOR_A(i) _V2D::mat[i] = v;
@@ -1040,7 +1039,7 @@ public:
* @brief Matrix assignment to matrix "v"
*
* @param v matrix for the assigment
* @return matrix equal with v
* @return reference to this matrix equal with v
*/
_CMatrix &operator=(const PIVector<PIVector<Type> > &v) {
*this = _CMatrix(v);
@@ -1197,7 +1196,7 @@ public:
* @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
* @return this transformed upper triangular matrix
*/
_CMatrix &toUpperTriangular(bool *ok = 0) {
if (!isSquare()) {
@@ -1241,7 +1240,7 @@ public:
*
* @param ok is a parameter with which we can find out if the method worked correctly
* @param sv is a vector multiplier
* @return copy of inverted matrix
* @return this inverted matrix
*/
_CMatrix &invert(bool *ok = 0, _CMCol *sv = 0) {
if (!isSquare()) {