10#ifndef EIGEN_SPARSE_REF_H
11#define EIGEN_SPARSE_REF_H
16 StandardCompressedFormat = 2
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());
122template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int Options,
typename Str
ideType>
128 template<
int OtherOptions>
130 template<
int OtherOptions>
135 EIGEN_SPARSE_PUBLIC_INTERFACE(
Ref)
138 #ifndef EIGEN_PARSED_BY_DOXYGEN
139 template<
int OtherOptions>
143 eigen_assert( ((Options &
int(StandardCompressedFormat))==0) || (expr.isCompressed()) );
144 Base::construct(expr.derived());
147 template<
int OtherOptions>
151 eigen_assert( ((Options &
int(StandardCompressedFormat))==0) || (expr.isCompressed()) );
152 Base::construct(expr.derived());
155 template<
typename Derived>
158 template<
typename Derived>
164 eigen_assert( ((Options &
int(StandardCompressedFormat))==0) || (expr.isCompressed()) );
165 Base::construct(expr.const_cast_derived());
170template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int Options,
typename Str
ideType>
179 EIGEN_SPARSE_PUBLIC_INTERFACE(
Ref)
181 template<
typename Derived>
191 template<
typename OtherRef>
198 template<
typename Expression>
201 if((Options &
int(StandardCompressedFormat)) && (!expr.isCompressed()))
205 Base::construct(*obj);
209 Base::construct(expr);
213 template<
typename Expression>
218 Base::construct(*obj);
238template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int Options,
typename Str
ideType>
244 template<
int OtherOptions>
249 EIGEN_SPARSE_PUBLIC_INTERFACE(
Ref)
251 #ifndef EIGEN_PARSED_BY_DOXYGEN
252 template<
int OtherOptions>
256 Base::construct(expr.derived());
259 template<
typename Derived>
262 template<
typename Derived>
268 Base::construct(expr.const_cast_derived());
273template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int Options,
typename Str
ideType>
282 EIGEN_SPARSE_PUBLIC_INTERFACE(
Ref)
284 template<
typename Derived>
294 template<
typename OtherRef>
301 template<
typename Expression>
304 Base::construct(expr);
307 template<
typename Expression>
312 Base::construct(*obj);
323template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int Options,
typename Str
ideType>
325 :
evaluator<SparseCompressedBase<Ref<SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> > >
333template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int Options,
typename Str
ideType>
335 :
evaluator<SparseCompressedBase<Ref<const SparseMatrix<MatScalar,MatOptions,MatIndex>, Options, StrideType> > >
343template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int Options,
typename Str
ideType>
345 :
evaluator<SparseCompressedBase<Ref<SparseVector<MatScalar,MatOptions,MatIndex>, Options, StrideType> > >
353template<
typename MatScalar,
int MatOptions,
typename MatIndex,
int Options,
typename Str
ideType>
355 :
evaluator<SparseCompressedBase<Ref<const SparseVector<MatScalar,MatOptions,MatIndex>, Options, StrideType> > >
A sparse matrix expression referencing an existing sparse expression.
Definition SparseRef.h:125
A sparse vector expression referencing an existing sparse vector expression.
Definition SparseRef.h:241
Definition SparseRef.h:173
Definition SparseRef.h:276
A matrix or vector expression mapping an existing expression.
Definition Ref.h:188
Pseudo expression representing a solving operation.
Definition Solve.h:63
Definition SparseMap.h:43
A versatible sparse matrix representation.
Definition SparseMatrix.h:94
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:138
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition Constants.h:61
const unsigned int CompressedAccessBit
Means that the underlying coefficients can be accessed through pointers to the sparse (un)compressed ...
Definition Constants.h:185
Definition CoreEvaluators.h:82
Definition XprHelper.h:628
Definition ForwardDeclarations.h:17