Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Eigen::BlockSparseMatrixView< BlockSparseMatrixT > Class Template Reference

#include <src/eigen/unsupported/Eigen/src/SparseExtra/BlockSparseMatrix.h>

+ Inheritance diagram for Eigen::BlockSparseMatrixView< BlockSparseMatrixT >:
+ Collaboration diagram for Eigen::BlockSparseMatrixView< BlockSparseMatrixT >:

Classes

class  InnerIterator
 

Public Types

enum  {
  Flags = BlockSparseMatrixT::Options , Options = BlockSparseMatrixT::Options , RowsAtCompileTime = BlockSparseMatrixT::RowsAtCompileTime , ColsAtCompileTime = BlockSparseMatrixT::ColsAtCompileTime ,
  MaxColsAtCompileTime = BlockSparseMatrixT::MaxColsAtCompileTime , MaxRowsAtCompileTime = BlockSparseMatrixT::MaxRowsAtCompileTime
}
 
typedef Ref< typename BlockSparseMatrixT::BlockScalar > Scalar
 
typedef Ref< typename BlockSparseMatrixT::BlockRealScalar > RealScalar
 
typedef BlockSparseMatrixT::Index Index
 
typedef BlockSparseMatrixT Nested
 
enum  
 
typedef Scalar value_type
 
typedef internal::packet_traits< Scalar >::type PacketScalar
 
typedef internal::traits< BlockSparseMatrixT >::StorageKind StorageKind
 
typedef internal::traits< BlockSparseMatrixT >::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< BlockSparseMatrixT > TransposeReturnType
 
typedef internal::add_const< Transpose< constDerived > >::type ConstTransposeReturnType
 
typedef SparseMatrix< Scalar, Flags &RowMajorBit ? RowMajor :ColMajor, StorageIndexPlainObject
 
typedef internal::conditional< _HasDirectAccess, constScalar &, Scalar >::type CoeffReturnType
 
typedef CwiseNullaryOp< internal::scalar_constant_op< Scalar >, Matrix< Scalar, Dynamic, Dynamic > > ConstantReturnType
 
typedef Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTimeDenseMatrixType
 
typedef Matrix< Scalar, EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime), EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime)> SquareMatrixType
 
typedef EigenBase< BlockSparseMatrixT > Base
 
typedef Block< BlockSparseMatrixT, IsRowMajor?1:Dynamic, IsRowMajor?Dynamic:1, true > InnerVectorReturnType
 
typedef Block< const BlockSparseMatrixT, IsRowMajor?1:Dynamic, IsRowMajor?Dynamic:1, true > ConstInnerVectorReturnType
 
typedef Block< BlockSparseMatrixT, Dynamic, Dynamic, true > InnerVectorsReturnType
 
typedef Block< const BlockSparseMatrixT, Dynamic, Dynamic, true > ConstInnerVectorsReturnType
 

Public Member Functions

 BlockSparseMatrixView (const BlockSparseMatrixT &spblockmat)
 
Index outerSize () const
 
Index cols () const
 
Index rows () const
 
Scalar coeff (Index row, Index col)
 
Scalar coeffRef (Index row, Index col)
 
const BlockSparseMatrixT & derived () const
 
BlockSparseMatrixT & derived ()
 
BlockSparseMatrixT & const_cast_derived () const
 
Index size () const
 
bool isVector () const
 
Index innerSize () const
 
bool isRValue () const
 
BlockSparseMatrixT & markAsRValue ()
 
BlockSparseMatrixT & operator+= (const SparseMatrixBase< OtherDerived > &other)
 
BlockSparseMatrixT & operator+= (const DiagonalBase< OtherDerived > &other)
 
BlockSparseMatrixT & operator+= (const EigenBase< OtherDerived > &other)
 
EIGEN_STRONG_INLINE BlockSparseMatrixT & operator+= (const SparseMatrixBase< OtherDerived > &other)
 
BlockSparseMatrixT & operator-= (const SparseMatrixBase< OtherDerived > &other)
 
BlockSparseMatrixT & operator-= (const DiagonalBase< OtherDerived > &other)
 
BlockSparseMatrixT & operator-= (const EigenBase< OtherDerived > &other)
 
EIGEN_STRONG_INLINE BlockSparseMatrixT & operator-= (const SparseMatrixBase< OtherDerived > &other)
 
BlockSparseMatrixT & operator*= (const Scalar &other)
 
BlockSparseMatrixT & operator*= (const SparseMatrixBase< OtherDerived > &other)
 
BlockSparseMatrixT & operator/= (const Scalar &other)
 
EIGEN_STRONG_INLINE const CwiseProductDenseReturnType< OtherDerived >::Type cwiseProduct (const MatrixBase< OtherDerived > &other) const
 
EIGEN_STRONG_INLINE const SparseMatrixBase< BlockSparseMatrixT >::template CwiseProductDenseReturnType< OtherDerived >::Type cwiseProduct (const MatrixBase< OtherDerived > &other) const
 
const Product< BlockSparseMatrixT, OtherDerived > operator* (const DiagonalBase< OtherDerived > &other) const
 
const Product< BlockSparseMatrixT, OtherDerived, AliasFreeProductoperator* (const SparseMatrixBase< OtherDerived > &other) const
 
