GQCP
|
#include <ImplicitMatrixSlice.hpp>
Public Types | |
using | Scalar = _Scalar |
Public Member Functions | |
ImplicitMatrixSlice (const std::map< size_t, size_t > &rows_implicit_to_dense, const std::map< size_t, size_t > &cols_implicit_to_dense, const MatrixX< Scalar > &M) | |
ImplicitMatrixSlice (const std::map< size_t, size_t > &rows_implicit_to_dense, const std::map< size_t, size_t > &cols_implicit_to_dense) | |
ImplicitMatrixSlice () | |
Scalar | operator() (const size_t row, const size_t col) const |
Scalar & | operator() (const size_t row, const size_t col) |
const MatrixX< Scalar > & | asMatrix () const |
VectorX< Scalar > | asVector () const |
const std::map< size_t, size_t > & | columnIndexMap () const |
size_t | denseIndexOfColumn (const size_t col) const |
size_t | denseIndexOfRow (const size_t row) const |
const std::map< size_t, size_t > & | rowIndexMap () const |
Static Public Member Functions | |
static ImplicitMatrixSlice< Scalar > | FromBlockRanges (const size_t row_start, const size_t row_end, const size_t col_start, const size_t col_end, const MatrixX< Scalar > &M) |
static ImplicitMatrixSlice< Scalar > | FromIndices (const std::vector< size_t > &row_indices, const std::vector< size_t > &col_indices, const MatrixX< Scalar > &M) |
static ImplicitMatrixSlice< Scalar > | ZeroFromBlockRanges (const size_t row_start, const size_t row_end, const size_t col_start, const size_t col_end) |
static ImplicitMatrixSlice< Scalar > | ZeroFromIndices (const std::vector< size_t > &row_indices, const std::vector< size_t > &col_indices) |
A slice of a matrix that only exists implicitly.
If the full matrix is unnecessary to know, and only a certain slice of the matrix is of interest, this class implements operator() that can be used with the row and column indices of the full matrix.
_Scalar | the scalar representation of one element of the encapsulating matrix |
using GQCP::ImplicitMatrixSlice< _Scalar >::Scalar = _Scalar |
|
inline |
Initialize an ImplicitMatrixSlice's members.
rows_implicit_to_dense | maps the row indices of the implicit matrix to the row indices of the dense representation of the slice |
cols_implicit_to_dense | maps the column indices of the implicit matrix to the column indices of the dense representation of the slice |
M | the dense representation of the slice |
|
inline |
Initialize an ImplicitMatrixSlice's members, with a zero matrix for the dense representation of the slice.
rows_implicit_to_dense | maps the row indices of the implicit matrix to the row indices of the dense representation of the slice |
cols_implicit_to_dense | maps the column indices of the implicit matrix to the column indices of the dense representation of the slice |
|
inline |
A default constructor setting everything to zero.
|
inline |
|
inline |
|
inline |
|
inline |
Convert an implicit column index to the column index in the dense representation of this slice.
col | the column number in the implicit encapsulating matrix |
|
inline |
Convert an implicit row index to the row index in the dense representation of this slice.
row | the row number in the implicit encapsulating matrix |
|
inlinestatic |
Construct an ImplicitMatrixSlice from a dense matrix block and corresponding index ranges.
row_start | the 0-based row index of the implicit matrix at which the block starts |
row_end | the 0-based row index of the implicit matrix at which the block ends (not included) |
col_start | the 0-based column index of the implicit matrix at which the block starts |
col_end | the 0-based column index of the implicit matrix at which the block ends (not included) |
M | the dense representation of the block |
|
inlinestatic |
Create an implicit matrix slice through a dense representation of the slice.
row_indices | the row indices (in order) of the implicit matrix that the row indices of the dense representation of the slice correspond to |
col_indices | the column indices (in order) of the implicit matrix that the column indices of the dense representation of the slice correspond to |
M | the dense representation of the slice |
|
inline |
Access an element of this implicit matrix slice.
row | the row number in the implicit encapsulating matrix |
col | the column number in the implicit encapsulating matrix |
|
inline |
Access an element of this implicit matrix slice.
row | the row number in the implicit encapsulating matrix |
col | the column number in the implicit encapsulating matrix |
|
inline |
|
inlinestatic |
Construct a zero ImplicitMatrixSlice with given block ranges.
row_start | the 0-based row index of the implicit matrix at which the block starts |
row_end | the 0-based row index of the implicit matrix at which the block ends (not included) |
col_start | the 0-based column index of the implicit matrix at which the block starts |
col_end | the 0-based column index of the implicit matrix at which the block ends (not included) |
M | the dense representation of the block |
|
inlinestatic |
Create a zero-initialized implicit matrix slice from given allowed row and column indices.
row_indices | the row indices (in order) of the implicit matrix that the row indices of the dense representation of the slice correspond to |
col_indices | the column indices (in order) of the implicit matrix that the column indices of the dense representation of the slice correspond to |