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

Common base class for sparse [compressed]-{row|column}-storage format. More...

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

+ Inheritance diagram for Eigen::SparseCompressedBase< Derived >:
+ Collaboration diagram for Eigen::SparseCompressedBase< Derived >:

Classes

class  InnerIterator
 
class  ReverseInnerIterator
 

Public Types

typedef SparseMatrixBase< Derived > Base
 
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< 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 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

Index nonZeros () const
 
const ScalarvaluePtr () const
 
ScalarvaluePtr ()
 
const StorageIndexinnerIndexPtr () const
 
StorageIndexinnerIndexPtr ()
 
const StorageIndexouterIndexPtr () const
 
StorageIndexouterIndexPtr ()
 
const StorageIndexinnerNonZeroPtr () const
 
StorageIndexinnerNonZeroPtr ()
 
bool isCompressed () const
 
const Map< const Array< Scalar, Dynamic, 1 > > coeffs () const
 
Map< Array< Scalar, Dynamic, 1 > > coeffs ()
 
template<typename OtherDerived >
Derived & operator= (const EigenBase< OtherDerived > &other)
 
template<typename OtherDerived >
Derived & operator= (const ReturnByValue< OtherDerived > &other)
 
template<typename OtherDerived >
Derived & operator= (const SparseMatrixBase< OtherDerived > &other)
 
Derived & operator= (const Derived &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 ()
 
template<typename OtherDerived >
Derived & operator+= (const SparseMatrixBase< OtherDerived > &other)
 
template<typename OtherDerived >
Derived & operator+= (const DiagonalBase< OtherDerived > &other)
 
template<typename OtherDerived >
Derived & operator+= (const EigenBase< OtherDerived > &other)
 
template<typename OtherDerived >
EIGEN_STRONG_INLINE 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 EigenBase< OtherDerived > &other)
 
template<typename OtherDerived >
EIGEN_STRONG_INLINE Derived & operator-= (const SparseMatrixBase< OtherDerived > &other)
 
Derived & operator*= (const Scalar &other)
 
