Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Eigen::SparseMatrixBase< Derived > Class Template Reference

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

#include <src/eigen/Eigen/src/SparseCore/SparseMatrixBase.h>

+ Inheritance diagram for Eigen::SparseMatrixBase< Derived >:
+ Collaboration 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 , MaxRowsAtCompileTime = RowsAtCompileTime ,
  MaxColsAtCompileTime = ColsAtCompileTime , MaxSizeAtCompileTime , IsVectorAtCompileTime = RowsAtCompileTime == 1 || ColsAtCompileTime == 1 , 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< 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< Derived > 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, ColsAtCompileTimeDenseMatrixType
 
typedef Matrix< Scalar, EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime), EIGEN_SIZE_MAX(RowsAtCompileTime, ColsAtCompileTime)> SquareMatrixType
 
typedef EigenBase< Derived > Base
 
typedef Block< Derived, IsRowMajor?1:Dynamic, IsRowMajor?Dynamic:1, true > InnerVectorReturnType
 
typedef Block< const Derived, IsRowMajor?1:Dynamic, IsRowMajor?Dynamic:1, true > ConstInnerVectorReturnType
 
typedef Block< Derived, Dynamic, Dynamic, true > InnerVectorsReturnType
 
typedef Block< const Derived, Dynamic, Dynamic, true > ConstInnerVectorsReturnType
 
typedef Eigen::Index Index
 The interface type of indices.
 

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

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 TopicCustomizing_Plugins by defining the preprocessor symbol EIGEN_SPARSEMATRIXBASE_PLUGIN.


Class Documentation

◆ Eigen::SparseMatrixBase::ConstSelfAdjointViewReturnType

struct Eigen::SparseMatrixBase::ConstSelfAdjointViewReturnType
template<typename Derived>
template<unsigned int UpLo>
struct Eigen::SparseMatrixBase< Derived >::ConstSelfAdjointViewReturnType< UpLo >
Class Members
typedef const SparseSelfAdjointView< const Derived, UpLo > Type

◆ Eigen::SparseMatrixBase::CwiseProductDenseReturnType

struct Eigen::SparseMatrixBase::CwiseProductDenseReturnType
template<typename Derived>
template<typename OtherDerived>
struct Eigen::SparseMatrixBase< Derived >::CwiseProductDenseReturnType< OtherDerived >
Class Members
typedef Scalar, typename Scalar >::ReturnType >, const Derived, const OtherDerived > Type

◆ Eigen::SparseMatrixBase::SelfAdjointViewReturnType

struct Eigen::SparseMatrixBase::SelfAdjointViewReturnType
template<typename Derived>
template<unsigned int UpLo>
struct Eigen::SparseMatrixBase< Derived >::SelfAdjointViewReturnType< UpLo >
Class Members
typedef SparseSelfAdjointView< Derived, UpLo > Type

Member Typedef Documentation

◆ AdjointReturnType

template<typename Derived >
typedef internal::conditional<NumTraits<Scalar>::IsComplex,CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>,Eigen::Transpose<constDerived>>,Transpose<constDerived>>::type Eigen::SparseMatrixBase< Derived >::AdjointReturnType

◆ Base

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

◆ CoeffReturnType

template<typename Derived >
typedef internal::conditional<_HasDirectAccess,constScalar&,Scalar>::type Eigen::SparseMatrixBase< Derived >::CoeffReturnType

◆ ConstantReturnType

template<typename Derived >
typedef CwiseNullaryOp<internal::scalar_constant_op<Scalar>,Matrix<Scalar,Dynamic,Dynamic> > Eigen::SparseMatrixBase< Derived >::ConstantReturnType

◆ ConstInnerVectorReturnType

template<typename Derived >
typedef Block<const Derived,IsRowMajor?1:Dynamic,IsRowMajor?Dynamic:1,true> Eigen::SparseMatrixBase< Derived >::ConstInnerVectorReturnType

◆ ConstInnerVectorsReturnType

template<typename Derived >
typedef Block<const Derived,Dynamic,Dynamic,true> Eigen::SparseMatrixBase< Derived >::ConstInnerVectorsReturnType

◆ ConstTransposeReturnType

template<typename Derived >
typedef internal::add_const<Transpose<constDerived>>::type Eigen::SparseMatrixBase< Derived >::ConstTransposeReturnType

◆ DenseMatrixType

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

type of the equivalent dense matrix

