|
enum | {
Options
,
Flags
,
BlockSize
,
RowsAtCompileTime
,
ColsAtCompileTime
,
MaxRowsAtCompileTime
,
MaxColsAtCompileTime
,
IsVectorAtCompileTime
,
IsColMajor
} |
|
typedef Matrix< RealScalar, _BlockAtCompileTime, _BlockAtCompileTime, IsColMajor ? ColMajor :RowMajor > | BlockRealScalar |
|
typedef Matrix< Scalar, _BlockAtCompileTime, _BlockAtCompileTime, IsColMajor ? ColMajor :RowMajor > | BlockScalar |
|
typedef std::conditional_t< _BlockAtCompileTime==Dynamic, Scalar, BlockScalar > | BlockScalarReturnType |
|
typedef internal::ref_selector< BlockSparseMatrix< Scalar_, _BlockAtCompileTime, Options_, StorageIndex_ > >::type | Nested |
|
typedef BlockSparseMatrix< Scalar, BlockSize, IsColMajor ? ColMajor :RowMajor, StorageIndex > | PlainObject |
|
typedef NumTraits< Scalar >::Real | RealScalar |
|
typedef Scalar_ | Scalar |
|
typedef StorageIndex_ | StorageIndex |
|
typedef std::conditional_t< NumTraits< Scalar >::IsComplex, CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, Eigen::Transpose< const Derived > >, Transpose< const Derived > > | AdjointReturnType |
|
typedef Transpose< const Derived > | ConstTransposeReturnType |
|
typedef Matrix< StorageIndex, Dynamic, 1 > | IndexVector |
|
typedef internal::add_const_on_value_type_if_arithmetic< typename internal::packet_traits< Scalar >::type >::type | PacketReturnType |
|
typedef internal::packet_traits< Scalar >::type | PacketScalar |
|
typedef SparseMatrix< Scalar, Flags &RowMajorBit ? RowMajor :ColMajor, StorageIndex > | PlainObject |
|
typedef internal::traits< Derived >::Scalar | Scalar |
|
typedef Matrix< Scalar, Dynamic, 1 > | ScalarVector |
|
typedef SparseMatrixBase | StorageBaseType |
|
typedef internal::traits< Derived >::StorageIndex | StorageIndex |
|
typedef internal::traits< Derived >::StorageKind | StorageKind |
|
typedef Transpose< Derived > | TransposeReturnType |
|
typedef Scalar | value_type |
|
typedef Eigen::Index | Index |
|
typedef internal::traits< Derived >::StorageKind | StorageKind |
|
|
Index | blockCols () const |
|
Index | blockColsIndex (Index bj) const |
|
Index | blockInnerIndex (Index bi) const |
|
Index | blockInnerSize (Index bi) const |
|
Index | blockOuterIndex (Index bj) const |
|
Index | blockOuterSize (Index bj) const |
|
Index | blockPtr (Index id) const |
|
Index | blockRows () const |
|
Index | blockRowsIndex (Index bi) const |
|
| BlockSparseMatrix () |
|
| BlockSparseMatrix (const BlockSparseMatrix &other) |
| Copy-constructor. More...
|
|
template<typename MatrixType > |
| BlockSparseMatrix (const MatrixType &spmat) |
| Constructor from a sparse matrix. More...
|
|
| BlockSparseMatrix (Index brow, Index bcol) |
| Construct and resize. More...
|
|
Map< const BlockScalar > | coeff (Index brow, Index bcol) const |
|
Ref< BlockScalar > | coeffRef (Index brow, Index bcol) |
|
Index | cols () const |
|
Index | innerBlocks () const |
|
StorageIndex * | innerIndexPtr () |
|
const StorageIndex * | innerIndexPtr () const |
|
Index | innerSize () const |
|
Index | innerToBlock (Index inner) const |
|
bool | isCompressed () const |
| for compatibility purposes with the SparseMatrix class More...
|
|
Index | nonZeros () const |
|
Index | nonZerosBlocks () const |
|
template<typename VecType > |
BlockSparseTimeDenseProduct< BlockSparseMatrix, VecType > | operator* (const VecType &lhs) const |
|
BlockSparseMatrix & | operator= (BlockSparseMatrix other) |
|
template<typename MatrixType > |
BlockSparseMatrix & | operator= (const MatrixType &spmat) |
| Assignment from a sparse matrix with the same storage order. More...
|
|
Index | outerBlocks () const |
|
StorageIndex * | outerIndexPtr () |
|
const StorageIndex * | outerIndexPtr () const |
|
Index | outerSize () const |
|
Index | outerToBlock (Index outer) const |
|
void | reserve (const Index nonzerosblocks) |
| Allocate the internal array of pointers to blocks and their inner indices. More...
|
|
void | resize (Index brow, Index bcol) |
| Set the number of rows and columns blocks. More...
|
|
Index | rows () const |
|
void | setBlockLayout (const VectorXi &rowBlocks, const VectorXi &colBlocks) |
| Set the row and column block layouts,. More...
|
|
void | setBlockSize (Index blockSize) |
| set the block size at runtime for fixed-size block layout More...
|
|
template<typename MatrixType > |
void | setBlockStructure (const MatrixType &blockPattern) |
| Set the nonzero block pattern of the matrix. More...
|
|
template<typename InputIterator > |
void | setFromTriplets (const InputIterator &begin, const InputIterator &end) |
| Fill values in a matrix from a triplet list. More...
|
|
BlockScalarReturnType * | valuePtr () |
|
| ~BlockSparseMatrix () |
|
const AdjointReturnType | adjoint () const |
|
RealScalar | blueNorm () const |
|
Index | cols () const |
|
const SparseMatrixBase< Derived >::template CwiseProductDenseReturnType< OtherDerived >::Type | cwiseProduct (const MatrixBase< OtherDerived > &other) const |
|
const CwiseProductDenseReturnType< OtherDerived >::Type | cwiseProduct (const MatrixBase< OtherDerived > &other) const |
|
internal::traits< Derived >::Scalar | dot (const MatrixBase< OtherDerived > &other) const |
|
Scalar | dot (const MatrixBase< OtherDerived > &other) const |
|
internal::traits< Derived >::Scalar | dot (const SparseMatrixBase< OtherDerived > &other) const |
|
Scalar | dot (const SparseMatrixBase< OtherDerived > &other) const |
|
const internal::eval< Derived >::type | eval () const |
|
Index | innerSize () const |
|
bool | isApprox (const MatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
|
bool | isApprox (const SparseMatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
|
bool | isRValue () const |
|
bool | isVector () const |
|
Derived & | markAsRValue () |
|
RealScalar | norm () const |
|
const Product< Derived, OtherDerived > | operator* (const DiagonalBase< OtherDerived > &other) const |
|
const Product< Derived, OtherDerived > | operator* (const MatrixBase< OtherDerived > &other) const |
|
const Product< Derived, OtherDerived, AliasFreeProduct > | operator* (const SparseMatrixBase< OtherDerived > &other) const |
|
Derived & | operator*= (const Scalar &other) |
|
Derived & | operator*= (const SparseMatrixBase< OtherDerived > &other) |
|
Derived & | operator+= (const DiagonalBase< OtherDerived > &other) |
|
Derived & | operator+= (const EigenBase< OtherDerived > &other) |
|
Derived & | operator+= (const SparseMatrixBase< OtherDerived > &other) |
|
Derived & | operator-= (const DiagonalBase< OtherDerived > &other) |
|
Derived & | operator-= (const EigenBase< OtherDerived > &other) |
|
Derived & | operator-= (const SparseMatrixBase< OtherDerived > &other) |
|
Derived & | operator/= (const Scalar &other) |
|
Derived & | operator= (const Derived &other) |
|
Derived & | operator= (const EigenBase< OtherDerived > &other) |
|
Derived & | operator= (const ReturnByValue< OtherDerived > &other) |
|
Derived & | operator= (const SparseMatrixBase< OtherDerived > &other) |
|
Index | outerSize () const |
|
const SparseView< Derived > | pruned (const Scalar &reference=Scalar(0), const RealScalar &epsilon=NumTraits< Scalar >::dummy_precision()) const |
|
Index | rows () const |
|
SelfAdjointViewReturnType< UpLo >::Type | selfadjointView () |
|
SparseMatrixBase< Derived >::template SelfAdjointViewReturnType< UpLo >::Type | selfadjointView () |
|
SparseMatrixBase< Derived >::template ConstSelfAdjointViewReturnType< UpLo >::Type | selfadjointView () const |
|
ConstSelfAdjointViewReturnType< UpLo >::Type | selfadjointView () const |
|
Index | size () const |
|
| SparseMatrixBase () |
|
RealScalar | squaredNorm () const |
|
Scalar | sum () const |
|
DenseMatrixType | toDense () const |
|
TransposeReturnType | transpose () |
|
const ConstTransposeReturnType | transpose () const |
|
const TriangularView< const Derived, Mode > | triangularView () const |
|
SparseSymmetricPermutationProduct< Derived, Upper|Lower > | twistedBy (const PermutationMatrix< Dynamic, Dynamic, StorageIndex > &perm) const |
|
void | addTo (Dest &dst) const |
|
void | applyThisOnTheLeft (Dest &dst) const |
|
void | applyThisOnTheRight (Dest &dst) const |
|
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
|
Derived & | const_cast_derived () const |
|
const Derived & | const_derived () const |
|
Derived & | derived () |
|
const Derived & | derived () const |
|
void | evalTo (Dest &dst) const |
|
EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
|
EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
|
void | subTo (Dest &dst) const |
|
template<typename Scalar_, int _BlockAtCompileTime, int Options_, typename StorageIndex_>
class Eigen::BlockSparseMatrix< Scalar_, _BlockAtCompileTime, Options_, StorageIndex_ >
A versatile sparse matrix representation where each element is a block.
This class provides routines to manipulate block sparse matrices stored in a BSR-like representation. There are two main types :
- All blocks have the same number of rows and columns, called block size in the following. In this case, if this block size is known at compile time, it can be given as a template parameter like
BlockSparseMatrix<Scalar, 3, ColMajor> bmat(b_rows, b_cols);
Here, bmat is a b_rows x b_cols block sparse matrix where each coefficient is a 3x3 dense matrix. If the block size is fixed but will be given at runtime, BlockSparseMatrix<Scalar, Dynamic, ColMajor> bmat(b_rows, b_cols);
bmat.setBlockSize(block_size);
- The second case is for variable-block sparse matrices. Here each block has its own dimensions. The only restriction is that all the blocks in a row (resp. a column) should have the same number of rows (resp. of columns). It is thus required in this case to describe the layout of the matrix by calling setBlockLayout(rowBlocks, colBlocks).
In any of the previous case, the matrix can be filled by calling setFromTriplets(). A regular sparse matrix can be converted to a block sparse matrix and vice versa. It is obviously required to describe the block layout beforehand by calling either setBlockSize() for fixed-size blocks or setBlockLayout for variable-size blocks.
- Template Parameters
-
Scalar_ | The Scalar type |
_BlockAtCompileTime | The block layout option. It takes the following values Dynamic : block size known at runtime a numeric number : fixed-size block known at compile time |
Definition at line 286 of file BlockSparseMatrix.h.