Eigen::SparseMatrixBase< Derived > Class Template Reference

Base class of any sparse matrices or sparse expressions. More...

#include <SparseMatrixBase.h>

+ Inheritance diagram for Eigen::SparseMatrixBase< Derived >:

Classes

struct  ConstSelfAdjointViewReturnType
 
struct  CwiseProductDenseReturnType
 
struct  SelfAdjointViewReturnType
 

Public Types

enum  {
  RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime , ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime , SizeAtCompileTime = (internal::size_of_xpr_at_compile_time<Derived>::ret) , MaxRowsAtCompileTime = RowsAtCompileTime ,
  MaxColsAtCompileTime = ColsAtCompileTime , MaxSizeAtCompileTime = internal::size_at_compile_time(MaxRowsAtCompileTime, MaxColsAtCompileTime) , IsVectorAtCompileTime = RowsAtCompileTime == 1 || ColsAtCompileTime == 1 , NumDimensions ,
  Flags = internal::traits<Derived>::Flags , IsRowMajor = Flags & RowMajorBit ? 1 : 0 , InnerSizeAtCompileTime , HasDirectAccess_ = (int(Flags) & DirectAccessBit) ? 1 : 0
}
 
typedef internal::traits< Derived >::Scalar Scalar
 
typedef Scalar value_type
 
typedef internal::packet_traits< Scalar >::type PacketScalar
 
typedef internal::traits< Derived >::StorageKind StorageKind
 
typedef internal::traits< Derived >::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 std::conditional_t< NumTraits< Scalar >::IsComplex, CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, Eigen::Transpose< const Derived > >, Transpose< const Derived > > AdjointReturnType
 
typedef Transpose< Derived > TransposeReturnType
 
typedef Transpose< const Derived > ConstTransposeReturnType
 
typedef SparseMatrix< Scalar, Flags &RowMajorBit ? RowMajor :ColMajor, StorageIndexPlainObject
 
typedef NumTraits< Scalar >::Real RealScalar
 
typedef std::conditional_t< HasDirectAccess_, const Scalar &, ScalarCoeffReturnType
 
typedef CwiseNullaryOp< internal::scalar_constant_op< Scalar >, Matrix< Scalar, Dynamic, Dynamic > > ConstantReturnType
 
typedef Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTimeDenseMatrixType
 
typedef Matrix< Scalar, internal::max_size_prefer_dynamic(RowsAtCompileTime, ColsAtCompileTime), internal::max_size_prefer_dynamic(RowsAtCompileTime, ColsAtCompileTime)> SquareMatrixType
 
typedef EigenBase< Derived > Base
 
- 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

template<typename OtherDerived >
Derived & operator= (const EigenBase< OtherDerived > &other)
 
const Derived & derived () const
 
Derived & derived ()
 
Derived & 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
 
Derived & markAsRValue ()
 
 SparseMatrixBase ()
 
template<typename OtherDerived >
Derived & operator= (const ReturnByValue< OtherDerived > &other)
 
template<typename OtherDerived >
Derived & operator= (const SparseMatrixBase< OtherDerived > &other)
 
Derived & operator= (const Derived &other)
 
template<typename OtherDerived >
Derived & operator+= (const SparseMatrixBase< OtherDerived > &other)
 
template<typename OtherDerived >
Derived & operator-= (const SparseMatrixBase< OtherDerived > &other)
 
template<typename OtherDerived >
Derived & operator+= (const DiagonalBase< OtherDerived > &other)
 
template<typename OtherDerived >
Derived & operator-= (const DiagonalBase< OtherDerived > &other)
 
template<typename OtherDerived >
Derived & operator+= (const EigenBase< OtherDerived > &other)
 
template<typename OtherDerived >
Derived & operator-= (const EigenBase< OtherDerived > &other)
 
Derived & operator*= (const Scalar &other)
 
Derived & operator/= (const Scalar &other)
 
template<typename OtherDerived >
EIGEN_STRONG_INLINE const CwiseProductDenseReturnType< OtherDerived >::Type cwiseProduct (const MatrixBase< OtherDerived > &other) const
 
template<typename OtherDerived >
const Product< Derived, OtherDerived > operator* (const DiagonalBase< OtherDerived > &other) const
 
template<typename OtherDerived >
const Product< Derived, OtherDerived, AliasFreeProductoperator* (const SparseMatrixBase< OtherDerived > &other) const
 
template<typename OtherDerived >
const Product< Derived, OtherDerived > operator* (const MatrixBase< OtherDerived > &other) const
 
SparseSymmetricPermutationProduct< Derived, Upper|LowertwistedBy (const PermutationMatrix< Dynamic, Dynamic, StorageIndex > &perm) const
 
template<typename OtherDerived >
Derived & operator*= (const SparseMatrixBase< OtherDerived > &other)
 
template<int Mode>
const TriangularView< const Derived, Mode > triangularView () const
 
template<unsigned int UpLo>
ConstSelfAdjointViewReturnType< UpLo >::Type selfadjointView () const
 
template<unsigned int UpLo>
SelfAdjointViewReturnType< UpLo >::Type selfadjointView ()
 
template<typename OtherDerived >
Scalar dot (const MatrixBase< OtherDerived > &other) const
 
template<typename OtherDerived >
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
 