template<typename OtherDerived >
Derived & operator*= (const SparseMatrixBase< OtherDerived > &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 >
EIGEN_STRONG_INLINE const SparseMatrixBase< Derived >::template 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<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<unsigned int UpLo>
SparseMatrixBase< Derived >::template ConstSelfAdjointViewReturnType< UpLo >::Type selfadjointView () const
 
template<unsigned int UpLo>
SparseMatrixBase< Derived >::template SelfAdjointViewReturnType< UpLo >::Type selfadjointView ()
 
template<typename OtherDerived >
Scalar dot (const MatrixBase< OtherDerived > &other) const
 
template<typename OtherDerived >
Scalar dot (const SparseMatrixBase< 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
 
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
 
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 Types

typedef Base::IndexVector IndexVector
 

Protected Member Functions

Eigen::Map< IndexVectorinnerNonZeros ()
 
const Eigen::Map< const IndexVectorinnerNonZeros () const
 
 SparseCompressedBase ()
 
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 OtherDerived >
 SparseCompressedBase (const SparseCompressedBase< OtherDerived > &)
 
template<typename Dest >
void evalTo (Dest &) const
 

Detailed Description

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

Common base class for sparse [compressed]-{row|column}-storage format.

This class defines the common interface for all derived classes implementing the compressed sparse storage format, such as:

  • SparseMatrix
  • Ref<SparseMatrixType,Options>
  • Map<SparseMatrixType>

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
inherited

◆ Base

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

◆ CoeffReturnType

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

◆ ConstantReturnType

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

◆ ConstInnerVectorReturnType

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

◆ ConstInnerVectorsReturnType

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

◆ ConstTransposeReturnType

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

◆ DenseMatrixType

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

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 Base::IndexVector Eigen::SparseCompressedBase< Derived >::IndexVector
protected

◆ InnerVectorReturnType

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

◆ InnerVectorsReturnType

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

◆ PacketReturnType

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

◆ PacketScalar

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

◆ PlainObject

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

◆ RealScalar

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

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
inherited

◆ ScalarVector

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

◆ SquareMatrixType

template<typename Derived >
typedef Matrix<Scalar,EIGEN_SIZE_MAX(RowsAtCompileTime,ColsAtCompileTime), EIGEN_SIZE_MAX(RowsAtCompileTime,ColsAtCompileTime)> Eigen::SparseMatrixBase< Derived >::SquareMatrixType
inherited

type of the equivalent square matrix

◆ StorageBaseType

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

◆ StorageIndex

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

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

◆ StorageKind

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

◆ TransposeReturnType

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

◆ value_type

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

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

It is an alias for the Scalar type

Member Enumeration Documentation

◆ anonymous enum

template<typename Derived >
anonymous enum
inherited
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

◆ SparseCompressedBase() [1/2]

template<typename Derived >
Eigen::SparseCompressedBase< Derived >::SparseCompressedBase ( )
inlineprotected

Default constructor. Do nothing.

130{}

◆ SparseCompressedBase() [2/2]

template<typename Derived >
template<typename OtherDerived >
Eigen::SparseCompressedBase< Derived >::SparseCompressedBase ( const SparseCompressedBase< OtherDerived > &  )
explicitprivate

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
inlineinherited
351{ return AdjointReturnType(transpose()); }
internal::conditional< NumTraits< Scalar >::IsComplex, CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, Eigen::Transpose< constDerived > >, Transpose< constDerived > >::type AdjointReturnType
Definition SparseMatrixBase.h:109
TransposeReturnType transpose()
Definition SparseMatrixBase.h:349

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

◆ assignGeneric()

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

◆ blueNorm()

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

◆ coeffs() [1/2]

template<typename Derived >
Map< Array< Scalar, Dynamic, 1 > > Eigen::SparseCompressedBase< Derived >::coeffs ( )
inline
Returns
a read-write view of the stored coefficients as a 1D array expression
Warning
this method is for compressed storage only, and it will trigger an assertion otherwise.

Here is an example:

and the output is:

See also
valuePtr(), isCompressed()
#define eigen_assert(x)
Definition Macros.h:579
Index nonZeros() const
Definition SparseCompressedBase.h:56
const Scalar * valuePtr() const
Definition SparseCompressedBase.h:71
bool isCompressed() const
Definition SparseCompressedBase.h:107

References Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Eigen::Map, eigen_assert, Eigen::SparseCompressedBase< Derived >::isCompressed(), Eigen::SparseCompressedBase< Derived >::nonZeros(), and Eigen::SparseCompressedBase< Derived >::valuePtr().

+ Here is the call graph for this function:

◆ coeffs() [2/2]

template<typename Derived >
const Map< const Array< Scalar, Dynamic, 1 > > Eigen::SparseCompressedBase< Derived >::coeffs ( ) const
inline
Returns
a read-only view of the stored coefficients as a 1D array expression.
Warning
this method is for compressed storage only, and it will trigger an assertion otherwise.
See also
valuePtr(), isCompressed()

References Eigen::PlainObjectBase< Array< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Eigen::Map, eigen_assert, Eigen::SparseCompressedBase< Derived >::isCompressed(), Eigen::SparseCompressedBase< Derived >::nonZeros(), and Eigen::SparseCompressedBase< Derived >::valuePtr().

+ Here is the call graph for this function:

◆ cols()

template<typename Derived >
Index Eigen::SparseMatrixBase< Derived >::cols ( ) const
inlineinherited
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)
inlinestaticprotectedinherited
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
inherited
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
inherited

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 ( )
inlineinherited
139{ return *static_cast<Derived*>(this); }

◆ derived() [2/2]

template<typename Derived >
const Derived & Eigen::SparseMatrixBase< Derived >::derived ( ) const
inlineinherited
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
inherited
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_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
inherited

◆ dot() [3/4]

template<typename Derived >
template<typename OtherDerived >
internal::traits< Derived >::Scalar Eigen::SparseMatrixBase< Derived >::dot ( const SparseMatrixBase< OtherDerived > &  other) const
inherited
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
inherited

◆ eval()

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

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

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

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
privateinherited

◆ innerIndexPtr() [1/2]

template<typename Derived >
StorageIndex * Eigen::SparseCompressedBase< Derived >::innerIndexPtr ( )
inline
Returns
a non-const pointer to the array of inner indices. This function is aimed at interoperability with other libraries.
See also
valuePtr(), outerIndexPtr()
84{ return derived().innerIndexPtr(); }

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

+ Here is the call graph for this function:

◆ innerIndexPtr() [2/2]

template<typename Derived >
const StorageIndex * Eigen::SparseCompressedBase< Derived >::innerIndexPtr ( ) const
inline
Returns
a const pointer to the array of inner indices. This function is aimed at interoperability with other libraries.
See also
valuePtr(), outerIndexPtr()
80{ return derived().innerIndexPtr(); }

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

+ Here is the call graph for this function:

◆ innerNonZeroPtr() [1/2]

template<typename Derived >
StorageIndex * Eigen::SparseCompressedBase< Derived >::innerNonZeroPtr ( )
inline
Returns
a non-const pointer to the array of the number of non zeros of the inner vectors. This function is aimed at interoperability with other libraries.
Warning
it returns the null pointer 0 in compressed mode
104{ return derived().innerNonZeroPtr(); }

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

+ Here is the call graph for this function:

◆ innerNonZeroPtr() [2/2]

template<typename Derived >
const StorageIndex * Eigen::SparseCompressedBase< Derived >::innerNonZeroPtr ( ) const
inline
Returns
a const pointer to the array of the number of non zeros of the inner vectors. This function is aimed at interoperability with other libraries.
Warning
it returns the null pointer 0 in compressed mode
100{ return derived().innerNonZeroPtr(); }

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

Referenced by Eigen::SparseCompressedBase< Derived >::InnerIterator::InnerIterator(), Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::ReverseInnerIterator(), Eigen::SparseCompressedBase< Derived >::innerNonZeros(), Eigen::SparseCompressedBase< Derived >::innerNonZeros(), and Eigen::SparseCompressedBase< Derived >::isCompressed().

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

◆ innerNonZeros() [1/2]

template<typename Derived >
Eigen::Map< IndexVector > Eigen::SparseCompressedBase< Derived >::innerNonZeros ( )
inlineprotected
A matrix or vector expression mapping an existing array of data.
Definition Map.h:96
const StorageIndex * innerNonZeroPtr() const
Definition SparseCompressedBase.h:100
Index outerSize() const
Definition SparseMatrixBase.h:184

References Eigen::SparseMatrixBase< Derived >::derived(), Eigen::SparseCompressedBase< Derived >::innerNonZeroPtr(), and Eigen::SparseCompressedBase< Derived >::isCompressed().

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

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

◆ innerNonZeros() [2/2]

template<typename Derived >
const Eigen::Map< const IndexVector > Eigen::SparseCompressedBase< Derived >::innerNonZeros ( ) const
inlineprotected

References Eigen::SparseMatrixBase< Derived >::derived(), Eigen::SparseCompressedBase< Derived >::innerNonZeroPtr(), and Eigen::SparseCompressedBase< Derived >::isCompressed().

+ Here is the call graph for this function:

◆ innerSize()

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

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)
inherited
Returns
the outer -th column (resp. row) of the matrix *this if *this is col-major (resp. row-major).
334{ return InnerVectorReturnType(derived(), outer); }
Block< 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
inherited
Returns
the outer -th column (resp. row) of the matrix *this if *this is col-major (resp. row-major). Read-only.
341{ return ConstInnerVectorReturnType(derived(), outer); }
Block< const 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 
)
inherited
Returns
the outer -th column (resp. row) of the matrix *this if *this is col-major (resp. row-major).
349{
350 return Block<Derived,Dynamic,Dynamic,true>(derived(),
351 IsRowMajor ? outerStart : 0, IsRowMajor ? 0 : outerStart,
353
354}

◆ innerVectors() [2/2]

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

◆ isApprox() [1/2]

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

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
inherited
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:

◆ isCompressed()

template<typename Derived >
bool Eigen::SparseCompressedBase< Derived >::isCompressed ( ) const
inline
Returns
whether *this is in compressed form.
107{ return innerNonZeroPtr()==0; }

References Eigen::SparseCompressedBase< Derived >::innerNonZeroPtr().

Referenced by Eigen::SparseCompressedBase< Derived >::InnerIterator::InnerIterator(), Eigen::Ref< SparseMatrix< MatScalar, MatOptions, MatIndex >, Options, StrideType >::Ref(), Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::ReverseInnerIterator(), Eigen::SparseCompressedBase< Derived >::coeffs(), Eigen::SparseCompressedBase< Derived >::coeffs(), Eigen::SparseCompressedBase< Derived >::innerNonZeros(), Eigen::SparseCompressedBase< Derived >::innerNonZeros(), and Eigen::SparseCompressedBase< Derived >::nonZeros().

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

◆ isRValue()

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

References Eigen::SparseMatrixBase< Derived >::m_isRValue.

Referenced by Eigen::DynamicSparseMatrix< _Scalar, _Options, _StorageIndex >::operator=(), Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::operator=(), Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::operator=(), and Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::operator=().

+ Here is the caller graph for this function:

◆ isVector()

template<typename Derived >
bool Eigen::SparseMatrixBase< Derived >::isVector ( ) const
inlineinherited
Returns
true if either the number of rows or the number of columns is equal to 1. In other words, this function returns
rows()==1 || cols()==1
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 ( )
inlineinherited
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:

◆ nonZeros()

template<typename Derived >
Index Eigen::SparseCompressedBase< Derived >::nonZeros ( ) const
inline
Returns
the number of non zero coefficients
57 {
58 if(Derived::IsVectorAtCompileTime && outerIndexPtr()==0)
59 return derived().nonZeros();
60 else if(isCompressed())
61 return outerIndexPtr()[derived().outerSize()]-outerIndexPtr()[0];
62 else if(derived().outerSize()==0)
63 return 0;
64 else
65 return innerNonZeros().sum();
66 }
Eigen::Map< IndexVector > innerNonZeros()
Definition SparseCompressedBase.h:50
const StorageIndex * outerIndexPtr() const
Definition SparseCompressedBase.h:90

References Eigen::SparseMatrixBase< Derived >::derived(), Eigen::SparseCompressedBase< Derived >::innerNonZeros(), Eigen::SparseCompressedBase< Derived >::isCompressed(), Eigen::SparseCompressedBase< Derived >::outerIndexPtr(), and Eigen::SparseMatrixBase< Derived >::outerSize().

Referenced by Eigen::SparseCompressedBase< Derived >::InnerIterator::InnerIterator(), Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::ReverseInnerIterator(), Eigen::SparseCompressedBase< Derived >::coeffs(), and Eigen::SparseCompressedBase< Derived >::coeffs().

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

◆ norm()

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

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
inlineinherited
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
inlineinherited
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
inlineinherited
Returns
an expression of the product of two sparse matrices. By default a conservative product preserving the symbolic non zeros is performed. The automatic pruning of the small values can be achieved by calling the pruned() function in which case a totally different product algorithm is employed:
C = (A*B).pruned(); // supress numerical zeros (exact)
C = (A*B).pruned(ref);
C = (A*B).pruned(ref,epsilon);
const SparseView< 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)
inherited
125{
126 typedef typename internal::evaluator<Derived>::InnerIterator EvalIterator;
127 internal::evaluator<Derived> thisEval(derived());
128 for (Index j=0; j<outerSize(); ++j)
129 for (EvalIterator i(thisEval,j); i; ++i)
130 i.valueRef() *= other;
131 return derived();
132}
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)
inherited

