Small fixed-size matrix containing RowSize rows and ColumnSize columns. More...
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 (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)). | |
Private Member Functions | |
| template<typename Stream> | |
| void | print (Stream &o) const |
Static Private Member Functions | |
| static constexpr bool | isRealType () |
| 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 | |
| DataType | m_values [NbElement] |
| Matrix values. | |
Static Private Attributes | |
| static constexpr Int32 | NbElement = RowSize * ColumnSize |
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 the matrix with rows (ax, ay).
Definition at line 60 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Constructs the matrix with rows (ax, ay, az).
Definition at line 68 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Constructs the matrix with rows (a1, a2, a3, a4).
Definition at line 77 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Constructs the matrix with rows (a1, a2, a3, a4, a5).
Definition at line 88 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Constructs the matrix with rows (a1, a2, a3, a4, a5, a6).
Definition at line 101 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineexplicitconstexpr |
Constructs the instance with the triplet (v, v, v).
Definition at line 115 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineexplicitconstexpr |
Definition at line 121 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineexplicitconstexpr |
Definition at line 126 of file arccore/src/base/arccore/base/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 393 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Returns a read-only view of the elements of the matrix.
Definition at line 353 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Returns a read-only view of the elements of the matrix.
Definition at line 341 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 327 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 174 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 181 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlinestaticconstexprprivate |
Definition at line 42 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlinestaticconstexprprivate |
Definition at line 43 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlinestaticconstexprprivate |
Definition at line 44 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlinestaticconstexprprivate |
Definition at line 45 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inline |
Conversion to Real2x2.
Definition at line 154 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Conversion to Real3x3.
Definition at line 160 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Definition at line 302 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Definition at line 310 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Creates a tensor opposite to the current tensor.
Definition at line 234 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Assigns the triplet (v, v, v) to the instance.
Definition at line 132 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Definition at line 139 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Definition at line 146 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineprivate |
Definition at line 398 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Definition at line 295 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Sets the value of the i-th row to v.
Definition at line 318 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(), and Arcane::NumMatrix< DataType, Row, Column >::NumMatrix().
|
inlineconstexpr |
Returns a mutable view of the elements of the matrix.
Definition at line 347 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Returns a mutable view of the elements of the matrix.
Definition at line 335 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Definition at line 366 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Definition at line 371 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlineconstexpr |
Definition at line 376 of file arccore/src/base/arccore/base/NumMatrix.h.
|
inlinestaticconstexpr |
Constructs the zero matrix.
Definition at line 168 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 288 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Multiplication by a scalar.
Definition at line 251 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Multiplication by a scalar.
Definition at line 243 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 204 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Creates a triplet that equals this triplet added to b.
Definition at line 218 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Adds b to a and returns a.
Definition at line 190 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Creates a triplet that equals a subtracted from this triplet.
Definition at line 226 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Subtracts b from a and returns a.
Definition at line 197 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Division by a scalar.
Definition at line 259 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Divides each component of the matrix by the real number b.
Definition at line 211 of file arccore/src/base/arccore/base/NumMatrix.h.
|
friend |
Definition at line 358 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 273 of file arccore/src/base/arccore/base/NumMatrix.h.
|
private |
Matrix values.
Definition at line 384 of file arccore/src/base/arccore/base/NumMatrix.h.
Referenced by Arcane::NumMatrix< DataType, Row, Column >::operator*, Arcane::NumMatrix< DataType, Row, Column >::operator*, Arcane::NumMatrix< DataType, Row, Column >::operator*=, Arcane::NumMatrix< DataType, Row, Column >::operator+, Arcane::NumMatrix< DataType, Row, Column >::operator+=, Arcane::NumMatrix< DataType, Row, Column >::operator-(), Arcane::NumMatrix< DataType, Row, Column >::operator-, Arcane::NumMatrix< DataType, Row, Column >::operator-=, Arcane::NumMatrix< DataType, Row, Column >::operator/, Arcane::NumMatrix< DataType, Row, Column >::operator/=, and Arcane::NumMatrix< DataType, Row, Column >::operator==.
|
staticconstexprprivate |
Definition at line 46 of file arccore/src/base/arccore/base/NumMatrix.h.