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

Functor used to extract a block from Fastor matrices. More...

#include <algebra/impl/fastor_getter.hpp>

Public Member Functions

template<std::size_t ROWS, std::size_t COLS, std::size_t oROWS, std::size_t oCOLS, concepts::scalar scalar_t>
algebra::fastor::Matrix< scalar_t, ROWS, COLS > operator() (const Fastor::Tensor< scalar_t, oROWS, oCOLS > &m, std::size_t row, std::size_t col) const
 Extract a rectangular block from a matrix.
template<std::size_t ROWS, concepts::scalar scalar_t, concepts::matrix input_matrix_type>
void set (input_matrix_type &m, const Fastor::Tensor< scalar_t, ROWS > &b, std::size_t row, std::size_t col) const
 Operator setting a block with a vector.
template<std::size_t ROWS, std::size_t COLS, concepts::scalar scalar_t, concepts::matrix input_matrix_type>
void set (input_matrix_type &m, const Fastor::Tensor< scalar_t, ROWS, COLS > &b, std::size_t row, std::size_t col) const
 Operator setting a block with a matrix.
template<std::size_t SIZE, std::size_t oROWS, std::size_t oCOLS, concepts::scalar scalar_t>
Fastor::Tensor< scalar_t, SIZE > vector (const Fastor::Tensor< scalar_t, oROWS, oCOLS > &m, std::size_t row, std::size_t col) const
 Extract a contiguous segment from one matrix column.

Detailed Description

Functor used to extract a block from Fastor matrices.

Member Function Documentation

◆ operator()()

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

Extract a rectangular block from a matrix.

Parameters
mSource matrix.
rowFirst row of the block.
colFirst column of the block.
Returns
A matrix containing the selected block.

◆ set() [1/2]

template<std::size_t ROWS, concepts::scalar scalar_t, concepts::matrix input_matrix_type>
void detray::algebra::fastor::storage::block_getter::set ( input_matrix_type & m,
const Fastor::Tensor< scalar_t, ROWS > & b,
std::size_t row,
std::size_t col ) const

Operator setting a block with a vector.

Parameters
mMatrix to update.
bVector values to write.
rowFirst destination row.
colDestination column.

◆ set() [2/2]

template<std::size_t ROWS, std::size_t COLS, concepts::scalar scalar_t, concepts::matrix input_matrix_type>
void detray::algebra::fastor::storage::block_getter::set ( input_matrix_type & m,
const Fastor::Tensor< scalar_t, ROWS, COLS > & b,
std::size_t row,
std::size_t col ) const

Operator setting a block with a matrix.

Parameters
mMatrix to update.
bBlock values to write.
rowFirst destination row.
colFirst destination column.

◆ vector()

template<std::size_t SIZE, std::size_t oROWS, std::size_t oCOLS, concepts::scalar scalar_t>
Fastor::Tensor< scalar_t, SIZE > detray::algebra::fastor::storage::block_getter::vector ( const Fastor::Tensor< scalar_t, oROWS, oCOLS > & m,
std::size_t row,
std::size_t col ) const

Extract a contiguous segment from one matrix column.

Parameters
mSource matrix.
rowFirst row of the segment.
colColumn containing the segment.
Returns
A vector containing the selected segment.