◆ Index

template<typename Derived >
typedef Eigen::Index Eigen::EigenBase< Derived >::Index
inherited

The interface type of indices.

To change this, #define the preprocessor symbol EIGEN_DEFAULT_DENSE_INDEX_TYPE.

See also
StorageIndex, TopicPreprocessorDirectives.

◆ IndexVector

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

◆ InnerVectorReturnType

template<typename Derived >
typedef Block<Derived,IsRowMajor?1:Dynamic,IsRowMajor?Dynamic:1,true> Eigen::SparseMatrixBase< Derived >::InnerVectorReturnType

◆ InnerVectorsReturnType

template<typename Derived >
typedef Block<Derived,Dynamic,Dynamic,true> Eigen::SparseMatrixBase< Derived >::InnerVectorsReturnType

◆ PacketReturnType

template<typename Derived >
typedef internal::add_const_on_value_type_if_arithmetic<typenameinternal::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

type of the equivalent square matrix

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

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,
72 SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,
73 internal::traits<Derived>::ColsAtCompileTime>::ret),
80
81 MaxSizeAtCompileTime = (internal::size_at_compile_time<MaxRowsAtCompileTime,
83
90 Flags = internal::traits<Derived>::Flags,
96
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
@ MaxColsAtCompileTime
Definition SparseMatrixBase.h:79
@ MaxRowsAtCompileTime
Definition SparseMatrixBase.h:78
@ MaxSizeAtCompileTime
Definition SparseMatrixBase.h:81
@ 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

Constructor & Destructor Documentation

◆ SparseMatrixBase()

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

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

template<typename Derived >
const AdjointReturnType Eigen::SparseMatrixBase< Derived >::adjoint ( ) const
inline
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

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

Referenced by Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::_solve_impl(), and Eigen::SparseSelfAdjointView< MatrixType, _Mode >::rankUpdate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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

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< typenameinternal::traits< Derived >::Scalar >::Real Eigen::SparseMatrixBase< Derived >::blueNorm
inline
93{
94 return internal::blueNorm_impl(*this);
95}
NumTraits< typenametraits< Derived >::Scalar >::Real blueNorm_impl(const EigenBase< Derived > &_vec)
Definition StableNorm.h:55

References Eigen::internal::blueNorm_impl().

+ Here is the call graph for this function:

◆ cols()

template<typename Derived >
Index Eigen::SparseMatrixBase< Derived >::cols ( ) const
inline
Returns
the number of columns.
See also
rows()
173{ return derived().cols(); }
const Derived & derived() const
Definition SparseMatrixBase.h:138

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

Referenced by Eigen::SparseMatrixBase< Derived >::innerSize(), Eigen::SparseMatrixBase< Derived >::isVector(), Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::operator=(), Eigen::SparseMatrixBase< Derived >::outerSize(), and Eigen::SparseMatrixBase< Derived >::size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ const_cast_derived()

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

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

Referenced by Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::conservativeResize().

+ Here is the caller graph for this function:

◆ 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
692{
693 return typename CwiseProductDenseReturnType<OtherDerived>::Type(derived(), other.derived());
694}
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

Referenced by Eigen::MatrixBase< Derived >::cwiseProduct().

+ Here is the caller graph for this function:

◆ derived() [1/2]

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

◆ derived() [2/2]

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

Referenced by Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::DynamicSparseMatrix(), Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::DynamicSparseMatrix(), 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::SparseMatrix< _Scalar, _Options, _StorageIndex >::SparseMatrix(), Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::SparseMatrix(), Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::SparseVector(), Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::SparseVector(), Eigen::IterativeSolverBase< Derived >::_solve_impl(), Eigen::SparseSolverBase< Derived >::_solve_impl(), Eigen::CholmodBase< _MatrixType, _UpLo, Derived >::_solve_impl(), Eigen::SparseMatrixBase< Derived >::cols(), Eigen::SparseMatrixBase< Derived >::dot(), Eigen::SparseMatrixBase< Derived >::eval(), Eigen::SparseCompressedBase< Derived >::innerIndexPtr(), Eigen::SparseCompressedBase< Derived >::innerIndexPtr(), Eigen::SparseCompressedBase< Derived >::innerNonZeroPtr(), Eigen::SparseCompressedBase< Derived >::innerNonZeroPtr(), Eigen::SparseCompressedBase< Derived >::innerNonZeros(), Eigen::SparseCompressedBase< Derived >::innerNonZeros(), Eigen::SparseMatrixBase< Derived >::isApprox(), Eigen::SluMatrix::Map(), Eigen::SparseMatrixBase< Derived >::markAsRValue(), Eigen::SparseCompressedBase< Derived >::nonZeros(), Eigen::SparseMatrixBase< Derived >::operator*(), Eigen::operator*(), Eigen::SparseMatrixBase< Derived >::operator*(), Eigen::operator*(), Eigen::SparseMatrixBase< Derived >::operator*(), Eigen::SparseSelfAdjointView< MatrixType, _Mode >::operator*(), Eigen::operator*(), Eigen::operator*(), Eigen::SparseMatrixBase< Derived >::operator+=(), Eigen::SparseMatrixBase< Derived >::operator-=(), Eigen::internal::sparse_matrix_block_impl< SparseMatrixType, BlockRows, BlockCols >::operator=(), Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::operator=(), Eigen::SparseMatrixBase< Derived >::operator=(), Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::operator=(), Eigen::SparseCompressedBase< Derived >::outerIndexPtr(), Eigen::SparseCompressedBase< Derived >::outerIndexPtr(), Eigen::internal::permute_symm_to_fullsymm(), Eigen::internal::permute_symm_to_symm(), Eigen::SparseMatrixBase< Derived >::rows(), Eigen::SparseQR< _MatrixType, _OrderingType >::solve(), Eigen::SparseMatrixBase< Derived >::toDense(), Eigen::SparseMatrixBase< Derived >::transpose(), Eigen::SparseMatrixBase< Derived >::transpose(), Eigen::SparseMatrixBase< Derived >::twistedBy(), Eigen::SparseCompressedBase< Derived >::valuePtr(), and Eigen::SparseCompressedBase< Derived >::valuePtr().

◆ dot() [1/4]

template<typename Derived >
template<typename OtherDerived >
internal::traits< Derived >::Scalar Eigen::SparseMatrixBase< Derived >::dot ( const MatrixBase< OtherDerived > &  other) const
19{
22 EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived)
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< Derived >::Scalar Scalar
Definition SparseMatrixBase.h:31
@ value
Definition Meta.h:63

References eigen_assert, EIGEN_STATIC_ASSERT, EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE, and EIGEN_STATIC_ASSERT_VECTOR_ONLY.

◆ 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
44{
47 EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(Derived,OtherDerived)
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}

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

+ Here is the call graph for this function:

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

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

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

Referenced by igl::biharmonic_coordinates().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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
187{ return (int(Flags)&RowMajorBit) ? this->cols() : this->rows(); }
Index rows() const
Definition SparseMatrixBase.h:171
Index cols() const
Definition SparseMatrixBase.h:173

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

+ Here is the call graph for this function:

◆ innerVector() [1/2]

template<typename Derived >
SparseMatrixBase< Derived >::InnerVectorReturnType Eigen::SparseMatrixBase< Derived >::innerVector ( Index  outer)
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< Derived, IsRowMajor?1:Dynamic, IsRowMajor?Dynamic:1, true > InnerVectorReturnType
Definition SparseMatrixBase.h:354

◆ innerVector() [2/2]

template<typename Derived >
const SparseMatrixBase< Derived >::ConstInnerVectorReturnType Eigen::SparseMatrixBase< Derived >::innerVector ( Index  outer) const
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 Derived, IsRowMajor?1:Dynamic, IsRowMajor?Dynamic:1, true > ConstInnerVectorReturnType
Definition SparseMatrixBase.h:355

◆ innerVectors() [1/2]

template<typename Derived >
SparseMatrixBase< Derived >::InnerVectorsReturnType Eigen::SparseMatrixBase< Derived >::innerVectors ( Index  outerStart,
Index  outerSize 
)
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]