const Product< BlockSparseMatrixT, OtherDerived > operator* (const MatrixBase< OtherDerived > &other) const
 
SparseSymmetricPermutationProduct< BlockSparseMatrixT, Upper|LowertwistedBy (const PermutationMatrix< Dynamic, Dynamic, StorageIndex > &perm) const
 
const TriangularView< const BlockSparseMatrixT, Mode > triangularView () const
 
ConstSelfAdjointViewReturnType< UpLo >::Type selfadjointView () const
 
SelfAdjointViewReturnType< UpLo >::Type selfadjointView ()
 
SparseMatrixBase< BlockSparseMatrixT >::template ConstSelfAdjointViewReturnType< UpLo >::Type selfadjointView () const
 
SparseMatrixBase< BlockSparseMatrixT >::template SelfAdjointViewReturnType< UpLo >::Type selfadjointView ()
 
Scalar dot (const MatrixBase< OtherDerived > &other) const
 
Scalar dot (const SparseMatrixBase< OtherDerived > &other) const
 
internal::traits< BlockSparseMatrixT >::Scalar dot (const MatrixBase< OtherDerived > &other) const
 
internal::traits< BlockSparseMatrixT >::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< BlockSparseMatrixT >::type eval () const
 
Scalar sum () const
 
const SparseView< BlockSparseMatrixT > pruned (const Scalar &reference=Scalar(0), const RealScalar &epsilon=NumTraits< Scalar >::dummy_precision()) const
 
EIGEN_DEVICE_FUNC const Derived & const_derived () 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

BlockSparseMatrixT & assign (const OtherDerived &other)
 
void assignGeneric (const OtherDerived &other)
 

Static Protected Member Functions

static StorageIndex convert_index (const Index idx)
 

Protected Attributes

const BlockSparseMatrixT & m_spblockmat
 
bool m_isRValue
 

Private Member Functions

void evalTo (Dest &) const
 

Detailed Description

template<typename BlockSparseMatrixT>
class Eigen::BlockSparseMatrixView< BlockSparseMatrixT >

Member Typedef Documentation

◆ AdjointReturnType

typedef internal::conditional<NumTraits<Scalar>::IsComplex,CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>,Eigen::Transpose<constDerived>>,Transpose<constDerived>>::type Eigen::SparseMatrixBase< BlockSparseMatrixT >::AdjointReturnType
inherited

◆ Base

typedef EigenBase<BlockSparseMatrixT > Eigen::SparseMatrixBase< BlockSparseMatrixT >::Base
inherited

◆ CoeffReturnType

typedef internal::conditional<_HasDirectAccess,constScalar&,Scalar>::type Eigen::SparseMatrixBase< BlockSparseMatrixT >::CoeffReturnType
inherited

◆ ConstantReturnType

typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,Matrix<Scalar,Dynamic,Dynamic> > Eigen::SparseMatrixBase< BlockSparseMatrixT >::ConstantReturnType
inherited

◆ ConstInnerVectorReturnType

typedef Block<const BlockSparseMatrixT ,IsRowMajor?1:Dynamic,IsRowMajor?Dynamic:1,true> Eigen::SparseMatrixBase< BlockSparseMatrixT >::ConstInnerVectorReturnType
inherited

◆ ConstInnerVectorsReturnType

typedef Block<const BlockSparseMatrixT ,Dynamic,Dynamic,true> Eigen::SparseMatrixBase< BlockSparseMatrixT >::ConstInnerVectorsReturnType
inherited

◆ ConstTransposeReturnType

typedef internal::add_const<Transpose<constDerived>>::type Eigen::SparseMatrixBase< BlockSparseMatrixT >::ConstTransposeReturnType
inherited

◆ DenseMatrixType

typedef Matrix<Scalar,RowsAtCompileTime,ColsAtCompileTime> Eigen::SparseMatrixBase< BlockSparseMatrixT >::DenseMatrixType
inherited

type of the equivalent dense matrix

◆ Index

template<typename BlockSparseMatrixT >
typedef BlockSparseMatrixT::Index Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::Index

◆ IndexVector

typedef Matrix<StorageIndex,Dynamic,1> Eigen::SparseMatrixBase< BlockSparseMatrixT >::IndexVector
inherited

◆ InnerVectorReturnType

typedef Block<BlockSparseMatrixT ,IsRowMajor?1:Dynamic,IsRowMajor?Dynamic:1,true> Eigen::SparseMatrixBase< BlockSparseMatrixT >::InnerVectorReturnType
inherited

◆ InnerVectorsReturnType

typedef Block<BlockSparseMatrixT ,Dynamic,Dynamic,true> Eigen::SparseMatrixBase< BlockSparseMatrixT >::InnerVectorsReturnType
inherited

◆ Nested

template<typename BlockSparseMatrixT >
typedef BlockSparseMatrixT Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::Nested

◆ PacketReturnType

typedef internal::add_const_on_value_type_if_arithmetic<typenameinternal::packet_traits<Scalar>::type>::type Eigen::SparseMatrixBase< BlockSparseMatrixT >::PacketReturnType
inherited

◆ PacketScalar

typedef internal::packet_traits<Scalar>::type Eigen::SparseMatrixBase< BlockSparseMatrixT >::PacketScalar
inherited