template<typename OtherDerived >
bool isApprox (const SparseMatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
template<typename OtherDerived >
bool isApprox (const MatrixBase< OtherDerived > &other, const RealScalar &prec=NumTraits< Scalar >::dummy_precision()) const
 
const internal::eval< Derived >::type eval () const
 
Scalar sum () const
 
const SparseView< Derived > pruned (const Scalar &reference=Scalar(0), const RealScalar &epsilon=NumTraits< Scalar >::dummy_precision()) const
 
template<typename OtherDerived >
EIGEN_STRONG_INLINE Derived & operator-= (const SparseMatrixBase< OtherDerived > &other)
 
template<typename OtherDerived >
EIGEN_STRONG_INLINE Derived & operator+= (const SparseMatrixBase< OtherDerived > &other)
 
template<typename OtherDerived >
EIGEN_STRONG_INLINE const SparseMatrixBase< Derived >::template CwiseProductDenseReturnType< OtherDerived >::Type cwiseProduct (const MatrixBase< OtherDerived > &other) const
 
template<typename OtherDerived >
internal::traits< Derived >::Scalar dot (const MatrixBase< OtherDerived > &other) const
 
template<typename OtherDerived >
internal::traits< Derived >::Scalar dot (const SparseMatrixBase< OtherDerived > &other) const
 
template<unsigned int UpLo>
SparseMatrixBase< Derived >::template ConstSelfAdjointViewReturnType< UpLo >::Type selfadjointView () const
 
template<unsigned int UpLo>
SparseMatrixBase< Derived >::template SelfAdjointViewReturnType< UpLo >::Type selfadjointView ()
 
- Public Member Functions inherited from Eigen::EigenBase< Derived >
constexpr EIGEN_DEVICE_FUNC Derived & derived ()
 
constexpr EIGEN_DEVICE_FUNC const Derived & derived () const
 
EIGEN_DEVICE_FUNC Derived & const_cast_derived () const
 
EIGEN_DEVICE_FUNC const Derived & const_derived () const
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows () const EIGEN_NOEXCEPT
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index size () const EIGEN_NOEXCEPT
 
template<typename Dest >
EIGEN_DEVICE_FUNC void evalTo (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void addTo (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void subTo (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void applyThisOnTheRight (Dest &dst) const
 
template<typename Dest >
EIGEN_DEVICE_FUNC void applyThisOnTheLeft (Dest &dst) const
 
template<typename Device >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DeviceWrapper< Derived, Device > device (Device &device)
 
template<typename Device >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DeviceWrapper< const Derived, Device > device (Device &device) const
 

Protected Member Functions

template<typename OtherDerived >
Derived & assign (const OtherDerived &other)
 
template<typename OtherDerived >
void assignGeneric (const OtherDerived &other)
 

Static Protected Member Functions

static StorageIndex convert_index (const Index idx)
 

Protected Attributes

bool m_isRValue
 

Private Member Functions

template<typename Dest >
void evalTo (Dest &) const
 

Friends

std::ostream & operator<< (std::ostream &s, const SparseMatrixBase &m)
 
template<typename OtherDerived >
const Product< OtherDerived, Derived > operator* (const DiagonalBase< OtherDerived > &lhs, const SparseMatrixBase &rhs)
 
template<typename OtherDerived >
const Product< OtherDerived, Derived > operator* (const MatrixBase< OtherDerived > &lhs, const SparseMatrixBase &rhs)
 

Detailed Description

template<typename Derived>
class Eigen::SparseMatrixBase< Derived >

Base class of any sparse matrices or sparse expressions.

Template Parameters
Derivedis the derived type, e.g. a sparse matrix type, or an expression, etc.

This class can be extended with the help of the plugin mechanism described on the page Extending MatrixBase (and other classes) by defining the preprocessor symbol EIGEN_SPARSEMATRIXBASE_PLUGIN.

Member Typedef Documentation

◆ AdjointReturnType

template<typename Derived >
typedef std::conditional_t<NumTraits<Scalar>::IsComplex, CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, Eigen::Transpose<const Derived> >, Transpose<const Derived> > Eigen::SparseMatrixBase< Derived >::AdjointReturnType

the return type of MatrixBase::adjoint()

◆ Base

template<typename Derived >
typedef EigenBase<Derived> Eigen::SparseMatrixBase< Derived >::Base

◆ CoeffReturnType

template<typename Derived >
typedef std::conditional_t<HasDirectAccess_, const Scalar&, Scalar> Eigen::SparseMatrixBase< Derived >::CoeffReturnType

the return type of coeff()

◆ ConstantReturnType

Represents a matrix with all coefficients equal to one another

◆ ConstTransposeReturnType

template<typename Derived >
typedef Transpose<const Derived> Eigen::SparseMatrixBase< Derived >::ConstTransposeReturnType

◆ DenseMatrixType

template<typename Derived >
typedef Matrix<Scalar, RowsAtCompileTime, ColsAtCompileTime> Eigen::SparseMatrixBase< Derived >::DenseMatrixType

type of the equivalent dense matrix

◆ IndexVector

template<typename Derived >
typedef Matrix<StorageIndex, Dynamic, 1> Eigen::SparseMatrixBase< Derived >::IndexVector

◆ PacketReturnType

template<typename Derived >
typedef internal::add_const_on_value_type_if_arithmetic<typename internal::packet_traits<Scalar>::type>::type Eigen::SparseMatrixBase< Derived >::PacketReturnType

◆ PacketScalar

template<typename Derived >
typedef internal::packet_traits<Scalar>::type Eigen::SparseMatrixBase< Derived >::PacketScalar

◆ PlainObject

template<typename Derived >
typedef SparseMatrix<Scalar, Flags & RowMajorBit ? RowMajor : ColMajor, StorageIndex> Eigen::SparseMatrixBase< Derived >::PlainObject

◆ RealScalar

template<typename Derived >
typedef NumTraits<Scalar>::Real Eigen::SparseMatrixBase< Derived >::RealScalar

This is the "real scalar" type; if the Scalar type is already real numbers (e.g. int, float or double) then RealScalar is just the same as Scalar. If Scalar is std::complex<T> then RealScalar is T.

See also
class NumTraits

◆ Scalar

template<typename Derived >
typedef internal::traits<Derived>::Scalar Eigen::SparseMatrixBase< Derived >::Scalar

◆ ScalarVector

template<typename Derived >
typedef Matrix<Scalar, Dynamic, 1> Eigen::SparseMatrixBase< Derived >::ScalarVector

◆ SquareMatrixType

◆ StorageBaseType

template<typename Derived >
typedef SparseMatrixBase Eigen::SparseMatrixBase< Derived >::StorageBaseType

◆ StorageIndex

template<typename Derived >
typedef internal::traits<Derived>::StorageIndex Eigen::SparseMatrixBase< Derived >::StorageIndex

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

template<typename Derived >
typedef internal::traits<Derived>::StorageKind Eigen::SparseMatrixBase< Derived >::StorageKind

◆ TransposeReturnType

template<typename Derived >
typedef Transpose<Derived> Eigen::SparseMatrixBase< Derived >::TransposeReturnType

◆ value_type

template<typename Derived >
typedef Scalar Eigen::SparseMatrixBase< Derived >::value_type

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

template<typename Derived >
anonymous enum
Enumerator
RowsAtCompileTime 

The number of rows at compile-time. This is just a copy of the value provided by the Derived type. If a value is not known at compile-time, it is set to the Dynamic constant.

See also
MatrixBase::rows(), MatrixBase::cols(), ColsAtCompileTime, SizeAtCompileTime
ColsAtCompileTime 

The number of columns at compile-time. This is just a copy of the value provided by the Derived type. If a value is not known at compile-time, it is set to the Dynamic constant.

See also
MatrixBase::rows(), MatrixBase::cols(), RowsAtCompileTime, SizeAtCompileTime
SizeAtCompileTime 

This is equal to the number of coefficients, i.e. the number of rows times the number of columns, or to Dynamic if this is not known at compile-time.

See also
RowsAtCompileTime, ColsAtCompileTime
MaxRowsAtCompileTime 
MaxColsAtCompileTime 
MaxSizeAtCompileTime 
IsVectorAtCompileTime 

This is set to true if either the number of rows or the number of columns is known at compile-time to be equal to 1. Indeed, in that case, we are dealing with a column-vector (if there is only one column) or with a row-vector (if there is only one row).

NumDimensions 

This value is equal to Tensor::NumDimensions, i.e. 0 for scalars, 1 for vectors, and 2 for matrices.

Flags 

This stores expression Flags flags which may or may not be inherited by new expressions constructed from this one. See the list of flags.

IsRowMajor 
InnerSizeAtCompileTime 
HasDirectAccess_ 
57  {
58 
59  RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,
65  ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,
78 
80 
89  : 2,
94  Flags = internal::traits<Derived>::Flags,
99  IsRowMajor = Flags & RowMajorBit ? 1 : 0,
100 
104 
105 #ifndef EIGEN_PARSED_BY_DOXYGEN
106  HasDirectAccess_ = (int(Flags) & DirectAccessBit) ? 1 : 0 // workaround sunCC
107 #endif
108  };
@ InnerSizeAtCompileTime
Definition: SparseMatrixBase.h:101
@ IsVectorAtCompileTime
Definition: SparseMatrixBase.h:81
@ NumDimensions
Definition: SparseMatrixBase.h:87
@ ColsAtCompileTime
Definition: SparseMatrixBase.h:65
@ RowsAtCompileTime
Definition: SparseMatrixBase.h:59
@ MaxColsAtCompileTime
Definition: SparseMatrixBase.h:77
@ MaxRowsAtCompileTime
Definition: SparseMatrixBase.h:76
@ MaxSizeAtCompileTime
Definition: SparseMatrixBase.h:79
@ SizeAtCompileTime
Definition: SparseMatrixBase.h:71
@ HasDirectAccess_
Definition: SparseMatrixBase.h:106
@ IsRowMajor
Definition: SparseMatrixBase.h:99
const unsigned int DirectAccessBit
Definition: Constants.h:159
const unsigned int RowMajorBit
Definition: Constants.h:70
return int(ret)+1
constexpr int size_at_compile_time(int rows, int cols)
Definition: XprHelper.h:373
Extend namespace for flags.
Definition: fsi_chan_precond_driver.cc:56

Constructor & Destructor Documentation

◆ SparseMatrixBase()

template<typename Derived >
Eigen::SparseMatrixBase< Derived >::SparseMatrixBase ( )
inline
206  : m_isRValue(false) { /* TODO check flags */
207  }
bool m_isRValue
Definition: SparseMatrixBase.h:389

Member Function Documentation

◆ adjoint()

template<typename Derived >
const AdjointReturnType Eigen::SparseMatrixBase< Derived >::adjoint ( ) const
inline
360 { return AdjointReturnType(transpose()); }
std::conditional_t< NumTraits< Scalar >::IsComplex, CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, Eigen::Transpose< const Derived > >, Transpose< const Derived > > AdjointReturnType
Definition: SparseMatrixBase.h:114
TransposeReturnType transpose()
Definition: SparseMatrixBase.h:358

References Eigen::SparseMatrixBase< Derived >::transpose().

Referenced by Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::_solve_impl(), Eigen::internal::least_square_conjugate_gradient(), Eigen::SparseSelfAdjointView< MatrixType, Mode_ >::rankUpdate(), trmm(), and Eigen::internal::upperbidiagonalization_inplace_unblocked().

◆ assign()

template<typename Derived >
template<typename OtherDerived >
Derived& Eigen::SparseMatrixBase< Derived >::assign ( const OtherDerived &  other)
inlineprotected

◆ assignGeneric()

template<typename Derived >
template<typename OtherDerived >
void Eigen::SparseMatrixBase< Derived >::assignGeneric ( const OtherDerived &  other)
inlineprotected

◆ blueNorm()

template<typename Derived >
NumTraits< typename internal::traits< Derived >::Scalar >::Real Eigen::SparseMatrixBase< Derived >::blueNorm
inline
95  {
96  return internal::blueNorm_impl(*this);
97 }
NumTraits< typename traits< Derived >::Scalar >::Real blueNorm_impl(const EigenBase< Derived > &_vec)
Definition: StableNorm.h:97

References Eigen::internal::blueNorm_impl().

◆ cols()

◆ const_cast_derived()

◆ convert_index()

template<typename Derived >
static StorageIndex Eigen::SparseMatrixBase< Derived >::convert_index ( const Index  idx)
inlinestaticprotected
391 { return internal::convert_index<StorageIndex>(idx); }

◆ cwiseProduct() [1/2]

template<typename Derived >
template<typename OtherDerived >
EIGEN_STRONG_INLINE const SparseMatrixBase<Derived>::template CwiseProductDenseReturnType<OtherDerived>::Type Eigen::SparseMatrixBase< Derived >::cwiseProduct ( const MatrixBase< OtherDerived > &  other) const
896  {
897  return typename CwiseProductDenseReturnType<OtherDerived>::Type(derived(), other.derived());
898 }
CwiseBinaryOp< internal::scalar_product_op< typename ScalarBinaryOpTraits< typename internal::traits< Derived >::Scalar, typename internal::traits< OtherDerived >::Scalar >::ReturnType >, const Derived, const OtherDerived > Type
Definition: SparseMatrixBase.h:287

◆ cwiseProduct() [2/2]

template<typename Derived >
template<typename OtherDerived >
EIGEN_STRONG_INLINE const CwiseProductDenseReturnType<OtherDerived>::Type Eigen::SparseMatrixBase< Derived >::cwiseProduct ( const MatrixBase< OtherDerived > &  other) const

◆ derived() [1/2]

template<typename Derived >
Derived& Eigen::SparseMatrixBase< Derived >::derived ( )
inline
145 { return *static_cast<Derived*>(this); }

◆ derived() [2/2]

template<typename Derived >
const Derived& Eigen::SparseMatrixBase< Derived >::derived ( ) const
inline
144 { return *static_cast<const Derived*>(this); }

Referenced by Eigen::SparseSolverBase< Derived >::_solve_impl(), Eigen::CholmodBase< MatrixType_, UpLo_, Derived >::_solve_impl(), Eigen::IterativeSolverBase< Derived >::_solve_with_guess_impl(), Eigen::accurateDot(), Eigen::SparseMatrixBase< Derived >::cols(), Eigen::SparseMatrixBase< Derived >::dot(), eiToDense(), eiToGmm(), eiToMtl(), eiToUblas(), Eigen::SparseMatrixBase< Derived >::eval(), Eigen::internal::generic_matrix_wrapper< MatrixType, false >::grab(), Eigen::SparseCompressedBase< Derived >::innerIndexPtr(), Eigen::SparseCompressedBase< Derived >::innerIndicesAreSorted(), Eigen::SparseCompressedBase< Derived >::innerNonZeroPtr(), Eigen::SparseCompressedBase< Derived >::innerNonZeros(), Eigen::SparseMatrixBase< Derived >::isApprox(), main(), Eigen::SluMatrix::Map(), Eigen::SparseMatrixBase< Derived >::markAsRValue(), Eigen::SparseCompressedBase< Derived >::nonZeros(), Eigen::SparseMatrixBase< Derived >::operator*(), Eigen::SparseSelfAdjointView< MatrixType, Mode_ >::operator*(), Eigen::SparseMatrixBase< Derived >::operator+=(), Eigen::SparseMatrixBase< Derived >::operator-=(), Eigen::internal::sparse_matrix_block_impl< SparseMatrixType, BlockRows, BlockCols >::operator=(), Eigen::SparseMatrixBase< Derived >::operator=(), Eigen::SparseVector< Scalar_, Options_, StorageIndex_ >::operator=(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::operator=(), Eigen::SparseCompressedBase< Derived >::outerIndexPtr(), Eigen::internal::permute_symm_to_fullsymm(), Eigen::internal::permute_symm_to_symm(), Eigen::Ref< const SparseMatrix< MatScalar, MatOptions, MatIndex >, Options, StrideType >::Ref(), Eigen::Ref< const SparseVector< MatScalar, MatOptions, MatIndex >, Options, StrideType >::Ref(), Eigen::Ref< SparseMatrix< MatScalar, MatOptions, MatIndex >, Options, StrideType >::Ref(), Eigen::Ref< SparseVector< MatScalar, MatOptions, MatIndex >, Options, StrideType >::Ref(), Eigen::SparseMatrixBase< Derived >::rows(), Eigen::internal::visit_impl< Derived, Visitor, ShortCircuitEvaulation >::run(), Eigen::internal::Assignment< DstXprType, SrcXprType, Functor, Diagonal2Sparse >::run(), Eigen::SparseCompressedBase< Derived >::sortInnerIndices(), Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::SparseMatrix(), Eigen::SparseVector< Scalar_, Options_, StorageIndex_ >::SparseVector(), Eigen::SparseMatrixBase< Derived >::toDense(), Eigen::SparseMatrixBase< Derived >::transpose(), Eigen::SparseMatrixBase< Derived >::twistedBy(), Eigen::SparseCompressedBase< Derived >::valuePtr(), and Eigen::viewAsCholmod().

◆ dot() [1/4]

template<typename Derived >
template<typename OtherDerived >
internal::traits<Derived>::Scalar Eigen::SparseMatrixBase< Derived >::dot ( const MatrixBase< OtherDerived > &  other) const
inline
21  {
24  EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived, OtherDerived)
27  YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
28 
29  eigen_assert(size() == other.size());
30  eigen_assert(other.size() > 0 && "you are using a non initialized vector");
31 
32  internal::evaluator<Derived> thisEval(derived());
33  typename internal::evaluator<Derived>::InnerIterator i(thisEval, 0);
34  // Two accumulators, which breaks the dependency chain on the accumulator
35  // and allows more instruction-level parallelism in the following loop.
36  Scalar res1(0);
37  Scalar res2(0);
38  for (; i; ++i) {
39  res1 += numext::conj(i.value()) * other.coeff(i.index());
40  ++i;
41  if (i) {
42  res2 += numext::conj(i.value()) * other.coeff(i.index());
43  }
44  }
45  return res1 + res2;
46 }
AnnoyingScalar conj(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:133
int i
Definition: BiCGSTAB_step_by_step.cpp:9
#define eigen_assert(x)
Definition: Macros.h:910
#define EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(TYPE0, TYPE1)
Definition: StaticAssert.h:60
#define EIGEN_STATIC_ASSERT(X, MSG)
Definition: StaticAssert.h:26
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE)
Definition: StaticAssert.h:36
SCALAR Scalar
Definition: bench_gemm.cpp:45
Index size() const
Definition: SparseMatrixBase.h:187
@ value
Definition: Meta.h:206

References conj(), eigen_assert, EIGEN_STATIC_ASSERT, EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE, EIGEN_STATIC_ASSERT_VECTOR_ONLY, i, and size.

◆ dot() [2/4]

template<typename Derived >
template<typename OtherDerived >
Scalar Eigen::SparseMatrixBase< Derived >::dot ( const MatrixBase< OtherDerived > &  other) const

◆ dot() [3/4]

template<typename Derived >
template<typename OtherDerived >
internal::traits<Derived>::Scalar Eigen::SparseMatrixBase< Derived >::dot ( const SparseMatrixBase< OtherDerived > &  other) const
inline
51  {
54  EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived, OtherDerived)
57  YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
58 
59  eigen_assert(size() == other.size());
60 
61  internal::evaluator<Derived> thisEval(derived());
62  typename internal::evaluator<Derived>::InnerIterator i(thisEval, 0);
63 
64  internal::evaluator<OtherDerived> otherEval(other.derived());
65  typename internal::evaluator<OtherDerived>::InnerIterator j(otherEval, 0);
66 
67  Scalar res(0);
68  while (i && j) {
69  if (i.index() == j.index()) {
70  res += numext::conj(i.value()) * j.value();
71  ++i;
72  ++j;
73  } else if (i.index() < j.index())
74  ++i;
75  else
76  ++j;
77  }
78  return res;
79 }
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition: PartialRedux_count.cpp:3
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References conj(), Eigen::SparseMatrixBase< Derived >::derived(), eigen_assert, EIGEN_STATIC_ASSERT, EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE, EIGEN_STATIC_ASSERT_VECTOR_ONLY, i, j, res, size, and Eigen::SparseMatrixBase< Derived >::size().

◆ dot() [4/4]

template<typename Derived >
template<typename OtherDerived >
Scalar Eigen::SparseMatrixBase< Derived >::dot ( const SparseMatrixBase< OtherDerived > &  other) const

◆ eval()

template<typename Derived >
const internal::eval<Derived>::type Eigen::SparseMatrixBase< Derived >::eval ( ) const
inline
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.

379  {
380  return typename internal::eval<Derived>::type(derived());
381  }
type
Definition: compute_granudrum_aor.py:141

References Eigen::SparseMatrixBase< Derived >::derived(), and compute_granudrum_aor::type.

◆ evalTo()

template<typename Derived >
template<typename Dest >
void Eigen::SparseMatrixBase< Derived >::evalTo ( Dest &  ) const
private

◆ innerSize()

template<typename Derived >
Index Eigen::SparseMatrixBase< Derived >::innerSize ( ) const
inline
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
198 { return (int(Flags) & RowMajorBit) ? this->cols() : this->rows(); }
Index rows() const
Definition: SparseMatrixBase.h:182
Index cols() const
Definition: SparseMatrixBase.h:184

References Eigen::SparseMatrixBase< Derived >::cols(), Eigen::RowMajorBit, and Eigen::SparseMatrixBase< Derived >::rows().

◆ isApprox() [1/2]

template<typename Derived >
template<typename OtherDerived >
bool Eigen::SparseMatrixBase< Derived >::isApprox ( const MatrixBase< OtherDerived > &  other,
const RealScalar prec = NumTraits<Scalar>::dummy_precision() 
) const
inline
370  {
371  return toDense().isApprox(other, prec);
372  }
DenseMatrixType toDense() const
Definition: SparseMatrixBase.h:362

References Eigen::SparseMatrixBase< Derived >::toDense().

◆ isApprox() [2/2]

template<typename Derived >
template<typename OtherDerived >
bool Eigen::SparseMatrixBase< Derived >::isApprox ( const SparseMatrixBase< OtherDerived > &  other,
const RealScalar prec = NumTraits<Scalar>::dummy_precision() 
) const
20  {
22  std::conditional_t<bool(IsRowMajor) == bool(OtherDerived::IsRowMajor),
24  actualB(other.derived());
25 
26  return (actualA - actualB).squaredNorm() <= prec * prec * numext::mini(actualA.squaredNorm(), actualB.squaredNorm());
27 }
SparseMatrix< Scalar, Flags &RowMajorBit ? RowMajor :ColMajor, StorageIndex > PlainObject
Definition: SparseMatrixBase.h:119
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T mini(const T &x, const T &y)
Definition: MathFunctions.h:920
std::conditional_t< Evaluate, PlainObject, typename ref_selector< T >::type > type
Definition: XprHelper.h:549

References Eigen::SparseMatrixBase< Derived >::derived(), and Eigen::numext::mini().

Referenced by test_random_setter().

◆ isRValue()

◆ isVector()

template<typename Derived >
bool Eigen::SparseMatrixBase< Derived >::isVector ( ) const
inline
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
See also
rows(), cols(), IsVectorAtCompileTime.
192 { return rows() == 1 || cols() == 1; }

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

◆ markAsRValue()

template<typename Derived >
Derived& Eigen::SparseMatrixBase< Derived >::markAsRValue ( )
inline

◆ norm()

template<typename Derived >
NumTraits< typename internal::traits< Derived >::Scalar >::Real Eigen::SparseMatrixBase< Derived >::norm
inline
88  {
89  using std::sqrt;
90  return sqrt(squaredNorm());
91 }
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
RealScalar squaredNorm() const
Definition: SparseDot.h:82

References sqrt().

Referenced by Eigen::SPQR< MatrixType_ >::compute(), and Eigen::MatrixMarketIterator< Scalar >::matrix().

◆ operator*() [1/3]

template<typename Derived >
template<typename OtherDerived >
const Product<Derived, OtherDerived> Eigen::SparseMatrixBase< Derived >::operator* ( const DiagonalBase< OtherDerived > &  other) const
inline
296  {
297  return Product<Derived, OtherDerived>(derived(), other.derived());
298  }

References Eigen::DiagonalBase< Derived >::derived(), and Eigen::SparseMatrixBase< Derived >::derived().

◆ operator*() [2/3]

template<typename Derived >
template<typename OtherDerived >
const Product<Derived, OtherDerived> Eigen::SparseMatrixBase< Derived >::operator* ( const MatrixBase< OtherDerived > &  other) const
inline
313  {
314  return Product<Derived, OtherDerived>(derived(), other.derived());
315  }

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

◆ operator*() [3/3]

template<typename Derived >
template<typename OtherDerived >
const Product< Derived, OtherDerived, AliasFreeProduct > Eigen::SparseMatrixBase< Derived >::operator* ( const SparseMatrixBase< OtherDerived > &  other) const
inline
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(); // suppress numerical zeros (exact)
C = (A*B).pruned(ref);
C = (A*B).pruned(ref,epsilon);
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Definition: bench_gemm.cpp:47
Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
Definition: bench_gemm.cpp:48
const SparseView< Derived > pruned(const Scalar &reference=Scalar(0), const RealScalar &epsilon=NumTraits< Scalar >::dummy_precision()) const
Definition: SparseView.h:219
Definition: matrices.h:74
double epsilon
Definition: osc_ring_sarah_asymptotics.h:43
where ref is a meaningful non zero reference value.
32  {
33  return Product<Derived, OtherDerived, AliasFreeProduct>(derived(), other.derived());
34 }

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

◆ operator*=() [1/2]

template<typename Derived >
EIGEN_STRONG_INLINE Derived & Eigen::SparseMatrixBase< Derived >::operator*= ( const Scalar other)
123  {
124  typedef typename internal::evaluator<Derived>::InnerIterator EvalIterator;
125  internal::evaluator<Derived> thisEval(derived());
126  for (Index j = 0; j < outerSize(); ++j)
127  for (EvalIterator i(thisEval, j); i; ++i) i.valueRef() *= other;
128  return derived();
129 }
Index outerSize() const
Definition: SparseMatrixBase.h:195
Eigen::Index Index
The interface type of indices.
Definition: EigenBase.h:43

References i, and j.

◆ operator*=() [2/2]

template<typename Derived >
template<typename OtherDerived >
Derived& Eigen::SparseMatrixBase< Derived >::operator*= ( const SparseMatrixBase< OtherDerived > &  other)

◆ operator+=() [1/4]

template<typename Derived >
template<typename OtherDerived >
Derived & Eigen::SparseMatrixBase< Derived >::operator+= ( const DiagonalBase< OtherDerived > &  other)
879  {
880  call_assignment_no_alias(derived(), other.derived(),
881  internal::add_assign_op<Scalar, typename OtherDerived::Scalar>());
882  return derived();
883 }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR void call_assignment_no_alias(Dst &dst, const Src &src, const Func &func)
Definition: AssignEvaluator.h:812

References Eigen::internal::call_assignment_no_alias(), and Eigen::DiagonalBase< Derived >::derived().

◆ operator+=() [2/4]

template<typename Derived >
template<typename OtherDerived >
Derived & Eigen::SparseMatrixBase< Derived >::operator+= ( const EigenBase< OtherDerived > &  other)
853  {
854  call_assignment(derived(), other.derived(), internal::add_assign_op<Scalar, typename OtherDerived::Scalar>());
855  return derived();
856 }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment(Dst &dst, const Src &src)
Definition: AssignEvaluator.h:781

References Eigen::internal::call_assignment(), and Eigen::EigenBase< Derived >::derived().

◆ operator+=() [3/4]

template<typename Derived >
template<typename OtherDerived >
EIGEN_STRONG_INLINE Derived& Eigen::SparseMatrixBase< Derived >::operator+= ( const SparseMatrixBase< OtherDerived > &  other)
873  {
874  return derived() = derived() + other.derived();
875 }

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

◆ operator+=() [4/4]

template<typename Derived >
template<typename OtherDerived >
Derived& Eigen::SparseMatrixBase< Derived >::operator+= ( const SparseMatrixBase< OtherDerived > &  other)

◆ operator-=() [1/4]

template<typename Derived >
template<typename OtherDerived >
Derived & Eigen::SparseMatrixBase< Derived >::operator-= ( const DiagonalBase< OtherDerived > &  other)
887  {
888  call_assignment_no_alias(derived(), other.derived(),
889  internal::sub_assign_op<Scalar, typename OtherDerived::Scalar>());
890  return derived();
891 }

References Eigen::internal::call_assignment_no_alias(), and Eigen::DiagonalBase< Derived >::derived().

◆ operator-=() [2/4]

template<typename Derived >
template<typename OtherDerived >
Derived & Eigen::SparseMatrixBase< Derived >::operator-= ( const EigenBase< OtherDerived > &  other)
860  {
861  call_assignment(derived(), other.derived(), internal::assign_op<Scalar, typename OtherDerived::Scalar>());
862  return derived();
863 }

References Eigen::internal::call_assignment(), and Eigen::EigenBase< Derived >::derived().

◆ operator-=() [3/4]

template<typename Derived >
template<typename OtherDerived >
EIGEN_STRONG_INLINE Derived& Eigen::SparseMatrixBase< Derived >::operator-= ( const SparseMatrixBase< OtherDerived > &  other)
867  {
868  return derived() = derived() - other.derived();
869 }

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

◆ operator-=() [4/4]

template<typename Derived >
template<typename OtherDerived >
Derived& Eigen::SparseMatrixBase< Derived >::operator-= ( const SparseMatrixBase< OtherDerived > &  other)

◆ operator/=()

template<typename Derived >
EIGEN_STRONG_INLINE Derived & Eigen::SparseMatrixBase< Derived >::operator/= ( const Scalar other)
132  {
133  typedef typename internal::evaluator<Derived>::InnerIterator EvalIterator;
134  internal::evaluator<Derived> thisEval(derived());
135  for (Index j = 0; j < outerSize(); ++j)
136  for (EvalIterator i(thisEval, j); i; ++i) i.valueRef() /= other;
137  return derived();
138 }

References i, and j.

◆ operator=() [1/4]

template<typename Derived >
Derived & Eigen::SparseMatrixBase< Derived >::operator= ( const Derived &  other)
inline
43  {
44  internal::call_assignment_no_alias(derived(), other.derived());
45  return derived();
46 }

References Eigen::internal::call_assignment_no_alias().

◆ operator=() [2/4]

template<typename Derived >
template<typename OtherDerived >
Derived & Eigen::SparseMatrixBase< Derived >::operator= ( const EigenBase< OtherDerived > &  other)

◆ operator=() [3/4]

template<typename Derived >
template<typename OtherDerived >
Derived & Eigen::SparseMatrixBase< Derived >::operator= ( const ReturnByValue< OtherDerived > &  other)
27  {
28  // TODO use the evaluator mechanism
29  other.evalTo(derived());
30  return derived();
31 }

References Eigen::ReturnByValue< Derived >::evalTo().

◆ operator=() [4/4]

template<typename Derived >
template<typename OtherDerived >
Derived & Eigen::SparseMatrixBase< Derived >::operator= ( const SparseMatrixBase< OtherDerived > &  other)
inline
35  {
36  // by default sparse evaluation do not alias, so we can safely bypass the generic call_assignment routine
37  internal::Assignment<Derived, OtherDerived, internal::assign_op<Scalar, typename OtherDerived::Scalar>>::run(
38  derived(), other.derived(), internal::assign_op<Scalar, typename OtherDerived::Scalar>());
39  return derived();
40 }
auto run(Kernel kernel, Args &&... args) -> decltype(kernel(args...))
Definition: gpu_test_helper.h:414

References Eigen::SparseMatrixBase< Derived >::derived(), and Eigen::run().

◆ outerSize()

template<typename Derived >
Index Eigen::SparseMatrixBase< Derived >::outerSize ( ) const
inline
Returns
the size of the storage major dimension, i.e., the number of columns for a columns major matrix, and the number of rows otherwise
195 { return (int(Flags) & RowMajorBit) ? this->rows() : this->cols(); }

References Eigen::SparseMatrixBase< Derived >::cols(), Eigen::RowMajorBit, and Eigen::SparseMatrixBase< Derived >::rows().

Referenced by Eigen::SparseCompressedBase< Derived >::innerIndicesAreSorted(), Eigen::SparseCompressedBase< Derived >::innerNonZeros(), Eigen::SparseCompressedBase< Derived >::nonZeros(), and Eigen::SparseCompressedBase< Derived >::sortInnerIndices().

◆ pruned()

template<typename Derived >
const SparseView< Derived > Eigen::SparseMatrixBase< Derived >::pruned ( const Scalar reference = Scalar(0),
const RealScalar epsilon = NumTraits<Scalar>::dummy_precision() 
) const
inline
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.

219  {
220  return SparseView<Derived>(derived(), reference, epsilon);
221 }

References oomph::SarahBL::epsilon.

◆ rows()

◆ selfadjointView() [1/4]

template<typename Derived >
template<unsigned int UpLo>
SelfAdjointViewReturnType<UpLo>::Type Eigen::SparseMatrixBase< Derived >::selfadjointView ( )
inline

◆ selfadjointView() [2/4]

template<typename Derived >
template<unsigned int UpLo>
SparseMatrixBase<Derived>::template SelfAdjointViewReturnType<UpLo>::Type Eigen::SparseMatrixBase< Derived >::selfadjointView ( )
185  {
186  return SparseSelfAdjointView<Derived, UpLo>(derived());
187 }

◆ selfadjointView() [3/4]

template<typename Derived >
template<unsigned int UpLo>
ConstSelfAdjointViewReturnType<UpLo>::Type Eigen::SparseMatrixBase< Derived >::selfadjointView ( ) const
inline

Referenced by main().

◆ selfadjointView() [4/4]

template<typename Derived >
template<unsigned int UpLo>
SparseMatrixBase<Derived>::template ConstSelfAdjointViewReturnType<UpLo>::Type Eigen::SparseMatrixBase< Derived >::selfadjointView ( ) const
178  {
179  return SparseSelfAdjointView<const Derived, UpLo>(derived());
180 }

◆ size()

◆ squaredNorm()

template<typename Derived >
NumTraits< typename internal::traits< Derived >::Scalar >::Real Eigen::SparseMatrixBase< Derived >::squaredNorm
inline
83  {
84  return numext::real((*this).cwiseAbs2().sum());
85 }
float real
Definition: datatypes.h:10

Referenced by Eigen::LeastSquareDiagonalPreconditioner< Scalar_ >::factorize().

◆ sum()

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

References cols, eigen_assert, j, res, and rows.

◆ toDense()

template<typename Derived >
DenseMatrixType Eigen::SparseMatrixBase< Derived >::toDense ( ) const
inline
362 { return DenseMatrixType(derived()); }
Matrix< Scalar, RowsAtCompileTime, ColsAtCompileTime > DenseMatrixType
Definition: SparseMatrixBase.h:138

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

Referenced by Eigen::SparseMatrixBase< Derived >::isApprox().

◆ transpose() [1/2]

◆ transpose() [2/2]

template<typename Derived >
const ConstTransposeReturnType Eigen::SparseMatrixBase< Derived >::transpose ( ) const
inline
359 { return ConstTransposeReturnType(derived()); }
Transpose< const Derived > ConstTransposeReturnType
Definition: SparseMatrixBase.h:116

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

◆ triangularView()

template<typename Derived >
template<int Mode>
const TriangularView< const Derived, Mode > Eigen::SparseMatrixBase< Derived >::triangularView
inline
171  {
172  return TriangularView<const Derived, Mode>(derived());
173 }

◆ twistedBy()

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

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

Referenced by Eigen::IncompleteLUT< Scalar_, StorageIndex_ >::factorize(), Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::factorize(), and sparse_permutations().

Friends And Related Function Documentation

◆ operator* [1/2]

template<typename Derived >
template<typename OtherDerived >
const Product<OtherDerived, Derived> operator* ( const DiagonalBase< OtherDerived > &  lhs,
const SparseMatrixBase< Derived > &  rhs 
)
friend
303  {
304  return Product<OtherDerived, Derived>(lhs.derived(), rhs.derived());
305  }

◆ operator* [2/2]

template<typename Derived >
template<typename OtherDerived >
const Product<OtherDerived, Derived> operator* ( const MatrixBase< OtherDerived > &  lhs,
const SparseMatrixBase< Derived > &  rhs 
)
friend
320  {
321  return Product<OtherDerived, Derived>(lhs.derived(), rhs.derived());
322  }

◆ operator<<

template<typename Derived >
std::ostream& operator<< ( std::ostream &  s,
const SparseMatrixBase< Derived > &  m 
)
friend
226  {
227  typedef typename Derived::Nested Nested;
228  typedef internal::remove_all_t<Nested> NestedCleaned;
229 
230  if (Flags & RowMajorBit) {
231  Nested nm(m.derived());
232  internal::evaluator<NestedCleaned> thisEval(nm);
233  for (Index row = 0; row < nm.outerSize(); ++row) {
234  Index col = 0;
235  for (typename internal::evaluator<NestedCleaned>::InnerIterator it(thisEval, row); it; ++it) {
236  for (; col < it.index(); ++col) s << "0 ";
237  s << it.value() << " ";
238  ++col;
239  }
240  for (; col < m.cols(); ++col) s << "0 ";
241  s << std::endl;
242  }
243  } else {
244  Nested nm(m.derived());
245  internal::evaluator<NestedCleaned> thisEval(nm);
246  if (m.cols() == 1) {
247  Index row = 0;
248  for (typename internal::evaluator<NestedCleaned>::InnerIterator it(thisEval, 0); it; ++it) {
249  for (; row < it.index(); ++row) s << "0" << std::endl;
250  s << it.value() << std::endl;
251  ++row;
252  }
253  for (; row < m.rows(); ++row) s << "0" << std::endl;
254  } else {
255  SparseMatrix<Scalar, RowMajorBit, StorageIndex> trans = m;
256  s << static_cast<const SparseMatrixBase<SparseMatrix<Scalar, RowMajorBit, StorageIndex> >&>(trans);
257  }
258  }
259  return s;
260  }
m col(1)
m row(1)
RealScalar s
Definition: level1_cplx_impl.h:130
int * m
Definition: level2_cplx_impl.h:294
char * trans
Definition: level2_impl.h:240

Member Data Documentation

◆ m_isRValue

template<typename Derived >
bool Eigen::SparseMatrixBase< Derived >::m_isRValue
protected

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