template<typename Derived >
const SparseMatrixBase< Derived >::ConstInnerVectorsReturnType Eigen::SparseMatrixBase< Derived >::innerVectors ( Index  outerStart,
Index  outerSize 
) const
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]

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

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

+ Here is the call graph for this function:

◆ 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
18{
20 typename internal::conditional<bool(IsRowMajor)==bool(OtherDerived::IsRowMajor),
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
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE T mini(const T &x, const T &y)
Definition MathFunctions.h:815
conditional< Evaluate, PlainObject, typenameref_selector< T >::type >::type type
Definition XprHelper.h:452

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

+ Here is the call graph for this function:

◆ isRValue()

template<typename Derived >
bool Eigen::SparseMatrixBase< Derived >::isRValue ( ) const
inline

◆ 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.
181{ return rows()==1 || cols()==1; }

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

+ Here is the call graph for this function:

◆ markAsRValue()

template<typename Derived >
Derived & Eigen::SparseMatrixBase< Derived >::markAsRValue ( )
inline
190{ m_isRValue = true; return derived(); }

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

+ Here is the call graph for this function:

◆ norm()

template<typename Derived >
NumTraits< typenameinternal::traits< Derived >::Scalar >::Real Eigen::SparseMatrixBase< Derived >::norm
inline
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

References sqrt().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator*() [1/3]

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

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

+ Here is the call graph for this function:

◆ operator*() [2/3]

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

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

+ Here is the call graph for this function:

◆ 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(); // supress numerical zeros (exact)
C = (A*B).pruned(ref);
C = (A*B).pruned(ref,epsilon);
const SparseView< Derived > 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}

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

