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

Functor used to access elements of a matrix. More...

#include <detray/algebra/common/matrix_getter.hpp>

Public Member Functions

template<template< typename, std::size_t > class array_t, concepts::scalar scalar_t, std::size_t ROW>
constexpr decltype(auto) operator() (const matrix< array_t, scalar_t, ROW, 1 > &m, std::size_t row) const
 Get const access to a matrix element.
template<template< typename, std::size_t > class array_t, concepts::scalar scalar_t, std::size_t ROW, std::size_t COL>
constexpr decltype(auto) operator() (const matrix< array_t, scalar_t, ROW, COL > &m, std::size_t row, std::size_t col) const
 Get const access to a matrix element.
template<template< typename, std::size_t > class array_t, concepts::scalar scalar_t, std::size_t N>
constexpr decltype(auto) operator() (const vector< N, scalar_t, array_t > &v, std::size_t row) const
 Get const access to a vector element.
template<template< typename, std::size_t > class array_t, concepts::scalar scalar_t, std::size_t ROW>
constexpr decltype(auto) operator() (matrix< array_t, scalar_t, ROW, 1 > &m, std::size_t row) const
 Get non-const access to a matrix element.
template<template< typename, std::size_t > class array_t, concepts::scalar scalar_t, std::size_t ROW, std::size_t COL>
constexpr decltype(auto) operator() (matrix< array_t, scalar_t, ROW, COL > &m, std::size_t row, std::size_t col) const
 Get non-const access to a matrix element.
template<template< typename, std::size_t > class array_t, concepts::scalar scalar_t, std::size_t N>
constexpr decltype(auto) operator() (vector< N, scalar_t, array_t > &v, std::size_t row) const
 Get non-const access to a vector element.

Detailed Description

Functor used to access elements of a matrix.

Member Function Documentation

◆ operator()() [1/6]

template<template< typename, std::size_t > class array_t, concepts::scalar scalar_t, std::size_t ROW>
decltype(auto) detray::algebra::storage::element_getter::operator() ( const matrix< array_t, scalar_t, ROW, 1 > & m,
std::size_t row ) const
constexpr

Get const access to a matrix element.

Parameters
mSingle-column matrix to read.
rowZero-based row of the element.
Returns
The selected element by const access.

◆ operator()() [2/6]

template<template< typename, std::size_t > class array_t, concepts::scalar scalar_t, std::size_t ROW, std::size_t COL>
decltype(auto) detray::algebra::storage::element_getter::operator() ( const matrix< array_t, scalar_t, ROW, COL > & m,
std::size_t row,
std::size_t col ) const
constexpr

Get const access to a matrix element.

Parameters
mMatrix to read.
rowZero-based row of the element.
colZero-based column of the element.
Returns
The selected element by const access.

◆ operator()() [3/6]

template<template< typename, std::size_t > class array_t, concepts::scalar scalar_t, std::size_t N>
decltype(auto) detray::algebra::storage::element_getter::operator() ( const vector< N, scalar_t, array_t > & v,
std::size_t row ) const
constexpr

Get const access to a vector element.

Parameters
vVector to read.
rowZero-based index of the element.
Returns
The selected element by const access.

◆ operator()() [4/6]

template<template< typename, std::size_t > class array_t, concepts::scalar scalar_t, std::size_t ROW>
decltype(auto) detray::algebra::storage::element_getter::operator() ( matrix< array_t, scalar_t, ROW, 1 > & m,
std::size_t row ) const
constexpr

Get non-const access to a matrix element.

Parameters
mSingle-column matrix to read.
rowZero-based row of the element.
Returns
Mutable access to the selected element.

◆ operator()() [5/6]

template<template< typename, std::size_t > class array_t, concepts::scalar scalar_t, std::size_t ROW, std::size_t COL>
decltype(auto) detray::algebra::storage::element_getter::operator() ( matrix< array_t, scalar_t, ROW, COL > & m,
std::size_t row,
std::size_t col ) const
constexpr

Get non-const access to a matrix element.

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

◆ operator()() [6/6]

template<template< typename, std::size_t > class array_t, concepts::scalar scalar_t, std::size_t N>
decltype(auto) detray::algebra::storage::element_getter::operator() ( vector< N, scalar_t, array_t > & v,
std::size_t row ) const
constexpr

Get non-const access to a vector element.

Parameters
vVector to read.
rowZero-based index of the element.
Returns
Mutable access to the selected element.