◆ operator+=() [1/4]

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

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)
inherited
643{
644 call_assignment(derived(), other.derived(), internal::add_assign_op<Scalar,typename OtherDerived::Scalar>());
645 return derived();
646}
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_assignment(Dst &dst, const Src &src)
Definition AssignEvaluator.h:780

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

◆ operator-=() [1/4]

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

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

◆ operator/=()

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

◆ operator=() [1/4]

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

◆ operator=() [2/4]

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

Referenced by Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::SparseMatrix(), Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::operator=(), and Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::operator=().

+ 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}

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

◆ outerIndexPtr() [1/2]

template<typename Derived >
StorageIndex * Eigen::SparseCompressedBase< Derived >::outerIndexPtr ( )
inline
Returns
a non-const pointer to the array of the starting positions of the inner vectors. This function is aimed at interoperability with other libraries.
Warning
it returns the null pointer 0 for SparseVector
See also
valuePtr(), innerIndexPtr()
95{ return derived().outerIndexPtr(); }

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

+ Here is the call graph for this function:

◆ outerIndexPtr() [2/2]

template<typename Derived >
const StorageIndex * Eigen::SparseCompressedBase< Derived >::outerIndexPtr ( ) const
inline
Returns
a const pointer to the array of the starting positions of the inner vectors. This function is aimed at interoperability with other libraries.
Warning
it returns the null pointer 0 for SparseVector
See also
valuePtr(), innerIndexPtr()
90{ return derived().outerIndexPtr(); }

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

