compbio
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > Class Template Reference

A versatile sparse matrix representation where each element is a block. More...

#include <BlockSparseMatrix.h>

Inheritance diagram for Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >:
Eigen::SparseMatrixBase< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > Eigen::EigenBase< Derived >

Classes

class  BlockInnerIterator
 
class  InnerIterator
 

Public Types

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 :RowMajorBlockScalar
 
typedef Matrix< RealScalar, _BlockAtCompileTime, _BlockAtCompileTime, IsColMajor ? ColMajor :RowMajorBlockRealScalar
 
typedef internal::conditional< _BlockAtCompileTime==Dynamic, Scalar, BlockScalar >::type BlockScalarReturnType
 
typedef BlockSparseMatrix< Scalar, BlockSize, IsColMajor ? ColMajor :RowMajor, StorageIndex > PlainObject
 
- Public Types inherited from Eigen::SparseMatrixBase< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >
enum  
 
typedef internal::traits< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::Scalar Scalar
 
typedef Scalar value_type
 The numeric type of the expression' coefficients, e.g. More...
 
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< typename internal::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< const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > >, Transpose< const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > >::type AdjointReturnType
 
typedef Transpose< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > TransposeReturnType
 
typedef internal::add_const< Transpose< const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > >::type ConstTransposeReturnType
 
typedef SparseMatrix< Scalar, Flags &RowMajorBit ? RowMajor :ColMajor, StorageIndex > PlainObject
 
typedef NumTraits< Scalar >::Real RealScalar
 This is the "real scalar" type; if the Scalar type is already real numbers (e.g. More...
 
typedef internal::conditional< _HasDirectAccess, const Scalar &, Scalar >::type CoeffReturnType
 
typedef CwiseNullaryOp< internal::scalar_constant_op< Scalar >, Matrix< Scalar, Dynamic, Dynamic > > ConstantReturnType
 
typedef Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTimeDenseMatrixType
 type of the equivalent dense matrix
 
typedef Matrix< Scalar, EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime), EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime)> SquareMatrixType
 type of the equivalent square matrix
 
typedef EigenBase< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > Base
 
typedef internal::conditional< NumTraits< Scalar >::IsComplex, const CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & >::type ConjugateReturnType
 
typedef internal::conditional< NumTraits< Scalar >::IsComplex, const CwiseUnaryOp< internal::scalar_real_op< Scalar >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & >::type RealReturnType
 
typedef internal::conditional< NumTraits< Scalar >::IsComplex, CwiseUnaryView< internal::scalar_real_ref_op< Scalar >, BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >, BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & >::type NonConstRealReturnType
 
typedef CwiseUnaryOp< internal::scalar_imag_op< Scalar >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > ImagReturnType
 
typedef CwiseUnaryView< internal::scalar_imag_ref_op< Scalar >, BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > NonConstImagReturnType
 
typedef CwiseUnaryOp< internal::scalar_opposite_op< Scalar >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > NegativeReturnType
 
typedef CwiseUnaryOp< internal::scalar_abs_op< Scalar >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > CwiseAbsReturnType
 
typedef CwiseUnaryOp< internal::scalar_abs2_op< Scalar >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > CwiseAbs2ReturnType
 
typedef CwiseUnaryOp< internal::scalar_sqrt_op< Scalar >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > CwiseSqrtReturnType
 
typedef CwiseUnaryOp< internal::scalar_sign_op< Scalar >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > CwiseSignReturnType
 
typedef CwiseUnaryOp< internal::scalar_inverse_op< Scalar >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > CwiseInverseReturnType
 
typedef CwiseBinaryOp< internal::scalar_cmp_op< Scalar, Scalar, internal::cmp_EQ >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, const ConstantReturnTypeCwiseScalarEqualReturnType
 
typedef Block< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, internal::traits< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::RowsAtCompileTime, 1, !IsRowMajor > ColXpr
 
typedef const Block< const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, internal::traits< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::RowsAtCompileTime, 1, !IsRowMajor > ConstColXpr
 
typedef Block< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, 1, internal::traits< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::ColsAtCompileTime, IsRowMajor > RowXpr
 
typedef const Block< const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, 1, internal::traits< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::ColsAtCompileTime, IsRowMajor > ConstRowXpr
 
typedef Block< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, internal::traits< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::RowsAtCompileTime, Dynamic, !IsRowMajor > ColsBlockXpr
 
