tfel
Loading...
Searching...
No Matches
tfel::math::tmatrix< N, M, ValueType > Struct Template Reference
Inheritance diagram for tfel::math::tmatrix< N, M, ValueType >:
tfel::math::MatrixConceptBase< tmatrix< N, M, double > > tfel::math::GenericFixedSizeArray< tmatrix< N, M, double >, FixedSizeRowMajorMatrixPolicy< N, M, double > >

Public Types

using GenericFixedSizeArrayBase
 a simple alias
Public Types inherited from tfel::math::MatrixConceptBase< tmatrix< N, M, double > >
using ConceptTag
Public Types inherited from tfel::math::GenericFixedSizeArray< tmatrix< N, M, double >, FixedSizeRowMajorMatrixPolicy< N, M, double > >
using value_type

Public Member Functions

 TFEL_MATH_FIXED_SIZE_ARRAY_DEFAULT_METHODS (tmatrix, GenericFixedSizeArrayBase)
template<std::size_t... d>
requires ((sizeof...(d) == N) && ((d == M) && ...))
TFEL_HOST_DEVICE constexpr tmatrix (ValueType const (&... arrays)[d])
 constructors from arrays to implement class template argument deduction.
TFEL_HOST_DEVICE constexpr unsigned short getNbCols () const
 return the number of columns of the matrix
TFEL_HOST_DEVICE constexpr unsigned short getNbRows () const
 return the number of rows of the matrix
template<unsigned short I>
TFEL_HOST_DEVICE constexpr auto row_view ()
template<unsigned short I, unsigned short J, unsigned short K>
TFEL_HOST_DEVICE constexpr auto row_view ()
template<unsigned short I>
TFEL_HOST_DEVICE constexpr auto row_view () const
template<unsigned short I, unsigned short J, unsigned short K>
TFEL_HOST_DEVICE constexpr auto row_view () const
template<unsigned short I>
TFEL_HOST_DEVICE constexpr auto column_view ()
template<unsigned short I, unsigned short J, unsigned short K>
TFEL_HOST_DEVICE constexpr auto column_view ()
template<unsigned short I, unsigned short J, unsigned short K>
TFEL_HOST_DEVICE constexpr auto column_view () const
template<unsigned short I>
TFEL_HOST_DEVICE constexpr auto column_view () const
template<unsigned short I, unsigned short J, unsigned short R, unsigned short C>
TFEL_HOST_DEVICE constexpr auto submatrix_view ()
template<unsigned short I, unsigned short J, unsigned short R, unsigned short C>
TFEL_HOST_DEVICE constexpr auto submatrix_view () const
TFEL_HOST_DEVICE constexpr auto max () const
TFEL_HOST_DEVICE constexpr auto abs_max () const
TFEL_HOST_DEVICE constexpr void swap_rows (const unsigned short i, const unsigned short j)
template<typename InputIterator>
TFEL_HOST_DEVICE constexpr void copy (const InputIterator)
template<unsigned short I>
constexpr auto row_view ()
template<unsigned short I>
constexpr auto row_view () const
template<unsigned short I, unsigned short J, unsigned short K>
constexpr auto row_view ()
template<unsigned short I, unsigned short J, unsigned short K>
constexpr auto row_view () const
template<unsigned short I>
constexpr auto column_view ()
template<unsigned short I>
constexpr auto column_view () const
template<unsigned short I, unsigned short J, unsigned short K>
constexpr auto column_view ()
template<unsigned short I, unsigned short J, unsigned short K>
constexpr auto column_view () const
template<unsigned short I, unsigned short J, unsigned short R, unsigned short C>
constexpr auto submatrix_view ()
template<unsigned short I, unsigned short J, unsigned short R, unsigned short C>
constexpr auto submatrix_view () const
Public Member Functions inherited from tfel::math::GenericFixedSizeArray< tmatrix< N, M, double >, FixedSizeRowMajorMatrixPolicy< N, M, double > >
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray (const std::initializer_list< ValueType > &values) noexcept
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray< tmatrix< N, M, double >, FixedSizeRowMajorMatrixPolicy< N, M, double >, getArrayPolicySize< FixedSizeRowMajorMatrixPolicy< N, M, double > >() >::size_type getContainerSize () const noexcept
TFEL_HOST_DEVICE constexpr tmatrix< N, M, double > & operator= (const OtherArray &) noexcept
 assign values values from an other array