◆ PlainObject

typedef SparseMatrix<Scalar, Flags&RowMajorBit ? RowMajor : ColMajor, StorageIndex> Eigen::SparseMatrixBase< BlockSparseMatrixT >::PlainObject
inherited

◆ RealScalar

template<typename BlockSparseMatrixT >
typedef Ref<typename BlockSparseMatrixT::BlockRealScalar> Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::RealScalar

◆ Scalar

template<typename BlockSparseMatrixT >
typedef Ref<typename BlockSparseMatrixT::BlockScalar> Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::Scalar

◆ ScalarVector

typedef Matrix<Scalar,Dynamic,1> Eigen::SparseMatrixBase< BlockSparseMatrixT >::ScalarVector
inherited

◆ SquareMatrixType

type of the equivalent square matrix

◆ StorageBaseType

typedef SparseMatrixBase Eigen::SparseMatrixBase< BlockSparseMatrixT >::StorageBaseType
inherited

◆ StorageIndex

typedef internal::traits<BlockSparseMatrixT >::StorageIndex Eigen::SparseMatrixBase< BlockSparseMatrixT >::StorageIndex
inherited

The integer type used to store indices within a SparseMatrix. For a SparseMatrix<Scalar,Options,IndexType> it an alias of the third template parameter IndexType.

◆ StorageKind

typedef internal::traits<BlockSparseMatrixT >::StorageKind Eigen::SparseMatrixBase< BlockSparseMatrixT >::StorageKind
inherited

◆ TransposeReturnType

typedef Transpose<BlockSparseMatrixT > Eigen::SparseMatrixBase< BlockSparseMatrixT >::TransposeReturnType
inherited

◆ value_type

typedef Scalar Eigen::SparseMatrixBase< BlockSparseMatrixT >::value_type
inherited

The numeric type of the expression' coefficients, e.g. float, double, int or std::complex<float>, etc.

It is an alias for the Scalar type

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited
57 {
58
59 RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,
65 ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,
72 SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,
73 internal::traits<Derived>::ColsAtCompileTime>::ret),
78 MaxRowsAtCompileTime = RowsAtCompileTime,
79 MaxColsAtCompileTime = ColsAtCompileTime,
80
81 MaxSizeAtCompileTime = (internal::size_at_compile_time<MaxRowsAtCompileTime,
82 MaxColsAtCompileTime>::ret),
83
84 IsVectorAtCompileTime = RowsAtCompileTime == 1 || ColsAtCompileTime == 1,
90 Flags = internal::traits<Derived>::Flags,
96
97 InnerSizeAtCompileTime = int(IsVectorAtCompileTime) ? int(SizeAtCompileTime)
98 : int(IsRowMajor) ? int(ColsAtCompileTime) : int(RowsAtCompileTime),
99
100 #ifndef EIGEN_PARSED_BY_DOXYGEN
101 _HasDirectAccess = (int(Flags)&DirectAccessBit) ? 1 : 0 // workaround sunCC
102 #endif
103 };
@ _HasDirectAccess
Definition SparseMatrixBase.h:101
@ InnerSizeAtCompileTime
Definition SparseMatrixBase.h:97
@ IsVectorAtCompileTime
Definition SparseMatrixBase.h:84
@ ColsAtCompileTime
Definition SparseMatrixBase.h:65
@ Flags
Definition SparseMatrixBase.h:90
@ RowsAtCompileTime
Definition SparseMatrixBase.h:59
@ SizeAtCompileTime
Definition SparseMatrixBase.h:72
@ IsRowMajor
Definition SparseMatrixBase.h:95
const unsigned int DirectAccessBit
Definition Constants.h:150
const unsigned int RowMajorBit
Definition Constants.h:61

◆ anonymous enum

template<typename BlockSparseMatrixT >
anonymous enum
Enumerator
Flags 
Options 
RowsAtCompileTime 
ColsAtCompileTime 
MaxColsAtCompileTime 
MaxRowsAtCompileTime 
109 {
110 Flags = BlockSparseMatrixT::Options,
111 Options = BlockSparseMatrixT::Options,
112 RowsAtCompileTime = BlockSparseMatrixT::RowsAtCompileTime,
113 ColsAtCompileTime = BlockSparseMatrixT::ColsAtCompileTime,
114 MaxColsAtCompileTime = BlockSparseMatrixT::MaxColsAtCompileTime,
115 MaxRowsAtCompileTime = BlockSparseMatrixT::MaxRowsAtCompileTime
116 };
@ MaxColsAtCompileTime
Definition BlockSparseMatrix.h:114
@ Flags
Definition BlockSparseMatrix.h:110
@ RowsAtCompileTime
Definition BlockSparseMatrix.h:112
@ MaxRowsAtCompileTime
Definition BlockSparseMatrix.h:115
@ ColsAtCompileTime
Definition BlockSparseMatrix.h:113
@ Options
Definition BlockSparseMatrix.h:111

Constructor & Destructor Documentation

◆ BlockSparseMatrixView()

template<typename BlockSparseMatrixT >
Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::BlockSparseMatrixView ( const BlockSparseMatrixT &  spblockmat)
inline
119 : m_spblockmat(spblockmat)
120 {}
const BlockSparseMatrixT & m_spblockmat
Definition BlockSparseMatrix.h:153

