Skip to content
Snippets Groups Projects
Commit 4bb33591 authored by Oliver Sander's avatar Oliver Sander
Browse files

Use 'auto' type deduction for matrix rows

This allows to call writeMatrixToMatlabHelper for matrix types
that do not actually implement true matrix rows, such as
DiagonalMatrix and ScaledIdentityMatrix.
parent ab28696c
No related branches found
No related tags found
1 merge request!265Implement matlab writing for matrices with scalar entries
......@@ -521,11 +521,8 @@ namespace Dune {
// Loop over all matrix rows
for (typename MatrixType::size_type rowIdx=0; rowIdx<matrix.N(); rowIdx++)
{
const typename MatrixType::row_type& row = matrix[rowIdx];
typename MatrixType::row_type::ConstIterator cIt = row.begin();
typename MatrixType::row_type::ConstIterator cEndIt = row.end();
auto cIt = matrix[rowIdx].begin();
auto cEndIt = matrix[rowIdx].end();
// Loop over all columns in this row
for (; cIt!=cEndIt; ++cIt)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment