26 #ifndef EIGEN_SPARSEVIEW_H
27 #define EIGEN_SPARSEVIEW_H
33 template<
typename MatrixType>
34 struct traits<SparseView<MatrixType> > :
traits<MatrixType>
37 typedef Sparse StorageKind;
45 template<
typename MatrixType>
48 typedef typename MatrixType::Nested MatrixTypeNested;
49 typedef typename internal::remove_all<MatrixTypeNested>::type _MatrixTypeNested;
53 SparseView(const MatrixType& mat, const Scalar& m_reference = Scalar(0),
55 m_matrix(mat), m_reference(m_reference), m_epsilon(m_epsilon) {}
59 inline Index rows()
const {
return m_matrix.rows(); }
60 inline Index cols()
const {
return m_matrix.cols(); }
71 template<
typename MatrixType>
72 class SparseView<MatrixType>::InnerIterator :
public _MatrixTypeNested::InnerIterator
75 typedef typename _MatrixTypeNested::InnerIterator IterBase;
76 InnerIterator(
const SparseView& view, Index outer) :
77 IterBase(view.
m_matrix, outer), m_view(view)
84 IterBase::operator++();
89 using IterBase::value;
92 const SparseView& m_view;
95 void incrementToNonZero()
99 IterBase::operator++();
104 template<
typename Derived>