Small fixed-size matrix containing RowSize rows and ColumnSize columns. More...
#include <arcane/utils/NumMatrix.h>
Public Types | |
| using | VectorType = NumVector<T, ColumnSize> |
| using | ThatClass = NumMatrix<T, RowSize, ColumnSize> |
| using | DataType = T |
Public Member Functions | |
| NumMatrix ()=default | |
| Constructs the matrix with all coefficients zero. | |
| constexpr __host__ __device__ | NumMatrix (const VectorType &ax, const VectorType &ay) |
| Constructs the matrix with rows (ax, ay). | |
| constexpr __host__ __device__ | NumMatrix (const VectorType &ax, const VectorType &ay, const VectorType &az) |
| Constructs the matrix with rows (ax, ay, az). | |
| constexpr __host__ __device__ | NumMatrix (const VectorType &a1, const VectorType &a2, const VectorType &a3, const VectorType &a4) |
| Constructs the matrix with rows (a1, a2, a3, a4). | |
| constexpr __host__ __device__ | NumMatrix (const VectorType &a1, const VectorType &a2, const VectorType &a3, const VectorType &a4, const VectorType &a5) |
| Constructs the matrix with rows (a1, a2, a3, a4, a5). | |
| constexpr __host__ __device__ | NumMatrix (T v) |
| Constructs the instance with the triplet (v, v, v). | |
| constexpr __host__ __device__ | NumMatrix (Real2x2 v) |
| constexpr __host__ __device__ | NumMatrix (Real3x3 v) |
| constexpr __host__ __device__ ThatClass & | operator= (T v) |
| Assigns the triplet (v, v, v) to the instance. | |
| constexpr __host__ __device__ ThatClass & | operator= (const Real2x2 &v) |
| constexpr __host__ __device__ ThatClass & | operator= (const Real3x3 &v) |
| operator Real2x2 () const | |
| operator Real3x3 () const | |
| constexpr __host__ __device__ bool | isNearlyZero () const |
| Compares the matrix with the zero matrix. | |
| constexpr __host__ __device__ ThatClass & | operator+= (const ThatClass &b) |
| Adds b to the triplet. | |
| constexpr __host__ __device__ ThatClass & | operator-= (const ThatClass &b) |
| Subtracts b from the triplet. | |
| constexpr __host__ __device__ ThatClass & | operator*= (T b) |
| Multiplies each component of the matrix by the real number b. | |
| constexpr __host__ __device__ ThatClass & | operator/= (T b) |
| Divides each component of the matrix by the real number b. | |
| constexpr __host__ __device__ ThatClass | operator- () const |
| Creates a tensor opposite to the current tensor. | |
| constexpr __host__ __device__ VectorType | operator() (Int32 i) const |
| constexpr __host__ __device__ VectorType | operator[] (Int32 i) const |
| constexpr __host__ __device__ T & | operator() (Int32 i, Int32 j) |
| constexpr __host__ __device__ T | operator() (Int32 i, Int32 j) const |
| constexpr __host__ __device__ void | setLine (Int32 i, const VectorType &v) |
| Sets the value of the i-th row to v. | |
| VectorType & | vx () |
| VectorType | vx () const |
| VectorType & | vy () |
| VectorType | vy () const |
| VectorType & | vz () |
| VectorType | vz () const |
Static Public Member Functions | |
| constexpr __host__ static __device__ ThatClass | zero () |
| Constructs the zero matrix. | |
| constexpr __host__ static __device__ ThatClass | fromColumns (T ax, T ay, T az, T bx, T by, T bz, T cx, T cy, T cz) |
| Constructs the matrix ((ax,bx,cx), (ay,by,cy), (az,bz,cz)). | |
| constexpr __host__ static __device__ ThatClass | fromLines (T ax, T bx, T cx, T ay, T by, T cy, T az, T bz, T cz) |
| Constructs the matrix ((ax,bx,cx), (ay,by,cy), (az,bz,cz)). | |
Static Private Member Functions | |
| static constexpr bool | isSquare () |
| static constexpr bool | isSquare2 () |
| static constexpr bool | isSquare3 () |
| constexpr __host__ static __device__ bool | _eq (T a, T b) |
| Compares the values of a and b using the TypeEqualT comparator. | |
Private Attributes | |
| VectorType | m_values [RowSize] = {} |
Static Private Attributes | |
| static constexpr int | Size = RowSize |
Friends | |
| constexpr __host__ __device__ ThatClass | operator+ (const ThatClass &a, const ThatClass &b) |
| Creates a triplet that equals this triplet added to b. | |
| constexpr __host__ __device__ ThatClass | operator- (const ThatClass &a, const ThatClass &b) |
| Creates a triplet that equals a subtracted from this triplet. | |
| constexpr __host__ __device__ ThatClass | operator* (DataType a, const ThatClass &mat) |
| Multiplication by a scalar. | |
| constexpr __host__ __device__ ThatClass | operator* (const ThatClass &mat, DataType b) |
| Multiplication by a scalar. | |
| constexpr __host__ __device__ ThatClass | operator/ (const ThatClass &mat, DataType b) |
| Division by a scalar. | |
| constexpr __host__ __device__ bool | operator== (const ThatClass &a, const ThatClass &b) |
| Compares the current instance component by component to b. | |
| constexpr __host__ __device__ bool | operator!= (const ThatClass &a, const ThatClass &b) |
| Compares two triplets. For the notion of equality, see operator==(). | |
Small fixed-size matrix containing RowSize rows and ColumnSize columns.
It is possible to access each vector component using 'operator[]' or 'operator()' or via the methods vx(), vy(), vz() if the dimension is sufficient (for example, vz() is only accessible if Size>=3.
Definition at line 42 of file NumMatrix.h.
| using Arcane::NumMatrix< T, RowSize, ColumnSize >::DataType = T |
Definition at line 57 of file NumMatrix.h.
| using Arcane::NumMatrix< T, RowSize, ColumnSize >::ThatClass = NumMatrix<T, RowSize, ColumnSize> |
Definition at line 56 of file NumMatrix.h.
| using Arcane::NumMatrix< T, RowSize, ColumnSize >::VectorType = NumVector<T, ColumnSize> |
Definition at line 55 of file NumMatrix.h.
|
inlineconstexpr |
Constructs the matrix with rows (ax, ay).
Definition at line 65 of file NumMatrix.h.
|
inlineconstexpr |
Constructs the matrix with rows (ax, ay, az).
Definition at line 73 of file NumMatrix.h.
|
inlineconstexpr |
Constructs the matrix with rows (a1, a2, a3, a4).
Definition at line 82 of file NumMatrix.h.
|
inlineconstexpr |
Constructs the matrix with rows (a1, a2, a3, a4, a5).
Definition at line 93 of file NumMatrix.h.
|
inlineexplicitconstexpr |
Constructs the instance with the triplet (v, v, v).
Definition at line 106 of file NumMatrix.h.
|
inlineexplicitconstexpr |
Definition at line 112 of file NumMatrix.h.
|
inlineexplicitconstexpr |
Definition at line 116 of file NumMatrix.h.
|
inlinestaticconstexprprivate |
Compares the values of a and b using the TypeEqualT comparator.
| true | if a and b are equal, |
| false | otherwise. |
Definition at line 378 of file NumMatrix.h.
|
inlinestaticconstexpr |
Constructs the matrix ((ax,bx,cx), (ay,by,cy), (az,bz,cz)).
Definition at line 159 of file NumMatrix.h.
|
inlinestaticconstexpr |
Constructs the matrix ((ax,bx,cx), (ay,by,cy), (az,bz,cz)).
Definition at line 166 of file NumMatrix.h.
|
inlineconstexpr |
Compares the matrix with the zero matrix.
The matrix is zero if and only if each of its components is less than a given epsilon. The epsilon value used is that of float_info<value_type>::nearlyEpsilon():
\[A=0 \Leftrightarrow |A.x|<\epsilon,|A.y|<\epsilon,|A.z|<\epsilon \]
| true | if the matrix is equal to the zero matrix, |
| false | otherwise. |
Definition at line 185 of file NumMatrix.h.
|
inlinestaticconstexprprivate |
Definition at line 49 of file NumMatrix.h.
|
inlinestaticconstexprprivate |
Definition at line 50 of file NumMatrix.h.
|
inlinestaticconstexprprivate |
Definition at line 51 of file NumMatrix.h.
|
inline |
Definition at line 140 of file NumMatrix.h.
|
inline |
Definition at line 145 of file NumMatrix.h.
|
inlineconstexpr |
Definition at line 299 of file NumMatrix.h.
|
inlineconstexpr |
Definition at line 313 of file NumMatrix.h.
|
inlineconstexpr |
Definition at line 321 of file NumMatrix.h.
|
inlineconstexpr |
Multiplies each component of the matrix by the real number b.
Definition at line 208 of file NumMatrix.h.
|
inlineconstexpr |
Adds b to the triplet.
Definition at line 194 of file NumMatrix.h.
|
inlineconstexpr |
Creates a tensor opposite to the current tensor.
Definition at line 238 of file NumMatrix.h.
|
inlineconstexpr |
Subtracts b from the triplet.
Definition at line 201 of file NumMatrix.h.
|
inlineconstexpr |
Divides each component of the matrix by the real number b.
Definition at line 215 of file NumMatrix.h.
|
inlineconstexpr |
Definition at line 128 of file NumMatrix.h.
|
inlineconstexpr |
Definition at line 134 of file NumMatrix.h.
|
inlineconstexpr |
Assigns the triplet (v, v, v) to the instance.
Definition at line 121 of file NumMatrix.h.
|
inlineconstexpr |
Definition at line 306 of file NumMatrix.h.
|
inlineconstexpr |
Sets the value of the i-th row to v.
Definition at line 329 of file NumMatrix.h.
|
inline |
Definition at line 337 of file NumMatrix.h.
|
inline |
Definition at line 342 of file NumMatrix.h.
|
inline |
Definition at line 347 of file NumMatrix.h.
|
inline |
Definition at line 352 of file NumMatrix.h.
|
inline |
Definition at line 357 of file NumMatrix.h.
|
inline |
Definition at line 362 of file NumMatrix.h.
|
inlinestaticconstexpr |
Constructs the zero matrix.
Definition at line 153 of file NumMatrix.h.
|
friend |
Compares two triplets. For the notion of equality, see operator==().
| true | if the two triplets are different, |
| false | otherwise. |
Definition at line 291 of file NumMatrix.h.
|
friend |
Multiplication by a scalar.
Definition at line 255 of file NumMatrix.h.
|
friend |
Multiplication by a scalar.
Definition at line 247 of file NumMatrix.h.
|
friend |
Creates a triplet that equals this triplet added to b.
Definition at line 222 of file NumMatrix.h.
|
friend |
Creates a triplet that equals a subtracted from this triplet.
Definition at line 230 of file NumMatrix.h.
|
friend |
Division by a scalar.
Definition at line 263 of file NumMatrix.h.
|
friend |
Compares the current instance component by component to b.
| true | if this.x==b.x and this.y==b.y and this.z==b.z. |
| false | otherwise. |
Definition at line 277 of file NumMatrix.h.
|
private |
Definition at line 369 of file NumMatrix.h.
|
staticconstexprprivate |
Definition at line 48 of file NumMatrix.h.