Member Function Documentation

◆ addTo()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::addTo ( Dest &  dst) const
inlineinherited
78 {
79 // This is the default implementation,
80 // derived class can reimplement it in a more optimized way.
81 typename Dest::PlainObject res(rows(),cols());
82 evalTo(res);
83 dst += res;
84 }
EIGEN_DEVICE_FUNC Index cols() const
Definition EigenBase.h:62
EIGEN_DEVICE_FUNC Index rows() const
Definition EigenBase.h:59
EIGEN_DEVICE_FUNC void evalTo(Dest &dst) const
Definition EigenBase.h:71

◆ adjoint()

const AdjointReturnType Eigen::SparseMatrixBase< BlockSparseMatrixT >::adjoint ( ) const
inlineinherited
351{ return AdjointReturnType(transpose()); }
internal::conditional< NumTraits< Scalar >::IsComplex, CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, Eigen::Transpose< constDerived > >, Transpose< constDerived > >::type AdjointReturnType
Definition SparseMatrixBase.h:109
TransposeReturnType transpose()
Definition SparseMatrixBase.h:349

◆ applyThisOnTheLeft()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::applyThisOnTheLeft ( Dest &  dst) const
inlineinherited
110 {
111 // This is the default implementation,
112 // derived class can reimplement it in a more optimized way.
113 dst = this->derived() * dst;
114 }
EIGEN_DEVICE_FUNC Derived & derived()
Definition EigenBase.h:45

References Eigen::EigenBase< Derived >::derived().

+ Here is the call graph for this function:

◆ applyThisOnTheRight()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::applyThisOnTheRight ( Dest &  dst) const
inlineinherited
101 {
102 // This is the default implementation,
103 // derived class can reimplement it in a more optimized way.
104 dst = dst * this->derived();
105 }

References Eigen::EigenBase< Derived >::derived().

+ Here is the call graph for this function:

◆ assign()

BlockSparseMatrixT & Eigen::SparseMatrixBase< BlockSparseMatrixT >::assign ( const OtherDerived &  other)
inlineprotectedinherited

◆ assignGeneric()

void Eigen::SparseMatrixBase< BlockSparseMatrixT >::assignGeneric ( const OtherDerived &  other)
inlineprotectedinherited

◆ blueNorm()

NumTraits< typenameinternal::traits< BlockSparseMatrixT >::Scalar >::Real Eigen::SparseMatrixBase< BlockSparseMatrixT >::blueNorm
inlineinherited
93{
94 return internal::blueNorm_impl(*this);
95}

◆ coeff()

template<typename BlockSparseMatrixT >
Scalar Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::coeff ( Index  row,
Index  col 
)
inline
135 {
136 return m_spblockmat.coeff(row, col);
137 }
EIGEN_DEVICE_FUNC RowXpr row(Index i)
This is the const version of row(). *‍/.
Definition BlockMethods.h:859
EIGEN_DEVICE_FUNC ColXpr col(Index i)
This is the const version of col().
Definition BlockMethods.h:838

References col(), Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::m_spblockmat, and row().

+ Here is the call graph for this function:

◆ coeffRef()

template<typename BlockSparseMatrixT >
Scalar Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::coeffRef ( Index  row,
Index  col 
)
inline
139 {
140 return m_spblockmat.coeffRef(row, col);
141 }

References col(), Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::m_spblockmat, and row().

+ Here is the call graph for this function:

◆ cols()

template<typename BlockSparseMatrixT >
Index Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::cols ( ) const
inline
127 {
128 return m_spblockmat.blockCols();
129 }

References Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::m_spblockmat.

Referenced by Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::outerSize().

+ Here is the caller graph for this function:

◆ const_cast_derived()

BlockSparseMatrixT & Eigen::SparseMatrixBase< BlockSparseMatrixT >::const_cast_derived ( ) const
inlineinherited
141 { return *static_cast<Derived*>(const_cast<SparseMatrixBase*>(this)); }
SparseMatrixBase()
Definition SparseMatrixBase.h:192

◆ const_derived()

template<typename Derived >
EIGEN_DEVICE_FUNC const Derived & Eigen::EigenBase< Derived >::const_derived ( ) const
inlineinherited
55 { return *static_cast<const Derived*>(this); }

◆ convert_index()

static StorageIndex Eigen::SparseMatrixBase< BlockSparseMatrixT >::convert_index ( const Index  idx)
inlinestaticprotectedinherited
396 {
397 return internal::convert_index<StorageIndex>(idx);
398 }

◆ cwiseProduct() [1/2]

EIGEN_STRONG_INLINE const SparseMatrixBase< BlockSparseMatrixT >::template CwiseProductDenseReturnType< OtherDerived >::Type Eigen::SparseMatrixBase< BlockSparseMatrixT >::cwiseProduct ( const MatrixBase< OtherDerived > &  other) const
inherited
692{
693 return typename CwiseProductDenseReturnType<OtherDerived>::Type(derived(), other.derived());
694}
const BlockSparseMatrixT & derived() const
Definition SparseMatrixBase.h:138

◆ cwiseProduct() [2/2]

EIGEN_STRONG_INLINE const CwiseProductDenseReturnType< OtherDerived >::Type Eigen::SparseMatrixBase< BlockSparseMatrixT >::cwiseProduct ( const MatrixBase< OtherDerived > &  other) const
inherited

