Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Eigen::SparseVector< _Scalar, _Options, _StorageIndex > Class Template Reference

a sparse vector class More...

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

+ Inheritance diagram for Eigen::SparseVector< _Scalar, _Options, _StorageIndex >:
+ Collaboration diagram for Eigen::SparseVector< _Scalar, _Options, _StorageIndex >:

Public Types

enum  { IsColVector = internal::traits<SparseVector>::IsColVector }
 
enum  { Options = _Options }
 
typedef internal::CompressedStorage< Scalar, StorageIndexStorage
 
typedef Base::InnerIterator InnerIterator
 
typedef Base::ReverseInnerIterator ReverseInnerIterator
 
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

EIGEN_STRONG_INLINE Index rows () const
 
EIGEN_STRONG_INLINE Index cols () const
 
EIGEN_STRONG_INLINE Index innerSize () const
 
EIGEN_STRONG_INLINE Index outerSize () const
 
EIGEN_STRONG_INLINE const ScalarvaluePtr () const
 
EIGEN_STRONG_INLINE ScalarvaluePtr ()
 
EIGEN_STRONG_INLINE const StorageIndexinnerIndexPtr () const
 
EIGEN_STRONG_INLINE StorageIndexinnerIndexPtr ()
 
const StorageIndexouterIndexPtr () const
 
StorageIndexouterIndexPtr ()
 
const StorageIndexinnerNonZeroPtr () const
 
StorageIndexinnerNonZeroPtr ()
 
Storagedata ()
 
const Storagedata () const
 
Scalar coeff (Index row, Index col) const
 
Scalar coeff (Index i) const
 
ScalarcoeffRef (Index row, Index col)
 
ScalarcoeffRef (Index i)
 
void setZero ()
 
Index nonZeros () const
 
void startVec (Index outer)
 
ScalarinsertBackByOuterInner (Index outer, Index inner)
 
ScalarinsertBack (Index i)
 
ScalarinsertBackByOuterInnerUnordered (Index outer, Index inner)
 
ScalarinsertBackUnordered (Index i)
 
Scalarinsert (Index row, Index col)
 
Scalarinsert (Index i)
 
void reserve (Index reserveSize)
 
void finalize ()
 
void prune (const Scalar &reference, const RealScalar &epsilon=NumTraits< RealScalar >::dummy_precision())
 
void resize (Index rows, Index cols)
 
void resize (Index newSize)
 
void conservativeResize (Index newSize)
 
void resizeNonZeros (Index size)
 
 SparseVector ()
 
 SparseVector (Index size)
 
 SparseVector (Index rows, Index cols)
 
template<typename OtherDerived >
 SparseVector (const SparseMatrixBase< OtherDerived > &other)
 
 SparseVector (const SparseVector &other)
 
void swap (SparseVector &other)
 
template<int OtherOptions>
void swap (SparseMatrix< Scalar, OtherOptions, StorageIndex > &other)
 
SparseVectoroperator= (const SparseVector &other)
 
template<typename OtherDerived >
SparseVectoroperator= (const SparseMatrixBase< OtherDerived > &other)
 
template<typename Lhs , typename Rhs >
SparseVectoroperator= (const SparseSparseProduct< Lhs, Rhs > &product)
 
 ~SparseVector ()
 
Scalar sum () const
 
EIGEN_DEPRECATED void startFill (Index reserve)
 
EIGEN_DEPRECATED Scalarfill (Index r, Index c)
 
EIGEN_DEPRECATED Scalarfill (Index i)
 
EIGEN_DEPRECATED Scalarfillrand (Index r, Index c)
 
EIGEN_DEPRECATED Scalarfillrand (Index i)
 
EIGEN_DEPRECATED void endFill ()
 
EIGEN_DEPRECATED Storage_data ()
 
EIGEN_DEPRECATED const Storage_data () const
 
bool isCompressed () const
 
const Map< const Array< Scalar, Dynamic, 1 > > coeffs () const
 