typedef const Block< const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, internal::traits< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::RowsAtCompileTime, Dynamic, !IsRowMajor > ConstColsBlockXpr
 
typedef Block< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, Dynamic, internal::traits< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::ColsAtCompileTime, IsRowMajor > RowsBlockXpr
 
typedef const Block< const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, Dynamic, internal::traits< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >::ColsAtCompileTime, IsRowMajor > ConstRowsBlockXpr
 
typedef Block< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > BlockXpr
 
typedef const Block< const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > ConstBlockXpr
 
typedef VectorBlock< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > SegmentReturnType
 
typedef const VectorBlock< const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > ConstSegmentReturnType
 
typedef Block< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, IsRowMajor?1:Dynamic, IsRowMajor?Dynamic:1, true > InnerVectorReturnType
 
typedef Block< const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, IsRowMajor?1:Dynamic, IsRowMajor?Dynamic:1, true > ConstInnerVectorReturnType
 
typedef Block< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, Dynamic, Dynamic, true > InnerVectorsReturnType
 
typedef Block< const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, Dynamic, Dynamic, true > ConstInnerVectorsReturnType
 
- Public Types inherited from Eigen::EigenBase< Derived >
typedef Eigen::Index Index
 The interface type of indices. More...
 
typedef internal::traits< Derived >::StorageKind StorageKind
 

Public Member Functions

 BlockSparseMatrix (Index brow, Index bcol)
 Construct and resize. More...
 
 BlockSparseMatrix (const BlockSparseMatrix &other)
 Copy-constructor.
 
BlockSparseMatrixoperator= (BlockSparseMatrix other)
 
template<typename MatrixType >
 BlockSparseMatrix (const MatrixType &spmat)
 Constructor from a sparse matrix. More...
 
template<typename MatrixType >
BlockSparseMatrixoperator= (const MatrixType &spmat)
 Assignment from a sparse matrix with the same storage order. More...
 
template<typename MatrixType >
void setBlockStructure (const MatrixType &blockPattern)
 Set the nonzero block pattern of the matrix. More...
 
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 More...
 
void setBlockLayout (const VectorXi &rowBlocks, const VectorXi &colBlocks)
 Set the row and column block layouts,. More...
 
void reserve (const Index nonzerosblocks)
 Allocate the internal array of pointers to blocks and their inner indices. More...
 
template<typename InputIterator >
void setFromTriplets (const InputIterator &begin, const InputIterator &end)
 Fill values in a matrix from a triplet list. More...
 
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< BlockScalarcoeffRef (Index brow, Index bcol)
 
Map< const BlockScalarcoeff (Index brow, Index bcol) const
 
template<typename VecType >
BlockSparseTimeDenseProduct< BlockSparseMatrix, VecType > operator* (const VecType &lhs) const
 
Index nonZerosBlocks () const
 
Index nonZeros () const
 
BlockScalarReturnTypevaluePtr ()
 
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
 
- Public Member Functions inherited from Eigen::SparseMatrixBase< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >
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
 
EIGEN_DEVICE_FUNC const NegativeReturnType operator- () const
 
EIGEN_DEVICE_FUNC CastXpr< NewType >::Type cast () const
 
EIGEN_DEVICE_FUNC ConjugateReturnType conjugate () const
 
EIGEN_DEVICE_FUNC RealReturnType real () const
 
EIGEN_DEVICE_FUNC NonConstRealReturnType real ()
 
EIGEN_DEVICE_FUNC const ImagReturnType imag () const
 
EIGEN_DEVICE_FUNC NonConstImagReturnType imag ()
 
EIGEN_DEVICE_FUNC const CwiseUnaryOp< CustomUnaryOp, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > unaryExpr (const CustomUnaryOp &func=CustomUnaryOp()) const
 Apply a unary operator coefficient-wise. More...
 
EIGEN_DEVICE_FUNC const CwiseUnaryView< CustomViewOp, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > > unaryViewExpr (const CustomViewOp &func=CustomViewOp()) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< CustomBinaryOp, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, const OtherDerived > binaryExpr (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other, const CustomBinaryOp &func=CustomBinaryOp()) const
 
EIGEN_DEVICE_FUNC const CwiseBinaryOp< internal::scalar_boolean_and_op, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, const OtherDerived > operator&& (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC const CwiseBinaryOp< internal::scalar_boolean_or_op, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, const OtherDerived > operator|| (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseAbsReturnType cwiseAbs () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseAbs2ReturnType cwiseAbs2 () const
 
EIGEN_DEVICE_FUNC const CwiseSqrtReturnType cwiseSqrt () const
 
EIGEN_DEVICE_FUNC const CwiseSignReturnType cwiseSign () const
 
EIGEN_DEVICE_FUNC const CwiseInverseReturnType cwiseInverse () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const EIGEN_CWISE_BINARY_RETURN_TYPE (BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, OtherDerived, product) cwiseProduct(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC const CwiseBinaryOp< std::equal_to< Scalar >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, const OtherDerived > cwiseEqual (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC const CwiseScalarEqualReturnType cwiseEqual (const Scalar &s) const
 
EIGEN_DEVICE_FUNC const CwiseBinaryOp< std::not_equal_to< Scalar >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, const OtherDerived > cwiseNotEqual (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_min_op< Scalar, Scalar >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, const OtherDerived > cwiseMin (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_min_op< Scalar, Scalar >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, const ConstantReturnTypecwiseMin (const Scalar &other) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_max_op< Scalar, Scalar >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, const OtherDerived > cwiseMax (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_max_op< Scalar, Scalar >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, const ConstantReturnTypecwiseMax (const Scalar &other) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_quotient_op< Scalar >, const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >, const OtherDerived > cwiseQuotient (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC BlockXpr block (Index startRow, Index startCol, Index blockRows, Index blockCols)
 
EIGEN_DEVICE_FUNC const ConstBlockXpr block (Index startRow, Index startCol, Index blockRows, Index blockCols) const
 This is the const version of block(Index,Index,Index,Index). */.
 
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC FixedBlockXpr< NRows, NCols >::Type block (Index startRow, Index startCol)
 
EIGEN_DEVICE_FUNC const ConstFixedBlockXpr< NRows, NCols >::Type block (Index startRow, Index startCol) const
 This is the const version of block<>(Index, Index). */.
 
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL FixedBlockXpr< NRows, NCols >::Type block (Index startRow, Index startCol, Index blockRows, Index blockCols)
 
const ConstFixedBlockXpr< NRows, NCols >::Type block (Index startRow, Index startCol, Index blockRows, Index blockCols) const
 This is the const version of block<>(Index, Index, Index, Index). */.
 
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC BlockXpr topRightCorner (Index cRows, Index cCols)
 
EIGEN_DEVICE_FUNC const ConstBlockXpr topRightCorner (Index cRows, Index cCols) const
 This is the const version of topRightCorner(Index, Index).
 
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC FixedBlockXpr< CRows, CCols >::Type topRightCorner ()
 
EIGEN_DEVICE_FUNC const ConstFixedBlockXpr< CRows, CCols >::Type topRightCorner () const
 This is the const version of topRightCorner<int, int>().
 
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL FixedBlockXpr< CRows, CCols >::Type topRightCorner (Index cRows, Index cCols)
 
const ConstFixedBlockXpr< CRows, CCols >::Type topRightCorner (Index cRows, Index cCols) const
 This is the const version of topRightCorner<int, int>(Index, Index).
 
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC BlockXpr topLeftCorner (Index cRows, Index cCols)
 
EIGEN_DEVICE_FUNC const ConstBlockXpr topLeftCorner (Index cRows, Index cCols) const
 This is the const version of topLeftCorner(Index, Index).
 
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC FixedBlockXpr< CRows, CCols >::Type topLeftCorner ()
 
EIGEN_DEVICE_FUNC const ConstFixedBlockXpr< CRows, CCols >::Type topLeftCorner () const
 This is the const version of topLeftCorner<int, int>().
 
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL FixedBlockXpr< CRows, CCols >::Type topLeftCorner (Index cRows, Index cCols)
 
const ConstFixedBlockXpr< CRows, CCols >::Type topLeftCorner (Index cRows, Index cCols) const
 This is the const version of topLeftCorner<int, int>(Index, Index).
 
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC BlockXpr bottomRightCorner (Index cRows, Index cCols)
 
EIGEN_DEVICE_FUNC const ConstBlockXpr bottomRightCorner (Index cRows, Index cCols) const
 This is the const version of bottomRightCorner(Index, Index).
 
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC FixedBlockXpr< CRows, CCols >::Type bottomRightCorner ()
 
EIGEN_DEVICE_FUNC const ConstFixedBlockXpr< CRows, CCols >::Type bottomRightCorner () const
 This is the const version of bottomRightCorner<int, int>().
 
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL FixedBlockXpr< CRows, CCols >::Type bottomRightCorner (Index cRows, Index cCols)
 
const ConstFixedBlockXpr< CRows, CCols >::Type bottomRightCorner (Index cRows, Index cCols) const
 This is the const version of bottomRightCorner<int, int>(Index, Index).
 
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC BlockXpr bottomLeftCorner (Index cRows, Index cCols)
 
EIGEN_DEVICE_FUNC const ConstBlockXpr bottomLeftCorner (Index cRows, Index cCols) const
 This is the const version of bottomLeftCorner(Index, Index).
 
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL EIGEN_DEVICE_FUNC FixedBlockXpr< CRows, CCols >::Type bottomLeftCorner ()
 
EIGEN_DEVICE_FUNC const ConstFixedBlockXpr< CRows, CCols >::Type bottomLeftCorner () const
 This is the const version of bottomLeftCorner<int, int>().
 
EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL FixedBlockXpr< CRows, CCols >::Type bottomLeftCorner (Index cRows, Index cCols)
 
const ConstFixedBlockXpr< CRows, CCols >::Type bottomLeftCorner (Index cRows, Index cCols) const
 This is the const version of bottomLeftCorner<int, int>(Index, Index).
 
EIGEN_DEVICE_FUNC RowsBlockXpr topRows (Index n)
 
EIGEN_DEVICE_FUNC ConstRowsBlockXpr topRows (Index n) const
 This is the const version of topRows(Index).
 
EIGEN_DEVICE_FUNC NRowsBlockXpr< N >::Type topRows (Index n=N)
 
EIGEN_DEVICE_FUNC ConstNRowsBlockXpr< N >::Type topRows (Index n=N) const
 This is the const version of topRows<int>().
 
EIGEN_DEVICE_FUNC RowsBlockXpr bottomRows (Index n)
 
EIGEN_DEVICE_FUNC ConstRowsBlockXpr bottomRows (Index n) const
 This is the const version of bottomRows(Index).
 
EIGEN_DEVICE_FUNC NRowsBlockXpr< N >::Type bottomRows (Index n=N)
 
EIGEN_DEVICE_FUNC ConstNRowsBlockXpr< N >::Type bottomRows (Index n=N) const
 This is the const version of bottomRows<int>().
 
EIGEN_DEVICE_FUNC RowsBlockXpr middleRows (Index startRow, Index n)
 
EIGEN_DEVICE_FUNC ConstRowsBlockXpr middleRows (Index startRow, Index n) const
 This is the const version of middleRows(Index,Index).
 
EIGEN_DEVICE_FUNC NRowsBlockXpr< N >::Type middleRows (Index startRow, Index n=N)
 
EIGEN_DEVICE_FUNC ConstNRowsBlockXpr< N >::Type middleRows (Index startRow, Index n=N) const
 This is the const version of middleRows<int>().
 
EIGEN_DEVICE_FUNC ColsBlockXpr leftCols (Index n)
 
EIGEN_DEVICE_FUNC ConstColsBlockXpr leftCols (Index n) const
 This is the const version of leftCols(Index).
 
EIGEN_DEVICE_FUNC NColsBlockXpr< N >::Type leftCols (Index n=N)
 
EIGEN_DEVICE_FUNC ConstNColsBlockXpr< N >::Type leftCols (Index n=N) const
 This is the const version of leftCols<int>().
 
EIGEN_DEVICE_FUNC ColsBlockXpr rightCols (Index n)
 
EIGEN_DEVICE_FUNC ConstColsBlockXpr rightCols (Index n) const
 This is the const version of rightCols(Index).
 
EIGEN_DEVICE_FUNC NColsBlockXpr< N >::Type rightCols (Index n=N)
 
EIGEN_DEVICE_FUNC ConstNColsBlockXpr< N >::Type rightCols (Index n=N) const
 This is the const version of rightCols<int>().
 
EIGEN_DEVICE_FUNC ColsBlockXpr middleCols (Index startCol, Index numCols)
 
EIGEN_DEVICE_FUNC ConstColsBlockXpr middleCols (Index startCol, Index numCols) const
 This is the const version of middleCols(Index,Index).
 
EIGEN_DEVICE_FUNC NColsBlockXpr< N >::Type middleCols (Index startCol, Index n=N)
 
EIGEN_DEVICE_FUNC ConstNColsBlockXpr< N >::Type middleCols (Index startCol, Index n=N) const
 This is the const version of middleCols<int>().
 
EIGEN_DEVICE_FUNC ColXpr col (Index i)
 
EIGEN_DEVICE_FUNC ConstColXpr col (Index i) const
 This is the const version of col(). */.
 
EIGEN_DEVICE_FUNC RowXpr row (Index i)
 
EIGEN_DEVICE_FUNC ConstRowXpr row (Index i) const
 This is the const version of row(). */.
 
EIGEN_DEVICE_FUNC SegmentReturnType segment (Index start, Index n)
 
EIGEN_DEVICE_FUNC ConstSegmentReturnType segment (Index start, Index n) const
 This is the const version of segment(Index,Index).
 
EIGEN_DEVICE_FUNC FixedSegmentReturnType< N >::Type segment (Index start, Index n=N)
 
EIGEN_DEVICE_FUNC ConstFixedSegmentReturnType< N >::Type segment (Index start, Index n=N) const
 This is the const version of segment<int>(Index).
 
EIGEN_DEVICE_FUNC SegmentReturnType head (Index n)
 
EIGEN_DEVICE_FUNC ConstSegmentReturnType head (Index n) const
 This is the const version of head(Index).
 
EIGEN_DEVICE_FUNC FixedSegmentReturnType< N >::Type head (Index n=N)
 
EIGEN_DEVICE_FUNC ConstFixedSegmentReturnType< N >::Type head (Index n=N) const
 This is the const version of head<int>().
 
EIGEN_DEVICE_FUNC SegmentReturnType tail (Index n)
 
EIGEN_DEVICE_FUNC ConstSegmentReturnType tail (Index n) const
 This is the const version of tail(Index).
 
EIGEN_DEVICE_FUNC FixedSegmentReturnType< N >::Type tail (Index n=N)
 
EIGEN_DEVICE_FUNC ConstFixedSegmentReturnType< N >::Type tail (Index n=N) const
 This is the const version of tail<int>.
 
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 ()
 
BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & operator+= (const SparseMatrixBase< OtherDerived > &other)
 
BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & operator+= (const DiagonalBase< 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)
 
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
 
InnerVectorReturnType innerVector (Index outer)
 
const ConstInnerVectorReturnType innerVector (Index outer) const
 
InnerVectorsReturnType innerVectors (Index outerStart, Index outerSize)
 
const ConstInnerVectorsReturnType innerVectors (Index outerStart, Index outerSize) 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
 
- Public Member Functions inherited from Eigen::EigenBase< Derived >
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 Index rows () const
 
EIGEN_DEVICE_FUNC Index cols () const
 
EIGEN_DEVICE_FUNC Index size () const
 
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
 

Protected Member Functions

Map< BlockScalarinsert (Index brow, Index bcol)
 
- Protected Member Functions inherited from Eigen::SparseMatrixBase< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >
BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > & assign (const OtherDerived &other)
 
void assignGeneric (const OtherDerived &other)
 

Protected Attributes

Index m_innerBSize
 
Index m_outerBSize
 
StorageIndex * m_innerOffset
 
StorageIndex * m_outerOffset
 
Index m_nonzerosblocks
 
Index m_nonzeros
 
Scalar * m_values
 
StorageIndex * m_blockPtr
 
StorageIndex * m_indices
 
StorageIndex * m_outerIndex
 
Index m_blockSize
 
- Protected Attributes inherited from Eigen::SparseMatrixBase< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >
bool m_isRValue
 

Friends

void swap (BlockSparseMatrix &first, BlockSparseMatrix &second)
 
std::ostream & operator<< (std::ostream &s, const BlockSparseMatrix &m)
 

Additional Inherited Members

- Static Protected Member Functions inherited from Eigen::SparseMatrixBase< BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > >
static StorageIndex convert_index (const Index idx)
 

Detailed Description

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 :

  1. 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);
  2. 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
_ScalarThe Scalar type
_BlockAtCompileTimeThe block layout option. It takes the following values Dynamic : block size known at runtime a numeric number : fixed-size block known at compile time

Constructor & Destructor Documentation

§ BlockSparseMatrix() [1/2]

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::BlockSparseMatrix ( Index  brow,
Index  bcol 
)
inline

Construct and resize.

§ BlockSparseMatrix() [2/2]

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
template<typename MatrixType >
Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::BlockSparseMatrix ( const MatrixType &  spmat)
inline

Constructor from a sparse matrix.

Member Function Documentation

§ blockCols()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::blockCols ( ) const
inline
Returns
the number of columns grouped by blocks

§ blockColsIndex()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::blockColsIndex ( Index  bj) const
inline
Returns
the starting index of the bj col block

§ blockPtr()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::blockPtr ( Index  id) const
inline
Returns
the starting position of the block <id> in the array of values

§ blockRows()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::blockRows ( ) const
inline
Returns
the number of rows grouped by blocks

§ blockRowsIndex()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::blockRowsIndex ( Index  bi) const
inline
Returns
the starting index of the bi row block

§ coeff()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
Map<const BlockScalar> Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::coeff ( Index  brow,
Index  bcol 
) const
inline
Returns
the value of the (i,j) block as an Eigen Dense Matrix

§ coeffRef()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
Ref<BlockScalar> Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::coeffRef ( Index  brow,
Index  bcol 
)
inline
Returns
a reference to the (i,j) block as an Eigen Dense Matrix

§ cols()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::cols ( void  ) const
inline
Returns
the number of cols

§ innerToBlock()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::innerToBlock ( Index  inner) const
inline
Returns
the block index where inner belongs to

§ nonZeros()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::nonZeros ( ) const
inline
Returns
the total number of nonzero elements, including eventual explicit zeros in blocks

§ nonZerosBlocks()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::nonZerosBlocks ( ) const
inline
Returns
the number of nonzero blocks

§ operator=()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
template<typename MatrixType >
BlockSparseMatrix& Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::operator= ( const MatrixType &  spmat)
inline

Assignment from a sparse matrix with the same storage order.

Convert from a sparse matrix to block sparse matrix.

Warning
Before calling this function, tt is necessary to call either setBlockLayout() (matrices with variable-size blocks) or setBlockSize() (for fixed-size blocks).

§ outerToBlock()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::outerToBlock ( Index  outer) const
inline
Returns
the block index where outer belongs to

§ reserve()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
void Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::reserve ( const Index  nonzerosblocks)
inline

Allocate the internal array of pointers to blocks and their inner indices.

Note
For fixed-size blocks, call setBlockSize() to set the block. And For variable-size blocks, call setBlockLayout() before using this function
Parameters
nonzerosblocksNumber of nonzero blocks. The total number of nonzeros is is computed in setBlockLayout() for variable-size blocks
See also
setBlockSize()

§ rows()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::rows ( void  ) const
inline
Returns
the number of rows

§ setBlockLayout()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
void Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::setBlockLayout ( const VectorXi &  rowBlocks,
const VectorXi &  colBlocks 
)
inline

Set the row and column block layouts,.

This function set the size of each row and column block. So this function should be used only for blocks with variable size.

Parameters
rowBlocks: Number of rows per row block
colBlocks: Number of columns per column block
See also
resize(), setBlockSize()

§ setBlockSize()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
void Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::setBlockSize ( Index  blockSize)
inline

set the block size at runtime for fixed-size block layout

Call this only for fixed-size blocks

§ setBlockStructure()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
template<typename MatrixType >
void Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::setBlockStructure ( const MatrixType &  blockPattern)
inline

Set the nonzero block pattern of the matrix.

Given a sparse matrix describing the nonzero block pattern, this function prepares the internal pointers for values. After calling this function, any nonzero block (bi, bj) can be set with a simple call to coeffRef(bi,bj).

Warning
Before calling this function, tt is necessary to call either setBlockLayout() (matrices with variable-size blocks) or setBlockSize() (for fixed-size blocks).
Parameters
blockPatternSparse matrix of boolean elements describing the block structure
See also
setBlockLayout()
setBlockSize()

§ setFromTriplets()

template<typename _Scalar, int _BlockAtCompileTime, int _Options, typename _StorageIndex>
template<typename InputIterator >
void Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::setFromTriplets ( const InputIterator &  begin,
const InputIterator &  end 
)
inline

Fill values in a matrix from a triplet list.

Each triplet item has a block stored in an Eigen dense matrix. The InputIterator class should provide the functions row(), col() and value()

Note
For fixed-size blocks, call setBlockSize() before this function.

FIXME Do not accept duplicates


The documentation for this class was generated from the following file: