|
RealTimeTransport 1.0.0
Real-time simulation of quantum transport processes
|
#include <RealTimeTransport/BlockMatrices/BlockDiagonalMatrix.h>
This class represents a complex valued block diagonal matrix.
Public Types | |
| using | Scalar = SciCore::Complex |
| Type representing the matrix elements. | |
| using | MatrixType = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> |
| Type representing a matrix block. | |
Public Member Functions | |
| BlockDiagonalMatrix () noexcept | |
| Constructs an empty block diagonal matrix. | |
| BlockDiagonalMatrix (BlockDiagonalMatrix &&other) noexcept | |
| Move constructor. | |
| BlockDiagonalMatrix (const BlockDiagonalMatrix &other) | |
| Copy constructor. | |
| BlockDiagonalMatrix (std::vector< MatrixType > &&blocks) noexcept | |
| Constructs a block diagonal matrix with given blocks. | |
| template<typename DenseMatrixT > | |
| BlockDiagonalMatrix (const DenseMatrixT &matrix, const std::vector< int > &blockDimensions) | |
| Constructs a block diagonal matrix from a dense matrix where the dimensions of the blocks are given by blockDimensions. | |
| BlockDiagonalMatrix & | operator= (BlockDiagonalMatrix &&other) noexcept |
| Move assignment operator. | |
| BlockDiagonalMatrix & | operator= (const BlockDiagonalMatrix &other) |
| Copy assignment operator. | |
| bool | operator== (const BlockDiagonalMatrix &other) const |
| Equality comparison operator. | |
| bool | operator!= (const BlockDiagonalMatrix &other) const |
| Inequality comparison operator. | |
| BlockDiagonalMatrix & | operator+= (const BlockDiagonalMatrix &rhs) |
| Adds the block diagonal matrix rhs to the object. | |
| BlockDiagonalMatrix & | operator-= (const BlockDiagonalMatrix &rhs) |
| Subtracts the block diagonal matrix rhs from the object. | |
| BlockDiagonalMatrix & | operator*= (const BlockDiagonalMatrix &rhs) |
| Multiplies the block diagonal matrix rhs from the right to object. | |
| BlockDiagonalMatrix & | operator*= (SciCore::Real scalar) |
| Multiplies the object by the a scalar. | |
| BlockDiagonalMatrix & | operator*= (SciCore::Complex scalar) |
| Multiplies the object by the a scalar. | |
| int | numBlocks () const noexcept |
| Multiplies the number of blocks. | |
| int | totalRows () const noexcept |
| Returns the total number of rows. | |
| int | totalCols () const noexcept |
| Returns the total number of columns. | |
| std::vector< int > | blockDimensions () const |
| Returns a vector containing the dimensions of each block. | |
| MatrixType & | operator() (int i) |
| Returns the matrix block with index i. | |
| const MatrixType & | operator() (int i) const |
| Returns the matrix block with index i. | |
| void | fromBlocks (std::vector< MatrixType > &&newBlocks) |
| Creates a new block diagonal matrix from given blocks. | |
| template<typename DenseMatrixT > | |
| void | fromDense (const DenseMatrixT &matrix, const std::vector< int > &blockDimensions) |
| Constructs a block diagonal matrix from a dense matrix where the dimensions of the blocks are given by blockDimensions. | |
| void | setZero (const std::vector< int > &blockDimensions) |
| Sets the matrix to zero with block dimensions blockDimensions. | |
| MatrixType | toDense () const |
| Returns a dense matrix representation. | |
| const Scalar & | element (int row, int column) const |
| Returns the matrix element at a given row and column. | |
| Scalar & | element (int row, int colum) |
| Returns the matrix element at a given row and column. | |
Static Public Member Functions | |
| static BlockDiagonalMatrix | Zero (const std::vector< int > &blockDimensions) |
| Returns a matrix with given blockDimensions that is zero everywhere. | |
| static BlockDiagonalMatrix | Identity (const std::vector< int > &blockDimensions) |
| Returns a matrix with given blockDimensions equal to the identity matrix. | |