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)
{
if(IsRowMajor)
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();
res.coeffRef(i.row(),i.col()) = i.value();
}
}
return res;

View File

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