Small fixed-size matrix containing RowSize rows and ColumnSize columns. More...
#include <arccore/base/NumMatrix.h>
Public Types | |
| using | VectorType = NumVector<T, ColumnSize> |
| using | ThatClass = NumMatrix<T, RowSize, ColumnSize> |
| using | DataType = T |
Public Member Functions | |
| constexpr | NumMatrix () |
| Constructs a matrix with each coefficient initialized with default T constructor. | |
| constexpr | NumMatrix (NoInitTag) |
| Constructs the matrix WITHOUT initializing its coefficients. | |
| constexpr __host__ __device__ | NumMatrix (const VectorType &ax) |
| Constructs the matrix with row (ax). | |
| 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 (const VectorType &a1, const VectorType &a2, const VectorType &a3, const VectorType &a4, const VectorType &a5, const VectorType &a6) |
| Constructs the matrix with rows (a1, a2, a3, a4, a5, a6). | |
| constexpr __host__ __device__ | NumMatrix (const T &v) |
| Constructs the instance with the triplet (v, v, v). | |
| constexpr __host__ __device__ | NumMatrix (const Real2x2 &v) |
| constexpr __host__ __device__ | NumMatrix (const Real3x3 &v) |
| constexpr __host__ __device__ ThatClass & | operator= (const DataType &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 | |
| Conversion to Real2x2. | |
| constexpr | operator Real3x3 () const |
| Conversion to Real3x3. | |
| constexpr __host__ __device__ ThatClass | operator- () const |
| Creates a tensor opposite to the current tensor. | |
| constexpr __host__ __device__ VectorType | row (Int32 i) const |
| constexpr __host__ __device__ DataType & | operator() (Int32 i, Int32 j) |
| constexpr __host__ __device__ DataType | operator() (Int32 i, Int32 j) const |
| constexpr __host__ __device__ void | setRow (Int32 i, const VectorType &v) |
| Sets the value of the i-th row to v. | |
| constexpr __host__ __device__ void | fill (const DataType &v) |
| Fill the matrix with the value v. | |
| constexpr __host__ __device__ ArrayView< DataType > | view () |
| Returns a mutable view of the elements of the matrix. | |
| constexpr __host__ __device__ ConstArrayView< DataType > | constView () const |
| Returns a read-only view of the elements of the matrix. | |
| constexpr __host__ __device__ SmallSpan< DataType, NbElement > | span () |
| Returns a mutable view of the elements of the matrix. | |
| constexpr __host__ __device__ SmallSpan< const DataType, NbElement > | constSpan () const |
| Returns a read-only view of the elements of the matrix. | |
| constexpr const VectorType | vx () const |
| constexpr const VectorType | vy () const |
| constexpr const 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)). | |
Friends | |
| constexpr __host__ __device__ ThatClass & | operator+= (ThatClass &a, const ThatClass &b) |
| Adds b to a and returns a. | |
| constexpr __host__ __device__ ThatClass & | operator-= (ThatClass &a, const ThatClass &b) |
| Subtracts b from a and returns a. | |
| constexpr __host__ __device__ ThatClass & | operator*= (ThatClass &a, T b) |
| Multiplies each component of the matrix a by the real number b and return a. | |
| constexpr __host__ __device__ ThatClass & | operator/= (ThatClass &a, T b) |
| Divides each component of the matrix by the real number b. | |
| 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. | |
| std::ostream & | operator<< (std::ostream &o, const NumMatrix &t) |
Small fixed-size matrix containing RowSize rows and ColumnSize columns.
It is possible to access each row using method 'row()' or via the methods vx(), vy(), vz() if the dimension is sufficient (for example, vz() is only accessible if Size>=3.
Definition at line 37 of file arccore/src/base/arccore/base/NumMatrix.h.
| using Arcane::NumMatrix< T, RowSize, ColumnSize >::DataType = T |
Definition at line 52 of file arccore/src/base/arccore/base/NumMatrix.h.
| using Arcane::NumMatrix< T, RowSize, ColumnSize >::ThatClass = NumMatrix<T, RowSize, ColumnSize> |
Definition at line 51 of file arccore/src/base/arccore/base/NumMatrix.h.
| using Arcane::NumMatrix< T, RowSize, ColumnSize >::VectorType = NumVector<T, ColumnSize> |
Definition at line 50 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Constructs a matrix with each coefficient initialized with default T constructor.
Definition at line 57 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineexplicitconstexpr |
Constructs the matrix WITHOUT initializing its coefficients.
Definition at line 64 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Constructs the matrix with row (ax).
Definition at line 67 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Constructs the matrix with rows (ax, ay).
Definition at line 74 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Constructs the matrix with rows (ax, ay, az).
Definition at line 82 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Constructs the matrix with rows (a1, a2, a3, a4).
Definition at line 91 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Constructs the matrix with rows (a1, a2, a3, a4, a5).
Definition at line 102 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Constructs the matrix with rows (a1, a2, a3, a4, a5, a6).
Definition at line 115 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineexplicitconstexpr |
Constructs the instance with the triplet (v, v, v).
Definition at line 129 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineexplicitconstexpr |
Definition at line 135 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineexplicitconstexpr |
Definition at line 140 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Returns a read-only view of the elements of the matrix.
Definition at line 367 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Returns a read-only view of the elements of the matrix.
Definition at line 355 of file arccore/src/base/arccore/base/NumMatrix.h.
Referenced by Arcane::NumMatrix< DataType, Row, Column >::operator Real3x3().
|
inlineconstexpr |
Fill the matrix with the value v.
Definition at line 341 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlinestaticconstexpr |
Constructs the matrix ((ax,bx,cx), (ay,by,cy), (az,bz,cz)).
Definition at line 188 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlinestaticconstexpr |
Constructs the matrix ((ax,bx,cx), (ay,by,cy), (az,bz,cz)).
Definition at line 195 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inline |
Conversion to Real2x2.
Definition at line 168 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Conversion to Real3x3.
Definition at line 174 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Definition at line 316 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Definition at line 324 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Creates a tensor opposite to the current tensor.
Definition at line 248 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Assigns the triplet (v, v, v) to the instance.
Definition at line 146 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Definition at line 153 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Definition at line 160 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Definition at line 309 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Sets the value of the i-th row to v.
Definition at line 332 of file arccore/src/base/arccore/base/NumMatrix.h.
Referenced by Arcane::NumMatrix< DataType, Row, Column >::NumMatrix(), Arcane::NumMatrix< DataType, Row, Column >::NumMatrix(), Arcane::NumMatrix< DataType, Row, Column >::NumMatrix(), Arcane::NumMatrix< DataType, Row, Column >::NumMatrix(), Arcane::NumMatrix< DataType, Row, Column >::NumMatrix(), and Arcane::NumMatrix< DataType, Row, Column >::NumMatrix().
|
inlineconstexpr |
Returns a mutable view of the elements of the matrix.
Definition at line 361 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Returns a mutable view of the elements of the matrix.
Definition at line 349 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Definition at line 380 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Definition at line 385 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Definition at line 390 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlinestaticconstexpr |
Constructs the zero matrix.
Definition at line 182 of file arccore/src/base/arccore/base/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 302 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Multiplication by a scalar.
Definition at line 265 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Multiplication by a scalar.
Definition at line 257 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Multiplies each component of the matrix a by the real number b and return a.
Definition at line 218 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Creates a triplet that equals this triplet added to b.
Definition at line 232 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Adds b to a and returns a.
Definition at line 204 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Creates a triplet that equals a subtracted from this triplet.
Definition at line 240 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Subtracts b from a and returns a.
Definition at line 211 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Division by a scalar.
Definition at line 273 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Divides each component of the matrix by the real number b.
Definition at line 225 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Definition at line 372 of file arccore/src/base/arccore/base/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 287 of file arccore/src/base/arccore/base/NumMatrix.h.