Gromacs  2026.0-dev-20251119-5f0a571d
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions
gmx::BasicMatrix3x3< ElementType > Class Template Reference

#include <gromacs/math/include/gromacs/math/matrix.h>

+ Inheritance diagram for gmx::BasicMatrix3x3< ElementType >:
+ Collaboration diagram for gmx::BasicMatrix3x3< ElementType >:

Description

template<class ElementType>
class gmx::BasicMatrix3x3< ElementType >

Three-by-three matrix of ElementType.

Template Parameters
ElementTypetype of element to be stored in matrix

Public Types

using value_type = typename std::array< ElementType, DIM *DIM >::value_type
 the type of values that are stored
 
using reference = typename std::array< ElementType, DIM *DIM >::reference
 reference type to the stored values
 
using const_reference = typename std::array< ElementType, DIM *DIM >::const_reference
 const reference type to the stored values
 
using view_type = basic_mdspan< value_type, extents< DIM, DIM >, layout_right >
 the view used to access the data
 
using const_view_type = basic_mdspan< const value_type, extents< DIM, DIM >, layout_right >
 const view on the data
 
using iterator = typename ArrayRef< value_type >::iterator
 Iterator type for contiguous iteration over the stored data. Used, e.g., in free begin and end functions.
 
using const_iterator = const typename ArrayRef< const value_type >::const_iterator
 Const iterator type for contiguous iteration over the stored data. used, e.g., in free begin and end functions.
 

Public Member Functions

 BasicMatrix3x3 ()
 Default constructor.
 
void swap (MultiDimArray &o) noexcept
 Swaps content with other.
 
void resize (IndexType...dynamicExtent)
 Resize the dynamic extents of the array if any and set container size accordingly. More...
 
reference operator() (IndexType...index) noexcept
 Data access via multidimensional indices. This allows referencing rank R array elements as array(x_0,x_1,x_2, .., x_R) More...
 
constexpr const_reference operator() (IndexType...index) const noexcept
 Const data access via multidimensional indices. This allows referencing rank R array elements as array(x_0,x_1,x_2, .., x_R) More...
 
ArrayRef< value_typetoArrayRef ()
 Contiguous access to the data. More...
 
constexpr ArrayRef< const
value_type
toArrayRef () const
 Contiguous const access to the data. More...
 
constexpr view_type::index_type extent (int k) const noexcept
 Return the extent. More...
 
constexpr view_type asView () noexcept
 Conversion to multidimensional view on the data.
 
constexpr const_view_type asConstView () const noexcept
 Conversion to const multidimensional view on the data.
 

Member Function Documentation

constexpr view_type::index_type gmx::MultiDimArray< std::array< ElementType, DIM *DIM > , extents< DIM, DIM > , layout_right >::extent ( int  k) const
inlinenoexceptinherited

Return the extent.

Parameters
[in]kdimension to query for extent
Returns
extent along specified dimension
reference gmx::MultiDimArray< std::array< ElementType, DIM *DIM > , extents< DIM, DIM > , layout_right >::operator() ( IndexType...  index)
inlinenoexceptinherited

Data access via multidimensional indices. This allows referencing rank R array elements as array(x_0,x_1,x_2, .., x_R)

Parameters
[in]indexmultidimensional indices as parameter pack the number of parameters must match the rank of the array.
Returns
reference to array element
constexpr const_reference gmx::MultiDimArray< std::array< ElementType, DIM *DIM > , extents< DIM, DIM > , layout_right >::operator() ( IndexType...  index) const
inlinenoexceptinherited

Const data access via multidimensional indices. This allows referencing rank R array elements as array(x_0,x_1,x_2, .., x_R)

Parameters
[in]indexmultidimensional indices as parameter pack the number of parameters must match the rank of the array.
Returns
const reference to array element
void gmx::MultiDimArray< std::array< ElementType, DIM *DIM > , extents< DIM, DIM > , layout_right >::resize ( IndexType...  dynamicExtent)
inlineinherited

Resize the dynamic extents of the array if any and set container size accordingly.

Invalidates data and views of this array.

Parameters
[in]dynamicExtentA parameter pack that describes the dynamic size of the array. Empty if purely static.
Template Parameters
IndexTypeParameter pack type holding the dynamic extents of the multidimensional array
ArrayRef<value_type> gmx::MultiDimArray< std::array< ElementType, DIM *DIM > , extents< DIM, DIM > , layout_right >::toArrayRef ( )
inlineinherited

Contiguous access to the data.

Returns
ArrayRef to stored data.
constexpr ArrayRef<const value_type> gmx::MultiDimArray< std::array< ElementType, DIM *DIM > , extents< DIM, DIM > , layout_right >::toArrayRef ( ) const
inlineinherited

Contiguous const access to the data.

Returns
ArrayRef to stored data.

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