ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Matrix representation with static size. More...
#include <matrix.hpp>
Public Types | |
using | container = Utils::Array< T, Cols *Rows > |
using | pointer = typename container::pointer |
using | const_pointer = typename container::const_pointer |
using | iterator = typename container::iterator |
using | const_iterator = typename container::const_iterator |
using | value_type = typename container::value_type |
using | reference = typename container::reference |
using | const_reference = typename container::const_reference |
Public Member Functions | |
Matrix ()=default | |
Matrix (std::initializer_list< T > init_list) | |
Matrix (std::initializer_list< std::initializer_list< T > > init_list) | |
constexpr value_type | operator() (std::size_t row, std::size_t col) const |
Element access (const). | |
constexpr reference | operator() (std::size_t row, std::size_t col) |
Element access (non const). | |
constexpr pointer | data () |
Access to the underlying data pointer (non const). | |
constexpr const_pointer | data () const noexcept |
Access to the underlying data pointer (non const). | |
constexpr iterator | begin () noexcept |
Iterator access (non const). | |
constexpr const_iterator | begin () const noexcept |
Iterator access (const). | |
constexpr iterator | end () noexcept |
Iterator access (non const). | |
constexpr const_iterator | end () const noexcept |
Iterator access (non const). | |
template<std::size_t R> | |
Vector< T, Cols > | row () const |
Retrieve an entire matrix row. | |
template<std::size_t C> | |
Vector< T, Rows > | col () const |
Retrieve an entire matrix column. | |
Vector< T, Cols > | diagonal () const |
Retrieve the diagonal. | |
T | trace () const |
Retrieve the trace. | |
Matrix< T, Cols, Rows > | transposed () const |
Retrieve a transposed copy of the matrix. | |
Matrix< T, Rows, Cols > | inversed () const |
Retrieve an inverted copy of the matrix. | |
constexpr std::pair< std::size_t, std::size_t > | shape () const noexcept |
Retrieve the shape of the matrix. | |
Public Attributes | |
container | m_data |
Friends | |
class | boost::serialization::access |
Matrix representation with static size.
T | The data type. |
Rows | Number of rows. |
Cols | Number of columns. |
Definition at line 65 of file matrix.hpp.
using Utils::Matrix< T, Rows, Cols >::const_iterator = typename container::const_iterator |
Definition at line 70 of file matrix.hpp.
using Utils::Matrix< T, Rows, Cols >::const_pointer = typename container::const_pointer |
Definition at line 68 of file matrix.hpp.
using Utils::Matrix< T, Rows, Cols >::const_reference = typename container::const_reference |
Definition at line 73 of file matrix.hpp.
using Utils::Matrix< T, Rows, Cols >::container = Utils::Array<T, Cols * Rows> |
Definition at line 66 of file matrix.hpp.
using Utils::Matrix< T, Rows, Cols >::iterator = typename container::iterator |
Definition at line 69 of file matrix.hpp.
using Utils::Matrix< T, Rows, Cols >::pointer = typename container::pointer |
Definition at line 67 of file matrix.hpp.
using Utils::Matrix< T, Rows, Cols >::reference = typename container::reference |
Definition at line 72 of file matrix.hpp.
using Utils::Matrix< T, Rows, Cols >::value_type = typename container::value_type |
Definition at line 71 of file matrix.hpp.
|
default |
|
inline |
Definition at line 85 of file matrix.hpp.
References Utils::Matrix< T, Rows, Cols >::begin().
|
inline |
Definition at line 89 of file matrix.hpp.
References Utils::Matrix< T, Rows, Cols >::begin(), and Utils::flatten().
|
inlineconstexprnoexcept |
Iterator access (const).
Definition at line 136 of file matrix.hpp.
References Utils::Array< T, N >::begin(), and Utils::Matrix< T, Rows, Cols >::m_data.
|
inlineconstexprnoexcept |
Iterator access (non const).
Definition at line 131 of file matrix.hpp.
References Utils::Array< T, N >::begin(), and Utils::Matrix< T, Rows, Cols >::m_data.
Referenced by Utils::flatten(), Utils::Matrix< T, Rows, Cols >::Matrix(), and Utils::Matrix< T, Rows, Cols >::Matrix().
|
inline |
Retrieve an entire matrix column.
C | The column index. |
C
. Definition at line 163 of file matrix.hpp.
Referenced by Utils::Matrix< T, Rows, Cols >::operator()(), and Utils::Matrix< T, Rows, Cols >::operator()().
|
inlineconstexpr |
Access to the underlying data pointer (non const).
Definition at line 121 of file matrix.hpp.
References Utils::Array< T, N >::data(), and Utils::Matrix< T, Rows, Cols >::m_data.
|
inlineconstexprnoexcept |
Access to the underlying data pointer (non const).
Definition at line 126 of file matrix.hpp.
References Utils::Array< T, N >::data(), and Utils::Matrix< T, Rows, Cols >::m_data.
|
inline |
Retrieve the diagonal.
Definition at line 171 of file matrix.hpp.
Referenced by Utils::Matrix< T, Rows, Cols >::trace().
|
inlineconstexprnoexcept |
Iterator access (non const).
Definition at line 148 of file matrix.hpp.
References Utils::Array< T, N >::end(), and Utils::Matrix< T, Rows, Cols >::m_data.
|
inlineconstexprnoexcept |
Iterator access (non const).
Definition at line 142 of file matrix.hpp.
References Utils::Array< T, N >::end(), and Utils::Matrix< T, Rows, Cols >::m_data.
Referenced by Utils::flatten().
|
inline |
Retrieve an inverted copy of the matrix.
Definition at line 197 of file matrix.hpp.
|
inlineconstexpr |
Element access (non const).
row | The row used for access. |
col | The column used for access. |
row
and column col
. Definition at line 111 of file matrix.hpp.
References Utils::Matrix< T, Rows, Cols >::col(), Utils::Matrix< T, Rows, Cols >::m_data, and Utils::Matrix< T, Rows, Cols >::row().
|
inlineconstexpr |
Element access (const).
row | The row used for access. |
col | The column used for access. |
row
and column col
. Definition at line 100 of file matrix.hpp.
References Utils::Matrix< T, Rows, Cols >::col(), Utils::Matrix< T, Rows, Cols >::m_data, and Utils::Matrix< T, Rows, Cols >::row().
|
inline |
Retrieve an entire matrix row.
R | The row index. |
R
. Definition at line 154 of file matrix.hpp.
Referenced by Utils::Matrix< T, Rows, Cols >::operator()(), and Utils::Matrix< T, Rows, Cols >::operator()().
|
inlineconstexprnoexcept |
Retrieve the shape of the matrix.
Definition at line 206 of file matrix.hpp.
|
inline |
Retrieve the trace.
Definition at line 180 of file matrix.hpp.
References Utils::Matrix< T, Rows, Cols >::diagonal().
|
inline |
Retrieve a transposed copy of the matrix.
Definition at line 189 of file matrix.hpp.
Referenced by Utils::basis_change(), and convert_body_to_space().
|
friend |
Definition at line 78 of file matrix.hpp.
container Utils::Matrix< T, Rows, Cols >::m_data |
Definition at line 75 of file matrix.hpp.
Referenced by Utils::Matrix< T, Rows, Cols >::begin(), Utils::Matrix< T, Rows, Cols >::begin(), Utils::Matrix< T, Rows, Cols >::data(), Utils::Matrix< T, Rows, Cols >::data(), Utils::Matrix< T, Rows, Cols >::end(), Utils::Matrix< T, Rows, Cols >::end(), Utils::Matrix< T, Rows, Cols >::operator()(), and Utils::Matrix< T, Rows, Cols >::operator()().