tfel
Loading...
Searching...
No Matches
tfel::math::matrix< ValueType > Class Template Reference

runtime row-major matrices More...

#include </home/runner/work/tfel/tfel/include/TFEL/Math/Forward/matrix.hxx>

Inheritance diagram for tfel::math::matrix< ValueType >:
tfel::math::MatrixConceptBase< matrix< ValueType > > tfel::math::GenericRuntimeArray< matrix< ValueType >, RuntimeRowMajorMatrixArrayPolicy< ValueType > > tfel::math::MutableRuntimeArrayBase< GenericRuntimeArray< matrix< ValueType >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >, RuntimeRowMajorMatrixArrayPolicy< ValueType > > tfel::math::MutableArrayCommonMethods< GenericRuntimeArray< matrix< ValueType >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >, RuntimeRowMajorMatrixArrayPolicy< ValueType > > tfel::math::MutableArraySTLCompatibilityLayer< GenericRuntimeArray< matrix< ValueType >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >, RuntimeRowMajorMatrixArrayPolicy< ValueType > > tfel::math::ConstArrayCommonMethods< GenericRuntimeArray< matrix< ValueType >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >

Public Types

using GenericRuntimeArrayBase
 a simple alias
Public Types inherited from tfel::math::MatrixConceptBase< matrix< ValueType > >
using ConceptTag
Public Types inherited from tfel::math::GenericRuntimeArray< matrix< ValueType >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >
using Container
 a simple alias
using value_type
 a simple alias
Public Types inherited from tfel::math::ConstArrayCommonMethods< GenericRuntimeArray< matrix< ValueType >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >
using array_policy
 exposing the array policy
using indexing_policy
 exposing the indexing policy

Public Member Functions

 TFEL_MATH_RUNTIME_ARRAY_DEFAULT_METHODS (matrix, GenericRuntimeArrayBase)
 matrix (const typename matrix::size_type, const typename matrix::size_type, const ValueType &=ValueType{})
 constructor
 matrix (const std::initializer_list< std::initializer_list< ValueType > > &)
 constructor from intricated initializer list
void resize (const typename matrix::size_type, const typename matrix::size_type, const ValueType &=ValueType{})
 resize the matrix
matrix< ValueType >::size_type getNbRows () const
matrix< ValueType >::size_type getNbCols () const
template<typename ValueType2>
requires (isAssignableTo<ValueType2, ValueType2>())
matrix & operator= (const std::initializer_list< std::initializer_list< ValueType2 > > &)
 constructor from intricated initializer list
void swap (matrix &)
 swap two matrixs
 ~matrix () noexcept
 destructor
template<typename ValueType2>
requires (isAssignableTo<ValueType2, ValueType2>())
matrix< ValueType > & operator= (const std::initializer_list< std::initializer_list< ValueType2 > > &values)
Public Member Functions inherited from tfel::math::GenericRuntimeArray< matrix< ValueType >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >
 GenericRuntimeArray ()=default
 default constructor
GenericRuntimeArray< matrix< ValueType >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >::pointer data () noexcept
void resize (const typename RuntimeRowMajorMatrixArrayPolicy< ValueType >::IndexingPolicy &)
 resize the array
GenericRuntimeArray< matrix< ValueType >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >::size_type getContainerSize () const noexcept
matrix< ValueType > & operator= (const OtherArray &)
 assign values values from an other array
matrix< ValueType > & operator+= (const OtherArray &)
matrix< ValueType > & operator-= (const OtherArray &)
matrix< ValueType > & operator*= (const ValueType2 &) noexcept
matrix< ValueType > & operator/= (const ValueType2 &) noexcept
bool empty () const
void clear ()
void shrink_to_fit ()
Public Member Functions inherited from tfel::math::MutableRuntimeArrayBase< GenericRuntimeArray< matrix< ValueType >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >
 MutableRuntimeArrayBase ()=default
 default constructor
MutableRuntimeArrayBase & operator= (const MutableRuntimeArrayBase &)=default
 copy assignement
TFEL_HOST_DEVICE constexpr const RuntimeRowMajorMatrixArrayPolicy< ValueType >::IndexingPolicy & getIndexingPolicy () const noexcept
void iterate (const Functor &)
 apply a multi-indices functor
