sparse_matrices.opt.exe : sparse_matrices.$(OBJEXT) testmatrix.$(OBJEXT) $(libraries_o)
sparsity_pattern.exe : sparsity_pattern.g.$(OBJEXT) testmatrix.g.$(OBJEXT) $(libraries)
sparse_ilu.exe : sparse_ilu.g.$(OBJEXT) testmatrix.g.$(OBJEXT) $(libraries)
+sparse_matrix_ez_iterator.exe : sparse_matrix_ez_iterator.g.$(OBJEXT) $(libraries)
vector-vector.exe : vector-vector.g.$(OBJEXT) $(libraries)
#mgbase.exe : mgbase.g.$(OBJEXT) $(libraries)
#mg.exe : mg.g.$(OBJEXT) testmatrix.g.$(OBJEXT) $(libraries)
tests = $(sort \
sparse_matrices block_matrices block_vector block_vector_iterator \
full_matrix \
- matrix_out solver sparsity_pattern sparse_ilu vector-vector)
+ matrix_out solver sparsity_pattern sparse_ilu \
+ sparse_matrix_ez_iterator vector-vector)
############################################################
--- /dev/null
+#include <base/logstream.h>
+#include <lac/sparse_matrix_ez.h>
+
+#include <fstream>
+
+
+int main ()
+{
+ std::ofstream logfile("sparse_matrix_ez_iterator.output");
+ logfile.setf(std::ios::fixed);
+ logfile.precision(2);
+ deallog.attach(logfile);
+
+ SparseMatrixEZ<double> m (4,4,4);
+ m.set (0,0,1);
+ m.set (1,0,2);
+ m.set (2,0,3);
+ m.set (2,2,0); // should be ignored
+ m.set (0,1,1);
+ m.set (0,2,2);
+ m.set (0,3,3);
+
+ for (SparseMatrixEZ<double>::const_iterator i = m.begin(); i != m.end(); ++i)
+ deallog << i->row() << ' ' << i->column() << ' ' << i->value()
+ << std::endl;
+}
+