10 #ifndef EIGEN_SPARSETRANSPOSE_H
11 #define EIGEN_SPARSETRANSPOSE_H
18 template<
typename MatrixType,
int CompressedAccess=
int(MatrixType::Flags&CompressedAccessBit)>
19 class SparseTransposeImpl
20 :
public SparseMatrixBase<Transpose<MatrixType> >
23 template<
typename MatrixType>
25 :
public SparseCompressedBase<Transpose<MatrixType> >
27 typedef SparseCompressedBase<Transpose<MatrixType> > Base;
30 typedef typename Base::Scalar
Scalar;
33 inline Index nonZeros()
const {
return derived().nestedExpression().nonZeros(); }
35 inline const Scalar* valuePtr()
const {
return derived().nestedExpression().valuePtr(); }
36 inline const StorageIndex* innerIndexPtr()
const {
return derived().nestedExpression().innerIndexPtr(); }
37 inline const StorageIndex* outerIndexPtr()
const {
return derived().nestedExpression().outerIndexPtr(); }
38 inline const StorageIndex* innerNonZeroPtr()
const {
return derived().nestedExpression().innerNonZeroPtr(); }
40 inline Scalar* valuePtr() {
return derived().nestedExpression().valuePtr(); }
41 inline StorageIndex* innerIndexPtr() {
return derived().nestedExpression().innerIndexPtr(); }
42 inline StorageIndex* outerIndexPtr() {
return derived().nestedExpression().outerIndexPtr(); }
43 inline StorageIndex* innerNonZeroPtr() {
return derived().nestedExpression().innerNonZeroPtr(); }
48 :
public internal::SparseTransposeImpl<MatrixType>
51 typedef internal::SparseTransposeImpl<MatrixType>
Base;
56 template<
typename ArgType>
57 struct unary_evaluator<
Transpose<ArgType>, IteratorBased>
58 :
public evaluator_base<Transpose<ArgType> >
60 typedef typename evaluator<ArgType>::InnerIterator
EvalIterator;
64 inline Index nonZerosEstimate()
const {
65 return m_argImpl.nonZerosEstimate();
71 EIGEN_STRONG_INLINE InnerIterator(
const unary_evaluator& unaryOp,
Index outer)
80 CoeffReadCost = evaluator<ArgType>::CoeffReadCost,
81 Flags = XprType::Flags
84 explicit unary_evaluator(
const XprType& op) :m_argImpl(op.nestedExpression()) {}
87 evaluator<ArgType> m_argImpl;
RowXpr row(Index i)
This is the const version of row(). */.
ColXpr col(Index i)
This is the const version of col().
Matrix< float, 1, Dynamic > MatrixType
The matrix class, also used for vectors and row-vectors.
internal::traits< Transpose< MatrixType > >::StorageIndex StorageIndex
internal::traits< Transpose< MatrixType > >::Scalar Scalar
internal::SparseTransposeImpl< MatrixType > Base
Expression of the transpose of a matrix.
const unsigned int CompressedAccessBit
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Transpose< MatrixType > & derived()