Map< Array< Scalar, Dynamic, 1 > > coeffs ()
 
const Derived & derived () const
 
Derived & derived ()
 
Derived & const_cast_derived () const
 
Index size () const
 
bool isVector () 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
 
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
 
template<typename OtherDerived >
Derived & assign (const OtherDerived &other)
 
template<typename OtherDerived >
void assignGeneric (const OtherDerived &other)
 

Static Protected Member Functions

static void check_template_parameters ()
 
static StorageIndex convert_index (const Index idx)
 

Protected Attributes

Storage m_data
 
Index m_size
 
bool m_isRValue
 

Private Types

typedef SparseCompressedBase< SparseVectorBase
 

Private Member Functions

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

Friends

std::ostream & operator<< (std::ostream &s, const SparseVector &m)
 

Detailed Description

template<typename _Scalar, int _Options, typename _StorageIndex>
class Eigen::SparseVector< _Scalar, _Options, _StorageIndex >

a sparse vector class

Template Parameters
_Scalarthe scalar type, i.e. the type of the coefficients

See http://www.netlib.org/linalg/html_templates/node91.html for details on the storage scheme.

This class can be extended with the help of the plugin mechanism described on the page TopicCustomizing_Plugins by defining the preprocessor symbol EIGEN_SPARSEVECTOR_PLUGIN.

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 _Scalar , int _Options, typename _StorageIndex >
typedef SparseCompressedBase<SparseVector> Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::Base
private

◆ 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

typedef Base::IndexVector Eigen::SparseCompressedBase< SparseVector< _Scalar, _Options, _StorageIndex > >::IndexVector
protectedinherited

◆ InnerIterator

template<typename _Scalar , int _Options, typename _StorageIndex >
typedef Base::InnerIterator Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::InnerIterator

◆ 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

◆ ReverseInnerIterator

template<typename _Scalar , int _Options, typename _StorageIndex >
typedef Base::ReverseInnerIterator Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::ReverseInnerIterator

◆ 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

◆ Storage

template<typename _Scalar , int _Options, typename _StorageIndex >
typedef internal::CompressedStorage<Scalar,StorageIndex> Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::Storage

◆ 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

◆ anonymous enum

template<typename _Scalar , int _Options, typename _StorageIndex >
anonymous enum
Enumerator
IsColVector 
75{ IsColVector = internal::traits<SparseVector>::IsColVector };
@ IsColVector
Definition SparseVector.h:75

◆ anonymous enum

template<typename _Scalar , int _Options, typename _StorageIndex >
anonymous enum
Enumerator
Options 
77 {
78 Options = _Options
79 };
@ Options
Definition SparseVector.h:78

Constructor & Destructor Documentation

◆ SparseVector() [1/5]

template<typename _Scalar , int _Options, typename _StorageIndex >
Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::SparseVector ( )
inline
void resize(Index rows, Index cols)
Definition SparseVector.h:223
static void check_template_parameters()
Definition SparseVector.h:397
Index m_size
Definition SparseVector.h:404

◆ SparseVector() [2/5]

template<typename _Scalar , int _Options, typename _StorageIndex >
Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::SparseVector ( Index  size)
inlineexplicit
Index size() const
Definition SparseMatrixBase.h:176

◆ SparseVector() [3/5]

template<typename _Scalar , int _Options, typename _StorageIndex >
Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::SparseVector ( Index  rows,
Index  cols 
)
inline
EIGEN_STRONG_INLINE Index cols() const
Definition SparseVector.h:82
EIGEN_STRONG_INLINE Index rows() const
Definition SparseVector.h:81

◆ SparseVector() [4/5]

template<typename _Scalar , int _Options, typename _StorageIndex >
template<typename OtherDerived >
Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::SparseVector ( const SparseMatrixBase< OtherDerived > &  other)
inline
267 : m_size(0)
268 {
269 #ifdef EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
270 EIGEN_SPARSE_CREATE_TEMPORARY_PLUGIN
271 #endif
273 *this = other.derived();
274 }

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

