fix typo in previous commit

This commit is contained in:
Gael Guennebaud 2009-07-13 15:21:32 +02:00
parent 1e7b1a8a85
commit bd506d837c
2 changed files with 13 additions and 20 deletions

View File

@ -446,14 +446,7 @@ template<typename Derived> class SparseMatrixBase
{ {
for (typename Derived::InnerIterator i(derived(),j); i; ++i) for (typename Derived::InnerIterator i(derived(),j); i; ++i)
{ {
if(IsRowMajor) res.coeffRef(i.row(),i.col()) = i.value();
std::cerr << i.row() << "," << i.col() << " == " << j << "," << i.index() << "\n";
else
std::cerr << i.row() << "," << i.col() << " == " << i.index() << "," << j << "\n";
// if(IsRowMajor)
res.coeffRef(i.row(),i.col()) = i.value();
// else
// res.coeffRef(i.index(),j) = i.value();
} }
} }
return res; return res;

View File

@ -42,11 +42,11 @@ struct ei_traits<SparseNestByValue<ExpressionType> > : public ei_traits<Expressi
{}; {};
template<typename ExpressionType> class SparseNestByValue template<typename ExpressionType> class SparseNestByValue
: public SparseMatrixBase<NestByValue<ExpressionType> > : public SparseMatrixBase<SparseNestByValue<ExpressionType> >
{ {
public: public:
class InnerIterator; typedef typename ExpressionType::InnerIterator InnerIterator;
EIGEN_SPARSE_GENERIC_PUBLIC_INTERFACE(SparseNestByValue) EIGEN_SPARSE_GENERIC_PUBLIC_INTERFACE(SparseNestByValue)
@ -70,15 +70,15 @@ SparseMatrixBase<Derived>::nestByValue() const
return SparseNestByValue<Derived>(derived()); return SparseNestByValue<Derived>(derived());
} }
template<typename MatrixType> // template<typename MatrixType>
class SparseNestByValue<MatrixType>::InnerIterator : public MatrixType::InnerIterator // class SparseNestByValue<MatrixType>::InnerIterator : public MatrixType::InnerIterator
{ // {
typedef typename MatrixType::InnerIterator Base; // typedef typename MatrixType::InnerIterator Base;
public: // public:
//
EIGEN_STRONG_INLINE InnerIterator(const SparseNestByValue& expr, int outer) // EIGEN_STRONG_INLINE InnerIterator(const SparseNestByValue& expr, int outer)
: Base(expr.m_expression, outer) // : Base(expr.m_expression, outer)
{} // {}
}; // };
#endif // EIGEN_SPARSENESTBYVALUE_H #endif // EIGEN_SPARSENESTBYVALUE_H