◆ derived() [1/2]

BlockSparseMatrixT & Eigen::SparseMatrixBase< BlockSparseMatrixT >::derived ( )
inlineinherited
139{ return *static_cast<Derived*>(this); }

◆ derived() [2/2]

const BlockSparseMatrixT & Eigen::SparseMatrixBase< BlockSparseMatrixT >::derived ( ) const
inlineinherited
138{ return *static_cast<const Derived*>(this); }

◆ dot() [1/4]

internal::traits< BlockSparseMatrixT >::Scalar Eigen::SparseMatrixBase< BlockSparseMatrixT >::dot ( const MatrixBase< OtherDerived > &  other) const
inherited
19{
22 EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived)
23 EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename OtherDerived::Scalar>::value),
24 YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
25
26 eigen_assert(size() == other.size());
27 eigen_assert(other.size()>0 && "you are using a non initialized vector");
28
29 internal::evaluator<Derived> thisEval(derived());
30 typename internal::evaluator<Derived>::InnerIterator i(thisEval, 0);
31 Scalar res(0);
32 while (i)
33 {
34 res += numext::conj(i.value()) * other.coeff(i.index());
35 ++i;
36 }
37 return res;
38}
#define eigen_assert(x)
Definition Macros.h:579
#define EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(TYPE0, TYPE1)
Definition StaticAssert.h:164
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
Definition StaticAssert.h:139
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition StaticAssert.h:124
Index size() const
Definition SparseMatrixBase.h:176
internal::traits< BlockSparseMatrixT >::Scalar Scalar
Definition SparseMatrixBase.h:31

◆ dot() [2/4]

Scalar Eigen::SparseMatrixBase< BlockSparseMatrixT >::dot ( const MatrixBase< OtherDerived > &  other) const
inherited

◆ dot() [3/4]

internal::traits< BlockSparseMatrixT >::Scalar Eigen::SparseMatrixBase< BlockSparseMatrixT >::dot ( const SparseMatrixBase< OtherDerived > &  other) const
inherited
44{
47 EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived)
48 EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename OtherDerived::Scalar>::value),
49 YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
50
51 eigen_assert(size() == other.size());
52
53 internal::evaluator<Derived> thisEval(derived());
54 typename internal::evaluator<Derived>::InnerIterator i(thisEval, 0);
55
56 internal::evaluator<OtherDerived> otherEval(other.derived());
57 typename internal::evaluator<OtherDerived>::InnerIterator j(otherEval, 0);
58
59 Scalar res(0);
60 while (i && j)
61 {
62 if (i.index()==j.index())
63 {
64 res += numext::conj(i.value()) * j.value();
65 ++i; ++j;
66 }
67 else if (i.index()<j.index())
68 ++i;
69 else
70 ++j;
71 }
72 return res;
73}

◆ dot() [4/4]

Scalar Eigen::SparseMatrixBase< BlockSparseMatrixT >::dot ( const SparseMatrixBase< OtherDerived > &  other) const
inherited

◆ eval()

const internal::eval< BlockSparseMatrixT >::type Eigen::SparseMatrixBase< BlockSparseMatrixT >::eval ( ) const
inlineinherited
Returns
the matrix or vector obtained by evaluating this expression.

Notice that in the case of a plain matrix or vector (not an expression) this function just returns a const reference, in order to avoid a useless copy.

385 { return typename internal::eval<Derived>::type(derived()); }

◆ evalTo()

void Eigen::SparseMatrixBase< BlockSparseMatrixT >::evalTo ( Dest &  ) const
privateinherited

◆ innerSize()

Index Eigen::SparseMatrixBase< BlockSparseMatrixT >::innerSize ( ) const
inlineinherited
Returns
the size of the inner dimension according to the storage order, i.e., the number of rows for a columns major matrix, and the number of cols otherwise
187{ return (int(Flags)&RowMajorBit) ? this->cols() : this->rows(); }
Index rows() const
Definition SparseMatrixBase.h:171
Index cols() const
Definition SparseMatrixBase.h:173

◆ innerVector() [1/2]

SparseMatrixBase< BlockSparseMatrixT >::InnerVectorReturnType Eigen::SparseMatrixBase< BlockSparseMatrixT >::innerVector ( Index  outer)
inherited
Returns
the outer -th column (resp. row) of the matrix *this if *this is col-major (resp. row-major).
334{ return InnerVectorReturnType(derived(), outer); }
Block< BlockSparseMatrixT, IsRowMajor?1:Dynamic, IsRowMajor?Dynamic:1, true > InnerVectorReturnType
Definition SparseMatrixBase.h:354

◆ innerVector() [2/2]

const SparseMatrixBase< BlockSparseMatrixT >::ConstInnerVectorReturnType Eigen::SparseMatrixBase< BlockSparseMatrixT >::innerVector ( Index  outer) const
inherited
Returns
the outer -th column (resp. row) of the matrix *this if *this is col-major (resp. row-major). Read-only.
341{ return ConstInnerVectorReturnType(derived(), outer); }
Block< const BlockSparseMatrixT, IsRowMajor?1:Dynamic, IsRowMajor?Dynamic:1, true > ConstInnerVectorReturnType
Definition SparseMatrixBase.h:355

