MatrixCWise Class Reference
Last update: 16.07.2025coefficient wise access to Matrix More...
Public Types | |
| typedef Eigen::Matrix< TScalar, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > | Base |
| the Eigen matrix type this class refers to | |
| typedef TScalar * | TBuffer |
| a pointer type for the data array | |
| typedef int | TIndex |
| Eigen matrix index type. | |
| typedef number | TScalar |
| floating point number for matrix elements | |
Public Member Functions | |
| Matrix | __add__ (TScalar other) |
| returns a matrix expression of the coefficient-wise sum of *this and other More... | |
| Matrix | __div__ (Matrix other) |
| returns a matrix expression of the coefficient-wise division of *this and other More... | |
| Matrix | __div__ (MatrixBlock other) |
| Matrix | __eq__ (Matrix other) |
| Matrix | __eq__ (MatrixBlock other) |
| Matrix | __eq__ (TScalar x) const |
| Matrix | __le__ (Matrix other) |
| Matrix | __le__ (MatrixBlock other) |
| Matrix | __le__ (TScalar x) const |
| Matrix | __lt__ (Matrix other) |
| Matrix | __lt__ (MatrixBlock other) |
| Matrix | __lt__ (TScalar x) const |
| Matrix | __mul__ (Matrix other) |
| returns a matrix expression of the coefficient-wise product of *this and other More... | |
| Matrix | __mul__ (MatrixBlock other) |
| Matrix | __pow__ (TScalar exponent) |
| Matrix | __sub__ (TScalar other) |
| returns a matrix expression of the coefficient-wise difference of *this and other More... | |
| Matrix | Abs () |
| Matrix | Abs2 () |
| Matrix | Add (TScalar other) |
| modifies this matrix by the coefficient-wise sum of *this and other More... | |
| Matrix | Atan2 (Matrix y) |
| returns the arcus tangens from two parameters: this object represents the coordinates along the x axis is this array, More... | |
| Matrix | Cos (TScalar a) |
| returns a matrix object with coefficient-wise cosine of (this*a) More... | |
| Matrix | Cos () |
| Matrix | Cube () |
| Matrix | Div (Matrix other) |
| modifies this matrix by the coefficient-wise division of *this and other More... | |
| Matrix | Div (MatrixBlock other) |
| Matrix | Exp (TScalar a) |
| returns a matrix object with coefficient-wise exponential of (this*a) More... | |
| Matrix | Exp () |
| Matrix | Greater (TScalar x) const |
| Matrix | Inverse () |
| Matrix | Less (TScalar x) const |
| Matrix | Log () |
| Matrix | Log10 () |
| MatrixCWise (MatrixCWise ar) | |
| destructor More... | |
| MatrixCWise (Matrix x) | |
| constructor from Matrix More... | |
| Matrix | Max (Matrix other) |
| returns a matrix expression of the coefficient-wise operator max of *this and other More... | |
| Matrix | Max (MatrixBlock other) |
| Matrix | Max (TScalar z) const |
| Matrix | Min (Matrix other) |
| returns a matrix expression of the coefficient-wise operator min of *this and other More... | |
| Matrix | Min (MatrixBlock other) |
| Matrix | Min (TScalar z) const |
| Matrix | Mul (Matrix other) |
| modifes this matrix by the coefficient-wise product of *this and other More... | |
| Matrix | Mul (MatrixBlock other) |
| Matrix | NotEqual (Matrix other) |
| Matrix | NotEqual (MatrixBlock other) |
| Matrix | NotEqual (TScalar x) const |
| Matrix | Pow (TScalar exponent) |
| returns a matrix object with coefficient-wise power of *this to the given exponent (operator ^) More... | |
| Matrix | Sign () const |
| Matrix | Sin (TScalar a) |
| returns a matrix object with coefficient-wise sinus of (this*a) More... | |
| Matrix | Sin () |
| Matrix | Sqrt () |
| Matrix | Square () |
| Matrix | Sub (TScalar other) |
| modifies this matrix by the coefficient-wise difference of *this and other More... | |
Detailed Description
coefficient wise access to Matrix
This class provides operators and functions for coefficient wise access for matrices, i.e. it provides a scalar view on all matrix elements.
Operators cover elementwise scalar operations. Functions cover a wide field of scalar functions applied to all elements.
By using a reference counting system it is guaranteed that the refered object will not be deleted before the MatrixCWise is deleted.
Constructor & Destructor Documentation
◆ MatrixCWise() [1/2]
| MatrixCWise | ( | MatrixCWise | ar | ) |
destructor
copy constructor
- Parameters
-
ar the source object
◆ MatrixCWise() [2/2]
| MatrixCWise | ( | Matrix | x | ) |
constructor from Matrix
- Parameters
-
x the matrix which is to be referenced
Member Function Documentation
◆ __add__()
returns a matrix expression of the coefficient-wise sum of *this and other
- Parameters
-
other the other (scalar)
- Returns
- the result of the operation
◆ __div__()
returns a matrix expression of the coefficient-wise division of *this and other
- Parameters
-
other the other matrix
- Returns
- the result of the operation
◆ __eq__()
- Returns
- returns a matrix expression of the coefficient-wise operator == (equal) of *this and other
- Parameters
-
other the other matrix to be compared
◆ __le__()
- Returns
- returns a matrix expression of the coefficient-wise operator <= of *this and other
- Parameters
-
other the other matrix to be compared
◆ __lt__()
- Returns
- returns a matrix expression of the coefficient-wise operator < of *this and other
- Parameters
-
other the other matrix to be compared
◆ __mul__()
returns a matrix expression of the coefficient-wise product of *this and other
- Parameters
-
other the other matrix
- Returns
- the result of the operation
◆ __pow__()
- Returns
- returns a matrix object with coefficient-wise power of *this to the given exponent (operator ^)
- Parameters
-
exponent the exponent
◆ __sub__()
returns a matrix expression of the coefficient-wise difference of *this and other
- Parameters
-
other the other object (scalar)
- Returns
- the result of the operation
◆ Abs()
| Matrix Abs | ( | ) |
- Returns
- a matrix object with coefficient-wise absolute value
◆ Abs2()
| Matrix Abs2 | ( | ) |
- Returns
- a matrix object with coefficient-wise squared absolute value
◆ Add()
modifies this matrix by the coefficient-wise sum of *this and other
- Parameters
-
other the other object (scalar)
- Returns
- a reference to *this
◆ Atan2()
returns the arcus tangens from two parameters: this object represents the coordinates along the x axis is this array,
- Parameters
-
y the given array defining the coordinates along the y axis.
- Returns
- The output matrix object contains the elementwise atan2 values
◆ Cos() [1/2]
returns a matrix object with coefficient-wise cosine of (this*a)
- Parameters
-
a the scalar a
- Returns
- the result of the operation
◆ Cos() [2/2]
| Matrix Cos | ( | ) |
- Returns
- a matrix object with coefficient-wise cosine
◆ Cube()
| Matrix Cube | ( | ) |
- Returns
- a matrix object with coefficient-wise cubic value (x^3)
◆ Div()
modifies this matrix by the coefficient-wise division of *this and other
- Parameters
-
other the other matrix
- Returns
- a reference to *this
◆ Exp() [1/2]
returns a matrix object with coefficient-wise exponential of (this*a)
- Parameters
-
a the scalar a
- Returns
- the result of the operation
◆ Exp() [2/2]
| Matrix Exp | ( | ) |
- Returns
- a matrix object with coefficient-wise exponential (Euler number power component)
◆ Greater()
- Returns
- a matrix indicating which element of this is greater than x
- Parameters
-
x the scalar x
◆ Inverse()
| Matrix Inverse | ( | ) |
- Returns
- a matrix object with coefficient-wise inverse, i.e $ y_i = 1/x_i $
◆ Less()
- Returns
- a matrix indicating which element of this is smaller than x
- Parameters
-
x the scalar x
◆ Log()
| Matrix Log | ( | ) |
- Returns
- a matrix object with coefficient-wise natural logarithm
◆ Log10()
| Matrix Log10 | ( | ) |
- Returns
- a matrix object with coefficient-wise decadic logarithm
◆ Max() [1/2]
returns a matrix expression of the coefficient-wise operator max of *this and other
- Parameters
-
other the other matrix
- Returns
- the result of the operation
◆ Max() [2/2]
- Returns
- an array with elementwise maximum of max(this,z)
- Parameters
-
z the scalar z
◆ Min() [1/2]
returns a matrix expression of the coefficient-wise operator min of *this and other
- Parameters
-
other the other matrix
- Returns
- the result of the operation
◆ Min() [2/2]
- Returns
- an array with elementwise minimum of min(this,z)
- Parameters
-
z the scalar z
◆ Mul()
modifes this matrix by the coefficient-wise product of *this and other
- Parameters
-
other the other matrix
- Returns
- a reference to *this
◆ NotEqual()
- Returns
- returns a matrix expression of the coefficient-wise operator != (inequal) of *this and other
- Parameters
-
other the other matrix to be compared
◆ Pow()
returns a matrix object with coefficient-wise power of *this to the given exponent (operator ^)
- Parameters
-
exponent the exponent of the power operation
- Returns
- the result of the operation
◆ Sign()
| Matrix Sign | ( | ) | const |
- Returns
- an array with elementwise sign (-1 if <0, 0 if=0, 1 if>0)
◆ Sin() [1/2]
returns a matrix object with coefficient-wise sinus of (this*a)
- Parameters
-
a the scalar a
- Returns
- the result of the operation
◆ Sin() [2/2]
| Matrix Sin | ( | ) |
- Returns
- a matrix object with coefficient-wise sinus
◆ Sqrt()
| Matrix Sqrt | ( | ) |
- Returns
- a matrix object with coefficient-wise square root
◆ Square()
| Matrix Square | ( | ) |
- Returns
- a matrix object with coefficient-wise squared value