+ Here is the call graph for this function:

◆ operator*=() [1/2]

template<typename Derived >
EIGEN_STRONG_INLINE Derived & Eigen::SparseMatrixBase< Derived >::operator*= ( const Scalar other)
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}
Eigen::Index Index
The interface type of indices.
Definition EigenBase.h:38

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

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

+ Here is the call graph for this function:

◆ operator+=() [2/4]

template<typename Derived >
template<typename OtherDerived >
Derived & Eigen::SparseMatrixBase< Derived >::operator+= ( const EigenBase< OtherDerived > &  other)
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

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

+ Here is the call graph for this function:

◆ operator+=() [3/4]

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

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

+ Here is the call graph for this function:

◆ 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)
683{
684 call_assignment_no_alias(derived(), other.derived(), internal::sub_assign_op<Scalar,typename OtherDerived::Scalar>());
685 return derived();
686}

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

+ Here is the call graph for this function:

◆ operator-=() [2/4]

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

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

+ Here is the call graph for this function:

◆ operator-=() [3/4]

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

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

+ Here is the call graph for this function:

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

◆ operator=() [1/4]

template<typename Derived >
Derived & Eigen::SparseMatrixBase< Derived >::operator= ( const Derived &  other)
inline
44{
46 return derived();
47}

References Eigen::internal::call_assignment_no_alias().

+ Here is the call graph for this function:

◆ operator=() [2/4]

template<typename Derived >
template<typename OtherDerived >
Derived & Eigen::SparseMatrixBase< Derived >::operator= ( const EigenBase< OtherDerived > &  other)
18{
20 return derived();
21}

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

Referenced by Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::DynamicSparseMatrix().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [3/4]

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

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

+ Here is the call graph for this function:

◆ 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> >
38 ::run(derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());
39 return derived();
40}

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

+ Here is the call graph for this function:

◆ 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
184{ return (int(Flags)&RowMajorBit) ? this->rows() : this->cols(); }

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

Referenced by Eigen::SparseCompressedBase< Derived >::nonZeros().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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

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

◆ rows()

template<typename Derived >
Index Eigen::SparseMatrixBase< Derived >::rows ( ) const
inline
Returns
the number of rows.
See also
cols()
171{ return derived().rows(); }

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

Referenced by Eigen::SparseMatrixBase< Derived >::innerSize(), Eigen::SparseMatrixBase< Derived >::isVector(), Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::operator=(), Eigen::SparseMatrixBase< Derived >::outerSize(), Eigen::SparseMatrixBase< Derived >::size(), and Eigen::SparseQR< _MatrixType, _OrderingType >::solve().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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 ( )
183{
184 return SparseSelfAdjointView<Derived, UpLo>(derived());
185}

References Eigen::EigenBase< SparseSelfAdjointView< MatrixType, _Mode > >::derived().

+ Here is the call graph for this function:

◆ selfadjointView() [3/4]

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

◆ selfadjointView() [4/4]

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

References Eigen::EigenBase< SparseSelfAdjointView< MatrixType, _Mode > >::derived().

+ Here is the call graph for this function:

◆ size()

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

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

Referenced by igl::active_set(), igl::cat(), igl::diag(), Eigen::SparseMatrixBase< Derived >::dot(), Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::finalize(), igl::invert_diag(), igl::min_quad_with_fixed_precompute(), Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::operator=(), Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::operator=(), and Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::resizeNonZeros().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ squaredNorm()