TFEL_HOST_DEVICE constexpr tmatrix< N, M, double > & operator+= (const OtherArray &) noexcept
TFEL_HOST_DEVICE constexpr tmatrix< N, M, double > & operator-= (const OtherArray &) noexcept
TFEL_HOST_DEVICE constexpr tmatrix< N, M, double > & operator*= (const ValueType2 &) noexcept
TFEL_HOST_DEVICE constexpr tmatrix< N, M, double > & operator/= (const ValueType2 &) noexcept
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray< tmatrix< N, M, double >, FixedSizeRowMajorMatrixPolicy< N, M, double >, getArrayPolicySize< FixedSizeRowMajorMatrixPolicy< N, M, double > >() >::pointer data () noexcept

Static Public Member Functions

static TFEL_HOST_DEVICE constexpr auto Id ()
static TFEL_HOST_DEVICE constexpr base_type< ValueType > Id (const typename tmatrix< N, M, ValueType >::size_type, const typename tmatrix< N, M, ValueType >::size_type) noexcept
Static Public Member Functions inherited from tfel::math::GenericFixedSizeArray< tmatrix< N, M, double >, FixedSizeRowMajorMatrixPolicy< N, M, double > >
static TFEL_HOST_DEVICE constexpr tmatrix< N, M, double > zero ()

Additional Inherited Members

Protected Attributes inherited from tfel::math::GenericFixedSizeArray< tmatrix< N, M, double >, FixedSizeRowMajorMatrixPolicy< N, M, double > >
FixedSizeRowMajorMatrixPolicy< N, M, double >::value_type v [getArrayPolicySize< FixedSizeRowMajorMatrixPolicy< N, M, double > >()]
 values holded

Member Typedef Documentation

◆ GenericFixedSizeArrayBase

template<unsigned short N, unsigned short M, typename ValueType = double>
using tfel::math::tmatrix< N, M, ValueType >::GenericFixedSizeArrayBase
Initial value:
GenericFixedSizeArray<tmatrix<N, M, ValueType>,
an array policy describing a fixed size matrix stored in row major format based on the fixed size mat...
Definition FixedSizeArrayPolicies.hxx:37

a simple alias

Constructor & Destructor Documentation

◆ tmatrix()

template<unsigned short N, unsigned short M, typename ValueType>
requires ((sizeof...(d) == N) && ((d == M) && ...))
template<std::size_t... d>
requires ((sizeof...(d) == N) && ((d == M) && ...))
TFEL_HOST_DEVICE constexpr tfel::math::tmatrix< N, M, ValueType >::tmatrix ( ValueType const (&... arrays)[d])
constexpr

constructors from arrays to implement class template argument deduction.

Template Parameters
ddimensions of the arrays

Member Function Documentation

◆ column_view() [1/4]

template<unsigned short N, unsigned short M, typename ValueType = double>
template<unsigned short I, unsigned short J, unsigned short K>
TFEL_HOST_DEVICE constexpr auto tfel::math::tmatrix< N, M, ValueType >::column_view ( )
nodiscardconstexpr
Returns
a view of a slice of column of this matrix
Parameters
[in]I: column index
[in]J: starting index in the column
[in]K: size of the slice

◆ column_view() [2/4]

template<unsigned short N, unsigned short M, typename ValueType = double>
template<unsigned short I>
TFEL_HOST_DEVICE constexpr auto tfel::math::tmatrix< N, M, ValueType >::column_view ( )
nodiscardconstexpr
Returns
a view of a column of this matrix
Parameters
[in]I: column index

◆ column_view() [3/4]

template<unsigned short N, unsigned short M, typename ValueType = double>
template<unsigned short I>
TFEL_HOST_DEVICE constexpr auto tfel::math::tmatrix< N, M, ValueType >::column_view ( ) const
nodiscardconstexpr
Returns
a view of a column of this matrix
Parameters
[in]I: column index

◆ column_view() [4/4]

