// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
bool operator != (const const_iterator&) const;
/**
- * Comparison
- * operator. Result is true
- * if either the first row
- * number is smaller or if
- * the row numbers are
- * equal and the first
+ * Comparison operator. Result is
+ * true if either the first row
+ * number is smaller or if the row
+ * numbers are equal and the first
* index is smaller.
*/
bool operator < (const const_iterator&) const;
+ /**
+ * Comparison operator. Compares just
+ * the other way around than the
+ * operator above.
+ */
+ bool operator > (const const_iterator&) const;
+
private:
/**
* Store an object of the
}
+template <typename number>
+inline
+bool
+FullMatrix<number>::const_iterator::
+operator > (const const_iterator& other) const
+{
+ return (other < *this);
+}
+
+
template <typename number>
inline
typename FullMatrix<number>::const_iterator
--- /dev/null
+//---------------------------- full_matrix_iterator_01.cc ---------------------------
+// $Id$
+// Version: $Name$
+//
+// Copyright (C) 2004, 2005 by the deal.II authors
+//
+// This file is subject to QPL and may not be distributed
+// without copyright and license information. Please refer
+// to the file deal.II/doc/license.html for the text and
+// further information on this license.
+//
+//---------------------------- full_matrix_iterator_01.cc ---------------------------
+
+
+// like sparse_matrix_iterator_12, but for FullMatrix
+
+#include "../tests.h"
+#include <lac/full_matrix.h>
+#include <fstream>
+#include <iostream>
+
+
+void test ()
+{
+ FullMatrix<double> A(3,3);
+
+ const FullMatrix<double>::const_iterator k = A.begin(),
+ j = ++A.begin();
+
+ Assert (k < j, ExcInternalError());
+ Assert (j > k, ExcInternalError());
+
+ Assert (!(j < k), ExcInternalError());
+ Assert (!(k > j), ExcInternalError());
+
+ Assert (k != j, ExcInternalError());
+ Assert (!(k == j), ExcInternalError());
+
+ Assert (k == k, ExcInternalError());
+ Assert (!(k != k), ExcInternalError());
+
+ deallog << "OK" << std::endl;
+}
+
+
+
+int main ()
+{
+ std::ofstream logfile("full_matrix_iterator_01.output");
+ deallog.attach(logfile);
+ deallog.depth_console(0);
+
+ try
+ {
+ test ();
+ }
+ catch (std::exception &exc)
+ {
+ std::cerr << std::endl << std::endl
+ << "----------------------------------------------------"
+ << std::endl;
+ std::cerr << "Exception on processing: " << std::endl
+ << exc.what() << std::endl
+ << "Aborting!" << std::endl
+ << "----------------------------------------------------"
+ << std::endl;
+
+ return 1;
+ }
+ catch (...)
+ {
+ std::cerr << std::endl << std::endl
+ << "----------------------------------------------------"
+ << std::endl;
+ std::cerr << "Unknown exception!" << std::endl
+ << "Aborting!" << std::endl
+ << "----------------------------------------------------"
+ << std::endl;
+ return 1;
+ };
+}