◆ innerVectors() [1/2]

SparseMatrixBase< BlockSparseMatrixT >::InnerVectorsReturnType Eigen::SparseMatrixBase< BlockSparseMatrixT >::innerVectors ( Index  outerStart,
Index  outerSize 
)
inherited
Returns
the outer -th column (resp. row) of the matrix *this if *this is col-major (resp. row-major).
349{
350 return Block<Derived,Dynamic,Dynamic,true>(derived(),
351 IsRowMajor ? outerStart : 0, IsRowMajor ? 0 : outerStart,
353
354}
Index outerSize() const
Definition SparseMatrixBase.h:184

◆ innerVectors() [2/2]

const SparseMatrixBase< BlockSparseMatrixT >::ConstInnerVectorsReturnType Eigen::SparseMatrixBase< BlockSparseMatrixT >::innerVectors ( Index  outerStart,
Index  outerSize 
) const
inherited
Returns
the outer -th column (resp. row) of the matrix *this if *this is col-major (resp. row-major). Read-only.
362{
363 return Block<const Derived,Dynamic,Dynamic,true>(derived(),
364 IsRowMajor ? outerStart : 0, IsRowMajor ? 0 : outerStart,
366
367}

◆ isApprox() [1/2]

bool Eigen::SparseMatrixBase< BlockSparseMatrixT >::isApprox ( const MatrixBase< OtherDerived > &  other,
const RealScalar prec = NumTraits<Scalar>::dummy_precision() 
) const
inlineinherited
377 { return toDense().isApprox(other,prec); }
DenseMatrixType toDense() const
Definition SparseMatrixBase.h:365

◆ isApprox() [2/2]

bool Eigen::SparseMatrixBase< BlockSparseMatrixT >::isApprox ( const SparseMatrixBase< OtherDerived > &  other,
const RealScalar prec = NumTraits<Scalar>::dummy_precision() 
) const
inherited
18{
19 const typename internal::nested_eval<Derived,2,PlainObject>::type actualA(derived());
20 typename internal::conditional<bool(IsRowMajor)==bool(OtherDerived::IsRowMajor),
21 const typename internal::nested_eval<OtherDerived,2,PlainObject>::type,
22 const PlainObject>::type actualB(other.derived());
23
24 return (actualA - actualB).squaredNorm() <= prec * prec * numext::mini(actualA.squaredNorm(), actualB.squaredNorm());
25}
SparseMatrix< Scalar, Flags &RowMajorBit ? RowMajor :ColMajor, StorageIndex > PlainObject
Definition SparseMatrixBase.h:114

◆ isRValue()

bool Eigen::SparseMatrixBase< BlockSparseMatrixT >::isRValue ( ) const
inlineinherited
189{ return m_isRValue; }
bool m_isRValue
Definition SparseMatrixBase.h:394

◆ isVector()

bool Eigen::SparseMatrixBase< BlockSparseMatrixT >::isVector ( ) const
inlineinherited
Returns
true if either the number of rows or the number of columns is equal to 1. In other words, this function returns
rows()==1 || cols()==1
Index rows() const
Definition BlockSparseMatrix.h:130
Index cols() const
Definition BlockSparseMatrix.h:126
See also
rows(), cols(), IsVectorAtCompileTime.
181{ return rows()==1 || cols()==1; }

◆ markAsRValue()

BlockSparseMatrixT & Eigen::SparseMatrixBase< BlockSparseMatrixT >::markAsRValue ( )
inlineinherited
190{ m_isRValue = true; return derived(); }

◆ norm()

NumTraits< typenameinternal::traits< BlockSparseMatrixT >::Scalar >::Real Eigen::SparseMatrixBase< BlockSparseMatrixT >::norm
inlineinherited
85{
86 using std::sqrt;
87 return sqrt(squaredNorm());
88}
EIGEN_DEVICE_FUNC const SqrtReturnType sqrt() const
Definition ArrayCwiseUnaryOps.h:152
RealScalar squaredNorm() const
Definition SparseDot.h:77

◆ operator*() [1/3]

const Product< BlockSparseMatrixT , OtherDerived > Eigen::SparseMatrixBase< BlockSparseMatrixT >::operator* ( const DiagonalBase< OtherDerived > &  other) const
inlineinherited
298 { return Product<Derived,OtherDerived>(derived(), other.derived()); }

◆ operator*() [2/3]

const Product< BlockSparseMatrixT , OtherDerived > Eigen::SparseMatrixBase< BlockSparseMatrixT >::operator* ( const MatrixBase< OtherDerived > &  other) const
inlineinherited
315 { return Product<Derived,OtherDerived>(derived(), other.derived()); }

◆ operator*() [3/3]

const Product< BlockSparseMatrixT , OtherDerived, AliasFreeProduct > Eigen::SparseMatrixBase< BlockSparseMatrixT >::operator* ( const SparseMatrixBase< OtherDerived > &  other) const
inlineinherited
Returns
an expression of the product of two sparse matrices. By default a conservative product preserving the symbolic non zeros is performed. The automatic pruning of the small values can be achieved by calling the pruned() function in which case a totally different product algorithm is employed:
C = (A*B).pruned(); // supress numerical zeros (exact)
C = (A*B).pruned(ref);
C = (A*B).pruned(ref,epsilon);
const SparseView< BlockSparseMatrixT > pruned(const Scalar &reference=Scalar(0), const RealScalar &epsilon=NumTraits< Scalar >::dummy_precision()) const
Definition SparseView.h:245
where ref is a meaningful non zero reference value.
30{
31 return Product<Derived,OtherDerived,AliasFreeProduct>(derived(), other.derived());
32}

◆ operator*=() [1/2]

EIGEN_STRONG_INLINE BlockSparseMatrixT & Eigen::SparseMatrixBase< BlockSparseMatrixT >::operator*= ( const Scalar other)
inherited
125{
126 typedef typename internal::evaluator<Derived>::InnerIterator EvalIterator;
127 internal::evaluator<Derived> thisEval(derived());
128 for (Index j=0; j<outerSize(); ++j)
129 for (EvalIterator i(thisEval,j); i; ++i)
130 i.valueRef() *= other;
131 return derived();
132}

◆ operator*=() [2/2]

BlockSparseMatrixT & Eigen::SparseMatrixBase< BlockSparseMatrixT >::operator*= ( const SparseMatrixBase< OtherDerived > &  other)
inherited

◆ operator+=() [1/4]

BlockSparseMatrixT & Eigen::SparseMatrixBase< BlockSparseMatrixT >::operator+= ( const DiagonalBase< OtherDerived > &  other)
inherited
675{
676 call_assignment_no_alias(derived(), other.derived(), internal::add_assign_op<Scalar,typename OtherDerived::Scalar>());
677 return derived();
678}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment_no_alias(Dst &dst, const Src &src, const Func &func)
Definition AssignEvaluator.h:819

◆ operator+=() [2/4]

BlockSparseMatrixT & Eigen::SparseMatrixBase< BlockSparseMatrixT >::operator+= ( const EigenBase< OtherDerived > &  other)
inherited
643{
644 call_assignment(derived(), other.derived(), internal::add_assign_op<Scalar,typename OtherDerived::Scalar>());
645 return derived();
646}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment(Dst &dst, const Src &src)
Definition AssignEvaluator.h:780

◆ operator+=() [3/4]

EIGEN_STRONG_INLINE BlockSparseMatrixT & Eigen::SparseMatrixBase< BlockSparseMatrixT >::operator+= ( const SparseMatrixBase< OtherDerived > &  other)
inherited
668{
669 return derived() = derived() + other.derived();
670}

◆ operator+=() [4/4]

BlockSparseMatrixT & Eigen::SparseMatrixBase< BlockSparseMatrixT >::operator+= ( const SparseMatrixBase< OtherDerived > &  other)
inherited

◆ operator-=() [1/4]

BlockSparseMatrixT & Eigen::SparseMatrixBase< BlockSparseMatrixT >::operator-= ( const DiagonalBase< OtherDerived > &  other)
inherited
683{
684 call_assignment_no_alias(derived(), other.derived(), internal::sub_assign_op<Scalar,typename OtherDerived::Scalar>());
685 return derived();
686}

◆ operator-=() [2/4]

BlockSparseMatrixT & Eigen::SparseMatrixBase< BlockSparseMatrixT >::operator-= ( const EigenBase< OtherDerived > &  other)
inherited
651{
652 call_assignment(derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());
653 return derived();
654}

◆ operator-=() [3/4]

EIGEN_STRONG_INLINE BlockSparseMatrixT & Eigen::SparseMatrixBase< BlockSparseMatrixT >::operator-= ( const SparseMatrixBase< OtherDerived > &  other)
inherited
660{
661 return derived() = derived() - other.derived();
662}

◆ operator-=() [4/4]

BlockSparseMatrixT & Eigen::SparseMatrixBase< BlockSparseMatrixT >::operator-= ( const SparseMatrixBase< OtherDerived > &  other)
inherited

◆ operator/=()

EIGEN_STRONG_INLINE BlockSparseMatrixT & Eigen::SparseMatrixBase< BlockSparseMatrixT >::operator/= ( const Scalar other)
inherited
137{
138 typedef typename internal::evaluator<Derived>::InnerIterator EvalIterator;
139 internal::evaluator<Derived> thisEval(derived());
140 for (Index j=0; j<outerSize(); ++j)
141 for (EvalIterator i(thisEval,j); i; ++i)
142 i.valueRef() /= other;
143 return derived();
144}

◆ outerSize()

template<typename BlockSparseMatrixT >
Index Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::outerSize ( ) const
inline
123 {
124 return (Flags&RowMajorBit) == 1 ? this->rows() : this->cols();
125 }

References Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::cols(), Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::Flags, Eigen::RowMajorBit, and Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::rows().

+ Here is the call graph for this function:

◆ pruned()

const SparseView< BlockSparseMatrixT > Eigen::SparseMatrixBase< BlockSparseMatrixT >::pruned ( const Scalar reference = Scalar(0),
const RealScalar epsilon = NumTraits<Scalar>::dummy_precision() 
) const
inlineinherited
Returns
an expression of *this with values smaller than reference * epsilon removed.

This method is typically used in conjunction with the product of two sparse matrices to automatically prune the smallest values as follows:

C = (A*B).pruned(); // suppress numerical zeros (exact)
C = (A*B).pruned(ref);
C = (A*B).pruned(ref,epsilon);

where ref is a meaningful non zero reference value.

247{
248 return SparseView<Derived>(derived(), reference, epsilon);
249}

◆ rows()

template<typename BlockSparseMatrixT >
Index Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::rows ( ) const
inline
131 {
132 return m_spblockmat.blockRows();
133 }

References Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::m_spblockmat.

Referenced by Eigen::BlockSparseMatrixView< BlockSparseMatrixT >::outerSize().

+ Here is the caller graph for this function:

◆ selfadjointView() [1/4]

SelfAdjointViewReturnType< UpLo >::Type Eigen::SparseMatrixBase< BlockSparseMatrixT >::selfadjointView ( )
inlineinherited

◆ selfadjointView() [2/4]

SparseMatrixBase< BlockSparseMatrixT >::template SelfAdjointViewReturnType< UpLo >::Type Eigen::SparseMatrixBase< BlockSparseMatrixT >::selfadjointView ( )
inherited
183{
184 return SparseSelfAdjointView<Derived, UpLo>(derived());
185}

◆ selfadjointView() [3/4]

ConstSelfAdjointViewReturnType< UpLo >::Type Eigen::SparseMatrixBase< BlockSparseMatrixT >::selfadjointView ( ) const
inlineinherited

◆ selfadjointView() [4/4]

SparseMatrixBase< BlockSparseMatrixT >::template ConstSelfAdjointViewReturnType< UpLo >::Type Eigen::SparseMatrixBase< BlockSparseMatrixT >::selfadjointView ( ) const
inherited
176{
177 return SparseSelfAdjointView<const Derived, UpLo>(derived());
178}

◆ size()

Index Eigen::SparseMatrixBase< BlockSparseMatrixT >::size ( ) const
inlineinherited
Returns
the number of coefficients, which is rows()*cols().
See also
rows(), cols().
176{ return rows() * cols(); }

◆ squaredNorm()

NumTraits< typenameinternal::traits< BlockSparseMatrixT >::Scalar >::Real Eigen::SparseMatrixBase< BlockSparseMatrixT >::squaredNorm
inlineinherited
78{
79 return numext::real((*this).cwiseAbs2().sum());
80}

◆ subTo()

template<typename Derived >
template<typename Dest >
EIGEN_DEVICE_FUNC void Eigen::EigenBase< Derived >::subTo ( Dest &  dst) const
inlineinherited
90 {
91 // This is the default implementation,
92 // derived class can reimplement it in a more optimized way.
93 typename Dest::PlainObject res(rows(),cols());
94 evalTo(res);
95 dst -= res;
96 }

References Eigen::EigenBase< Derived >::cols(), Eigen::EigenBase< Derived >::evalTo(), and Eigen::EigenBase< Derived >::rows().

+ Here is the call graph for this function:

◆ sum()

internal::traits< BlockSparseMatrixT >::Scalar Eigen::SparseMatrixBase< BlockSparseMatrixT >::sum
inherited
18{
19 eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix");
20 Scalar res(0);
21 internal::evaluator<Derived> thisEval(derived());
22 for (Index j=0; j<outerSize(); ++j)
23 for (typename internal::evaluator<Derived>::InnerIterator iter(thisEval,j); iter; ++iter)
24 res += iter.value();
25 return res;
26}

◆ toDense()

DenseMatrixType Eigen::SparseMatrixBase< BlockSparseMatrixT >::toDense ( ) const
inlineinherited
366 {
367 return DenseMatrixType(derived());
368 }
Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime > DenseMatrixType
Definition SparseMatrixBase.h:133

◆ transpose() [1/2]

TransposeReturnType Eigen::SparseMatrixBase< BlockSparseMatrixT >::transpose ( )
inlineinherited
349{ return TransposeReturnType(derived()); }
Transpose< BlockSparseMatrixT > TransposeReturnType
Definition SparseMatrixBase.h:110

◆ transpose() [2/2]

const ConstTransposeReturnType Eigen::SparseMatrixBase< BlockSparseMatrixT >::transpose ( ) const
inlineinherited
internal::add_const< Transpose< constDerived > >::type ConstTransposeReturnType
Definition SparseMatrixBase.h:111

◆ triangularView()

const TriangularView< const BlockSparseMatrixT , Mode > Eigen::SparseMatrixBase< BlockSparseMatrixT >::triangularView
inlineinherited
183{
184 return TriangularView<const Derived, Mode>(derived());
185}

◆ twistedBy()

SparseSymmetricPermutationProduct< BlockSparseMatrixT , Upper|Lower > Eigen::SparseMatrixBase< BlockSparseMatrixT >::twistedBy ( const PermutationMatrix< Dynamic, Dynamic, StorageIndex > &  perm) const
inlineinherited
Returns
an expression of P H P^-1 where H is the matrix represented by *this
325 {
326 return SparseSymmetricPermutationProduct<Derived,Upper|Lower>(derived(), perm);
327 }

Member Data Documentation

◆ m_isRValue

bool Eigen::SparseMatrixBase< BlockSparseMatrixT >::m_isRValue
protectedinherited

◆ m_spblockmat


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