ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::algebra::eigen::storage::element_getter Struct Reference

Functor used to access elements of Eigen matrices. More...

#include <algebra/impl/eigen_getter.hpp>

Public Member Functions

template<typename derived_type, concepts::index index_t>
constexpr auto operator() (const Eigen::MatrixBase< derived_type > &m, index_t row) const
 Get const access to a matrix element.
template<typename derived_type, concepts::index index_t_1, concepts::index index_t_2>
constexpr auto operator() (const Eigen::MatrixBase< derived_type > &m, index_t_1 row, index_t_2 col) const
 Get const access to a matrix element.
template<typename derived_type, concepts::index index_t>
requires std::is_base_of_v< Eigen::DenseCoeffsBase<derived_type, Eigen::WriteAccessors>, Eigen::MatrixBase<derived_type>>
constexpr auto & operator() (Eigen::MatrixBase< derived_type > &m, index_t row) const
 Get non-const access to a matrix element.
template<typename derived_type, concepts::index index_t_1, concepts::index index_t_2>
requires std::is_base_of_v< Eigen::DenseCoeffsBase<derived_type, Eigen::WriteAccessors>, Eigen::MatrixBase<derived_type>>
constexpr auto & operator() (Eigen::MatrixBase< derived_type > &m, index_t_1 row, index_t_2 col) const
 Get non-const access to a matrix element.

Detailed Description

Functor used to access elements of Eigen matrices.

Member Function Documentation

◆ operator()() [1/4]

template<typename derived_type, concepts::index index_t>
auto detray::algebra::eigen::storage::element_getter::operator() ( const Eigen::MatrixBase< derived_type > & m,
index_t row ) const
constexpr

Get const access to a matrix element.

Parameters
mMatrix to read.
rowZero-based linear index.
Returns
The selected element.

◆ operator()() [2/4]

template<typename derived_type, concepts::index index_t_1, concepts::index index_t_2>
auto detray::algebra::eigen::storage::element_getter::operator() ( const Eigen::MatrixBase< derived_type > & m,
index_t_1 row,
index_t_2 col ) const
constexpr

Get const access to a matrix element.

Parameters
mMatrix to read.
rowZero-based row index.
colZero-based column index.
Returns
The selected element.

◆ operator()() [3/4]

template<typename derived_type, concepts::index index_t>
requires std::is_base_of_v< Eigen::DenseCoeffsBase<derived_type, Eigen::WriteAccessors>, Eigen::MatrixBase<derived_type>>
auto & detray::algebra::eigen::storage::element_getter::operator() ( Eigen::MatrixBase< derived_type > & m,
index_t row ) const
constexpr

Get non-const access to a matrix element.

Parameters
mMatrix to read.
rowZero-based linear index.
Returns
Mutable access to the selected element.

◆ operator()() [4/4]

template<typename derived_type, concepts::index index_t_1, concepts::index index_t_2>
requires std::is_base_of_v< Eigen::DenseCoeffsBase<derived_type, Eigen::WriteAccessors>, Eigen::MatrixBase<derived_type>>
auto & detray::algebra::eigen::storage::element_getter::operator() ( Eigen::MatrixBase< derived_type > & m,
index_t_1 row,
index_t_2 col ) const
constexpr

Get non-const access to a matrix element.

Parameters
mMatrix to read.
rowZero-based row index.
colZero-based column index.
Returns
Mutable access to the selected element.