Functor used to extract a block from Fastor matrices.
More...
#include <algebra/impl/fastor_getter.hpp>
|
| 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.
|
Functor used to extract a block from Fastor matrices.
◆ 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
-
| m | Source matrix. |
| row | First row of the block. |
| col | First 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
-
| m | Matrix to update. |
| b | Vector values to write. |
| row | First destination row. |
| col | Destination 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
-
| m | Matrix to update. |
| b | Block values to write. |
| row | First destination row. |
| col | First 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
-
| m | Source matrix. |
| row | First row of the segment. |
| col | Column containing the segment. |
- Returns
- A vector containing the selected segment.