|
| enum | {
Options = _Options
, Flags = Options
, BlockSize =_BlockAtCompileTime
, RowsAtCompileTime = Dynamic
,
ColsAtCompileTime = Dynamic
, MaxRowsAtCompileTime = Dynamic
, MaxColsAtCompileTime = Dynamic
, IsVectorAtCompileTime = 0
,
IsColMajor = Flags&RowMajorBit ? 0 : 1
} |
| |
| typedef _Scalar | Scalar |
| |
| typedef NumTraits< Scalar >::Real | RealScalar |
| |
| typedef _StorageIndex | StorageIndex |
| |
| typedef internal::ref_selector< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::type | Nested |
| |
| typedef Matrix< Scalar, _BlockAtCompileTime, _BlockAtCompileTime, IsColMajor ? ColMajor :RowMajor > | BlockScalar |
| |
| typedef Matrix< RealScalar, _BlockAtCompileTime, _BlockAtCompileTime, IsColMajor ? ColMajor :RowMajor > | BlockRealScalar |
| |
| typedef internal::conditional< _BlockAtCompileTime==Dynamic, Scalar, BlockScalar >::type | BlockScalarReturnType |
| |
| typedef BlockSparseMatrix< Scalar, BlockSize, IsColMajor ? ColMajor :RowMajor, StorageIndex > | PlainObject |
| |
| enum | |
| |
| typedef internal::traits< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::Scalar | Scalar |
| |
| typedef Scalar | value_type |
| |
| typedef internal::packet_traits< Scalar >::type | PacketScalar |
| |
| typedef internal::traits< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::StorageKind | StorageKind |
| |
| typedef internal::traits< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::StorageIndex | StorageIndex |
| |
| typedef internal::add_const_on_value_type_if_arithmetic< typenameinternal::packet_traits< Scalar >::type >::type | PacketReturnType |
| |
| typedef SparseMatrixBase | StorageBaseType |
| |
| typedef Matrix< StorageIndex, Dynamic, 1 > | IndexVector |
| |
| typedef Matrix< Scalar, Dynamic, 1 > | ScalarVector |
| |
| typedef internal::conditional< NumTraits< Scalar >::IsComplex, CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, Eigen::Transpose< constDerived > >, Transpose< constDerived > >::type | AdjointReturnType |
| |
| typedef Transpose< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > | TransposeReturnType |
| |
| typedef internal::add_const< Transpose< constDerived > >::type | ConstTransposeReturnType |
| |
| typedef SparseMatrix< Scalar, Flags &RowMajorBit ? RowMajor :ColMajor, StorageIndex > | PlainObject |
| |
| typedef NumTraits< Scalar >::Real | RealScalar |
| |
| typedef internal::conditional< _HasDirectAccess, constScalar &, Scalar >::type | CoeffReturnType |
| |
| typedef CwiseNullaryOp< internal::scalar_constant_op< Scalar >, Matrix< Scalar, Dynamic, Dynamic > > | ConstantReturnType |
| |
| typedef Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime > | DenseMatrixType |
| |
| typedef Matrix< Scalar, EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime), EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime)> | SquareMatrixType |
| |
| typedef EigenBase< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > | Base |
| |
| typedef Eigen::Index | Index |
| | The interface type of indices.
|
| |
| typedef internal::traits< Derived >::StorageKind | StorageKind |
| |
|
| | BlockSparseMatrix () |
| |
| | BlockSparseMatrix (Index brow, Index bcol) |
| | Construct and resize.
|
| |
| | BlockSparseMatrix (const BlockSparseMatrix &other) |
| | Copy-constructor.
|
| |
| BlockSparseMatrix & | operator= (BlockSparseMatrix other) |
| |
| | ~BlockSparseMatrix () |
| |
| template<typename MatrixType > |
| | BlockSparseMatrix (const MatrixType &spmat) |
| | Constructor from a sparse matrix.
|
| |
| template<typename MatrixType > |
| BlockSparseMatrix & | operator= (const MatrixType &spmat) |
| | Assignment from a sparse matrix with the same storage order.
|
| |
| template<typename MatrixType > |
| void | setBlockStructure (const MatrixType &blockPattern) |
| | Set the nonzero block pattern of the matrix.
|
| |
| void | resize (Index brow, Index bcol) |
| | Set the number of rows and columns blocks.
|
| |
| void | setBlockSize (Index blockSize) |
| | set the block size at runtime for fixed-size block layout
|
| |
| void | setBlockLayout (const VectorXi &rowBlocks, const VectorXi &colBlocks) |
| | Set the row and column block layouts,.
|
| |
| void | reserve (const Index nonzerosblocks) |
| | Allocate the internal array of pointers to blocks and their inner indices.
|
| |
| template<typename InputIterator > |
| void | setFromTriplets (const InputIterator &begin, const InputIterator &end) |
| | Fill values in a matrix from a triplet list.
|
| |
| Index | rows () const |
| |
| Index | cols () const |
| |
| Index | innerSize () const |
| |
| Index | outerSize () const |
| |
| Index | blockRows () const |
| |
| Index | blockCols () const |
| |
| Index | outerBlocks () const |
| |
| Index | innerBlocks () const |
| |
| Index | outerToBlock (Index outer) const |
| |
| Index | innerToBlock (Index inner) const |
| |
| Ref< BlockScalar > | coeffRef (Index brow, Index bcol) |
| |
| Map< const BlockScalar > | coeff (Index brow, Index bcol) const |
| |
| template<typename VecType > |
| BlockSparseTimeDenseProduct< BlockSparseMatrix, VecType > | operator* (const VecType &lhs) const |
| |
| Index | nonZerosBlocks () const |
| |
| Index | nonZeros () const |
| |
| BlockScalarReturnType * | valuePtr () |
| |
| StorageIndex * | innerIndexPtr () |
| |
| const StorageIndex * | innerIndexPtr () const |
| |
| StorageIndex * | outerIndexPtr () |
| |
| const StorageIndex * | outerIndexPtr () const |
| |
| bool | isCompressed () const |
| | for compatibility purposes with the SparseMatrix class
|
| |
| Index | blockRowsIndex (Index bi) const |
| |
| Index | blockColsIndex (Index bj) const |
| |
| Index | blockOuterIndex (Index bj) const |
| |
| Index | blockInnerIndex (Index bi) const |
| |
| Index | blockInnerSize (Index bi) const |
| |
| Index | blockOuterSize (Index bj) const |
| |
| Index | blockPtr (Index id) const |
| |
| BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | operator= (const EigenBase< OtherDerived > &other) |
| |
| BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | operator= (const ReturnByValue< OtherDerived > &other) |
| |
| BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | operator= (const SparseMatrixBase< OtherDerived > &other) |
| |
| BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | operator= (const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > &other) |
| |
| const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | derived () const |
| |
| BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | derived () |
| |
| BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | const_cast_derived () const |
| |
| Index | rows () const |
| |
| Index | cols () const |
| |
| Index | size () const |
| |
| bool | isVector () const |
| |
| Index | outerSize () const |
| |
| Index | innerSize () const |
| |
| bool | isRValue () const |
| |
| BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | markAsRValue () |
| |
| | SparseMatrixBase () |
| |
| BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | operator+= (const SparseMatrixBase< OtherDerived > &other) |
| |
| BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | operator+= (const DiagonalBase< OtherDerived > &other) |
| |
| BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | operator+= (const EigenBase< OtherDerived > &other) |
| |
| EIGEN_STRONG_INLINE BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | operator+= (const SparseMatrixBase< OtherDerived > &other) |
| |
| BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | operator-= (const SparseMatrixBase< OtherDerived > &other) |
| |
| BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | operator-= (const DiagonalBase< OtherDerived > &other) |
| |
| BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | operator-= (const EigenBase< OtherDerived > &other) |
| |
| EIGEN_STRONG_INLINE BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | operator-= (const SparseMatrixBase< OtherDerived > &other) |
| |
| BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | operator*= (const Scalar &other) |
| |
| BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | operator*= (const SparseMatrixBase< OtherDerived > &other) |
| |
| BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & | operator/= (const Scalar &other) |
| |
| EIGEN_STRONG_INLINE const CwiseProductDenseReturnType< OtherDerived >::Type | cwiseProduct (const MatrixBase< OtherDerived > &other) const |
| |
| EIGEN_STRONG_INLINE const SparseMatrixBase< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::template CwiseProductDenseReturnType< OtherDerived >::Type | cwiseProduct (const MatrixBase< OtherDerived > &other) const |
| |
| const Product< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, OtherDerived > | operator* (const DiagonalBase< OtherDerived > &other) const |
| |
| const Product< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, OtherDerived, AliasFreeProduct > | operator* (const SparseMatrixBase< OtherDerived > &other) const |
| |
| const Product< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, OtherDerived > | operator* (const MatrixBase< OtherDerived > &other) const |
| |
| SparseSymmetricPermutationProduct< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, Upper|Lower > | twistedBy (const PermutationMatrix< Dynamic, Dynamic, StorageIndex > &perm) const |
| |
| const TriangularView< const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, Mode > | triangularView () const |
| |
| ConstSelfAdjointViewReturnType< UpLo >::Type | selfadjointView () const |
| |
| SelfAdjointViewReturnType< UpLo >::Type | selfadjointView () |
| |
| SparseMatrixBase< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::template ConstSelfAdjointViewReturnType< UpLo >::Type | selfadjointView () const |
| |
| SparseMatrixBase< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::template SelfAdjointViewReturnType< UpLo >::Type | selfadjointView () |
| |
| Scalar | dot (const MatrixBase< OtherDerived > &other) const |
| |
| Scalar | dot (const SparseMatrixBase< OtherDerived > &other) const |
| |
| internal::traits< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::Scalar | dot (const MatrixBase< OtherDerived > &other) const |
| |
| internal::traits< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::Scalar | dot (const SparseMatrixBase< OtherDerived > &other) const |
| |
| RealScalar | squaredNorm () const |
| |
| RealScalar | norm () const |
| |
| RealScalar | blueNorm () const |
| |
| TransposeReturnType | transpose () |
| |
| const ConstTransposeReturnType | transpose () const |
| |
| const AdjointReturnType | adjoint () const |
| |
| DenseMatrixType | toDense () const |
| |
| bool | isApprox (const SparseMatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
| |
| bool | isApprox (const MatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const |
| |
| const internal::eval< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::type | eval () const |
| |
| Scalar | sum () const |
| |
| const SparseView< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > | pruned (const Scalar &reference=Scalar(0), const RealScalar &epsilon=NumTraits< Scalar >::dummy_precision()) const |
| |
| EIGEN_DEVICE_FUNC Derived & | derived () |
| |
| EIGEN_DEVICE_FUNC const Derived & | derived () const |
| |
| EIGEN_DEVICE_FUNC Derived & | const_cast_derived () const |
| |
| EIGEN_DEVICE_FUNC const Derived & | const_derived () const |
| |
| EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
| |
| EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
| |
| EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
| |
| template<typename Dest > |
| EIGEN_DEVICE_FUNC void | evalTo (Dest &dst) const |
| |
| template<typename Dest > |
| EIGEN_DEVICE_FUNC void | addTo (Dest &dst) const |
| |
| template<typename Dest > |
| EIGEN_DEVICE_FUNC void | subTo (Dest &dst) const |
| |
| template<typename Dest > |
| EIGEN_DEVICE_FUNC void | applyThisOnTheRight (Dest &dst) const |
| |
| template<typename Dest > |
| EIGEN_DEVICE_FUNC void | applyThisOnTheLeft (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
A versatile sparse matrix representation where each element is a block.
Definition BlockSparseMatrix.h:285
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,
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 |