+ Here is the call graph for this function:

◆ SparseVector() [5/5]

template<typename _Scalar , int _Options, typename _StorageIndex >
Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::SparseVector ( const SparseVector< _Scalar, _Options, _StorageIndex > &  other)
inline
277 : Base(other), m_size(0)
278 {
280 *this = other.derived();
281 }
SparseCompressedBase< SparseVector > Base
Definition SparseVector.h:67

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

+ Here is the call graph for this function:

◆ ~SparseVector()

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

Destructor

341{}

Member Function Documentation

◆ _data() [1/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_DEPRECATED Storage & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::_data ( )
inline
387{ return m_data; }
Storage m_data
Definition SparseVector.h:403

◆ _data() [2/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_DEPRECATED const Storage & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::_data ( ) const
inline
389{ return m_data; }

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

◆ check_template_parameters()

template<typename _Scalar , int _Options, typename _StorageIndex >
static void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::check_template_parameters ( )
inlinestaticprotected
398 {
399 EIGEN_STATIC_ASSERT(NumTraits<StorageIndex>::IsSigned,THE_INDEX_TYPE_MUST_BE_A_SIGNED_TYPE);
400 EIGEN_STATIC_ASSERT((_Options&(ColMajor|RowMajor))==Options,INVALID_MATRIX_TEMPLATE_PARAMETERS);
401 }
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition StaticAssert.h:124
@ ColMajor
Definition Constants.h:320
@ RowMajor
Definition Constants.h:322
@ IsSigned
Definition NumTraits.h:92

References Eigen::ColMajor, EIGEN_STATIC_ASSERT, and Eigen::RowMajor.

◆ coeff() [1/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
Scalar Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::coeff ( Index  i) const
inline
108 {
109 eigen_assert(i>=0 && i<m_size);
110 return m_data.at(StorageIndex(i));
111 }
#define eigen_assert(x)
Definition Macros.h:579
internal::traits< Derived >::StorageIndex StorageIndex
Definition SparseMatrixBase.h:43
Scalar at(Index key, const Scalar &defaultValue=Scalar(0)) const
Definition CompressedStorage.h:146

References eigen_assert.

◆ coeff() [2/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
Scalar Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::coeff ( Index  row,
Index  col 
) const
inline
103 {
104 eigen_assert(IsColVector ? (col==0 && row>=0 && row<m_size) : (row==0 && col>=0 && col<m_size));
105 return coeff(IsColVector ? row : col);
106 }
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
Scalar coeff(Index row, Index col) const
Definition SparseVector.h:102

References col(), eigen_assert, and row().

+ Here is the call graph for this function:

◆ coeffRef() [1/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
Scalar & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::coeffRef ( Index  i)
inline
Returns
a reference to the coefficient value at given index i This operation involes a log(rho*size) binary search. If the coefficient does not exist yet, then a sorted insertion into a sequential buffer is performed.

This insertion might be very costly if the number of nonzeros above i is large.

126 {
127 eigen_assert(i>=0 && i<m_size);
128
130 }
Scalar & atWithInsertion(Index key, const Scalar &defaultValue=Scalar(0))
Definition CompressedStorage.h:174

References eigen_assert.

◆ coeffRef() [2/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
Scalar & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::coeffRef ( Index  row,
Index  col 
)
inline
114 {
115 eigen_assert(IsColVector ? (col==0 && row>=0 && row<m_size) : (row==0 && col>=0 && col<m_size));
116 return coeffRef(IsColVector ? row : col);
117 }
Scalar & coeffRef(Index row, Index col)
Definition SparseVector.h:113

References col(), eigen_assert, and row().

Referenced by igl::count(), and igl::sum().

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

◆ coeffs() [1/2]

Map< Array< Scalar, Dynamic, 1 > > Eigen::SparseCompressedBase< SparseVector< _Scalar, _Options, _StorageIndex > >::coeffs ( )
inlineinherited
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()
126{ eigen_assert(isCompressed()); return Array<Scalar,Dynamic,1>::Map(valuePtr(),nonZeros()); }
const Scalar * valuePtr() const
Definition SparseCompressedBase.h:71
bool isCompressed() const
Definition SparseCompressedBase.h:107

◆ coeffs() [2/2]

const Map< const Array< Scalar, Dynamic, 1 > > Eigen::SparseCompressedBase< SparseVector< _Scalar, _Options, _StorageIndex > >::coeffs ( ) const
inlineinherited
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()
114{ eigen_assert(isCompressed()); return Array<Scalar,Dynamic,1>::Map(valuePtr(),nonZeros()); }

◆ cols()

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_STRONG_INLINE Index Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::cols ( ) const
inline
82{ return IsColVector ? 1 : m_size; }

◆ conservativeResize()

template<typename _Scalar , int _Options, typename _StorageIndex >
void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::conservativeResize ( Index  newSize)
inline

Resizes the sparse vector to newSize, while leaving old values untouched.

If the size of the vector is decreased, then the storage of the out-of bounds coefficients is kept and reserved. Call .data().squeeze() to free extra memory.

See also
reserve(), setZero()
247 {
248 if (newSize < m_size)
249 {
250 Index i = 0;
251 while (i<m_data.size() && m_data.index(i)<newSize) ++i;
252 m_data.resize(i);
253 }
254 m_size = newSize;
255 }
Index size() const
Definition CompressedStorage.h:109
StorageIndex & index(Index i)
Definition CompressedStorage.h:121
void resize(Index size, double reserveSizeFactor=0)
Definition CompressedStorage.h:89
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:33

◆ 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
const Derived & derived() const
Definition SparseMatrixBase.h:138

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

◆ data() [1/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
Storage & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::data ( )
inline
98{ return m_data; }

◆ data() [2/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
const Storage & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::data ( ) const
inline
100{ return m_data; }

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

◆ endFill()

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_DEPRECATED void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::endFill ( )
inline
383{}

◆ 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

◆ fill() [1/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_DEPRECATED Scalar & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::fill ( Index  i)
inline
364 {
365 m_data.append(0, i);
366 return m_data.value(m_data.size()-1);
367 }
Scalar & value(Index i)
Definition CompressedStorage.h:118
void append(const Scalar &v, Index i)
Definition CompressedStorage.h:101

◆ fill() [2/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_DEPRECATED Scalar & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::fill ( Index  r,
Index  c 
)
inline
357 {
358 eigen_assert(r==0 || c==0);
359 return fill(IsColVector ? r : c);
360 }
EIGEN_DEPRECATED Scalar & fill(Index r, Index c)
Definition SparseVector.h:356

References eigen_assert.

◆ fillrand() [1/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_DEPRECATED Scalar & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::fillrand ( Index  i)
inline
378 {
379 return insert(i);
380 }
Scalar & insert(Index row, Index col)
Definition SparseVector.h:172

◆ fillrand() [2/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_DEPRECATED Scalar & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::fillrand ( Index  r,
Index  c 
)
inline
371 {
372 eigen_assert(r==0 || c==0);
373 return fillrand(IsColVector ? r : c);
374 }
EIGEN_DEPRECATED Scalar & fillrand(Index r, Index c)
Definition SparseVector.h:370

References eigen_assert.

◆ finalize()

template<typename _Scalar , int _Options, typename _StorageIndex >
void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::finalize ( )
inline
207{}

◆ innerIndexPtr() [1/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_STRONG_INLINE StorageIndex * Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::innerIndexPtr ( )
inline
90{ return m_data.indexPtr(); }
const StorageIndex * indexPtr() const
Definition CompressedStorage.h:115

◆ innerIndexPtr() [2/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_STRONG_INLINE const StorageIndex * Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::innerIndexPtr ( ) const
inline
89{ return m_data.indexPtr(); }

◆ innerNonZeroPtr() [1/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
StorageIndex * Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::innerNonZeroPtr ( )
inline
95{ return 0; }

◆ innerNonZeroPtr() [2/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
const StorageIndex * Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::innerNonZeroPtr ( ) const
inline
94{ return 0; }

◆ innerNonZeros() [1/2]

Eigen::Map< IndexVector > Eigen::SparseCompressedBase< SparseVector< _Scalar, _Options, _StorageIndex > >::innerNonZeros ( )
inlineprotectedinherited
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

◆ innerNonZeros() [2/2]

const Eigen::Map< const IndexVector > Eigen::SparseCompressedBase< SparseVector< _Scalar, _Options, _StorageIndex > >::innerNonZeros ( ) const
inlineprotectedinherited

◆ innerSize()

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_STRONG_INLINE Index Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::innerSize ( ) const
inline
83{ return m_size; }

◆ 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}
Index rows() const
Definition SparseMatrixBase.h:171
Index cols() const
Definition SparseMatrixBase.h:173

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

◆ insert() [1/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
Scalar & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::insert ( Index  i)
inline
183 {
184 eigen_assert(i>=0 && i<m_size);
185
186 Index startId = 0;
187 Index p = Index(m_data.size()) - 1;
188 // TODO smart realloc
189 m_data.resize(p+2,1);
190
191 while ( (p >= startId) && (m_data.index(p) > i) )
192 {
193 m_data.index(p+1) = m_data.index(p);
194 m_data.value(p+1) = m_data.value(p);
195 --p;
196 }
197 m_data.index(p+1) = convert_index(i);
198 m_data.value(p+1) = 0;
199 return m_data.value(p+1);
200 }
static StorageIndex convert_index(const Index idx)
Definition SparseMatrixBase.h:396

References eigen_assert.

◆ insert() [2/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
Scalar & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::insert ( Index  row,
Index  col 
)
inline
173 {
174 eigen_assert(IsColVector ? (col==0 && row>=0 && row<m_size) : (row==0 && col>=0 && col<m_size));
175
176 Index inner = IsColVector ? row : col;
177 Index outer = IsColVector ? col : row;
179 eigen_assert(outer==0);
180 return insert(inner);
181 }
#define EIGEN_ONLY_USED_FOR_DEBUG(x)
Definition Macros.h:591

References col(), eigen_assert, EIGEN_ONLY_USED_FOR_DEBUG, and row().

+ Here is the call graph for this function:

◆ insertBack()

template<typename _Scalar , int _Options, typename _StorageIndex >
Scalar & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::insertBack ( Index  i)
inline
155 {
156 m_data.append(0, i);
157 return m_data.value(m_data.size()-1);
158 }

◆ insertBackByOuterInner()

template<typename _Scalar , int _Options, typename _StorageIndex >
Scalar & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::insertBackByOuterInner ( Index  outer,
Index  inner 
)
inline
149 {
151 eigen_assert(outer==0);
152 return insertBack(inner);
153 }
#define EIGEN_UNUSED_VARIABLE(var)
Definition Macros.h:618
Scalar & insertBack(Index i)
Definition SparseVector.h:154

References eigen_assert, and EIGEN_UNUSED_VARIABLE.

◆ insertBackByOuterInnerUnordered()

template<typename _Scalar , int _Options, typename _StorageIndex >
Scalar & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::insertBackByOuterInnerUnordered ( Index  outer,
Index  inner 
)
inline
161 {
163 eigen_assert(outer==0);
164 return insertBackUnordered(inner);
165 }
Scalar & insertBackUnordered(Index i)
Definition SparseVector.h:166

References eigen_assert, and EIGEN_UNUSED_VARIABLE.

◆ insertBackUnordered()

template<typename _Scalar , int _Options, typename _StorageIndex >
Scalar & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::insertBackUnordered ( Index  i)
inline
167 {
168 m_data.append(0, i);
169 return m_data.value(m_data.size()-1);
170 }

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

bool Eigen::SparseCompressedBase< SparseVector< _Scalar, _Options, _StorageIndex > >::isCompressed ( ) const
inlineinherited
Returns
whether *this is in compressed form.
107{ return innerNonZeroPtr()==0; }

◆ 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 _Scalar , int _Options, typename _StorageIndex >
Index Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::nonZeros ( ) const
inline
Returns
the number of non zero coefficients
140{ return m_data.size(); }

Referenced by igl::invert_diag().

+ 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/3]

template<typename _Scalar , int _Options, typename _StorageIndex >
template<typename OtherDerived >
SparseVector & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::operator= ( const SparseMatrixBase< OtherDerived > &  other)
inline
317 {
318 SparseVector tmp(other.size());
319 internal::sparse_vector_assign_selector<SparseVector,OtherDerived>::run(tmp,other.derived());
320 this->swap(tmp);
321 return *this;
322 }
void swap(SparseVector &other)
Definition SparseVector.h:287
SparseVector()
Definition SparseVector.h:259

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

+ Here is the call graph for this function:

◆ operator=() [2/3]

template<typename _Scalar , int _Options, typename _StorageIndex >
template<typename Lhs , typename Rhs >
SparseVector & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::operator= ( const SparseSparseProduct< Lhs, Rhs > &  product)
inline
327 {
328 return Base::operator=(product);
329 }
Derived & operator=(const EigenBase< OtherDerived > &other)
Definition SparseAssign.h:17

◆ operator=() [3/3]

template<typename _Scalar , int _Options, typename _StorageIndex >
SparseVector & Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::operator= ( const SparseVector< _Scalar, _Options, _StorageIndex > &  other)
inline
302 {
303 if (other.isRValue())
304 {
305 swap(other.const_cast_derived());
306 }
307 else
308 {
309 resize(other.size());
310 m_data = other.m_data;
311 }
312 return *this;
313 }

References Eigen::SparseMatrixBase< Derived >::const_cast_derived(), Eigen::SparseMatrixBase< Derived >::isRValue(), Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::m_data, and Eigen::SparseMatrixBase< Derived >::size().

+ Here is the call graph for this function:

◆ outerIndexPtr() [1/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
StorageIndex * Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::outerIndexPtr ( )
inline
93{ return 0; }

◆ outerIndexPtr() [2/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
const StorageIndex * Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::outerIndexPtr ( ) const
inline
92{ return 0; }

◆ outerSize()

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_STRONG_INLINE Index Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::outerSize ( ) const
inline
84{ return 1; }

◆ prune()

template<typename _Scalar , int _Options, typename _StorageIndex >
void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::prune ( const Scalar reference,
const RealScalar epsilon = NumTraits<RealScalar>::dummy_precision() 
)
inline

Suppresses all nonzeros which are much smaller than reference under the tolerence epsilon

211 {
212 m_data.prune(reference,epsilon);
213 }
void prune(const Scalar &reference, const RealScalar &epsilon=NumTraits< RealScalar >::dummy_precision())
Definition CompressedStorage.h:210

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

◆ reserve()

template<typename _Scalar , int _Options, typename _StorageIndex >
void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::reserve ( Index  reserveSize)
inline
204{ m_data.reserve(reserveSize); }
void reserve(Index size)
Definition CompressedStorage.h:76

◆ resize() [1/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::resize ( Index  newSize)
inline

Resizes the sparse vector to newSize This method deletes all entries, thus leaving an empty sparse vector

See also
conservativeResize(), setZero()
234 {
235 m_size = newSize;
236 m_data.clear();
237 }
void clear()
Definition CompressedStorage.h:111

◆ resize() [2/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::resize ( Index  rows,
Index  cols 
)
inline

Resizes the sparse vector to rows x cols

This method is provided for compatibility with matrices. For a column vector, cols must be equal to 1. For a row vector, rows must be equal to 1.

See also
resize(Index)
224 {
225 eigen_assert((IsColVector ? cols : rows)==1 && "Outer dimension must equal 1");
227 }

References eigen_assert.

◆ resizeNonZeros()

template<typename _Scalar , int _Options, typename _StorageIndex >
void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::resizeNonZeros ( Index  size)
inline
257{ m_data.resize(size); }

◆ rows()

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_STRONG_INLINE Index Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::rows ( ) const
inline
81{ return IsColVector ? m_size : 1; }

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

◆ setZero()

template<typename _Scalar , int _Options, typename _StorageIndex >
void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::setZero ( )
inline
137{ m_data.clear(); }

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

◆ startFill()

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_DEPRECATED void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::startFill ( Index  reserve)
inline
350 {
351 setZero();
353 }
void reserve(Index reserveSize)
Definition SparseVector.h:204
void setZero()
Definition SparseVector.h:137

◆ startVec()

template<typename _Scalar , int _Options, typename _StorageIndex >
void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::startVec ( Index  outer)
inline
143 {
145 eigen_assert(outer==0);
146 }

References eigen_assert, and EIGEN_UNUSED_VARIABLE.

◆ 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 _Scalar , int _Options, typename _Index >
internal::traits< SparseVector< _Scalar, _Options, _Index > >::Scalar Eigen::SparseVector< _Scalar, _Options, _Index >::sum

Overloaded for performance

42{
43 eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix");
45}
const Scalar * valuePtr() const
Definition CompressedStorage.h:113

References Eigen::PlainObjectBase< Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > >::Eigen::Map, and eigen_assert.

◆ swap() [1/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
template<int OtherOptions>
void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::swap ( SparseMatrix< Scalar, OtherOptions, StorageIndex > &  other)
inline
295 {
296 eigen_assert(other.outerSize()==1);
297 std::swap(m_size, other.m_innerSize);
298 m_data.swap(other.m_data);
299 }
void swap(CompressedStorage &other)
Definition CompressedStorage.h:62

References eigen_assert, Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::m_data, Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::m_innerSize, and Eigen::SparseMatrix< _Scalar, _Options, _StorageIndex >::outerSize().

+ Here is the call graph for this function:

◆ swap() [2/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
void Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::swap ( SparseVector< _Scalar, _Options, _StorageIndex > &  other)
inline

Swaps the values of *this and other. Overloaded for performance: this version performs a shallow swap by swaping pointers and attributes only.

See also
SparseMatrixBase::swap()
288 {
289 std::swap(m_size, other.m_size);
290 m_data.swap(other.m_data);
291 }

References Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::m_data, and Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::m_size.

◆ 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 _Scalar , int _Options, typename _StorageIndex >
EIGEN_STRONG_INLINE Scalar * Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::valuePtr ( )
inline
87{ return m_data.valuePtr(); }

◆ valuePtr() [2/2]

template<typename _Scalar , int _Options, typename _StorageIndex >
EIGEN_STRONG_INLINE const Scalar * Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::valuePtr ( ) const
inline
86{ return m_data.valuePtr(); }

Friends And Related Symbol Documentation

◆ operator<<

template<typename _Scalar , int _Options, typename _StorageIndex >
std::ostream & operator<< ( std::ostream &  s,
const SparseVector< _Scalar, _Options, _StorageIndex > &  m 
)
friend
333 {
334 for (Index i=0; i<m.nonZeros(); ++i)
335 s << "(" << m.m_data.value(i) << "," << m.m_data.index(i) << ") ";
336 s << std::endl;
337 return s;
338 }

Member Data Documentation

◆ m_data

template<typename _Scalar , int _Options, typename _StorageIndex >
Storage Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::m_data
protected

◆ m_isRValue

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

◆ m_size

template<typename _Scalar , int _Options, typename _StorageIndex >
Index Eigen::SparseVector< _Scalar, _Options, _StorageIndex >::m_size
protected

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