Referenced by Eigen::SparseCompressedBase< Derived >::InnerIterator::InnerIterator(), Eigen::SparseCompressedBase< Derived >::ReverseInnerIterator::ReverseInnerIterator(), and Eigen::SparseCompressedBase< Derived >::nonZeros().

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

◆ outerSize()

template<typename Derived >
Index Eigen::SparseMatrixBase< Derived >::outerSize ( ) const
inlineinherited
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
inlineinherited
Returns
an expression of *this with values smaller than reference * epsilon removed.

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

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

where ref is a meaningful non zero reference value.

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

◆ rows()

template<typename Derived >
Index Eigen::SparseMatrixBase< Derived >::rows ( ) const
inlineinherited
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 ( )
inlineinherited

◆ selfadjointView() [2/4]

template<typename Derived >
template<unsigned int UpLo>
SparseMatrixBase< Derived >::template SelfAdjointViewReturnType< UpLo >::Type Eigen::SparseMatrixBase< Derived >::selfadjointView ( )
inherited
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
inlineinherited

◆ selfadjointView() [4/4]

template<typename Derived >
template<unsigned int UpLo>
SparseMatrixBase< Derived >::template ConstSelfAdjointViewReturnType< UpLo >::Type Eigen::SparseMatrixBase< Derived >::selfadjointView ( ) const
inherited
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
inlineinherited
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
inlineinherited
78{
79 return numext::real((*this).cwiseAbs2().sum());
80}