Public Member Functions inherited from tfel::math::MutableArrayCommonMethods< GenericRuntimeArray< matrix< ValueType >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >
constexpr RuntimeRowMajorMatrixArrayPolicy< ValueType >::reference operator() (const Indices... i) noexcept
constexpr void assign (const OtherArray &src) noexcept
constexpr void addAndAssign (const OtherArray &src) noexcept
constexpr void substractAndAssign (const OtherArray &src) noexcept
constexpr GenericRuntimeArray< matrix< ValueType >, RuntimeRowMajorMatrixArrayPolicy< ValueType > > & operator= (const std::initializer_list< ValueType > &values) noexcept
constexpr void import (const ImportIndexingPolicy &policy, const InputIterator p, const InputIterator pe)
constexpr void fill (const ValueType2 &v)
constexpr void clamp (const ValueType2 &lower_bound, const ValueType3 &upper_bound)
constexpr void multiplyByScalar (const ValueType2 &s)
constexpr void divideByScalar (const ValueType2 &s)
TFEL_HOST_DEVICE constexpr RuntimeRowMajorMatrixArrayPolicy< ValueType >::reference operator[] (const typename RuntimeRowMajorMatrixArrayPolicy< ValueType >::IndexingPolicy::size_type) noexcept
 access operator
Public Member Functions inherited from tfel::math::ConstArrayCommonMethods< GenericRuntimeArray< matrix< ValueType >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >
constexpr RuntimeRowMajorMatrixArrayPolicy< ValueType >::const_reference operator() (const Indices... i) const noexcept
TFEL_HOST_DEVICE constexpr RuntimeRowMajorMatrixArrayPolicy< ValueType >::const_reference operator[] (const typename RuntimeRowMajorMatrixArrayPolicy< ValueType >::IndexingPolicy::size_type) const noexcept
 access operator

Additional Inherited Members

Protected Attributes inherited from tfel::math::GenericRuntimeArray< matrix< ValueType >, RuntimeRowMajorMatrixArrayPolicy< ValueType > >
Container data_values
 values holded

Detailed Description

template<typename ValueType>
class tfel::math::matrix< ValueType >

runtime row-major matrices

a class representing a dynamically allocated matrix

Template Parameters
ValueTypetype of values hold by the matrix
Tthe type hold by the matrix.

Member Typedef Documentation

◆ GenericRuntimeArrayBase

template<typename ValueType>
using tfel::math::matrix< ValueType >::GenericRuntimeArrayBase
Initial value:
an array policy based on the runtime row-major matrix indexing policy
Definition RuntimeArrayPolicies.hxx:35
matrix(const typename matrix::size_type, const typename matrix::size_type, const ValueType &=ValueType{})
constructor
Definition matrix.ixx:22

a simple alias

Constructor & Destructor Documentation

◆ matrix() [1/2]

template<typename ValueType>
tfel::math::matrix< ValueType >::matrix ( const typename matrix< ValueType >::size_type r,
const typename matrix< ValueType >::size_type c,
const ValueType & v = ValueType{} )

constructor

Parameters
[in]nnumber of rows
[in]mnumber of columns
[in]vdefaut values

◆ matrix() [2/2]

template<typename ValueType>
tfel::math::matrix< ValueType >::matrix ( const std::initializer_list< std::initializer_list< ValueType > > & values)

constructor from intricated initializer list

Parameters
[in]valuesvalues

◆ ~matrix()

template<typename ValueType>
tfel::math::matrix< ValueType >::~matrix ( )
defaultnoexcept

destructor

copy all the elements between two iterators at the beginning of the matrix.

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

Member Function Documentation

◆ operator=()

template<typename ValueType>
template<typename ValueType2>
requires (isAssignableTo<ValueType2, ValueType2>())
matrix & tfel::math::matrix< ValueType >::operator= ( const std::initializer_list< std::initializer_list< ValueType2 > > & )

constructor from intricated initializer list

Parameters
[in]valuesvalues

◆ swap()

template<typename ValueType>
void tfel::math::matrix< ValueType >::swap ( matrix< ValueType > & m)

swap two matrixs

Parameters
[in,out]theother matrix

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