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

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

#include <algebra/impl/fastor_getter.hpp>

Public Member Functions

template<std::size_t N, concepts::scalar scalar_t>
constexpr scalar_t operator() (const Fastor::Tensor< scalar_t, N > &m, std::size_t row) const
 Read a vector element.
template<std::size_t N, concepts::scalar scalar_t>
constexpr scalar_t operator() (const Fastor::Tensor< scalar_t, N, 1 > &m, std::size_t row) const
 Read an element of a single-column matrix.
template<std::size_t ROWS, std::size_t COLS, concepts::scalar scalar_t>
constexpr scalar_t operator() (const Fastor::Tensor< scalar_t, ROWS, COLS > &m, std::size_t row, std::size_t col) const
 Read a matrix element.
template<std::size_t N, concepts::scalar scalar_t>
constexpr scalar_t & operator() (Fastor::Tensor< scalar_t, N > &m, std::size_t row) const
 Access a mutable vector element.
template<std::size_t N, concepts::scalar scalar_t>
constexpr scalar_t & operator() (Fastor::Tensor< scalar_t, N, 1 > &m, std::size_t row) const
 Access a mutable element of a single-column matrix.
template<std::size_t ROWS, std::size_t COLS, concepts::scalar scalar_t>
constexpr scalar_t & operator() (Fastor::Tensor< scalar_t, ROWS, COLS > &m, std::size_t row, std::size_t col) const
 Access a mutable matrix element.

Detailed Description

Functor used to access elements of Fastor matrices.

Member Function Documentation

◆ operator()() [1/6]

template<std::size_t N, concepts::scalar scalar_t>
scalar_t detray::algebra::fastor::storage::element_getter::operator() ( const Fastor::Tensor< scalar_t, N > & m,
std::size_t row ) const
constexpr

Read a vector element.

Parameters
mVector to read.
rowZero-based element index.
Returns
The element value.

◆ operator()() [2/6]

template<std::size_t N, concepts::scalar scalar_t>
scalar_t detray::algebra::fastor::storage::element_getter::operator() ( const Fastor::Tensor< scalar_t, N, 1 > & m,
std::size_t row ) const
constexpr

Read an element of a single-column matrix.

Parameters
mMatrix to read.
rowZero-based row index.
Returns
The element value.

◆ operator()() [3/6]

template<std::size_t ROWS, std::size_t COLS, concepts::scalar scalar_t>
scalar_t detray::algebra::fastor::storage::element_getter::operator() ( const Fastor::Tensor< scalar_t, ROWS, COLS > & m,
std::size_t row,
std::size_t col ) const
constexpr

Read a matrix element.

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

◆ operator()() [4/6]

template<std::size_t N, concepts::scalar scalar_t>
scalar_t & detray::algebra::fastor::storage::element_getter::operator() ( Fastor::Tensor< scalar_t, N > & m,
std::size_t row ) const
constexpr

Access a mutable vector element.

Parameters
mVector to access.
rowZero-based element index.
Returns
A mutable reference to the element.

◆ operator()() [5/6]

template<std::size_t N, concepts::scalar scalar_t>
scalar_t & detray::algebra::fastor::storage::element_getter::operator() ( Fastor::Tensor< scalar_t, N, 1 > & m,
std::size_t row ) const
constexpr

Access a mutable element of a single-column matrix.

Parameters
mMatrix to access.
rowZero-based row index.
Returns
A mutable reference to the element.

◆ operator()() [6/6]

template<std::size_t ROWS, std::size_t COLS, concepts::scalar scalar_t>
scalar_t & detray::algebra::fastor::storage::element_getter::operator() ( Fastor::Tensor< scalar_t, ROWS, COLS > & m,
std::size_t row,
std::size_t col ) const
constexpr

Access a mutable matrix element.

Parameters
mMatrix to access.
rowZero-based row index.
colZero-based column index.
Returns
A mutable reference to the element.