summaryrefslogtreecommitdiff
path: root/math/mtl/files/patch-test__src__algo_test.h
diff options
context:
space:
mode:
authorBrendan Fabeny <bf@FreeBSD.org>2012-01-01 17:34:49 +0000
committerBrendan Fabeny <bf@FreeBSD.org>2012-01-01 17:34:49 +0000
commit486a856d6bb14bad22e55b3d87f80a69725aa3dd (patch)
tree2a445277d1931fe7cb8a0742786c969c93e84c21 /math/mtl/files/patch-test__src__algo_test.h
parent- Update to 1.241 (diff)
update to 2.1.2.23; add LICENSE and test targets; respect CXX and
CXXFLAGS; fix the build with lang/gcc46 (refactored libstdc++ headers) and clang (stricter unqualified lookups in templates); install examples
Diffstat (limited to 'math/mtl/files/patch-test__src__algo_test.h')
-rw-r--r--math/mtl/files/patch-test__src__algo_test.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/math/mtl/files/patch-test__src__algo_test.h b/math/mtl/files/patch-test__src__algo_test.h
new file mode 100644
index 000000000000..69d901ccdb2c
--- /dev/null
+++ b/math/mtl/files/patch-test__src__algo_test.h
@@ -0,0 +1,60 @@
+--- test/src/algo_test.h.orig 2007-04-10 16:03:10.000000000 -0400
++++ test/src/algo_test.h 2012-01-01 08:04:04.000000000 -0500
+@@ -8,6 +8,28 @@
+ using mtl::dense1D;
+
+ template <class Matrix>
++void
++set_diagonal_test(std::string test_name, Matrix& A, bool& success)
++{
++ if (A.is_unit()) {
++ std::cout << test_name.c_str() << " skipping set_diagonal" << std::endl;
++ return;
++ }
++ typedef typename mtl::matrix_traits<Matrix>::value_type T;
++ typedef typename mtl::matrix_traits<Matrix>::size_type Int;
++ // set_diagnal
++ Int i;
++ mtl::set_diagonal(A, T(1));
++
++ for (i = 0; i < A.nrows() && i < A.ncols(); ++i)
++ if (A(i,i) != T(1)) {
++ std::cout << test_name.c_str() << " failed set_diagnal(A,a) *****" << std::endl;
++ success = false;
++ break;
++ }
++}
++
++template <class Matrix>
+ bool
+ mat_algo_test(Matrix& A, std::string test_name)
+ {
+@@ -110,28 +132,6 @@
+ return success;
+ }
+
+-template <class Matrix>
+-void
+-set_diagonal_test(std::string test_name, Matrix& A, bool& success)
+-{
+- if (A.is_unit()) {
+- std::cout << test_name.c_str() << " skipping set_diagonal" << std::endl;
+- return;
+- }
+- typedef typename mtl::matrix_traits<Matrix>::value_type T;
+- typedef typename mtl::matrix_traits<Matrix>::size_type Int;
+- // set_diagnal
+- Int i;
+- mtl::set_diagonal(A, T(1));
+-
+- for (i = 0; i < A.nrows() && i < A.ncols(); ++i)
+- if (A(i,i) != T(1)) {
+- std::cout << test_name.c_str() << " failed set_diagnal(A,a) *****" << std::endl;
+- success = false;
+- break;
+- }
+-}
+-
+ template <class Mat>
+ inline void
+ fill_matrix(Mat& A, int /*sub*/, int /*super*/, mtl::rectangle_tag)