10 #ifndef EIGEN_SPARSETRANSPOSE_H
11 #define EIGEN_SPARSETRANSPOSE_H
15 template<
typename MatrixType>
class TransposeImpl<MatrixType,Sparse>
16 :
public SparseMatrixBase<Transpose<MatrixType> >
18 typedef typename internal::remove_all<typename MatrixType::Nested>::type _MatrixTypeNested;
21 EIGEN_SPARSE_PUBLIC_INTERFACE(Transpose<MatrixType> )
24 class ReverseInnerIterator;
26 inline Index nonZeros()
const {
return derived().nestedExpression().nonZeros(); }
33 template<
typename MatrixType>
class TransposeImpl<MatrixType,Sparse>::InnerIterator
34 :
public _MatrixTypeNested::InnerIterator
36 typedef typename _MatrixTypeNested::InnerIterator Base;
37 typedef typename TransposeImpl::Index Index;
40 EIGEN_STRONG_INLINE InnerIterator(
const TransposeImpl& trans,
typename TransposeImpl<MatrixType,Sparse>::Index outer)
41 : Base(trans.derived().nestedExpression(), outer)
43 typename TransposeImpl<MatrixType,Sparse>::Index row()
const {
return Base::col(); }
44 typename TransposeImpl<MatrixType,Sparse>::Index col()
const {
return Base::row(); }
47 template<
typename MatrixType>
class TransposeImpl<MatrixType,Sparse>::ReverseInnerIterator
48 :
public _MatrixTypeNested::ReverseInnerIterator
50 typedef typename _MatrixTypeNested::ReverseInnerIterator Base;
51 typedef typename TransposeImpl::Index Index;
54 EIGEN_STRONG_INLINE ReverseInnerIterator(
const TransposeImpl& xpr,
typename TransposeImpl<MatrixType,Sparse>::Index outer)
55 : Base(xpr.derived().nestedExpression(), outer)
57 typename TransposeImpl<MatrixType,Sparse>::Index row()
const {
return Base::col(); }
58 typename TransposeImpl<MatrixType,Sparse>::Index col()
const {
return Base::row(); }
63 #endif // EIGEN_SPARSETRANSPOSE_H