◆ subTo()

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

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

+ Here is the call graph for this function:

◆ sum()

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

References eigen_assert.

◆ toDense()

template<typename Derived >
DenseMatrixType Eigen::SparseMatrixBase< Derived >::toDense ( ) const
inlineinherited
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 ( )
inlineinherited
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
inlineinherited
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
inlineinherited
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
inlineinherited
Returns
an expression of P H P^-1 where H is the matrix represented by *this
325 {
326 return SparseSymmetricPermutationProduct<Derived,Upper|Lower>(derived(), perm);
327 }

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:

◆ valuePtr() [1/2]

template<typename Derived >
Scalar * Eigen::SparseCompressedBase< Derived >::valuePtr ( )
inline
Returns
a non-const pointer to the array of values. This function is aimed at interoperability with other libraries.
See also
innerIndexPtr(), outerIndexPtr()
75{ return derived().valuePtr(); }

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

+ Here is the call graph for this function:

◆ valuePtr() [2/2]

template<typename Derived >
const Scalar * Eigen::SparseCompressedBase< Derived >::valuePtr ( ) const
inline
Returns
a const pointer to the array of values. This function is aimed at interoperability with other libraries.
See also
innerIndexPtr(), outerIndexPtr()
71{ return derived().valuePtr(); }

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

Referenced by Eigen::SparseCompressedBase< Derived >::coeffs(), and Eigen::SparseCompressedBase< Derived >::coeffs().

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

Member Data Documentation

◆ m_isRValue

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

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