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

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

#include <algebra/impl/smatrix_getter.hpp>

Public Member Functions

template<unsigned int ROWS, unsigned int COLS, unsigned int oROWS, unsigned int oCOLS, concepts::scalar scalar_t>
ROOT::Math::SMatrix< scalar_t, ROWS, COLS > operator() (const ROOT::Math::SMatrix< scalar_t, oROWS, oCOLS > &m, unsigned int row, unsigned int col) const
 Extract a rectangular block from a matrix.
template<unsigned int ROWS, unsigned int COLS, concepts::scalar scalar_t, concepts::matrix input_matrix_type>
void set (input_matrix_type &m, const ROOT::Math::SMatrix< scalar_t, ROWS, COLS > &b, std::size_t row, std::size_t col) const
 Operator setting a block with a matrix.
template<unsigned int ROWS, concepts::scalar scalar_t, concepts::matrix input_matrix_type>
void set (input_matrix_type &m, const ROOT::Math::SVector< scalar_t, ROWS > &b, unsigned int row, unsigned int col) const
 Operator setting a block with a vector.
template<unsigned int SIZE, unsigned int ROWS, unsigned int COLS, concepts::scalar scalar_t>
ROOT::Math::SVector< scalar_t, SIZE > vector (const ROOT::Math::SMatrix< scalar_t, ROWS, COLS > &m, unsigned int row, unsigned int col) const
 Extract a contiguous segment from one matrix column.

Detailed Description

Functor used to extract a block from SMatrix matrices.

Member Function Documentation

◆ operator()()

template<unsigned int ROWS, unsigned int COLS, unsigned int oROWS, unsigned int oCOLS, concepts::scalar scalar_t>
ROOT::Math::SMatrix< scalar_t, ROWS, COLS > detray::algebra::smatrix::storage::block_getter::operator() ( const ROOT::Math::SMatrix< scalar_t, oROWS, oCOLS > & m,
unsigned int row,
unsigned int 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<unsigned int ROWS, unsigned int COLS, concepts::scalar scalar_t, concepts::matrix input_matrix_type>
void detray::algebra::smatrix::storage::block_getter::set ( input_matrix_type & m,
const ROOT::Math::SMatrix< 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.

◆ set() [2/2]

template<unsigned int ROWS, concepts::scalar scalar_t, concepts::matrix input_matrix_type>
void detray::algebra::smatrix::storage::block_getter::set ( input_matrix_type & m,
const ROOT::Math::SVector< scalar_t, ROWS > & b,
unsigned int row,
unsigned int col ) const

Operator setting a block with a vector.

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

◆ vector()

template<unsigned int SIZE, unsigned int ROWS, unsigned int COLS, concepts::scalar scalar_t>
ROOT::Math::SVector< scalar_t, SIZE > detray::algebra::smatrix::storage::block_getter::vector ( const ROOT::Math::SMatrix< scalar_t, ROWS, COLS > & m,
unsigned int row,
unsigned int 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.