template<typename Derived >
NumTraits< typenameinternal::traits< Derived >::Scalar >::Real Eigen::SparseMatrixBase< Derived >::squaredNorm
inline
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()

template<typename Derived >
internal::traits< Derived >::Scalar Eigen::SparseMatrixBase< Derived >::sum
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}

References eigen_assert.

◆ toDense()

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

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

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ transpose() [1/2]

template<typename Derived >
TransposeReturnType Eigen::SparseMatrixBase< Derived >::transpose ( )
inline
349{ return TransposeReturnType(derived()); }
Transpose< Derived > TransposeReturnType
Definition SparseMatrixBase.h:110

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

Referenced by Eigen::SparseMatrixBase< Derived >::adjoint(), Eigen::IncompleteLUT< _Scalar, _StorageIndex >::analyzePattern(), igl::arap_dof_precomputation(), igl::AtA_cached_precompute(), igl::slim::build_linear_system(), igl::copyleft::comiso::PoissonSolver< DerivedV, DerivedF >::BuildLaplacianMatrix(), Eigen::PastixLU< _MatrixType, IsStrSym >::grabMatrix(), igl::hessian(), igl::hessian_energy(), igl::min_quad_with_fixed_precompute(), igl::mosek::mosek_quadprog(), igl::orientable_patches(), igl::shapeup_precomputation(), and igl::straighten_seams().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ transpose() [2/2]

template<typename Derived >
const ConstTransposeReturnType Eigen::SparseMatrixBase< Derived >::transpose ( ) const
inline
internal::add_const< Transpose< constDerived > >::type ConstTransposeReturnType
Definition SparseMatrixBase.h:111

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

+ Here is the call graph for this function:

◆ triangularView()

template<typename Derived >
template<int Mode>
const TriangularView< const Derived, Mode > Eigen::SparseMatrixBase< Derived >::triangularView
inline
183{
184 return TriangularView<const Derived, Mode>(derived());
185}

Referenced by igl::mosek::mosek_quadprog().

+ Here is the caller graph for this function:

◆ 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
325 {
326 return SparseSymmetricPermutationProduct<Derived,Upper|Lower>(derived(), perm);
327 }

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

Referenced by Eigen::IncompleteLUT< _Scalar, _StorageIndex >::factorize(), Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::factorize(), Eigen::PardisoLLT< MatrixType, _UpLo >::getMatrix(), and Eigen::PardisoLDLT< MatrixType, Options >::getMatrix().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator* [1/2]

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

◆ operator* [2/2]

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

◆ operator<<

template<typename Derived >
std::ostream & operator<< ( std::ostream &  s,
const SparseMatrixBase< Derived > &  m 
)
friend
214 {
215 typedef typename Derived::Nested Nested;
216 typedef typename internal::remove_all<Nested>::type NestedCleaned;
217
218 if (Flags&RowMajorBit)
219 {
220 Nested nm(m.derived());
221 internal::evaluator<NestedCleaned> thisEval(nm);
222 for (Index row=0; row<nm.outerSize(); ++row)
223 {
224 Index col = 0;
225 for (typename internal::evaluator<NestedCleaned>::InnerIterator it(thisEval, row); it; ++it)
226 {
227 for ( ; col<it.index(); ++col)
228 s << "0 ";
229 s << it.value() << " ";
230 ++col;
231 }
232 for ( ; col<m.cols(); ++col)
233 s << "0 ";
234 s << std::endl;
235 }
236 }
237 else
238 {
239 Nested nm(m.derived());
240 internal::evaluator<NestedCleaned> thisEval(nm);
241 if (m.cols() == 1) {
242 Index row = 0;
243 for (typename internal::evaluator<NestedCleaned>::InnerIterator it(thisEval, 0); it; ++it)
244 {
245 for ( ; row<it.index(); ++row)
246 s << "0" << std::endl;
247 s << it.value() << std::endl;
248 ++row;
249 }
250 for ( ; row<m.rows(); ++row)
251 s << "0" << std::endl;
252 }
253 else
254 {
255 SparseMatrix<Scalar, RowMajorBit, StorageIndex> trans = m;
256 s << static_cast<const SparseMatrixBase<SparseMatrix<Scalar, RowMajorBit, StorageIndex> >&>(trans);
257 }
258 }
259 return s;
260 }
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
T type
Definition Meta.h:78

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: