10#ifndef EIGEN_SPARSE_REF_H
11#define EIGEN_SPARSE_REF_H
21template<
typename Derived>
class SparseRefBase;
23template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int _Options,
typename _Str
ideType>
25 :
public traits<SparseMatrix<MatScalar,MatOptions,MatIndex> >
33 template<
typename Derived>
struct match {
35 StorageOrderMatch = PlainObjectType::IsVectorAtCompileTime || Derived::IsVectorAtCompileTime || ((PlainObjectType::Flags&
RowMajorBit)==(Derived::Flags&
RowMajorBit)),
43template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int _Options,
typename _Str
ideType>
45 :
public traits<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, _Options, _StrideType> >
52template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int _Options,
typename _Str
ideType>
54 :
public traits<SparseVector<MatScalar,MatOptions,MatIndex> >
62 template<
typename Derived>
struct match {
71template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int _Options,
typename _Str
ideType>
73 :
public traits<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, _Options, _StrideType> >
80template<
typename Derived>
92 :
Base(RowsAtCompileTime==
Dynamic?0:RowsAtCompileTime,ColsAtCompileTime==
Dynamic?0:ColsAtCompileTime, 0, 0, 0, 0, 0)
97 template<
typename Expression>
100 if(expr.outerIndexPtr()==0)
101 ::new (
static_cast<Base*
>(
this))
Base(expr.size(), expr.
nonZeros(), expr.innerIndexPtr(), expr.valuePtr());
103 ::new (
static_cast<Base*
>(
this))
Base(expr.rows(), expr.cols(), expr.
nonZeros(), expr.outerIndexPtr(), expr.innerIndexPtr(), expr.valuePtr(), expr.innerNonZeroPtr());
121#ifndef EIGEN_PARSED_BY_DOXYGEN
122template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int Options,
typename Str
ideType>
126template<typename SparseMatrixType, int Options>
133 template<
int OtherOptions>
135 template<
int OtherOptions>
140 EIGEN_SPARSE_PUBLIC_INTERFACE(
Ref)
143 #ifndef EIGEN_PARSED_BY_DOXYGEN
144 template<
int OtherOptions>
149 Base::construct(expr.derived());
152 template<
int OtherOptions>
157 Base::construct(expr.derived());
160 template<
typename Derived>
164 template<
typename Derived>
171 Base::construct(expr.const_cast_derived());
176template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int Options,
typename Str
ideType>
185 EIGEN_SPARSE_PUBLIC_INTERFACE(
Ref)
187 template<
typename Derived>
193 inline Ref(
const Ref& other) :
Base(other), m_hasCopy(
false) {
197 template<
typename OtherRef>
205 obj->~TPlainObjectType();
211 template<
typename Expression>
219 Base::construct(*obj);
223 Base::construct(expr);
227 template<
typename Expression>
233 Base::construct(*obj);
252#ifndef EIGEN_PARSED_BY_DOXYGEN
253template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int Options,
typename Str
ideType>
257template<typename SparseVectorType>
264 template<
int OtherOptions>
269 EIGEN_SPARSE_PUBLIC_INTERFACE(
Ref)
271 #ifndef EIGEN_PARSED_BY_DOXYGEN
272 template<
int OtherOptions>
276 Base::construct(expr.derived());
279 template<
typename Derived>
283 template<
typename Derived>
289 Base::construct(expr.const_cast_derived());
294template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int Options,
typename Str
ideType>
303 EIGEN_SPARSE_PUBLIC_INTERFACE(
Ref)
305 template<
typename Derived>
311 inline Ref(
const Ref& other) :
Base(other), m_hasCopy(
false) {
315 template<
typename OtherRef>
323 obj->~TPlainObjectType();
329 template<
typename Expression>
332 Base::construct(expr);
335 template<
typename Expression>
341 Base::construct(*obj);
353template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int Options,
typename Str
ideType>
355 :
evaluator<SparseCompressedBase<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> > >
363template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int Options,
typename Str
ideType>
365 :
evaluator<SparseCompressedBase<Ref<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> > >
373template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int Options,
typename Str
ideType>
375 :
evaluator<SparseCompressedBase<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, Options, StrideType> > >
383template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int Options,
typename Str
ideType>
385 :
evaluator<SparseCompressedBase<Ref<const SparseVector<MatScalar,MatOptions,MatIndex>, Options, StrideType> > >
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index nonZeros() const
Definition DenseBase.h:215
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
A sparse matrix expression referencing an existing sparse expression.
Definition SparseRef.h:130
A sparse vector expression referencing an existing sparse vector expression.
Definition SparseRef.h:261
Definition SparseRef.h:179
Definition SparseRef.h:297
A matrix or vector expression mapping an existing expression.
Definition Ref.h:283
Definition SparseMap.h:43
A versatible sparse matrix representation.
Definition SparseMatrix.h:98
a sparse vector class
Definition SparseVector.h:66
Definition SparseRef.h:85
const unsigned int LvalueBit
Means the expression has a coeffRef() method, i.e.
Definition Constants.h:144
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition Constants.h:66
const unsigned int CompressedAccessBit
Means that the underlying coefficients can be accessed through pointers to the sparse (un)compressed ...
Definition Constants.h:191
Namespace containing all symbols from the Eigen library.
Definition LDLT.h:16
@ StandardCompressedFormat
used by Ref<SparseMatrix> to specify whether the input storage must be in standard compressed form
Definition SparseRef.h:16
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time,...
Definition Constants.h:22
Definition CoreEvaluators.h:91
Definition XprHelper.h:660
Definition ForwardDeclarations.h:17