TR-mbed 1.0
Loading...
Searching...
No Matches
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, StorageIndexPlainObject
 
- 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
 
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, StorageIndexPlainObject
 
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
 
- Public Types inherited from Eigen::EigenBase< Derived >
typedef Eigen::Index Index
 The interface type of indices.
 
typedef internal::traits< Derived >::StorageKind StorageKind
 

Public Member Functions

 BlockSparseMatrix ()
 
 BlockSparseMatrix (Index brow, Index bcol)
 Construct and resize.
 
 BlockSparseMatrix (const BlockSparseMatrix &other)
 Copy-constructor.
 
BlockSparseMatrixoperator= (BlockSparseMatrix other)
 
 ~BlockSparseMatrix ()
 
template<typename MatrixType >
 BlockSparseMatrix (const MatrixType &spmat)
 Constructor from a sparse matrix.
 
template<typename MatrixType >
BlockSparseMatrixoperator= (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< 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 ()
 
StorageIndexinnerIndexPtr ()
 
const StorageIndexinnerIndexPtr () const
 
StorageIndexouterIndexPtr ()
 
const StorageIndexouterIndexPtr () 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
 
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
 
- 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 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
 

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
 
StorageIndexm_innerOffset
 
StorageIndexm_outerOffset
 
Index m_nonzerosblocks
 
Index m_nonzeros
 
Scalarm_values
 
StorageIndexm_blockPtr
 
StorageIndexm_indices
 
StorageIndexm_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
    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);
  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

Member Typedef Documentation

◆ BlockRealScalar

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
typedef Matrix<RealScalar, _BlockAtCompileTime, _BlockAtCompileTime,IsColMajor ? ColMajor : RowMajor> Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::BlockRealScalar

◆ BlockScalar

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
typedef Matrix<Scalar, _BlockAtCompileTime, _BlockAtCompileTime,IsColMajor ? ColMajor : RowMajor> Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::BlockScalar

◆ BlockScalarReturnType

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
typedef internal::conditional<_BlockAtCompileTime==Dynamic,Scalar,BlockScalar>::type Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::BlockScalarReturnType

◆ Nested

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
typedef internal::ref_selector<BlockSparseMatrix<_Scalar,_BlockAtCompileTime,_Options,_StorageIndex>>::type Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::Nested

◆ PlainObject

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
typedef BlockSparseMatrix<Scalar, BlockSize, IsColMajor ? ColMajor : RowMajor, StorageIndex> Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::PlainObject

◆ RealScalar

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
typedef NumTraits<Scalar>::Real Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::RealScalar

◆ Scalar

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
typedef _Scalar Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::Scalar

◆ StorageIndex

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
typedef _StorageIndex Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::StorageIndex

Member Enumeration Documentation

◆ anonymous enum

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
anonymous enum
Enumerator
Options 
Flags 
BlockSize 
RowsAtCompileTime 
ColsAtCompileTime 
MaxRowsAtCompileTime 
MaxColsAtCompileTime 
IsVectorAtCompileTime 
IsColMajor 

Constructor & Destructor Documentation

◆ BlockSparseMatrix() [1/4]

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

◆ BlockSparseMatrix() [2/4]

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() [3/4]

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

Copy-constructor.

◆ ~BlockSparseMatrix()

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

◆ BlockSparseMatrix() [4/4]

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

◆ blockInnerIndex()

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::blockInnerIndex ( Index  bi) const
inline

◆ blockInnerSize()

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::blockInnerSize ( Index  bi) const
inline

◆ blockOuterIndex()

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::blockOuterIndex ( Index  bj) const
inline

◆ blockOuterSize()

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::blockOuterSize ( Index  bj) const
inline

◆ 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 ( ) const
inline
Returns
the number of cols

◆ innerBlocks()

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

◆ innerIndexPtr() [1/2]

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
StorageIndex * Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::innerIndexPtr ( )
inline

◆ innerIndexPtr() [2/2]

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
const StorageIndex * Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::innerIndexPtr ( ) const
inline

◆ innerSize()

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

◆ 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

◆ insert()

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
Map< BlockScalar > Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::insert ( Index  brow,
Index  bcol 
)
protected

◆ isCompressed()

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
bool Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::isCompressed ( ) const
inline

for compatibility purposes with the SparseMatrix class

◆ 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 VecType >
BlockSparseTimeDenseProduct< BlockSparseMatrix, VecType > Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::operator* ( const VecType &  lhs) const
inline

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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).

◆ outerBlocks()

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

◆ outerIndexPtr() [1/2]

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
StorageIndex * Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::outerIndexPtr ( )
inline

◆ outerIndexPtr() [2/2]

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
const StorageIndex * Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::outerIndexPtr ( ) const
inline

◆ outerSize()

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

◆ 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()

◆ resize()

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

Set the number of rows and columns blocks.

◆ rows()

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::rows ( ) 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

◆ valuePtr()

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
BlockScalarReturnType * Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::valuePtr ( )
inline

Friends And Related Symbol Documentation

◆ operator<<

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
std::ostream & operator<< ( std::ostream &  s,
const BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > &  m 
)
friend

◆ swap

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
void swap ( BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > &  first,
BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex > &  second 
)
friend

Member Data Documentation

◆ m_blockPtr

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
StorageIndex* Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::m_blockPtr
protected

◆ m_blockSize

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::m_blockSize
protected

◆ m_indices

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
StorageIndex* Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::m_indices
protected

◆ m_innerBSize

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::m_innerBSize
protected

◆ m_innerOffset

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
StorageIndex* Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::m_innerOffset
protected

◆ m_nonzeros

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::m_nonzeros
protected

◆ m_nonzerosblocks

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::m_nonzerosblocks
protected

◆ m_outerBSize

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
Index Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::m_outerBSize
protected

◆ m_outerIndex

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
StorageIndex* Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::m_outerIndex
protected

◆ m_outerOffset

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
StorageIndex* Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::m_outerOffset
protected

◆ m_values

template<typename _Scalar , int _BlockAtCompileTime, int _Options, typename _StorageIndex >
Scalar* Eigen::BlockSparseMatrix< _Scalar, _BlockAtCompileTime, _Options, _StorageIndex >::m_values
protected

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