|
OpenMD 3.1
Molecular Dynamics in the Open
|
rectangular matrix class More...
#include "math/DynamicRectMatrix.hpp"
Public Types | |
| using | ElemType = Real |
| using | ElemPoinerType = Real* |
| using | SelfType = DynamicRectMatrix<Real> |
Public Member Functions | |
| DynamicRectMatrix () | |
| default constructor | |
| DynamicRectMatrix (unsigned int nrow, unsigned int ncol) | |
| DynamicRectMatrix (unsigned int nrow, unsigned int ncol, Real s) | |
| Constructs and initializes every element of this matrix to a scalar. | |
| DynamicRectMatrix (unsigned int nrow, unsigned int ncol, Real *array) | |
| DynamicRectMatrix (const SelfType &m) | |
| copy constructor | |
| ~DynamicRectMatrix () | |
| destructor | |
| DynamicRectMatrix< Real > | operator= (const DynamicRectMatrix< Real > &m) |
| copy assignment operator | |
| Real & | operator() (unsigned int i, unsigned int j) |
| Returns the reference of a single element of this matrix. | |
| Real | operator() (unsigned int i, unsigned int j) const |
| Returns the value of a single element of this matrix. | |
| void | getArray (Real *array) |
| Copies the internal data to an array. | |
| DynamicVector< Real > | getRow (unsigned int row) |
| Returns a row of this matrix as a vector. | |
| void | setRow (unsigned int row, const DynamicVector< Real > &v) |
| Sets a row of this matrix. | |
| DynamicVector< Real > | getColumn (unsigned int col) |
| Returns a column of this matrix as a vector. | |
| void | setColumn (unsigned int col, const DynamicVector< Real > &v) |
| Sets a column of this matrix. | |
| void | swapRow (unsigned int i, unsigned int j) |
| swap two rows of this matrix | |
| void | swapColumn (unsigned int i, unsigned int j) |
| swap two Columns of this matrix | |
| bool | operator== (const DynamicRectMatrix< Real > &m) |
| Tests if this matrix is identical to matrix m. | |
| bool | operator!= (const DynamicRectMatrix< Real > &m) |
| Tests if this matrix is not equal to matrix m. | |
| void | negate () |
| Negates the value of this matrix in place. | |
| void | negate (const DynamicRectMatrix< Real > &m) |
| Sets the value of this matrix to the negation of matrix m. | |
| void | add (const DynamicRectMatrix< Real > &m) |
| Sets the value of this matrix to the sum of itself and m (*this += m). | |
| void | add (const DynamicRectMatrix< Real > &m1, const DynamicRectMatrix< Real > &m2) |
| Sets the value of this matrix to the sum of m1 and m2 (*this = m1 + m2). | |
| void | sub (const DynamicRectMatrix< Real > &m) |
| Sets the value of this matrix to the difference of itself and m (*this -= m). | |
| void | sub (const DynamicRectMatrix< Real > &m1, const DynamicRectMatrix< Real > &m2) |
| Sets the value of this matrix to the difference of matrix m1 and m2 (*this = m1 - m2). | |
| void | mul (Real s) |
| Sets the value of this matrix to the scalar multiplication of itself (*this *= s). | |
| void | mul (Real s, const DynamicRectMatrix< Real > &m) |
| Sets the value of this matrix to the scalar multiplication of matrix m (*this = s * m). | |
| void | div (Real s) |
| Sets the value of this matrix to the scalar division of itself (*this /= s ). | |
| void | div (Real s, const DynamicRectMatrix< Real > &m) |
| Sets the value of this matrix to the scalar division of matrix m (*this = m /s). | |
| DynamicRectMatrix< Real > | operator*= (const Real s) |
| Multiples a scalar onto every element of this matrix. | |
| DynamicRectMatrix< Real > | operator/= (const Real s) |
| Divides every element of this matrix by a scalar. | |
| DynamicRectMatrix< Real > | operator+= (const DynamicRectMatrix< Real > m) |
| Sets the value of this matrix to the sum of the other matrix and itself (*this += m). | |
| DynamicRectMatrix< Real > | operator-= (const DynamicRectMatrix< Real > m) |
| Sets the value of this matrix to the differerence of itself and the other matrix (*this -= m) | |
| DynamicRectMatrix< Real > | transpose () const |
| Return the transpose of this matrix. | |
| unsigned int | getNRow () const |
| unsigned int | getNCol () const |
| template<class MatrixType > | |
| void | setSubMatrix (unsigned int beginRow, unsigned int beginCol, const MatrixType &m) |
| template<class MatrixType > | |
| void | getSubMatrix (unsigned int beginRow, unsigned int beginCol, MatrixType &m) |
Protected Attributes | |
| Real ** | data_ |
| unsigned int | nrow_ |
| unsigned int | ncol_ |
rectangular matrix class
Definition at line 67 of file DynamicRectMatrix.hpp.
| using OpenMD::DynamicRectMatrix< Real >::ElemPoinerType = Real* |
Definition at line 70 of file DynamicRectMatrix.hpp.
| using OpenMD::DynamicRectMatrix< Real >::ElemType = Real |
Definition at line 69 of file DynamicRectMatrix.hpp.
| using OpenMD::DynamicRectMatrix< Real >::SelfType = DynamicRectMatrix<Real> |
Definition at line 71 of file DynamicRectMatrix.hpp.
|
inline |
default constructor
Definition at line 74 of file DynamicRectMatrix.hpp.
|
inline |
Definition at line 80 of file DynamicRectMatrix.hpp.
|
inline |
Constructs and initializes every element of this matrix to a scalar.
Definition at line 89 of file DynamicRectMatrix.hpp.
|
inline |
Definition at line 96 of file DynamicRectMatrix.hpp.
|
inline |
copy constructor
Definition at line 104 of file DynamicRectMatrix.hpp.
|
inline |
destructor
Definition at line 113 of file DynamicRectMatrix.hpp.
|
inline |
Sets the value of this matrix to the sum of itself and m (*this += m).
| m | the other matrix |
Definition at line 280 of file DynamicRectMatrix.hpp.
Referenced by OpenMD::operator+(), and OpenMD::DynamicRectMatrix< Real >::operator+=().
|
inline |
Sets the value of this matrix to the sum of m1 and m2 (*this = m1 + m2).
| m1 | the first matrix |
| m2 | the second matrix |
Definition at line 292 of file DynamicRectMatrix.hpp.
|
inline |
Sets the value of this matrix to the scalar division of itself (*this /= s ).
| s | the scalar value |
Definition at line 355 of file DynamicRectMatrix.hpp.
Referenced by OpenMD::operator/(), and OpenMD::DynamicRectMatrix< Real >::operator/=().
|
inline |
Sets the value of this matrix to the scalar division of matrix m (*this = m /s).
| s | the scalar value |
| m | the matrix |
Definition at line 367 of file DynamicRectMatrix.hpp.
|
inline |
Copies the internal data to an array.
| array | the pointer of destination array |
Definition at line 153 of file DynamicRectMatrix.hpp.
|
inline |
Returns a column of this matrix as a vector.
| col | the column index |
Definition at line 191 of file DynamicRectMatrix.hpp.
|
inline |
Definition at line 426 of file DynamicRectMatrix.hpp.
|
inline |
Definition at line 425 of file DynamicRectMatrix.hpp.
|
inline |
Returns a row of this matrix as a vector.
| row | the row index |
Definition at line 166 of file DynamicRectMatrix.hpp.
|
inline |
Definition at line 440 of file DynamicRectMatrix.hpp.
|
inline |
Sets the value of this matrix to the scalar multiplication of itself (*this *= s).
| s | the scalar value |
Definition at line 331 of file DynamicRectMatrix.hpp.
Referenced by OpenMD::operator*(), OpenMD::operator*(), and OpenMD::DynamicRectMatrix< Real >::operator*=().
|
inline |
Sets the value of this matrix to the scalar multiplication of matrix m (*this = s * m).
| s | the scalar value |
| m | the matrix |
Definition at line 343 of file DynamicRectMatrix.hpp.
|
inline |
Negates the value of this matrix in place.
Definition at line 260 of file DynamicRectMatrix.hpp.
Referenced by OpenMD::operator-().
|
inline |
Sets the value of this matrix to the negation of matrix m.
| m | the source matrix |
Definition at line 270 of file DynamicRectMatrix.hpp.
|
inline |
Tests if this matrix is not equal to matrix m.
| m | matrix to be compared |
Definition at line 257 of file DynamicRectMatrix.hpp.
|
inline |
Returns the reference of a single element of this matrix.
| i | row index |
| j | Column index |
Definition at line 135 of file DynamicRectMatrix.hpp.
|
inline |
Returns the value of a single element of this matrix.
| i | row index |
| j | Column index |
Definition at line 145 of file DynamicRectMatrix.hpp.
|
inline |
Multiples a scalar onto every element of this matrix.
| s | the scalar value |
Definition at line 378 of file DynamicRectMatrix.hpp.
References OpenMD::DynamicRectMatrix< Real >::mul().
|
inline |
Sets the value of this matrix to the sum of the other matrix and itself (*this += m).
| m | the other matrix |
Definition at line 397 of file DynamicRectMatrix.hpp.
References OpenMD::DynamicRectMatrix< Real >::add().
|
inline |
Sets the value of this matrix to the differerence of itself and the other matrix (*this -= m)
| m | the other matrix |
Definition at line 408 of file DynamicRectMatrix.hpp.
References OpenMD::DynamicRectMatrix< Real >::sub().
|
inline |
Divides every element of this matrix by a scalar.
| s | the scalar value |
Definition at line 387 of file DynamicRectMatrix.hpp.
References OpenMD::DynamicRectMatrix< Real >::div().
|
inline |
copy assignment operator
Definition at line 116 of file DynamicRectMatrix.hpp.
|
inline |
Tests if this matrix is identical to matrix m.
| m | matrix to be compared |
Definition at line 242 of file DynamicRectMatrix.hpp.
References OpenMD::equal().
|
inline |
Sets a column of this matrix.
| col | the column index |
| v | the vector to be set |
Definition at line 205 of file DynamicRectMatrix.hpp.
|
inline |
Sets a row of this matrix.
| row | the row index |
| v | the vector to be set |
Definition at line 180 of file DynamicRectMatrix.hpp.
|
inline |
Definition at line 429 of file DynamicRectMatrix.hpp.
|
inline |
Sets the value of this matrix to the difference of itself and m (*this -= m).
| m | the other matrix |
Definition at line 305 of file DynamicRectMatrix.hpp.
Referenced by OpenMD::operator-(), and OpenMD::DynamicRectMatrix< Real >::operator-=().
|
inline |
Sets the value of this matrix to the difference of matrix m1 and m2 (*this = m1 - m2).
| m1 | the first matrix |
| m2 | the second matrix |
Definition at line 318 of file DynamicRectMatrix.hpp.
|
inline |
swap two Columns of this matrix
| i | the first Column |
| j | the second Column |
Definition at line 227 of file DynamicRectMatrix.hpp.
|
inline |
swap two rows of this matrix
| i | the first row |
| j | the second row |
Definition at line 215 of file DynamicRectMatrix.hpp.
|
inline |
Return the transpose of this matrix.
Definition at line 415 of file DynamicRectMatrix.hpp.
|
protected |
Definition at line 451 of file DynamicRectMatrix.hpp.
|
protected |
Definition at line 453 of file DynamicRectMatrix.hpp.
|
protected |
Definition at line 452 of file DynamicRectMatrix.hpp.