template<unsigned short N, unsigned short M, typename ValueType = double>
template<unsigned short I, unsigned short J, unsigned short K>
TFEL_HOST_DEVICE constexpr auto tfel::math::tmatrix< N, M, ValueType >::column_view ( ) const
nodiscardconstexpr
Returns
a view of a slice of column of this matrix
Parameters
[in]I: column index
[in]J: starting index in the column
[in]K: size of the slice

◆ copy()

template<unsigned short N, unsigned short M, typename T>
template<typename InputIterator>
TFEL_HOST_DEVICE constexpr void tfel::math::tmatrix< N, M, T >::copy ( const InputIterator src)
constexpr

copy the N*Mth elements following this argument.

Parameters
constInputIterator, an iterator to the first element to be copied.

◆ Id() [1/2]

template<unsigned short N, unsigned short M, typename T>
TFEL_HOST_DEVICE constexpr auto tfel::math::tmatrix< N, M, T >::Id ( )
staticconstexpr
Returns
the identity matrix

◆ Id() [2/2]

template<unsigned short N, unsigned short M, typename ValueType = double>
TFEL_HOST_DEVICE constexpr base_type< ValueType > tfel::math::tmatrix< N, M, ValueType >::Id ( const typename tmatrix< N, M, ValueType >::size_type ,
const typename tmatrix< N, M, ValueType >::size_type  )
staticconstexprnoexcept
Returns
the component (i, j) of Id(), without building the matrix. This is useful when an index is only known at run time: no table is stored nor read. The component has no unit: its type is the base type of ValueType.
Parameters
[in]irow index
[in]jcolumn index

◆ row_view() [1/4]

template<unsigned short N, unsigned short M, typename ValueType = double>
template<unsigned short I, unsigned short J, unsigned short K>
TFEL_HOST_DEVICE constexpr auto tfel::math::tmatrix< N, M, ValueType >::row_view ( )
nodiscardconstexpr
Returns
a view of a slice of row of this matrix
Parameters
[in]I: row index
[in]J: starting index in the row
[in]K: size of the slice

◆ row_view() [2/4]

template<unsigned short N, unsigned short M, typename ValueType = double>
template<unsigned short I>
TFEL_HOST_DEVICE constexpr auto tfel::math::tmatrix< N, M, ValueType >::row_view ( )
nodiscardconstexpr
Returns
a view of a row of this matrix
Parameters
[in]I: row index

◆ row_view() [3/4]

template<unsigned short N, unsigned short M, typename ValueType = double>
template<unsigned short I, unsigned short J, unsigned short K>
TFEL_HOST_DEVICE constexpr auto tfel::math::tmatrix< N, M, ValueType >::row_view ( ) const
nodiscardconstexpr
Returns
a view of a slice of row of this matrix
Parameters
[in]I: row index
[in]J: starting index in the row
[in]K: size of the slice

◆ row_view() [4/4]

template<unsigned short N, unsigned short M, typename ValueType = double>
template<unsigned short I>
TFEL_HOST_DEVICE constexpr auto tfel::math::tmatrix< N, M, ValueType >::row_view ( ) const
nodiscardconstexpr
Returns
a view of a row of this matrix
Parameters
[in]I: row index

◆ submatrix_view() [1/2]

template<unsigned short N, unsigned short M, typename ValueType = double>
template<unsigned short I, unsigned short J, unsigned short R, unsigned short C>
TFEL_HOST_DEVICE constexpr auto tfel::math::tmatrix< N, M, ValueType >::submatrix_view ( )
nodiscardconstexpr
Returns
a view of a sub matrix of this matrix
Parameters
[in]I: submatrix row starting index
[in]J: submatrix column starting index
[in]R: number of rows
[in]C: number of columns

◆ submatrix_view() [2/2]

template<unsigned short N, unsigned short M, typename ValueType = double>
template<unsigned short I, unsigned short J, unsigned short R, unsigned short C>
TFEL_HOST_DEVICE constexpr auto tfel::math::tmatrix< N, M, ValueType >::submatrix_view ( ) const
nodiscardconstexpr
Returns
a view of a sub matrix of this matrix
Parameters
[in]I: submatrix row starting index
[in]J: submatrix column starting index
[in]R: number of rows
[in]C: number of columns

The documentation for this struct was generated from the following files: