$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r79894 - in sandbox/big_number: boost/multiprecision libs/multiprecision/performance libs/multiprecision/test libs/multiprecision/test/include_test libs/multiprecision/test/ublas_interop libs/multiprecision/test/ublas_interop/common
From: john_at_[hidden]
Date: 2012-08-07 04:10:16
Author: johnmaddock
Date: 2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
New Revision: 79894
URL: http://svn.boost.org/trac/boost/changeset/79894
Log:
Add uBlas interoperability tests.
Add file include tests.
Added:
   sandbox/big_number/libs/multiprecision/test/include_test/
   sandbox/big_number/libs/multiprecision/test/include_test/cpp_dec_float_include_test.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/include_test/cpp_int_include_test.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/include_test/gmp_include_test.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/include_test/mpfr_include_test.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/include_test/tommath_include_test.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/
   sandbox/big_number/libs/multiprecision/test/ublas_interop/common/
   sandbox/big_number/libs/multiprecision/test/ublas_interop/common/init.hpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/common/testhelper.hpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test1.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test1.hpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test11.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test12.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test13.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test2.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test2.hpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test21.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test22.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test23.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test3.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test3.hpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test31.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test32.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test33.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test4.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test4.hpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test42.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test43.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test5.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test5.hpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test52.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test53.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test6.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test6.hpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test62.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test63.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test7.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test7.hpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test71.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test72.cpp   (contents, props changed)
   sandbox/big_number/libs/multiprecision/test/ublas_interop/test73.cpp   (contents, props changed)
Text files modified: 
   sandbox/big_number/boost/multiprecision/mp_number.hpp                 |   148 ++++----------------------------------- 
   sandbox/big_number/libs/multiprecision/performance/sf_performance.cpp |     2                                         
   sandbox/big_number/libs/multiprecision/test/Jamfile.v2                |    22 +++++                                   
   3 files changed, 39 insertions(+), 133 deletions(-)
Modified: sandbox/big_number/boost/multiprecision/mp_number.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/mp_number.hpp	(original)
+++ sandbox/big_number/boost/multiprecision/mp_number.hpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -1541,138 +1541,6 @@
    Backend m_backend;
 };
 
-/*
-namespace detail
-{
-
-template <class Backend, bool ExpressionTemplates>
-BOOST_FORCEINLINE int mp_number_compare(const mp_number<Backend, ExpressionTemplates>& a, const mp_number<Backend, ExpressionTemplates>& b)
-{
-   return a.compare(b);
-}
-
-template <class Backend, bool ExpressionTemplates, class tag, class A1, class A2, class A3, class A4>
-BOOST_FORCEINLINE int mp_number_compare(const mp_number<Backend, ExpressionTemplates>& a, const mp_exp<tag, A1, A2, A3, A4>& b)
-{
-   return a.compare(mp_number<Backend, ExpressionTemplates>(b));
-}
-
-template <class tag, class A1, class A2, class A3, class A4, class Backend, bool ExpressionTemplates>
-inline int mp_number_compare(const mp_exp<tag, A1, A2, A3, A4>& a, const mp_number<Backend, ExpressionTemplates>& b)
-{
-   return -b.compare(mp_number<Backend, ExpressionTemplates>(a));
-}
-
-template <class Backend, bool ExpressionTemplates, class Val>
-inline int mp_number_compare(const mp_number<Backend, ExpressionTemplates>& a, const Val b)
-{
-   return a.compare(b);
-}
-
-template <class Val, class Backend, bool ExpressionTemplates>
-inline int mp_number_compare(const Val a, const mp_number<Backend, ExpressionTemplates>& b)
-{
-   return -b.compare(a);
-}
-
-template <class tag, class A1, class A2, class A3, class A4, class tag2, class A1b, class A2b, class A3b>
-inline int mp_number_compare(const mp_exp<tag, A1, A2, A3, A4>& a, const mp_exp<tag2, A1b, A2b, A3b>& b)
-{
-   typedef typename mp_exp<tag, A1, A2, A3, A4>::result_type real1;
-   typedef typename mp_exp<tag2, A1b, A2b, A3b>::result_type real2;
-   return real1(a).compare(real2(b));
-}
-
-template <class tag, class A1, class A2, class A3, class A4, class Val>
-inline typename enable_if<is_arithmetic<Val>, int>::type mp_number_compare(const mp_exp<tag, A1, A2, A3, A4>& a, const Val b)
-{
-   typedef typename mp_exp<tag, A1, A2, A3, A4>::result_type real;
-   real t(a);
-   return t.compare(b);
-}
-
-template <class Val, class tag, class A1, class A2, class A3, class A4>
-inline typename enable_if<is_arithmetic<Val>, int>::type mp_number_compare(const Val a, const mp_exp<tag, A1, A2, A3, A4>& b)
-{
-   typedef typename mp_exp<tag, A1, A2, A3, A4>::result_type real;
-   return -real(b).compare(a);
-}
-
-template <class Exp1, class Exp2>
-struct is_valid_comparison_imp
-{
-   typedef typename mpl::or_<
-      is_mp_number<Exp1>,
-      is_mp_number_exp<Exp1>
-   >::type is1;
-   typedef typename mpl::or_<
-      is_mp_number<Exp2>,
-      is_mp_number_exp<Exp2>
-   >::type is2;
-   typedef typename mpl::or_<
-      mpl::and_<
-         is1,
-         mpl::or_<
-            is2,
-            is_arithmetic<Exp2>
-         >
-      >,
-      mpl::and_<
-         is2,
-         mpl::or_<
-            is1,
-            is_arithmetic<Exp1>
-         >
-      >
-   >::type type;
-};
-
-template <class Exp1, class Exp2>
-struct is_valid_comparison : public boost::multiprecision::detail::is_valid_comparison_imp<Exp1, Exp2>::type {};
-
-}
-
-template <class Exp1, class Exp2>
-inline typename boost::enable_if<detail::is_valid_comparison<Exp1, Exp2>, bool>::type 
-   operator == (const Exp1& a, const Exp2& b)
-{
-   return 0 == detail::mp_number_compare(a, b);
-}
-template <class Exp1, class Exp2>
-inline typename boost::enable_if<detail::is_valid_comparison<Exp1, Exp2>, bool>::type 
-   operator != (const Exp1& a, const Exp2& b)
-{
-   return 0 != detail::mp_number_compare(a, b);
-}
-
-template <class Exp1, class Exp2>
-inline typename boost::enable_if<detail::is_valid_comparison<Exp1, Exp2>, bool>::type 
-   operator <= (const Exp1& a, const Exp2& b)
-{
-   return 0 >= detail::mp_number_compare(a, b);
-}
-
-template <class Exp1, class Exp2>
-inline typename boost::enable_if<detail::is_valid_comparison<Exp1, Exp2>, bool>::type 
-   operator < (const Exp1& a, const Exp2& b)
-{
-   return 0 > detail::mp_number_compare(a, b);
-}
-
-template <class Exp1, class Exp2>
-inline typename boost::enable_if<detail::is_valid_comparison<Exp1, Exp2>, bool>::type 
-   operator >= (const Exp1& a, const Exp2& b)
-{
-   return 0 <= detail::mp_number_compare(a, b);
-}
-
-template <class Exp1, class Exp2>
-inline typename boost::enable_if<detail::is_valid_comparison<Exp1, Exp2>, bool>::type 
-   operator > (const Exp1& a, const Exp2& b)
-{
-   return 0 < detail::mp_number_compare(a, b);
-}
-*/
 template <class Backend, bool ExpressionTemplates>
 inline std::ostream& operator << (std::ostream& os, const mp_number<Backend, ExpressionTemplates>& r)
 {
@@ -1793,6 +1661,22 @@
    return a.denominator();
 }
 
+namespace numeric { namespace ublas {
+//
+// uBlas interoperability:
+//
+template<class V>
+class sparse_vector_element;
+
+template <class V, class Backend, bool ExpressionTemplates>
+inline bool operator == (const sparse_vector_element<V>& a, const ::boost::multiprecision::mp_number<Backend, ExpressionTemplates>& b)
+{
+typedef typename sparse_vector_element<V>::const_reference ref_type;
+   return static_cast<ref_type>(a) == b;
+}
+
+}} // namespaces
+
 #ifdef BOOST_MSVC
 #pragma warning(pop)
 #endif
Modified: sandbox/big_number/libs/multiprecision/performance/sf_performance.cpp
==============================================================================
--- sandbox/big_number/libs/multiprecision/performance/sf_performance.cpp	(original)
+++ sandbox/big_number/libs/multiprecision/performance/sf_performance.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -225,7 +225,7 @@
 int main()
 {
    using namespace boost::multiprecision;
-#if defined(TEST_MPFR) || defined(TEST_MPFR_CLASS) || defined(TEST_MPREAL)
+#if defined(TEST_MPFR) || defined(TEST_MPFR_CLASS) || defined(TEST_MPREAL) || defined(TEST_MPF)
    mp_get_memory_functions(&alloc_func_ptr, &realloc_func_ptr, &free_func_ptr);
    mp_set_memory_functions(&alloc_func, &realloc_func, &free_func);
 #endif
Modified: sandbox/big_number/libs/multiprecision/test/Jamfile.v2
==============================================================================
--- sandbox/big_number/libs/multiprecision/test/Jamfile.v2	(original)
+++ sandbox/big_number/libs/multiprecision/test/Jamfile.v2	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -731,6 +731,27 @@
          [ check-target-builds ../config//has_tommath : : <build>no ] ;
 run ../example/floating_point_examples.cpp : : : <toolset>gcc:<cxxflags>-std=c++0x ;
 
+compile include_test/mpfr_include_test.cpp
+              : # requirements
+               [ check-target-builds ../config//has_mpfr : : <build>no ] ;
+compile include_test/gmp_include_test.cpp
+              : # requirements
+               [ check-target-builds ../config//has_gmp : : <build>no ] ;
+compile include_test/tommath_include_test.cpp 
+              : # requirements
+               [ check-target-builds ../config//has_tommath : : <build>no ] ;
+compile include_test/cpp_int_include_test.cpp ;
+compile include_test/cpp_dec_float_include_test.cpp ;
+
+run ublas_interop/test1.cpp ublas_interop/test11.cpp ublas_interop/test12.cpp ublas_interop/test13.cpp ;
+run ublas_interop/test2.cpp ublas_interop/test21.cpp ublas_interop/test22.cpp ublas_interop/test23.cpp ;
+#run ublas_interop/test3.cpp ublas_interop/test31.cpp ublas_interop/test32.cpp ublas_interop/test33.cpp ;
+run ublas_interop/test4.cpp ublas_interop/test42.cpp ublas_interop/test43.cpp ;
+run ublas_interop/test5.cpp ublas_interop/test52.cpp ublas_interop/test53.cpp ;
+run ublas_interop/test6.cpp ublas_interop/test62.cpp ublas_interop/test63.cpp ;
+run ublas_interop/test7.cpp ublas_interop/test71.cpp ublas_interop/test72.cpp ublas_interop/test73.cpp ;
+
+
 if $(enable-specfun)
 {
 
@@ -771,6 +792,7 @@
    }
 }
 
+
 if ! $(disable-concepts)
 {
 
Added: sandbox/big_number/libs/multiprecision/test/include_test/cpp_dec_float_include_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/include_test/cpp_dec_float_include_test.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,12 @@
+///////////////////////////////////////////////////////////////
+//  Copyright 2012 John Maddock. Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#include <boost/multiprecision/cpp_dec_float.hpp>
+
+using namespace boost::multiprecision;
+
+cpp_dec_float<50> a;
+
+
Added: sandbox/big_number/libs/multiprecision/test/include_test/cpp_int_include_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/include_test/cpp_int_include_test.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,16 @@
+///////////////////////////////////////////////////////////////
+//  Copyright 2012 John Maddock. Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#include <boost/multiprecision/cpp_int.hpp>
+
+using namespace boost::multiprecision;
+
+mp_number<cpp_int_backend<> > a;
+mp_number<cpp_int_backend<>, false> b;
+mp_number<cpp_int_backend<64, true, void>, false> c;
+mp_number<cpp_int_backend<128, false, void>, false> d;
+mp_number<cpp_int_backend<500, true, void>, false> e;
+
+
Added: sandbox/big_number/libs/multiprecision/test/include_test/gmp_include_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/include_test/gmp_include_test.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,14 @@
+///////////////////////////////////////////////////////////////
+//  Copyright 2012 John Maddock. Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#include <boost/multiprecision/gmp.hpp>
+
+using namespace boost::multiprecision;
+
+mpf_float a;
+mpz_int b;
+mpq_rational c;
+
+
Added: sandbox/big_number/libs/multiprecision/test/include_test/mpfr_include_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/include_test/mpfr_include_test.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,12 @@
+///////////////////////////////////////////////////////////////
+//  Copyright 2012 John Maddock. Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#include <boost/multiprecision/mpfr.hpp>
+
+using namespace boost::multiprecision;
+
+mpfr_float a;
+
+
Added: sandbox/big_number/libs/multiprecision/test/include_test/tommath_include_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/include_test/tommath_include_test.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,12 @@
+///////////////////////////////////////////////////////////////
+//  Copyright 2012 John Maddock. Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#include <boost/multiprecision/tommath.hpp>
+
+using namespace boost::multiprecision;
+
+tom_int a;
+
+
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/common/init.hpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/common/init.hpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2004 Michael Stevens
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+/*
+ * Default construct test when possible
+ */
+
+template <class E>
+struct default_construct
+{
+    static void test() {}
+}; 
+template <class VC>
+struct default_construct<boost::numeric::ublas::vector_container<VC> >
+{
+    static void test ()
+    {
+        VC default_constuct;
+        initialize_vector (default_constuct);
+        std::cout << "default construct = " << default_constuct << std::endl;
+    }
+};
+template <class MC>
+struct default_construct<boost::numeric::ublas::matrix_container<MC> >
+{
+    static void test ()
+    {
+        MC default_constuct;
+        initialize_vector (default_constuct);
+        std::cout << "default construct = " << default_constuct << std::endl;
+    }
+};
+
+/*
+ * Initialise test values in vector/matrix
+ */
+
+template<class V>
+void initialize_vector (V &v) {
+    typename V::size_type size = v.size ();
+    for (typename V::size_type i = 0; i < size; ++ i)
+        v [i] = typename V::value_type ( i + 1.f );
+}
+
+template<class M>
+void initialize_matrix_impl (M &m, ublas::packed_proxy_tag) {
+    typename M::size_type size1 = m.size1 ();
+#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
+    for (typename M::iterator1 i = m.begin1(); i != m.end1(); ++ i)
+        for (typename M::iterator2 j = i.begin(); j != i.end(); ++ j)
+            *j = typename M::value_type ( i.index1() * size1 + j.index2() + 1.f );
+#else
+    for (typename M::iterator1 i = m.begin1(); i != m.end1(); ++ i)
+        for (typename M::iterator2 j = ublas::begin (i, ublas::iterator1_tag ()); j != ublas::end (i, ublas::iterator1_tag ()); ++ j)
+            *j = typename M::value_type ( i.index1() * size1 + j.index2() + 1.f );
+#endif
+}
+
+template<class M>
+void initialize_matrix_impl (M &m, ublas::sparse_proxy_tag) {
+    typename M::size_type size1 = m.size1 ();
+    typename M::size_type size2 = m.size2 ();
+    for (typename M::size_type i = 0; i < size1; ++ i)
+        for (typename M::size_type j = 0; j < size2; ++ j)
+            m (i, j) = typename M::value_type (i * size1 + j + 1.f);
+}
+
+template<class M>
+void initialize_matrix (M &m) {
+    initialize_matrix_impl (m, typename M::storage_category());
+}
+
+template<class M>
+void initialize_matrix (M &m, ublas::lower_tag) {
+    typename M::size_type size1 = m.size1 ();
+    typename M::size_type size2 = m.size2 ();
+    for (typename M::size_type i = 0; i < size1; ++ i) {
+        typename M::size_type j = 0;
+        for (; j <= i; ++ j)
+            m (i, j) = i * size1 + j + 1.f;
+        for (; j < size2; ++ j)
+            m (i, j) = 0.f;
+    }
+}
+template<class M>
+void initialize_matrix (M &m, ublas::upper_tag) {
+    typename M::size_type size1 = m.size1 ();
+    typename M::size_type size2 = m.size2 ();
+    for (typename M::size_type i = 0; i < size1; ++ i) {
+        typename M::size_type j = 0;
+        for (; j < i; ++ j)
+            m (i, j) = 0.f;
+        for (; j < size2; ++ j)
+            m (i, j) = i * size1 + j + 1.f;
+    }
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/common/testhelper.hpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/common/testhelper.hpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,74 @@
+// Copyright 2008 Gunter Winkler <guwi17_at_[hidden]>
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef _HPP_TESTHELPER_
+#define _HPP_TESTHELPER_
+
+#include <utility>
+
+static unsigned _success_counter = 0;
+static unsigned _fail_counter    = 0;
+
+static inline
+void assertTrue(const char* message, bool condition) {
+#ifndef NOMESSAGES
+  std::cout << message;
+#endif
+  if ( condition ) {
+    ++ _success_counter;
+    std::cout << "1\n"; // success
+  } else {
+    ++ _fail_counter;
+    std::cout << "0\n"; // failed
+  }
+}
+
+template < class T >
+void assertEquals(const char* message, T expected, T actual) {
+#ifndef NOMESSAGES
+  std::cout << message;
+#endif
+  if ( expected == actual ) {
+    ++ _success_counter;
+    std::cout << "1\n"; // success
+  } else {
+    #ifndef NOMESSAGES
+      std::cout << " expected " << expected << " actual " << actual << " ";
+    #endif
+    ++ _fail_counter;
+    std::cout << "0\n"; // failed
+  }
+}
+
+static
+std::pair<unsigned, unsigned> getResults() {
+  return std::make_pair(_success_counter, _fail_counter);
+}
+
+template < class M1, class M2 >
+bool compare( const boost::numeric::ublas::matrix_expression<M1> & m1, 
+              const boost::numeric::ublas::matrix_expression<M2> & m2 ) {
+  size_t size1 = (std::min)(m1().size1(), m2().size1());
+  size_t size2 = (std::min)(m1().size2(), m2().size2());
+  for (size_t i=0; i < size1; ++i) {
+    for (size_t j=0; j < size2; ++j) {
+      if ( m1()(i,j) != m2()(i,j) ) return false;
+    }
+  }
+  return true;
+}
+
+template < class M1, class M2 >
+bool compare( const boost::numeric::ublas::vector_expression<M1> & m1, 
+              const boost::numeric::ublas::vector_expression<M2> & m2 ) {
+  size_t size = (std::min)(m1().size(), m2().size());
+  for (size_t i=0; i < size; ++i) {
+    if ( m1()(i) != m2()(i) ) return false;
+  }
+  return true;
+}
+
+#endif
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test1.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test1.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,20 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test1.hpp"
+
+int main () {
+    test_vector ();
+    test_matrix_vector ();
+    test_matrix ();
+    return 0;
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test1.hpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test1.hpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,45 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#ifndef TEST1_H
+#define TEST1_H
+
+#include <iostream>
+
+#ifdef _MSC_VER
+#  pragma warning(disable:4800 4996)
+#endif
+
+#include <boost/multiprecision/cpp_dec_float.hpp>
+
+typedef boost::multiprecision::mp_number<boost::multiprecision::cpp_dec_float<50>, false> mp_test_type;
+//typedef double mp_test_type;
+
+#define USE_RANGE
+#define USE_SLICE
+
+
+#include <boost/numeric/ublas/vector.hpp>
+#include <boost/numeric/ublas/vector_proxy.hpp>
+#include <boost/numeric/ublas/matrix.hpp>
+#include <boost/numeric/ublas/matrix_proxy.hpp>
+#include <boost/numeric/ublas/io.hpp>
+
+namespace ublas = boost::numeric::ublas;
+
+#include "common/init.hpp"
+
+void test_vector ();
+void test_matrix_vector ();
+void test_matrix ();
+
+#endif
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test11.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test11.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,182 @@
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+
+#include "test1.hpp"
+
+// Test vector expression templates
+template<class V, int N>
+struct test_my_vector {
+    typedef typename V::value_type value_type;
+    typedef typename V::size_type size_type;
+    typedef typename ublas::type_traits<value_type>::real_type real_type;
+
+    template<class VP>
+    void test_container_with (VP &v1) const {
+        // Container type tests in addition to expression types
+        // Insert and erase
+        v1.insert_element (0, 55);
+        v1.erase_element (1);
+        v1.clear ();
+    }
+    
+    template<class VP>
+    void test_expression_with (VP &v1, VP &v2, VP &v3) const {
+        // Expression type tests
+        value_type t;
+        size_type i;
+        real_type n;
+
+        // Default Construct
+        default_construct<VP>::test ();
+        
+        // Copy and swap
+        initialize_vector (v1);
+        initialize_vector (v2);
+        v1 = v2;
+        std::cout << "v1 = v2 = " << v1 << std::endl;
+        v1.assign_temporary (v2);
+        std::cout << "v1.assign_temporary (v2) = " << v1 << std::endl;
+        v1.swap (v2);
+        std::cout << "v1.swap (v2) = " << v1 << " " << v2 << std::endl;
+        
+        // Zero assignment
+        v1 = ublas::zero_vector<> (v1.size ());
+        std::cout << "v1.zero_vector = " << v1 << std::endl;
+        v1 = v2;
+
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+            // Project range and slice
+        initialize_vector (v1);
+        initialize_vector (v2);
+        project (v1, ublas::range(0,1)) = project (v2, ublas::range(0,1));
+        project (v1, ublas::range(0,1)) = project (v2, ublas::slice(0,1,1));
+        project (v1, ublas::slice(2,-1,2)) = project (v2, ublas::slice(0,1,2));
+        project (v1, ublas::slice(2,-1,2)) = project (v2, ublas::range(0,2));
+        std::cout << "v1 = range/slice " << v1 << std::endl;
+#endif
+
+            // Unary vector operations resulting in a vector
+        initialize_vector (v1);
+        v2 = - v1;
+        std::cout << "- v1 = " << v2 << std::endl;
+        v2 = ublas::conj (v1);
+        std::cout << "conj (v1) = " << v2 << std::endl;
+
+        // Binary vector operations resulting in a vector
+        initialize_vector (v1);
+        initialize_vector (v2);
+        v3 = v1 + v2;
+        std::cout << "v1 + v2 = " << v3 << std::endl;
+        v3 = v1 - v2;
+        std::cout << "v1 - v2 = " << v3 << std::endl;
+        v3 = ublas::element_prod (v1, v2);
+        std::cout << "element_prod (v1, v2) = " << v3 << std::endl;
+
+        // Scaling a vector
+        t = N;
+        initialize_vector (v1);
+        v2 = value_type (1.) * v1;
+        std::cout << "1. * v1 = " << v2 << std::endl;
+        v2 = t * v1;
+        std::cout << "N * v1 = " << v2 << std::endl;
+        initialize_vector (v1);
+        v2 = v1 * value_type (1.);
+        std::cout << "v1 * 1. = " << v2 << std::endl;
+        v2 = v1 * t;
+	  std::cout << "v1 * value_type(N) = " << v2 << std::endl;
+	  // test interop with integer
+	  v2 = v1 * N;
+
+        std::cout << "v1 * N = " << v2 << std::endl;
+
+        // Some assignments
+        initialize_vector (v1);
+        initialize_vector (v2);
+        v2 += v1;
+        std::cout << "v2 += v1 = " << v2 << std::endl;
+        v2 -= v1;
+        std::cout << "v2 -= v1 = " << v2 << std::endl;
+        v2 = v2 + v1;
+        std::cout << "v2 = v2 + v1 = " << v2 << std::endl;
+        v2 = v2 - v1;
+        std::cout << "v2 = v2 - v1 = " << v2 << std::endl;
+        v1 *= value_type (1.);
+        std::cout << "v1 *= 1. = " << v1 << std::endl;
+        v1 *= t;
+	  std::cout << "v1 *= value_type(N) = " << v1 << std::endl;
+	  // test interop with integer
+	  v1 *= N;
+        std::cout << "v1 *= N = " << v1 << std::endl;
+
+        // Unary vector operations resulting in a scalar
+        initialize_vector (v1);
+        t = ublas::sum (v1);
+        std::cout << "sum (v1) = " << t << std::endl;
+        n = ublas::norm_1 (v1);
+        std::cout << "norm_1 (v1) = " << n << std::endl;
+        n = ublas::norm_2 (v1);
+        std::cout << "norm_2 (v1) = " << n << std::endl;
+        n = ublas::norm_inf (v1);
+        std::cout << "norm_inf (v1) = " << n << std::endl;
+
+        i = ublas::index_norm_inf (v1);
+        std::cout << "index_norm_inf (v1) = " << i << std::endl;
+
+        // Binary vector operations resulting in a scalar
+        initialize_vector (v1);
+        initialize_vector (v2);
+        t = ublas::inner_prod (v1, v2);
+        std::cout << "inner_prod (v1, v2) = " << t << std::endl;
+
+        // Scalar and Binary vector expression resulting in a vector
+        initialize_vector (v1);
+        initialize_vector (v2);
+        v1 = v1 * ublas::inner_prod (v1, v2);
+        std::cout << "v1 * inner_prod (v1, v2) = " << v1 << std::endl;
+    }
+
+    void operator () () const {
+        V v1 (N), v2 (N), v3 (N);
+        test_expression_with (v1, v2, v3);
+        test_container_with (v1);
+
+#ifdef USE_RANGE
+        ublas::vector_range<V> vr1 (v1, ublas::range (0, N)),
+                               vr2 (v2, ublas::range (0, N)),
+                               vr3 (v3, ublas::range (0, N));
+        test_expression_with (vr1, vr2, vr3);
+#endif
+
+#ifdef USE_SLICE
+        ublas::vector_slice<V> vs1 (v1, ublas::slice (0, 1, N)),
+                               vs2 (v2, ublas::slice (0, 1, N)),
+                               vs3 (v3, ublas::slice (0, 1, N));
+        test_expression_with (vs1, vs2, vs3);
+#endif
+    }
+};
+
+// Test vector
+void test_vector () {
+    std::cout << "test_vector" << std::endl;
+
+    std::cout << "mp_test_type, bounded_array" << std::endl;
+    test_my_vector<ublas::vector<mp_test_type, ublas::bounded_array<mp_test_type, 3> >, 3 > () ();
+
+
+    std::cout << "mp_test_type, unbounded_array" << std::endl;
+    test_my_vector<ublas::vector<mp_test_type, ublas::unbounded_array<mp_test_type> >, 3 > () ();
+
+    std::cout << "mp_test_type, std::vector" << std::endl;
+    test_my_vector<ublas::vector<mp_test_type, std::vector<mp_test_type> >, 3 > () ();
+
+    std::cout << "mp_test_type, bounded" << std::endl;
+    test_my_vector<ublas::bounded_vector<mp_test_type, 3>, 3> () ();
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test12.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test12.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,102 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test1.hpp"
+
+// Test matrix & vector expression templates
+template<class V, class M, int N>
+struct test_my_matrix_vector {
+    typedef typename V::value_type value_type;
+
+    template<class VP, class MP>
+    void test_with (VP &v1, VP &v2, MP &m1) const {
+        {
+            // Rows and columns
+            initialize_matrix (m1);
+            for (int i = 0; i < N; ++ i) {
+                v1 = ublas::row (m1, i);
+                std::cout << "row (m, " << i << ") = " << v1 << std::endl;
+                v1 = ublas::column (m1, i);
+                std::cout << "column (m, " << i << ") = " << v1 << std::endl;
+            }
+
+            // Outer product
+            initialize_vector (v1);
+            initialize_vector (v2);
+            m1 = ublas::outer_prod (v1, v2);
+            std::cout << "outer_prod (v1, v2) = " << m1 << std::endl;
+
+            // Matrix vector product
+            initialize_matrix (m1);
+            initialize_vector (v1);
+            v2 = ublas::prod (m1, v1);
+            std::cout << "prod (m1, v1) = " << v2 << std::endl;
+            v2 = ublas::prod (v1, m1);
+            std::cout << "prod (v1, m1) = " << v2 << std::endl;
+        }
+    }
+    void operator () () const {
+        {
+            V v1 (N), v2 (N);
+            M m1 (N, N);
+            test_with (v1, v2, m1);
+
+            ublas::matrix_row<M> mr1 (m1, 0), mr2 (m1, 1);
+            test_with (mr1, mr2, m1);
+
+            ublas::matrix_column<M> mc1 (m1, 0), mc2 (m1, 1);
+            test_with (mc1, mc2, m1);
+
+#ifdef USE_RANGE
+            ublas::matrix_vector_range<M> mvr1 (m1, ublas::range (0, N), ublas::range (0, N)),
+                                          mvr2 (m1, ublas::range (0, N), ublas::range (0, N));
+            test_with (mvr1, mvr2, m1);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_vector_slice<M> mvs1 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                          mvs2 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (mvs1, mvs2, m1);
+#endif
+        }
+    }
+};
+
+// Test matrix & vector
+void test_matrix_vector () {
+    std::cout << "test_matrix_vector" << std::endl;
+
+    std::cout << "mp_test_type, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::bounded_array<mp_test_type, 3> >,
+                          ublas::matrix<mp_test_type, ublas::row_major, ublas::bounded_array<mp_test_type, 3 * 3> >, 3> () ();
+    std::cout << "mp_test_type, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::unbounded_array<mp_test_type> >,
+                          ublas::matrix<mp_test_type, ublas::row_major, ublas::unbounded_array<mp_test_type> >, 3> () ();
+    std::cout << "mp_test_type, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, std::vector<mp_test_type> >,
+                          ublas::matrix<mp_test_type, ublas::row_major, std::vector<mp_test_type> >, 3> () ();
+    std::cout << "mp_test_type, bounded" << std::endl;
+    test_my_matrix_vector<ublas::bounded_vector<mp_test_type, 3>,
+                          ublas::bounded_matrix<mp_test_type, 3, 3>, 3> () ();
+    std::cout << "mp_test_type, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::bounded_array<mp_test_type, 3> >,
+                          ublas::vector_of_vector<mp_test_type, ublas::row_major, ublas::bounded_array<ublas::bounded_array<mp_test_type, 3>, 3 + 1> >, 3> () ();
+    std::cout << "mp_test_type, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::unbounded_array<mp_test_type> >,
+                          ublas::vector_of_vector<mp_test_type, ublas::row_major, ublas::unbounded_array<ublas::unbounded_array<mp_test_type> > >, 3> () ();
+    std::cout << "mp_test_type, std::vector" << std::endl;
+    /*
+    // This fails with an internal std lib assersion, even when mp_test_type is double,
+    // looks like a bug in the uBlas test code...
+    test_my_matrix_vector<ublas::vector<mp_test_type, std::vector<mp_test_type> >,
+                          ublas::vector_of_vector<mp_test_type, ublas::row_major, std::vector<std::vector<mp_test_type> > >, 3> () ();*/
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test13.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test13.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,167 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test1.hpp"
+
+// Test matrix expression templates
+template<class M, int N>
+struct test_my_matrix {
+    typedef typename M::value_type value_type;
+
+    template<class VP>
+    void test_container_with (VP &v1) const {
+        // Container type tests in addition to expression types
+        // Insert and erase
+        v1.insert_element (0,0, 55);
+        v1.erase_element (1,1);
+        v1.clear ();
+    }
+    
+    template<class MP>
+    void test_expression_with (MP &m1, MP &m2, MP &m3) const {
+        value_type t;
+
+        // Default Construct
+        default_construct<MP>::test ();
+        
+        // Copy and swap
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        m1 = m2;
+        std::cout << "m1 = m2 = " << m1 << std::endl;
+        m1.assign_temporary (m2);
+        std::cout << "m1.assign_temporary (m2) = " << m1 << std::endl;
+        m1.swap (m2);
+        std::cout << "m1.swap (m2) = " << m1 << " " << m2 << std::endl;
+
+        // Zero assignment
+        m1 = ublas::zero_matrix<> (m1.size1 (), m1.size2 ());
+        std::cout << "m1.zero_matrix = " << m1 << std::endl;
+        m1 = m2;
+
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+            // Project range and slice
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        project (m1, ublas::range(0,1),ublas::range(0,1)) = project (m2, ublas::range(0,1),ublas::range(0,1));
+        project (m1, ublas::range(0,1),ublas::range(0,1)) = project (m2, ublas::slice(0,1,1),ublas::slice(0,1,1));
+        project (m1, ublas::slice(2,-1,2),ublas::slice(2,-1,2)) = project (m2, ublas::slice(0,1,2),ublas::slice(0,1,2));
+        project (m1, ublas::slice(2,-1,2),ublas::slice(2,-1,2)) = project (m2, ublas::range(0,2),ublas::range(0,2));
+        std::cout << "m1 = range/slice " << m1 << std::endl;
+#endif
+
+            // Unary matrix operations resulting in a matrix
+        initialize_matrix (m1);
+        m2 = - m1;
+        std::cout << "- m1 = " << m2 << std::endl;
+        m2 = ublas::conj (m1);
+        std::cout << "conj (m1) = " << m2 << std::endl;
+
+        // Binary matrix operations resulting in a matrix
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        m3 = m1 + m2;
+        std::cout << "m1 + m2 = " << m3 << std::endl;
+        m3 = m1 - m2;
+        std::cout << "m1 - m2 = " << m3 << std::endl;
+        m3 = ublas::element_prod (m1, m2);
+        std::cout << "element_prod (m1, m2) = " << m3 << std::endl;
+
+        // Scaling a matrix
+        t = N;
+        initialize_matrix (m1);
+        m2 = value_type (1.) * m1;
+        std::cout << "1. * m1 = " << m2 << std::endl;
+        m2 = t * m1;
+        std::cout << "N * m1 = " << m2 << std::endl;
+        initialize_matrix (m1);
+        m2 = m1 * value_type (1.);
+        std::cout << "m1 * 1. = " << m2 << std::endl;
+        m2 = m1 * t;
+        std::cout << "m1 * N = " << m2 << std::endl;
+
+        // Some assignments
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        m2 += m1;
+        std::cout << "m2 += m1 = " << m2 << std::endl;
+        m2 -= m1;
+        std::cout << "m2 -= m1 = " << m2 << std::endl;
+        m2 = m2 + m1;
+        std::cout << "m2 = m2 + m1 = " << m2 << std::endl;
+        m2 = m2 - m1;
+        std::cout << "m2 = m2 - m1 = " << m2 << std::endl;
+        m1 *= value_type (1.);
+        std::cout << "m1 *= 1. = " << m1 << std::endl;
+        m1 *= t;
+        std::cout << "m1 *= N = " << m1 << std::endl;
+
+        // Transpose
+        initialize_matrix (m1);
+        m2 = ublas::trans (m1);
+        std::cout << "trans (m1) = " << m2 << std::endl;
+
+        // Hermitean
+        initialize_matrix (m1);
+        m2 = ublas::herm (m1);
+        std::cout << "herm (m1) = " << m2 << std::endl;
+
+        // Matrix multiplication
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        m3 = ublas::prod (m1, m2);
+        std::cout << "prod (m1, m2) = " << m3 << std::endl;
+    }
+
+    void operator () () const {
+        M m1 (N, N), m2 (N, N), m3 (N, N);
+        test_expression_with (m1, m2, m3);
+        test_container_with (m1);
+
+#ifdef USE_RANGE
+        ublas::matrix_range<M> mr1 (m1, ublas::range (0, N), ublas::range (0, N)),
+                               mr2 (m2, ublas::range (0, N), ublas::range (0, N)),
+                               mr3 (m3, ublas::range (0, N), ublas::range (0, N));
+        test_expression_with (mr1, mr2, mr3);
+#endif
+
+#ifdef USE_SLICE
+        ublas::matrix_slice<M> ms1 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                               ms2 (m2, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                               ms3 (m3, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+        test_expression_with (ms1, ms2, ms3);
+#endif
+    }
+};
+
+// Test matrix
+void test_matrix () {
+    std::cout << "test_matrix" << std::endl;
+
+    std::cout << "mp_test_type, bounded_array" << std::endl;
+    test_my_matrix<ublas::matrix<mp_test_type, ublas::row_major, ublas::bounded_array<mp_test_type, 3 * 3> >, 3> () ();
+    std::cout << "mp_test_type, unbounded_array" << std::endl;
+    test_my_matrix<ublas::matrix<mp_test_type, ublas::row_major, ublas::unbounded_array<mp_test_type> >, 3> () ();
+    std::cout << "mp_test_type, std::vector" << std::endl;
+    test_my_matrix<ublas::matrix<mp_test_type, ublas::row_major, std::vector<mp_test_type> >, 3> () ();
+    std::cout << "mp_test_type, bounded" << std::endl;
+    test_my_matrix<ublas::bounded_matrix<mp_test_type, 3, 3>, 3> () ();
+    std::cout << "mp_test_type, bounded_array" << std::endl;
+    test_my_matrix<ublas::vector_of_vector<mp_test_type, ublas::row_major, ublas::bounded_array<ublas::bounded_array<mp_test_type, 3>, 3 + 1> >, 3> () ();
+    /*
+    // This fails with an internal std lib assersion, even when mp_test_type is double,
+    // looks like a bug in the uBlas test code...
+    std::cout << "mp_test_type, unbounded_array" << std::endl;
+    test_my_matrix<ublas::vector_of_vector<mp_test_type, ublas::row_major, ublas::unbounded_array<ublas::unbounded_array<mp_test_type> > >, 3> () ();
+    std::cout << "mp_test_type, std::vector" << std::endl;
+    test_my_matrix<ublas::vector_of_vector<mp_test_type, ublas::row_major, std::vector<std::vector<mp_test_type > > >, 3> () ();*/
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test2.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test2.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,87 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test2.hpp"
+
+int main () {
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type" << std::endl;
+    test_blas_1<ublas::vector<mp_test_type>, 3> ().test ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double" << std::endl;
+    test_blas_1<ublas::vector<double>, 3> ().test ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>" << std::endl;
+    test_blas_1<ublas::vector<std::complex<mp_test_type> >, 3> ().test ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>" << std::endl;
+    test_blas_1<ublas::vector<std::complex<double> >, 3> ().test ();
+#endif
+#endif
+
+    std::cout << "test_blas_2" << std::endl;
+
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type" << std::endl;
+    test_blas_2<ublas::vector<mp_test_type>, ublas::matrix<mp_test_type>, 3> ().test ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double" << std::endl;
+    test_blas_2<ublas::vector<double>, ublas::matrix<double>, 3> ().test ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>" << std::endl;
+    test_blas_2<ublas::vector<std::complex<mp_test_type> >, ublas::matrix<std::complex<mp_test_type> >, 3> ().test ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>" << std::endl;
+    test_blas_2<ublas::vector<std::complex<double> >, ublas::matrix<std::complex<double> >, 3> ().test ();
+#endif
+#endif
+
+    std::cout << "test_blas_3" << std::endl;
+
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type" << std::endl;
+    test_blas_3<ublas::matrix<mp_test_type>, 3> ().test ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double" << std::endl;
+    test_blas_3<ublas::matrix<double>, 3> ().test ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>" << std::endl;
+    test_blas_3<ublas::matrix<std::complex<mp_test_type> >, 3> ().test ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>" << std::endl;
+    test_blas_3<ublas::matrix<std::complex<double> >, 3> ().test ();
+#endif
+#endif
+
+    return 0;
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test2.hpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test2.hpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,69 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#ifndef TEST2_H
+#define TEST2_H
+
+#ifdef _MSC_VER
+#  pragma warning(disable:4800 4996)
+#endif
+
+#include <boost/multiprecision/cpp_dec_float.hpp>
+
+typedef boost::multiprecision::mp_number<boost::multiprecision::cpp_dec_float<50>, false> mp_test_type;
+//typedef double mp_test_type;
+
+#define USE_RANGE
+#define USE_SLICE
+#define USE_FLOAT
+#define USE_RANGE 
+#define USE_SLICE
+#define USE_UNBOUNDED_ARRAY 
+#define USE_STD_VECTOR 
+#define USE_BOUNDED_VECTOR USE_MATRIX
+
+#include <iostream>
+
+#include <boost/numeric/ublas/vector.hpp>
+#include <boost/numeric/ublas/matrix.hpp>
+#include <boost/numeric/ublas/triangular.hpp>
+#include <boost/numeric/ublas/io.hpp>
+#include <boost/numeric/ublas/blas.hpp>
+
+namespace ublas = boost::numeric::ublas;
+
+#include "common/init.hpp"
+
+template<class V, int N>
+struct test_blas_1 {
+    typedef typename V::value_type value_type;
+    typedef typename ublas::type_traits<value_type>::real_type real_type;
+
+    void test ();
+};
+
+template<class V, class M, int N>
+struct test_blas_2 {
+    typedef typename V::value_type value_type;
+
+    void test ();
+};
+
+template<class M, int N>
+struct test_blas_3 {
+    typedef typename M::value_type value_type;
+
+    void test ();
+};
+
+
+#endif
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test21.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test21.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,95 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test2.hpp"
+
+template<class V, int N>
+void test_blas_1<V, N>::test () {
+    {
+        value_type t;
+        real_type n;
+        V v1 (N), v2 (N);
+
+        // _asum
+        initialize_vector (v1);
+        n = ublas::blas_1::asum (v1);
+        std::cout << "asum (v1) = " << n << std::endl;
+
+        // _amax
+        initialize_vector (v1);
+        n = ublas::blas_1::amax (v1);
+        std::cout << "amax (v1) = " << n << std::endl;
+
+        // _nrm2
+        initialize_vector (v1);
+        n = ublas::blas_1::nrm2 (v1);
+        std::cout << "nrm2 (v1) = " << n << std::endl;
+
+        // _dot
+        // _dotu
+        // _dotc
+        initialize_vector (v1);
+        initialize_vector (v2);
+        t = ublas::blas_1::dot (v1, v2);
+        std::cout << "dot (v1, v2) = " << t << std::endl;
+        t = ublas::blas_1::dot (ublas::conj (v1), v2);
+        std::cout << "dot (conj (v1), v2) = " << t << std::endl;
+
+        // _copy
+        initialize_vector (v2);
+        ublas::blas_1::copy (v1, v2);
+        std::cout << "copy (v1, v2) = " << v1 << std::endl;
+
+        // _swap
+        initialize_vector (v1);
+        initialize_vector (v2);
+        ublas::blas_1::swap (v1, v2);
+        std::cout << "swap (v1, v2) = " << v1 << " " << v2 << std::endl;
+
+        // _scal
+        // csscal
+        // zdscal
+        initialize_vector (v1);
+        ublas::blas_1::scal (v1, value_type (1));
+        std::cout << "scal (v1, 1) = " << v1 << std::endl;
+
+        // _axpy
+        initialize_vector (v1);
+        initialize_vector (v2);
+        ublas::blas_1::axpy (v1, value_type (1), v2);
+        std::cout << "axpy (v1, 1, v2) = " << v1 << std::endl;
+
+        // _rot
+        initialize_vector (v1);
+        initialize_vector (v2);
+        ublas::blas_1::rot (value_type (1), v1, value_type (1), v2);
+        std::cout << "rot (1, v1, 1, v2) = " << v1 << " " << v2 << std::endl;
+    }
+}
+
+#ifdef USE_FLOAT
+template struct test_blas_1<ublas::vector<mp_test_type>, 3>;
+#endif
+
+#ifdef USE_DOUBLE
+template struct test_blas_1<ublas::vector<double>, 3>;
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+template struct test_blas_1<ublas::vector<std::complex<mp_test_type> >, 3>;
+#endif
+
+#ifdef USE_DOUBLE
+template struct test_blas_1<ublas::vector<std::complex<double> >, 3>;
+#endif
+#endif
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test22.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test22.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,147 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test2.hpp"
+
+template<class V, class M, int N>
+void test_blas_2<V, M, N>::test () {
+    {
+        V v1 (N), v2 (N);
+        M m (N, N);
+
+        // _t_mv
+        initialize_vector (v1);
+        initialize_matrix (m);
+        ublas::blas_2::tmv (v1, m);
+        std::cout << "tmv (v1, m) = " << v1 << std::endl;
+        initialize_vector (v1);
+        initialize_matrix (m);
+        ublas::blas_2::tmv (v1, ublas::trans (m));
+        std::cout << "tmv (v1, trans (m)) = " << v1 << std::endl;
+#ifdef USE_STD_COMPLEX
+        initialize_vector (v1);
+        initialize_matrix (m);
+        ublas::blas_2::tmv (v1, ublas::herm (m));
+        std::cout << "tmv (v1, herm (m)) = " << v1 << std::endl;
+#endif
+
+        // _t_sv
+        initialize_vector (v1);
+        initialize_vector (v2);
+        initialize_matrix (m, ublas::lower_tag ());
+        ublas::blas_2::tsv (v1, m, ublas::lower_tag ());
+        std::cout << "tsv (v1, m) = " << v1 << " " << ublas::prod (m, v1) - v2 << std::endl;
+        initialize_vector (v1);
+        initialize_vector (v2);
+        initialize_matrix (m, ublas::upper_tag ());
+        ublas::blas_2::tsv (v1, ublas::trans (m), ublas::lower_tag ());
+        std::cout << "tsv (v1, trans (m)) = " << v1 << " " << ublas::prod (ublas::trans (m), v1) - v2 << std::endl;
+#ifdef USE_STD_COMPLEX
+        initialize_vector (v1);
+        initialize_vector (v2);
+        initialize_matrix (m, ublas::upper_tag ());
+        ublas::blas_2::tsv (v1, ublas::herm (m), ublas::lower_tag ());
+        std::cout << "tsv (v1, herm (m)) = " << v1 << " " << ublas::prod (ublas::herm (m), v1) - v2 << std::endl;
+#endif
+        initialize_vector (v1);
+        initialize_vector (v2);
+        initialize_matrix (m, ublas::upper_tag ());
+        ublas::blas_2::tsv (v1, m, ublas::upper_tag ());
+        std::cout << "tsv (v1, m) = " << v1 << " " << ublas::prod (m, v1) - v2 << std::endl;
+        initialize_vector (v1);
+        initialize_vector (v2);
+        initialize_matrix (m, ublas::lower_tag ());
+        ublas::blas_2::tsv (v1, ublas::trans (m), ublas::upper_tag ());
+        std::cout << "tsv (v1, trans (m)) = " << v1 << " " << ublas::prod (ublas::trans (m), v1) - v2 << std::endl;
+#ifdef USE_STD_COMPLEX
+        initialize_vector (v1);
+        initialize_vector (v2);
+        initialize_matrix (m, ublas::lower_tag ());
+        ublas::blas_2::tsv (v1, ublas::herm (m), ublas::upper_tag ());
+        std::cout << "tsv (v1, herm (m)) = " << v1 << " " << ublas::prod (ublas::herm (m), v1) - v2 << std::endl;
+#endif
+
+        // _g_mv
+        // _s_mv
+        // _h_mv
+        initialize_vector (v1);
+        initialize_vector (v2);
+        initialize_matrix (m);
+        ublas::blas_2::gmv (v1, value_type (1), value_type (1), m, v2);
+        std::cout << "gmv (v1, 1, 1, m, v2) = " << v1 << std::endl;
+        ublas::blas_2::gmv (v1, value_type (1), value_type (1), ublas::trans (m), v2);
+        std::cout << "gmv (v1, 1, 1, trans (m), v2) = " << v1 << std::endl;
+#ifdef USE_STD_COMPLEX
+        ublas::blas_2::gmv (v1, value_type (1), value_type (1), ublas::herm (m), v2);
+        std::cout << "gmv (v1, 1, 1, herm (m), v2) = " << v1 << std::endl;
+#endif
+
+        // _g_r
+        // _g_ru
+        // _g_rc
+        initialize_vector (v1);
+        initialize_vector (v2);
+        initialize_matrix (m);
+        ublas::blas_2::gr (m, value_type (1), v1, v2);
+        std::cout << "gr (m, 1, v1, v2) = " << m << std::endl;
+        ublas::blas_2::gr (m, value_type (1), v1, ublas::conj (v2));
+        std::cout << "gr (m, 1, v1, conj (v2)) = " << m << std::endl;
+
+        // _s_r
+        initialize_vector (v1);
+        initialize_matrix (m);
+        ublas::blas_2::sr (m, value_type (1), v1);
+        std::cout << "sr (m, 1, v1) = " << m << std::endl;
+
+#ifdef USE_STD_COMPLEX
+        // _h_r
+        initialize_vector (v1);
+        initialize_matrix (m);
+        ublas::blas_2::hr (m, value_type (1), v1);
+        std::cout << "hr (m, 1, v1) = " << m << std::endl;
+#endif
+
+        // _s_r2
+        initialize_vector (v1);
+        initialize_vector (v2);
+        initialize_matrix (m);
+        ublas::blas_2::sr2 (m, value_type (1), v1, v2);
+        std::cout << "sr2 (m, 1, v1, v2) = " << m << std::endl;
+
+#ifdef USE_STD_COMPLEX
+        // _h_r2
+        initialize_vector (v1);
+        initialize_vector (v2);
+        initialize_matrix (m);
+        ublas::blas_2::hr2 (m, value_type (1), v1, v2);
+        std::cout << "hr2 (m, 1, v1, v2) = " << m << std::endl;
+#endif
+    }
+}
+
+#ifdef USE_FLOAT
+template struct test_blas_2<ublas::vector<mp_test_type>, ublas::matrix<mp_test_type>, 3>;
+#endif
+
+#ifdef USE_DOUBLE
+template struct test_blas_2<ublas::vector<double>, ublas::matrix<double>, 3>;
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+template struct test_blas_2<ublas::vector<std::complex<mp_test_type> >, ublas::matrix<std::complex<mp_test_type> >, 3>;
+#endif
+
+#ifdef USE_DOUBLE
+template struct test_blas_2<ublas::vector<std::complex<double> >, ublas::matrix<std::complex<double> >, 3>;
+#endif
+#endif
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test23.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test23.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,208 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test2.hpp"
+
+template<class M, int N>
+void test_blas_3<M, N>::test () {
+    {
+        M m1 (N, N), m2 (N, N), m3 (N, N);
+
+        // _t_mm
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        ublas::blas_3::tmm (m1, value_type (1), m2, m1);
+        std::cout << "tmm (m1, 1, m2, m1) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        ublas::blas_3::tmm (m1, value_type (1), m2, ublas::trans (m1));
+        std::cout << "tmm (m1, 1, m2, trans (m1)) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        ublas::blas_3::tmm (m1, value_type (1), ublas::trans (m2), m1);
+        std::cout << "tmm (m1, 1, trans (m2), m1) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        ublas::blas_3::tmm (m1, value_type (1), ublas::trans (m2), ublas::trans (m1));
+        std::cout << "tmm (m1, 1, trans (m2), trans (m1)) = " << m1 << std::endl;
+#ifdef USE_STD_COMPLEX
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        ublas::blas_3::tmm (m1, value_type (1), m2, ublas::herm (m1));
+        std::cout << "tmm (m1, 1, m2, herm (m1)) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        ublas::blas_3::tmm (m1, value_type (1), ublas::herm (m2), m1);
+        std::cout << "tmm (m1, 1, herm (m2), m1) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        ublas::blas_3::tmm (m1, value_type (1), ublas::trans (m2), ublas::herm (m1));
+        std::cout << "tmm (m1, 1, trans (m2), herm (m1)) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        ublas::blas_3::tmm (m1, value_type (1), ublas::herm (m2), ublas::trans (m1));
+        std::cout << "tmm (m1, 1, herm (m2), trans (m1)) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        ublas::blas_3::tmm (m1, value_type (1), ublas::herm (m2), ublas::herm (m1));
+        std::cout << "tmm (m1, 1, herm (m2), herm (m1)) = " << m1 << std::endl;
+#endif
+
+        // _t_sm
+        initialize_matrix (m1);
+        initialize_matrix (m2, ublas::lower_tag ());
+        initialize_matrix (m3);
+        ublas::blas_3::tsm (m1, value_type (1), m2, ublas::lower_tag ());
+        std::cout << "tsm (m1, 1, m2) = " << m1 << " " << ublas::prod (m2, m1) - value_type (1) * m3 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2, ublas::upper_tag ());
+        ublas::blas_3::tsm (m1, value_type (1), ublas::trans (m2), ublas::lower_tag ());
+        std::cout << "tsm (m1, 1, trans (m2)) = " << m1 << " " << ublas::prod (ublas::trans (m2), m1) - value_type (1) * m3 << std::endl;
+#ifdef USE_STD_COMPLEX
+        initialize_matrix (m1);
+        initialize_matrix (m2, ublas::upper_tag ());
+        ublas::blas_3::tsm (m1, value_type (1), ublas::herm (m2), ublas::lower_tag ());
+        std::cout << "tsm (m1, 1, herm (m2)) = " << m1 << " " << ublas::prod (ublas::herm (m2), m1) - value_type (1) * m3 << std::endl;
+#endif
+        initialize_matrix (m1);
+        initialize_matrix (m2, ublas::upper_tag ());
+        ublas::blas_3::tsm (m1, value_type (1), m2, ublas::upper_tag ());
+        std::cout << "tsm (m1, 1, m2) = " << m1 << " " << ublas::prod (m2, m1) - value_type (1) * m3 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2, ublas::lower_tag ());
+        ublas::blas_3::tsm (m1, value_type (1), ublas::trans (m2), ublas::upper_tag ());
+        std::cout << "tsm (m1, 1, trans (m2)) = " << m1 << " " << ublas::prod (ublas::trans (m2), m1) - value_type (1) * m3 << std::endl;
+#ifdef USE_STD_COMPLEX
+        initialize_matrix (m1);
+        initialize_matrix (m2, ublas::lower_tag ());
+        ublas::blas_3::tsm (m1, value_type (1), ublas::herm (m2), ublas::upper_tag ());
+        std::cout << "tsm (m1, 1, herm (m2)) = " << m1 << " " << ublas::prod (ublas::herm (m2), m1) - value_type (1) * m3 << std::endl;
+#endif
+
+        // _g_mm
+        // _s_mm
+        // _h_mm
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        initialize_matrix (m3);
+        ublas::blas_3::gmm (m1, value_type (1), value_type (1), m2, m3);
+        std::cout << "gmm (m1, 1, 1, m2, m3) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        initialize_matrix (m3);
+        ublas::blas_3::gmm (m1, value_type (1), value_type (1), ublas::trans (m2), m3);
+        std::cout << "gmm (m1, 1, 1, trans (m2), m3) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        initialize_matrix (m3);
+        ublas::blas_3::gmm (m1, value_type (1), value_type (1), m2, ublas::trans (m3));
+        std::cout << "gmm (m1, 1, 1, m2, trans (m3)) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        initialize_matrix (m3);
+        ublas::blas_3::gmm (m1, value_type (1), value_type (1), ublas::trans (m2), ublas::trans (m3));
+        std::cout << "gmm (m1, 1, 1, trans (m2), trans (m3)) = " << m1 << std::endl;
+#ifdef USE_STD_COMPLEX
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        initialize_matrix (m3);
+        ublas::blas_3::gmm (m1, value_type (1), value_type (1), ublas::herm (m2), m3);
+        std::cout << "gmm (m1, 1, 1, herm (m2), m3) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        initialize_matrix (m3);
+        ublas::blas_3::gmm (m1, value_type (1), value_type (1), m2, ublas::herm (m3));
+        std::cout << "gmm (m1, 1, 1, m2, herm (m3)) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        initialize_matrix (m3);
+        ublas::blas_3::gmm (m1, value_type (1), value_type (1), ublas::herm (m2), ublas::trans (m3));
+        std::cout << "gmm (m1, 1, 1, herm (m2), trans (m3)) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        initialize_matrix (m3);
+        ublas::blas_3::gmm (m1, value_type (1), value_type (1), ublas::trans (m2), ublas::herm (m3));
+        std::cout << "gmm (m1, 1, 1, trans (m2), herm (m3)) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        initialize_matrix (m3);
+        ublas::blas_3::gmm (m1, value_type (1), value_type (1), ublas::herm (m2), ublas::herm (m3));
+        std::cout << "gmm (m1, 1, 1, herm (m2), herm (m3)) = " << m1 << std::endl;
+#endif
+
+        // s_rk
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        ublas::blas_3::srk (m1, value_type (1), value_type (1), m2);
+        std::cout << "srk (m1, 1, 1, m2) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        ublas::blas_3::srk (m1, value_type (1), value_type (1), ublas::trans (m2));
+        std::cout << "srk (m1, 1, 1, trans (m2)) = " << m1 << std::endl;
+
+#ifdef USE_STD_COMPLEX
+        // h_rk
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        ublas::blas_3::hrk (m1, value_type (1), value_type (1), m2);
+        std::cout << "hrk (m1, 1, 1, m2) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        ublas::blas_3::hrk (m1, value_type (1), value_type (1), ublas::herm (m2));
+        std::cout << "hrk (m1, 1, 1, herm (m2)) = " << m1 << std::endl;
+#endif
+
+        // s_r2k
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        initialize_matrix (m3);
+        ublas::blas_3::sr2k (m1, value_type (1), value_type (1), m2, m3);
+        std::cout << "sr2k (m1, 1, 1, m2, m3) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        initialize_matrix (m3);
+        ublas::blas_3::sr2k (m1, value_type (1), value_type (1), ublas::trans (m2), ublas::trans (m3));
+        std::cout << "sr2k (m1, 1, 1, trans (m2), trans (m3)) = " << m1 << std::endl;
+
+#ifdef USE_STD_COMPLEX
+        // h_r2k
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        initialize_matrix (m3);
+        ublas::blas_3::hr2k (m1, value_type (1), value_type (1), m2, m3);
+        std::cout << "hr2k (m1, 1, 1, m2, m3) = " << m1 << std::endl;
+        initialize_matrix (m1);
+        initialize_matrix (m2);
+        initialize_matrix (m3);
+        ublas::blas_3::hr2k (m1, value_type (1), value_type (1), ublas::herm (m2), ublas::herm (m3));
+        std::cout << "hr2k (m1, 1, 1, herm (m2), herm (m3)) = " << m1 << std::endl;
+#endif
+    }
+}
+
+#ifdef USE_FLOAT
+template struct test_blas_3<ublas::matrix<mp_test_type>, 3>;
+#endif
+
+#ifdef USE_DOUBLE
+template struct test_blas_3<ublas::matrix<double>, 3>;
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+template struct test_blas_3<ublas::matrix<std::complex<mp_test_type> >, 3>;
+#endif
+
+#ifdef USE_DOUBLE
+template struct test_blas_3<ublas::matrix<std::complex<double> >, 3>;
+#endif
+#endif
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test3.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test3.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,20 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test3.hpp"
+
+int main () {
+    test_vector ();
+    test_matrix_vector ();
+    test_matrix ();
+    return 0;
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test3.hpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test3.hpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,63 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#ifndef TEST3_H
+#define TEST3_H
+
+#ifdef _MSC_VER
+#  pragma warning(disable:4800 4996)
+#endif
+
+#include <boost/multiprecision/cpp_dec_float.hpp>
+
+typedef boost::multiprecision::mp_number<boost::multiprecision::cpp_dec_float<50>, false> mp_test_type;
+//typedef double mp_test_type;
+
+#define USE_RANGE
+#define USE_SLICE
+#define USE_FLOAT
+#define USE_UNBOUNDED_ARRAY 
+#define USE_STD_VECTOR 
+#define USE_BOUNDED_VECTOR USE_MATRIX
+#define USE_UNBOUNDED_ARRAY
+#define USE_MAP_ARRAY 
+#define USE_STD_MAP
+#define USE_MAPPED_VECTOR 
+#define USE_COMPRESSED_VECTOR 
+#define USE_COORDINATE_VECTOR
+#define USE_MAPPED_MATRIX 
+#define USE_COMPRESSED_MATRIX 
+#define USE_COORDINATE_MATRIX
+
+#include <iostream>
+
+#include <boost/numeric/ublas/vector.hpp>
+#include <boost/numeric/ublas/vector_proxy.hpp>
+#include <boost/numeric/ublas/vector_sparse.hpp>
+#include <boost/numeric/ublas/matrix.hpp>
+#include <boost/numeric/ublas/matrix_proxy.hpp>
+#include <boost/numeric/ublas/matrix_sparse.hpp>
+#include <boost/numeric/ublas/vector_sparse.hpp>
+#ifdef USE_GENERALIZED_VECTOR_OF_VECTOR
+#include <boost/numeric/ublas/vector_of_vector.hpp>
+#endif
+#include <boost/numeric/ublas/io.hpp>
+
+namespace ublas = boost::numeric::ublas;
+
+#include "common/init.hpp"
+
+void test_vector ();
+void test_matrix_vector ();
+void test_matrix ();
+
+#endif
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test31.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test31.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,248 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test3.hpp"
+
+// Test vector expression templates
+template<class V, int N>
+struct test_my_vector {
+    typedef typename V::value_type value_type;
+    typedef typename V::size_type size_type;
+    typedef typename ublas::type_traits<value_type>::real_type real_type;
+
+    template<class VP>
+    void test_with (VP &v1, VP &v2, VP &v3) const {
+        {
+            value_type t;
+            size_type i;
+            real_type n;
+
+            // Default Construct
+            default_construct<VP>::test ();
+            
+            // Copy and swap
+            initialize_vector (v1);
+            initialize_vector (v2);
+            v1 = v2;
+            std::cout << "v1 = v2 = " << v1 << std::endl;
+            v1.assign_temporary (v2);
+            std::cout << "v1.assign_temporary (v2) = " << v1 << std::endl;
+            v1.swap (v2);
+            std::cout << "v1.swap (v2) = " << v1 << " " << v2 << std::endl;
+
+            // Zero assignment
+            v1 = ublas::zero_vector<> (v1.size ());
+            std::cout << "v1.zero_vector = " << v1 << std::endl;
+            v1 = v2;
+
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+            // Project range and slice
+            initialize_vector (v1);
+            initialize_vector (v2);
+            project (v1, ublas::range(0,1)) = project (v2, ublas::range(0,1));
+            project (v1, ublas::range(0,1)) = project (v2, ublas::slice(0,1,1));
+            project (v1, ublas::slice(2,-1,2)) = project (v2, ublas::slice(0,1,2));
+            project (v1, ublas::slice(2,-1,2)) = project (v2, ublas::range(0,2));
+            std::cout << "v1 = range/slice " << v1 << std::endl;
+#endif
+
+            // Unary vector operations resulting in a vector
+            initialize_vector (v1);
+            v2 = - v1;
+            std::cout << "- v1 = " << v2 << std::endl;
+            v2 = ublas::conj (v1);
+            std::cout << "conj (v1) = " << v2 << std::endl;
+
+            // Binary vector operations resulting in a vector
+            initialize_vector (v1);
+            initialize_vector (v2);
+            initialize_vector (v3);
+            v3 = v1 + v2;
+            std::cout << "v1 + v2 = " << v3 << std::endl;
+
+            v3 = v1 - v2;
+            std::cout << "v1 - v2 = " << v3 << std::endl;
+
+            // Scaling a vector
+            t = N;
+            initialize_vector (v1);
+            v2 = value_type (1.) * v1;
+            std::cout << "1. * v1 = " << v2 << std::endl;
+            v2 = t * v1;
+            std::cout << "N * v1 = " << v2 << std::endl;
+            initialize_vector (v1);
+            v2 = v1 * value_type (1.);
+            std::cout << "v1 * 1. = " << v2 << std::endl;
+            v2 = v1 * t;
+            std::cout << "v1 * N = " << v2 << std::endl;
+
+            // Some assignments
+            initialize_vector (v1);
+            initialize_vector (v2);
+            v2 += v1;
+            std::cout << "v2 += v1 = " << v2 << std::endl;
+            v2 -= v1;
+            std::cout << "v2 -= v1 = " << v2 << std::endl;
+            v2 = v2 + v1;
+            std::cout << "v2 = v2 + v1 = " << v2 << std::endl;
+            v2 = v2 - v1;
+            std::cout << "v2 = v2 - v1 = " << v2 << std::endl;
+            v1 *= value_type (1.);
+            std::cout << "v1 *= 1. = " << v1 << std::endl;
+            v1 *= t;
+            std::cout << "v1 *= N = " << v1 << std::endl;
+
+            // Unary vector operations resulting in a scalar
+            initialize_vector (v1);
+            t = ublas::sum (v1);
+            std::cout << "sum (v1) = " << t << std::endl;
+            n = ublas::norm_1 (v1);
+            std::cout << "norm_1 (v1) = " << n << std::endl;
+            n = ublas::norm_2 (v1);
+            std::cout << "norm_2 (v1) = " << n << std::endl;
+            n = ublas::norm_inf (v1);
+            std::cout << "norm_inf (v1) = " << n << std::endl;
+
+            i = ublas::index_norm_inf (v1);
+            std::cout << "index_norm_inf (v1) = " << i << std::endl;
+
+            // Binary vector operations resulting in a scalar
+            initialize_vector (v1);
+            initialize_vector (v2);
+            t = ublas::inner_prod (v1, v2);
+            std::cout << "inner_prod (v1, v2) = " << t << std::endl;
+        }
+    }
+    void operator () () const {
+        {
+            V v1 (N, N), v2 (N, N), v3 (N, N);
+            test_with (v1, v2, v3);
+
+#ifdef USE_RANGE
+            ublas::vector_range<V> vr1 (v1, ublas::range (0, N)),
+                                   vr2 (v2, ublas::range (0, N)),
+                                   vr3 (v3, ublas::range (0, N));
+            test_with (vr1, vr2, vr3);
+#endif
+
+#ifdef USE_SLICE
+            ublas::vector_slice<V> vs1 (v1, ublas::slice (0, 1, N)),
+                                   vs2 (v2, ublas::slice (0, 1, N)),
+                                   vs3 (v3, ublas::slice (0, 1, N));
+            test_with (vs1, vs2, vs3);
+#endif
+        }
+    }
+};
+
+// Test vector
+void test_vector () {
+    std::cout << "test_vector" << std::endl;
+
+#ifdef USE_SPARSE_VECTOR
+#ifdef USE_MAP_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, map_array" << std::endl;
+    test_my_vector<ublas::mapped_vector<mp_test_type, ublas::map_array<std::size_t, mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, map_array" << std::endl;
+    test_my_vector<ublas::mapped_vector<double, ublas::map_array<std::size_t, double> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, map_array" << std::endl;
+    test_my_vector<ublas::mapped_vector<std::complex<mp_test_type>, ublas::map_array<std::size_t, std::complex<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, map_array" << std::endl;
+    test_my_vector<ublas::mapped_vector<std::complex<double>, ublas::map_array<std::size_t, std::complex<double> > >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_STD_MAP
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, std::map" << std::endl;
+    test_my_vector<ublas::mapped_vector<mp_test_type, std::map<std::size_t, mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, std::map" << std::endl;
+    test_my_vector<ublas::mapped_vector<double, std::map<std::size_t, double> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, std::map" << std::endl;
+    test_my_vector<ublas::mapped_vector<std::complex<mp_test_type>, std::map<std::size_t, std::complex<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, std::map" << std::endl;
+    test_my_vector<ublas::mapped_vector<std::complex<double>, std::map<std::size_t, std::complex<double> > > , 3 > () ();
+#endif
+#endif
+#endif
+#endif
+
+#ifdef USE_COMPRESSED_VECTOR
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type compressed" << std::endl;
+    test_my_vector<ublas::compressed_vector<mp_test_type>, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double compressed" << std::endl;
+    test_my_vector<ublas::compressed_vector<double>, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type> compressed" << std::endl;
+    test_my_vector<ublas::compressed_vector<std::complex<mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double> compressed" << std::endl;
+    test_my_vector<ublas::compressed_vector<std::complex<double> >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_COORDINATE_VECTOR
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type coordinate" << std::endl;
+    test_my_vector<ublas::coordinate_vector<mp_test_type>, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double coordinate" << std::endl;
+    test_my_vector<ublas::coordinate_vector<double>, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type> coordinate" << std::endl;
+    test_my_vector<ublas::coordinate_vector<std::complex<mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double> coordinate" << std::endl;
+    test_my_vector<ublas::coordinate_vector<std::complex<double> >, 3 > () ();
+#endif
+#endif
+#endif
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test32.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test32.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,324 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test3.hpp"
+
+// Test matrix & vector expression templates
+template<class V, class M, int N>
+struct test_my_matrix_vector {
+    typedef typename V::value_type value_type;
+
+    template<class VP, class MP>
+    void test_with (VP &v1, VP &v2, MP &m1) const {
+        {
+            // Rows and columns
+            initialize_matrix (m1);
+            for (int i = 0; i < N; ++ i) {
+                v1 = ublas::row (m1, i);
+                std::cout << "row (m, " << i << ") = " << v1 << std::endl;
+                v1 = ublas::column (m1, i);
+                std::cout << "column (m, " << i << ") = " << v1 << std::endl;
+            }
+
+            // Outer product
+            initialize_vector (v1);
+            initialize_vector (v2);
+            m1 = ublas::outer_prod (v1, v2);
+            std::cout << "outer_prod (v1, v2) = " << m1 << std::endl;
+
+            // Matrix vector product
+            initialize_matrix (m1);
+            initialize_vector (v1);
+            v2 = ublas::prod (m1, v1);
+            std::cout << "prod (m1, v1) = " << v2 << std::endl;
+            v2 = ublas::prod (v1, m1);
+            std::cout << "prod (v1, m1) = " << v2 << std::endl;
+        }
+    }
+    void operator () () const {
+        {
+            V v1 (N, N), v2 (N, N);
+            M m1 (N, N, N * N);
+
+            test_with (v1, v2, m1);
+
+            ublas::matrix_row<M> mr1 (m1, 0), mr2 (m1, N - 1);
+            test_with (mr1, mr2, m1);
+
+            ublas::matrix_column<M> mc1 (m1, 0), mc2 (m1, N - 1);
+            test_with (mc1, mc2, m1);
+
+#ifdef USE_RANGE
+            ublas::matrix_vector_range<M> mvr1 (m1, ublas::range (0, N), ublas::range (0, N)),
+                                          mvr2 (m1, ublas::range (0, N), ublas::range (0, N));
+            test_with (mvr1, mvr2, m1);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_vector_slice<M> mvs1 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                          mvs2 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (mvs1, mvs2, m1);
+#endif
+        }
+    }
+};
+
+// Test matrix & vector
+void test_matrix_vector () {
+    std::cout << "test_matrix_vector" << std::endl;
+
+#ifdef USE_SPARSE_MATRIX
+#ifdef USE_MAP_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, map_array" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<mp_test_type, ublas::map_array<std::size_t, mp_test_type> >,
+                          ublas::mapped_matrix<mp_test_type, ublas::row_major, ublas::map_array<std::size_t, mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, map_array" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<double, ublas::map_array<std::size_t, double> >,
+                          ublas::mapped_matrix<double, ublas::row_major, ublas::map_array<std::size_t, double> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, map_array" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<std::complex<mp_test_type>, ublas::map_array<std::size_t, std::complex<mp_test_type> > >,
+                          ublas::mapped_matrix<std::complex<mp_test_type>, ublas::row_major, ublas::map_array<std::size_t, std::complex<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, map_array" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<std::complex<double>, ublas::map_array<std::size_t, std::complex<double> > >,
+                          ublas::mapped_matrix<std::complex<double>, ublas::row_major, ublas::map_array<std::size_t, std::complex<double> > >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_STD_MAP
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, std::map" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<mp_test_type, std::map<std::size_t, mp_test_type> >,
+                          ublas::mapped_matrix<mp_test_type, ublas::row_major, std::map<std::size_t, mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, std::map" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<double, std::map<std::size_t, double> >,
+                          ublas::mapped_matrix<double, ublas::row_major, std::map<std::size_t, double> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, std::map" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<std::complex<mp_test_type>, std::map<std::size_t, std::complex<mp_test_type> > >,
+                          ublas::mapped_matrix<std::complex<mp_test_type>, ublas::row_major, std::map<std::size_t, std::complex<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, std::map" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<std::complex<double>, std::map<std::size_t, std::complex<double> > >,
+                          ublas::mapped_matrix<std::complex<double>, ublas::row_major, std::map<std::size_t, std::complex<double> > >, 3 > () ();
+#endif
+#endif
+#endif
+#endif
+
+#ifdef USE_SPARSE_VECTOR_OF_SPARSE_VECTOR
+#ifdef USE_MAP_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, mapped_vector map_array" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<mp_test_type, ublas::map_array<std::size_t, mp_test_type> >,
+                          ublas::mapped_vector<mp_test_type, ublas::row_major, ublas::map_array<std::size_t, ublas::map_array<std::size_t, mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, mapped_vector map_array" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<double, ublas::map_array<std::size_t, double> >,
+                          ublas::mapped_vector<double, ublas::row_major, ublas::map_array<std::size_t, ublas::map_array<std::size_t, double> > >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, mapped_vector map_array" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<std::complex<mp_test_type>, ublas::map_array<std::size_t, std::complex<mp_test_type> > >,
+                          ublas::mapped_vector<std::complex<mp_test_type>, ublas::row_major, ublas::map_array<std::size_t, ublas::map_array<std::size_t, std::complex<mp_test_type> > > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>,mapped_vector map_array" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<std::complex<double>, ublas::map_array<std::size_t, std::complex<double> > >,
+                          ublas::mapped_vector<std::complex<double>, ublas::row_major, ublas::map_array<std::size_t, ublas::map_array<std::size_t, std::complex<double> > > >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_STD_MAP
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, mapped_vector std::map" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<mp_test_type, std::map<std::size_t, mp_test_type> >,
+                          ublas::mapped_vector<mp_test_type, ublas::row_major, std::map<std::size_t, std::map<std::size_t, mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, mapped_vector std::map" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<double, std::map<std::size_t, double> >,
+                          ublas::mapped_vector<double, ublas::row_major, std::map<std::size_t, std::map<std::size_t, double> > >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, mapped_vector std::map" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<std::complex<mp_test_type>, std::map<std::size_t, std::complex<mp_test_type> > >,
+                          ublas::mapped_vector<std::complex<mp_test_type>, ublas::row_major, std::map<std::size_t, std::map<std::size_t, std::complex<mp_test_type> > > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, mapped_vector std::map" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<std::complex<double>, std::map<std::size_t, std::complex<double> > >,
+                          ublas::mapped_vector<std::complex<double>, ublas::row_major, std::map<std::size_t, std::map<std::size_t, std::complex<double> > > >, 3 > () ();
+#endif
+#endif
+#endif
+#endif
+
+#ifdef USE_GENERALIZED_VECTOR_OF_VECTOR
+#ifdef USE_MAP_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, generalized_vector_of_vector map_array" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<mp_test_type, ublas::map_array<std::size_t, mp_test_type> >,
+                          ublas::generalized_vector_of_vector<mp_test_type, ublas::row_major, ublas::vector<ublas::mapped_vector<mp_test_type, ublas::map_array<std::size_t, mp_test_type> > > >, 3 > () ();
+    test_my_matrix_vector<ublas::mapped_vector<mp_test_type, ublas::map_array<std::size_t, mp_test_type> >,
+                          ublas::generalized_vector_of_vector<mp_test_type, ublas::row_major, ublas::mapped_vector<ublas::mapped_vector<mp_test_type, ublas::map_array<std::size_t, mp_test_type> >, ublas::map_array<std::size_t, ublas::mapped_vector<mp_test_type, ublas::map_array<std::size_t, mp_test_type> > > > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, generalized_vector_of_vector map_array" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<double, ublas::map_array<std::size_t, double> >,
+                          ublas::generalized_vector_of_vector<double, ublas::row_major, ublas::vector<ublas::mapped_vector<double, ublas::map_array<std::size_t, double> > > >, 3 > () ();
+    test_my_matrix_vector<ublas::mapped_vector<double, ublas::map_array<std::size_t, double> >,
+                          ublas::generalized_vector_of_vector<double, ublas::row_major, ublas::mapped_vector<ublas::mapped_vector<double, ublas::map_array<std::size_t, double> >, ublas::map_array<std::size_t, ublas::mapped_vector<double, ublas::map_array<std::size_t, double> > > > >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, generalized_vector_of_vector map_array" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<std::complex<mp_test_type>, ublas::map_array<std::size_t, std::complex<mp_test_type> > >,
+                          ublas::generalized_vector_of_vector<std::complex<mp_test_type>, ublas::row_major, ublas::vector<ublas::mapped_vector<std::complex<mp_test_type>, ublas::map_array<std::size_t, std::complex<mp_test_type> > > > >, 3 > () ();
+    test_my_matrix_vector<ublas::mapped_vector<std::complex<mp_test_type>, ublas::map_array<std::size_t, std::complex<mp_test_type> > >,
+                          ublas::generalized_vector_of_vector<std::complex<mp_test_type>, ublas::row_major, ublas::mapped_vector<ublas::mapped_vector<std::complex<mp_test_type>, ublas::map_array<std::size_t, std::complex<mp_test_type> > >, ublas::map_array<std::size_t, ublas::mapped_vector<std::complex<mp_test_type>, ublas::map_array<std::size_t, std::complex<mp_test_type> > > > > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, generalized_vector_of_vector map_array" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<std::complex<double>, ublas::map_array<std::size_t, std::complex<double> > >,
+                          ublas::generalized_vector_of_vector<std::complex<double>, ublas::row_major, ublas::vector<ublas::mapped_vector<std::complex<double>, ublas::map_array<std::size_t, std::complex<double> > > > >, 3 > () ();
+    test_my_matrix_vector<ublas::mapped_vector<std::complex<double>, ublas::map_array<std::size_t, std::complex<double> > >,
+                          ublas::generalized_vector_of_vector<std::complex<double>, ublas::row_major, ublas::mapped_vector<ublas::mapped_vector<std::complex<double>, ublas::map_array<std::size_t, std::complex<double> > >, ublas::map_array<std::size_t, ublas::mapped_vector<std::complex<double>, ublas::map_array<std::size_t, std::complex<double> > > > > >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_STD_MAP
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, generalized_vector_of_vector std::map" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<mp_test_type, std::map<std::size_t, mp_test_type> >,
+                          ublas::generalized_vector_of_vector<mp_test_type, ublas::row_major, ublas::vector<ublas::mapped_vector<mp_test_type, std::map<std::size_t, mp_test_type> > > >, 3 > () ();
+    test_my_matrix_vector<ublas::mapped_vector<mp_test_type, std::map<std::size_t, mp_test_type> >,
+                          ublas::generalized_vector_of_vector<mp_test_type, ublas::row_major, ublas::mapped_vector<ublas::mapped_vector<mp_test_type, std::map<std::size_t, mp_test_type> >, std::map<std::size_t, ublas::mapped_vector<mp_test_type, std::map<std::size_t, mp_test_type> > > > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, generalized_vector_of_vector std::map" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<double, std::map<std::size_t, double> >,
+                          ublas::generalized_vector_of_vector<double, ublas::row_major, ublas::vector<ublas::mapped_vector<double, std::map<std::size_t, double> > > >, 3 > () ();
+    test_my_matrix_vector<ublas::mapped_vector<double, std::map<std::size_t, double> >,
+                          ublas::generalized_vector_of_vector<double, ublas::row_major, ublas::mapped_vector<ublas::mapped_vector<double, std::map<std::size_t, double> >, std::map<std::size_t, ublas::mapped_vector<double, std::map<std::size_t, double> > > > >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, generalized_vector_of_vector std::map" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<std::complex<mp_test_type>, std::map<std::size_t, std::complex<mp_test_type> > >,
+                          ublas::generalized_vector_of_vector<std::complex<mp_test_type>, ublas::row_major, ublas::vector<ublas::mapped_vector<std::complex<mp_test_type>, std::map<std::size_t, std::complex<mp_test_type> > > > >, 3 > () ();
+    test_my_matrix_vector<ublas::mapped_vector<std::complex<mp_test_type>, std::map<std::size_t, std::complex<mp_test_type> > >,
+                          ublas::generalized_vector_of_vector<std::complex<mp_test_type>, ublas::row_major, ublas::mapped_vector<ublas::mapped_vector<std::complex<mp_test_type>, std::map<std::size_t, std::complex<mp_test_type> > >, std::map<std::size_t, ublas::mapped_vector<std::complex<mp_test_type>, std::map<std::size_t, std::complex<mp_test_type> > > > > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, generalized_vector_of_vector std::map" << std::endl;
+    test_my_matrix_vector<ublas::mapped_vector<std::complex<double>, std::map<std::size_t, std::complex<double> > >,
+                          ublas::generalized_vector_of_vector<std::complex<double>, ublas::row_major, ublas::vector<ublas::mapped_vector<std::complex<double>, std::map<std::size_t, std::complex<double> > > > >, 3 > () ();
+    test_my_matrix_vector<ublas::mapped_vector<std::complex<double>, std::map<std::size_t, std::complex<double> > >,
+                          ublas::generalized_vector_of_vector<std::complex<double>, ublas::row_major, ublas::mapped_vector<ublas::mapped_vector<std::complex<double>, std::map<std::size_t, std::complex<double> > >, std::map<std::size_t, ublas::mapped_vector<std::complex<double>, std::map<std::size_t, std::complex<double> > > > > >, 3 > () ();
+#endif
+#endif
+#endif
+#endif
+
+#ifdef USE_COMPRESSED_MATRIX
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type compressed" << std::endl;
+    test_my_matrix_vector<ublas::compressed_vector<mp_test_type>,
+                          ublas::compressed_matrix<mp_test_type>, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double compressed" << std::endl;
+    test_my_matrix_vector<ublas::compressed_vector<double>,
+                          ublas::compressed_matrix<double>, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type> compressed" << std::endl;
+    test_my_matrix_vector<ublas::compressed_vector<std::complex<mp_test_type> >,
+                          ublas::compressed_matrix<std::complex<mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double> compressed" << std::endl;
+    test_my_matrix_vector<ublas::compressed_vector<std::complex<double> >,
+                          ublas::compressed_matrix<std::complex<double> >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_COORDINATE_MATRIX
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type coordinate" << std::endl;
+    test_my_matrix_vector<ublas::coordinate_vector<mp_test_type>,
+                          ublas::coordinate_matrix<mp_test_type>, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double coordinate" << std::endl;
+    test_my_matrix_vector<ublas::coordinate_vector<double>,
+                          ublas::coordinate_matrix<double>, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type> coordinate" << std::endl;
+    test_my_matrix_vector<ublas::coordinate_vector<std::complex<mp_test_type> >,
+                          ublas::coordinate_matrix<std::complex<mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double> coordinate" << std::endl;
+    test_my_matrix_vector<ublas::coordinate_vector<std::complex<double> >,
+                          ublas::coordinate_matrix<std::complex<double> >, 3 > () ();
+#endif
+#endif
+#endif
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test33.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test33.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,347 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test3.hpp"
+
+// Test matrix expression templates
+template<class M, int N>
+struct test_my_matrix {
+    typedef typename M::value_type value_type;
+
+    template<class MP>
+    void test_with (MP &m1, MP &m2, MP &m3) const {
+        {
+            value_type t;
+
+            // Default Construct
+            default_construct<MP>::test ();
+            
+            // Copy and swap
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m1 = m2;
+            std::cout << "m1 = m2 = " << m1 << std::endl;
+            m1.assign_temporary (m2);
+            std::cout << "m1.assign_temporary (m2) = " << m1 << std::endl;
+            m1.swap (m2);
+            std::cout << "m1.swap (m2) = " << m1 << " " << m2 << std::endl;
+
+            // Zero assignment
+            m1 = ublas::zero_matrix<> (m1.size1 (), m1.size2 ());
+            std::cout << "m1.zero_matrix = " << m1 << std::endl;
+            m1 = m2;
+
+#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+            // Project range and slice
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            project (m1, ublas::range(0,1),ublas::range(0,1)) = project (m2, ublas::range(0,1),ublas::range(0,1));
+            project (m1, ublas::range(0,1),ublas::range(0,1)) = project (m2, ublas::slice(0,1,1),ublas::slice(0,1,1));
+            project (m1, ublas::slice(2,-1,2),ublas::slice(2,-1,2)) = project (m2, ublas::slice(0,1,2),ublas::slice(0,1,2));
+            project (m1, ublas::slice(2,-1,2),ublas::slice(2,-1,2)) = project (m2, ublas::range(0,2),ublas::range(0,2));
+            std::cout << "m1 = range/slice " << m1 << std::endl;
+#endif
+
+            // Unary matrix operations resulting in a matrix
+            initialize_matrix (m1);
+            m2 = - m1;
+            std::cout << "- m1 = " << m2 << std::endl;
+            m2 = ublas::conj (m1);
+            std::cout << "conj (m1) = " << m2 << std::endl;
+
+            // Binary matrix operations resulting in a matrix
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            initialize_matrix (m3);
+            m3 = m1 + m2;
+            std::cout << "m1 + m2 = " << m3 << std::endl;
+            m3 = m1 - m2;
+            std::cout << "m1 - m2 = " << m3 << std::endl;
+
+            // Scaling a matrix
+            t = N;
+            initialize_matrix (m1);
+            m2 = value_type (1.) * m1;
+            std::cout << "1. * m1 = " << m2 << std::endl;
+            m2 = t * m1;
+            std::cout << "N * m1 = " << m2 << std::endl;
+            initialize_matrix (m1);
+            m2 = m1 * value_type (1.);
+            std::cout << "m1 * 1. = " << m2 << std::endl;
+            m2 = m1 * t;
+            std::cout << "m1 * N = " << m2 << std::endl;
+
+            // Some assignments
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m2 += m1;
+            std::cout << "m2 += m1 = " << m2 << std::endl;
+            m2 -= m1;
+            std::cout << "m2 -= m1 = " << m2 << std::endl;
+            m2 = m2 + m1;
+            std::cout << "m2 = m2 + m1 = " << m2 << std::endl;
+            m2 = m2 - m1;
+            std::cout << "m2 = m2 - m1 = " << m2 << std::endl;
+            m1 *= value_type (1.);
+            std::cout << "m1 *= 1. = " << m1 << std::endl;
+            m1 *= t;
+            std::cout << "m1 *= N = " << m1 << std::endl;
+
+            // Transpose
+            initialize_matrix (m1);
+            m2 = ublas::trans (m1);
+            std::cout << "trans (m1) = " << m2 << std::endl;
+
+            // Hermitean
+            initialize_matrix (m1);
+            m2 = ublas::herm (m1);
+            std::cout << "herm (m1) = " << m2 << std::endl;
+
+            // Matrix multiplication
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m3 = ublas::prod (m1, m2);
+            std::cout << "prod (m1, m2) = " << m3 << std::endl;
+        }
+    }
+    void operator () () const {
+        {
+            M m1 (N, N, N * N), m2 (N, N, N * N), m3 (N, N, N * N);
+            test_with (m1, m2, m3);
+
+#ifdef USE_RANGE
+            ublas::matrix_range<M> mr1 (m1, ublas::range (0, N), ublas::range (0, N)),
+                                   mr2 (m2, ublas::range (0, N), ublas::range (0, N)),
+                                   mr3 (m3, ublas::range (0, N), ublas::range (0, N));
+            test_with (mr1, mr2, mr3);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_slice<M> ms1 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                   ms2 (m2, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                   ms3 (m3, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (ms1, ms2, ms3);
+#endif
+        }
+    }
+};
+
+// Test matrix
+void test_matrix () {
+    std::cout << "test_matrix" << std::endl;
+
+#ifdef USE_SPARSE_MATRIX
+#ifdef USE_MAP_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, mapped_matrix map_array" << std::endl;
+    test_my_matrix<ublas::mapped_matrix<mp_test_type, ublas::row_major, ublas::map_array<std::size_t, mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, mapped_matrix map_array" << std::endl;
+    test_my_matrix<ublas::mapped_matrix<double, ublas::row_major, ublas::map_array<std::size_t, double> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, mapped_matrix map_array" << std::endl;
+    test_my_matrix<ublas::mapped_matrix<std::complex<mp_test_type>, ublas::row_major, ublas::map_array<std::size_t, std::complex<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, mapped_matrix map_array" << std::endl;
+    test_my_matrix<ublas::mapped_matrix<std::complex<double>, ublas::row_major, ublas::map_array<std::size_t, std::complex<double> > >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_STD_MAP
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, mapped_matrix std::map" << std::endl;
+    test_my_matrix<ublas::mapped_matrix<mp_test_type, ublas::row_major, std::map<std::size_t, mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, mapped_matrix std::map" << std::endl;
+    test_my_matrix<ublas::mapped_matrix<double, ublas::row_major, std::map<std::size_t, double> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, mapped_matrix std::map" << std::endl;
+    test_my_matrix<ublas::mapped_matrix<std::complex<mp_test_type>, ublas::row_major, std::map<std::size_t, std::complex<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, mapped_matrix std::map" << std::endl;
+    test_my_matrix<ublas::mapped_matrix<std::complex<double>, ublas::row_major, std::map<std::size_t, std::complex<double> > >, 3 > () ();
+#endif
+#endif
+#endif
+#endif
+
+#ifdef USE_SPARSE_VECTOR_OF_SPARSE_VECTOR
+#ifdef USE_MAP_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, mapped_vector_of_mapped_vector map_array" << std::endl;
+    test_my_matrix<ublas::mapped_vector_of_mapped_vector<mp_test_type, ublas::row_major, ublas::map_array<std::size_t, ublas::map_array<std::size_t, mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, mapped_vector_of_mapped_vector map_array" << std::endl;
+    test_my_matrix<ublas::mapped_vector_of_mapped_vector<double, ublas::row_major, ublas::map_array<std::size_t, ublas::map_array<std::size_t, double> > >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, mapped_vector_of_mapped_vector map_array" << std::endl;
+    test_my_matrix<ublas::mapped_vector_of_mapped_vector<std::complex<mp_test_type>, ublas::row_major, ublas::map_array<std::size_t, ublas::map_array<std::size_t, std::complex<mp_test_type> > > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, mapped_vector_of_mapped_vectormap_array" << std::endl;
+    test_my_matrix<ublas::mapped_vector_of_mapped_vector<std::complex<double>, ublas::row_major, ublas::map_array<std::size_t, ublas::map_array<std::size_t, std::complex<double> > > >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_STD_MAP
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, mapped_vector_of_mapped_vector std::map" << std::endl;
+    test_my_matrix<ublas::mapped_vector_of_mapped_vector<mp_test_type, ublas::row_major, std::map<std::size_t, std::map<std::size_t, mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, mapped_vector_of_mapped_vector std::map" << std::endl;
+    test_my_matrix<ublas::mapped_vector_of_mapped_vector<double, ublas::row_major, std::map<std::size_t, std::map<std::size_t, double> > >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, mapped_vector_of_mapped_vector std::map" << std::endl;
+    test_my_matrix<ublas::mapped_vector_of_mapped_vector<std::complex<mp_test_type>, ublas::row_major, std::map<std::size_t, std::map<std::size_t, std::complex<mp_test_type> > > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, mapped_vector_of_mapped_vector std::map" << std::endl;
+    test_my_matrix<ublas::mapped_vector_of_mapped_vector<std::complex<double>, ublas::row_major, std::map<std::size_t, std::map<std::size_t, std::complex<double> > > >, 3 > () ();
+#endif
+#endif
+#endif
+#endif
+
+#ifdef USE_GENERALIZED_VECTOR_OF_VECTOR
+#ifdef USE_MAP_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type,generalized_vector_of_vector map_array" << std::endl;
+    test_my_matrix<ublas::generalized_vector_of_vector<mp_test_type, ublas::row_major, ublas::vector<ublas::mapped_vector<mp_test_type, ublas::map_array<std::size_t, mp_test_type> > > >, 3 > () ();
+    test_my_matrix<ublas::generalized_vector_of_vector<mp_test_type, ublas::row_major, ublas::mapped_vector<ublas::mapped_vector<mp_test_type, ublas::map_array<std::size_t, mp_test_type> >, ublas::map_array<std::size_t, ublas::mapped_vector<mp_test_type, ublas::map_array<std::size_t, mp_test_type> > > > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, generalized_vector_of_vector map_array" << std::endl;
+    test_my_matrix<ublas::generalized_vector_of_vector<double, ublas::row_major, ublas::vector<ublas::mapped_vector<double, ublas::map_array<std::size_t, double> > > >, 3 > () ();
+    test_my_matrix<ublas::generalized_vector_of_vector<double, ublas::row_major, ublas::mapped_vector<ublas::mapped_vector<double, ublas::map_array<std::size_t, double> >, ublas::map_array<std::size_t, ublas::mapped_vector<double, ublas::map_array<std::size_t, double> > > > >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, generalized_vector_of_vector map_array" << std::endl;
+    test_my_matrix<ublas::generalized_vector_of_vector<std::complex<mp_test_type>, ublas::row_major, ublas::vector<ublas::mapped_vector<std::complex<mp_test_type>, ublas::map_array<std::size_t, std::complex<mp_test_type> > > > >, 3 > () ();
+    test_my_matrix<ublas::generalized_vector_of_vector<std::complex<mp_test_type>, ublas::row_major, ublas::mapped_vector<ublas::mapped_vector<std::complex<mp_test_type>, ublas::map_array<std::size_t, std::complex<mp_test_type> > >, ublas::map_array<std::size_t, ublas::mapped_vector<std::complex<mp_test_type>, ublas::map_array<std::size_t, std::complex<mp_test_type> > > > > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, generalized_vector_of_vector map_array" << std::endl;
+    test_my_matrix<ublas::generalized_vector_of_vector<std::complex<double>, ublas::row_major, ublas::vector<ublas::mapped_vector<std::complex<double>, ublas::map_array<std::size_t, std::complex<double> > > > >, 3 > () ();
+    test_my_matrix<ublas::generalized_vector_of_vector<std::complex<double>, ublas::row_major, ublas::mapped_vector<ublas::mapped_vector<std::complex<double>, ublas::map_array<std::size_t, std::complex<double> > >, ublas::map_array<std::size_t, ublas::mapped_vector<std::complex<double>, ublas::map_array<std::size_t, std::complex<double> > > > > >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_STD_MAP
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, generalized_vector_of_vector std::map" << std::endl;
+    test_my_matrix<ublas::generalized_vector_of_vector<mp_test_type, ublas::row_major, ublas::vector<ublas::mapped_vector<mp_test_type, std::map<std::size_t, mp_test_type> > > >, 3 > () ();
+    test_my_matrix<ublas::generalized_vector_of_vector<mp_test_type, ublas::row_major, ublas::mapped_vector<ublas::mapped_vector<mp_test_type, std::map<std::size_t, mp_test_type> >, std::map<std::size_t, ublas::mapped_vector<mp_test_type, std::map<std::size_t, mp_test_type> > > > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, generalized_vector_of_vector std::map" << std::endl;
+    test_my_matrix<ublas::generalized_vector_of_vector<double, ublas::row_major, ublas::vector<ublas::mapped_vector<double, std::map<std::size_t, double> > > >, 3 > () ();
+    test_my_matrix<ublas::generalized_vector_of_vector<double, ublas::row_major, ublas::mapped_vector<ublas::mapped_vector<double, std::map<std::size_t, double> >, std::map<std::size_t, ublas::mapped_vector<double, std::map<std::size_t, double> > > > >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, generalized_vector_of_vector std::map" << std::endl;
+    test_my_matrix<ublas::generalized_vector_of_vector<std::complex<mp_test_type>, ublas::row_major, ublas::vector<ublas::mapped_vector<std::complex<mp_test_type>, std::map<std::size_t, std::complex<mp_test_type> > > > >, 3 > () ();
+    test_my_matrix<ublas::generalized_vector_of_vector<std::complex<mp_test_type>, ublas::row_major, ublas::mapped_vector<ublas::mapped_vector<std::complex<mp_test_type>, std::map<std::size_t, std::complex<mp_test_type> > >, std::map<std::size_t, ublas::mapped_vector<std::complex<mp_test_type>, std::map<std::size_t, std::complex<mp_test_type> > > > > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, generalized_vector_of_vector std::map" << std::endl;
+    test_my_matrix<ublas::generalized_vector_of_vector<std::complex<double>, ublas::row_major, ublas::vector<ublas::mapped_vector<std::complex<double>, std::map<std::size_t, std::complex<double> > > > >, 3 > () ();
+    test_my_matrix<ublas::generalized_vector_of_vector<std::complex<double>, ublas::row_major, ublas::mapped_vector<ublas::mapped_vector<std::complex<double>, std::map<std::size_t, std::complex<double> > >, std::map<std::size_t, ublas::mapped_vector<std::complex<double>, std::map<std::size_t, std::complex<double> > > > > >, 3 > () ();
+#endif
+#endif
+#endif
+#endif
+
+#ifdef USE_COMPRESSED_MATRIX
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type compressed_matrix" << std::endl;
+    test_my_matrix<ublas::compressed_matrix<mp_test_type>, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double compressed_matrix" << std::endl;
+    test_my_matrix<ublas::compressed_matrix<double>, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type> compressed_matrix" << std::endl;
+    test_my_matrix<ublas::compressed_matrix<std::complex<mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double> compressed_matrix" << std::endl;
+    test_my_matrix<ublas::compressed_matrix<std::complex<double> >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_COORDINATE_MATRIX
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type coordinate_matrix" << std::endl;
+    test_my_matrix<ublas::coordinate_matrix<mp_test_type>, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double coordinate_matrix" << std::endl;
+    test_my_matrix<ublas::coordinate_matrix<double>, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type> coordinate_matrix" << std::endl;
+    test_my_matrix<ublas::coordinate_matrix<std::complex<mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double> coordinate_matrix" << std::endl;
+    test_my_matrix<ublas::coordinate_matrix<std::complex<double> >, 3 > () ();
+#endif
+#endif
+#endif
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test4.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test4.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,19 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test4.hpp"
+
+int main () {
+    test_matrix_vector ();
+    test_matrix ();
+    return 0;
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test4.hpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test4.hpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,39 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#ifndef TEST4_H
+#define TEST4_H
+
+#include <iostream>
+
+#include <boost/numeric/ublas/vector.hpp>
+#include <boost/numeric/ublas/matrix.hpp>
+#include <boost/numeric/ublas/matrix_proxy.hpp>
+#include <boost/numeric/ublas/banded.hpp>
+#include <boost/numeric/ublas/io.hpp>
+
+namespace ublas = boost::numeric::ublas;
+
+#include "common/init.hpp"
+
+//#define USE_BANDED
+#define USE_DIAGONAL
+
+
+void test_matrix_vector ();
+void test_matrix ();
+
+
+// FIXME slice are failing in assignment to zero elements
+#undef USE_SLICE
+
+#endif
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test42.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test42.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,361 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test4.hpp"
+
+// Test matrix & vector expression templates
+template<class V, class M, int N>
+struct test_my_matrix_vector {
+    typedef typename V::value_type value_type;
+
+    template<class VP, class MP>
+    void test_with (VP &v1, VP &v2, MP &m1) const {
+        {
+#ifndef USE_DIAGONAL
+            // Rows and columns
+            initialize_matrix (m1);
+            for (int i = 0; i < N; ++ i) {
+                v2 = ublas::row (m1, i);
+                std::cout << "row (m, " << i << ") = " << v2 << std::endl;
+                v2 = ublas::column (m1, i);
+                std::cout << "column (m, " << i << ") = " << v2 << std::endl;
+            }
+
+            // Outer product
+            initialize_vector (v1);
+            initialize_vector (v2);
+            v1 (0) = 0;
+            v1 (N - 1) = 0;
+            m1 = ublas::outer_prod (v1, v2);
+            std::cout << "outer_prod (v1, v2) = " << m1 << std::endl;
+
+            // Matrix vector product
+            initialize_matrix (m1);
+            initialize_vector (v1);
+            v2 = ublas::prod (m1, v1);
+            std::cout << "prod (m1, v1) = " << v2 << std::endl;
+            v2 = ublas::prod (v1, m1);
+            std::cout << "prod (v1, m1) = " << v2 << std::endl;
+#endif
+        }
+    }
+    void operator () () const {
+        {
+            V v1 (N), v2 (N);
+#ifdef USE_BANDED
+            M m1 (N, N, 1, 1);
+#endif
+#ifdef USE_DIAGONAL
+            M m1 (N, N);
+#endif
+            test_with (v1, v2, m1);
+
+            ublas::matrix_row<M> mr1 (m1, 1), mr2 (m1, 1);
+            test_with (mr1, mr2, m1);
+
+            ublas::matrix_column<M> mc1 (m1, 1), mc2 (m1, 1);
+            test_with (mc1, mc2, m1);
+
+#ifdef USE_RANGE
+            ublas::matrix_vector_range<M> mvr1 (m1, ublas::range (0, N), ublas::range (0, N)),
+                                          mvr2 (m1, ublas::range (0, N), ublas::range (0, N));
+            test_with (mvr1, mvr2, m1);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_vector_slice<M> mvs1 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                          mvs2 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (mvs1, mvs2, m1);
+#endif
+        }
+    }
+
+    void operator () (int) const {
+#ifdef USE_ADAPTOR
+        {
+#ifdef USE_BANDED
+            V v1 (N), v2 (N);
+            M m1 (N, N, 1, 1);
+            ublas::banded_adaptor<M> bam1 (m1, 1, 1);
+            test_with (v1, v2, bam1);
+
+            ublas::matrix_row<ublas::banded_adaptor<M> > mr1 (bam1, 1), mr2 (bam1, 1);
+            test_with (mr1, mr2, bam1);
+
+            ublas::matrix_column<ublas::banded_adaptor<M> > mc1 (bam1, 1), mc2 (bam1, 1);
+            test_with (mc1, mc2, bam1);
+
+#ifdef USE_RANGE
+            ublas::matrix_vector_range<ublas::banded_adaptor<M> > mvr1 (bam1, ublas::range (0, N), ublas::range (0, N)),
+                                                                  mvr2 (bam1, ublas::range (0, N), ublas::range (0, N));
+            test_with (mvr1, mvr2, bam1);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_vector_slice<ublas::banded_adaptor<M> > mvs1 (bam1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                                                  mvs2 (bam1, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (mvs1, mvs2, bam1);
+#endif
+#endif
+#ifdef USE_DIAGONAL
+            V v1 (N), v2 (N);
+            M m1 (N, N);
+            ublas::diagonal_adaptor<M> dam1 (m1);
+            test_with (v1, v2, dam1);
+
+            ublas::matrix_row<ublas::diagonal_adaptor<M> > mr1 (dam1, 1), mr2 (dam1, 1);
+            test_with (mr1, mr2, dam1);
+
+            ublas::matrix_column<ublas::diagonal_adaptor<M> > mc1 (dam1, 1), mc2 (dam1, 1);
+            test_with (mc1, mc2, dam1);
+
+#ifdef USE_RANGE
+            ublas::matrix_vector_range<ublas::diagonal_adaptor<M> > mvr1 (dam1, ublas::range (0, N), ublas::range (0, N)),
+                                                                    mvr2 (dam1, ublas::range (0, N), ublas::range (0, N));
+            test_with (mvr1, mvr2, dam1);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_vector_slice<ublas::diagonal_adaptor<M> > mvs1 (dam1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                                                    mvs2 (dam1, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (mvs1, mvs2, dam1);
+#endif
+#endif
+        }
+#endif
+    }
+};
+
+// Test matrix & vector
+void test_matrix_vector () {
+    std::cout << "test_matrix_vector" << std::endl;
+
+#ifdef USE_BANDED
+#ifdef USE_BOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::bounded_array<mp_test_type, 3> >,
+                          ublas::banded_matrix<mp_test_type, ublas::row_major, ublas::bounded_array<mp_test_type, 3 * 3> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::bounded_array<mp_test_type, 3> >,
+                          ublas::banded_matrix<mp_test_type, ublas::row_major, ublas::bounded_array<mp_test_type, 3 * 3> >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<double, ublas::bounded_array<double, 3> >,
+                          ublas::banded_matrix<double, ublas::row_major, ublas::bounded_array<double, 3 * 3> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<double, ublas::bounded_array<double, 3> >,
+                          ublas::banded_matrix<double, ublas::row_major, ublas::bounded_array<double, 3 * 3> >, 3> () (0);
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, ublas::bounded_array<std::complex<mp_test_type>, 3> >,
+                          ublas::banded_matrix<std::complex<mp_test_type>, ublas::row_major, ublas::bounded_array<std::complex<mp_test_type>, 3 * 3> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, ublas::bounded_array<std::complex<mp_test_type>, 3> >,
+                          ublas::banded_matrix<std::complex<mp_test_type>, ublas::row_major, ublas::bounded_array<std::complex<mp_test_type>, 3 * 3> >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::bounded_array<std::complex<double>, 3> >,
+                          ublas::banded_matrix<std::complex<double>, ublas::row_major, ublas::bounded_array<std::complex<double>, 3 * 3> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::bounded_array<std::complex<double>, 3> >,
+                          ublas::banded_matrix<std::complex<double>, ublas::row_major, ublas::bounded_array<std::complex<double>, 3 * 3> >, 3> () (0);
+#endif
+#endif
+#endif
+
+#ifdef USE_UNBOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::unbounded_array<mp_test_type> >,
+                          ublas::banded_matrix<mp_test_type, ublas::row_major, ublas::unbounded_array<mp_test_type> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::unbounded_array<mp_test_type> >,
+                          ublas::banded_matrix<mp_test_type, ublas::row_major, ublas::unbounded_array<mp_test_type> >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<double, ublas::unbounded_array<double> >,
+                          ublas::banded_matrix<double, ublas::row_major, ublas::unbounded_array<double> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<double, ublas::unbounded_array<double> >,
+                          ublas::banded_matrix<double, ublas::row_major, ublas::unbounded_array<double> >, 3> () (0);
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, ublas::unbounded_array<std::complex<mp_test_type> > >,
+                          ublas::banded_matrix<std::complex<mp_test_type>, ublas::row_major, ublas::unbounded_array<std::complex<mp_test_type> > >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, ublas::unbounded_array<std::complex<mp_test_type> > >,
+                          ublas::banded_matrix<std::complex<mp_test_type>, ublas::row_major, ublas::unbounded_array<std::complex<mp_test_type> > >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::unbounded_array<std::complex<double> > >,
+                          ublas::banded_matrix<std::complex<double>, ublas::row_major, ublas::unbounded_array<std::complex<double> > >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::unbounded_array<std::complex<double> > >,
+                          ublas::banded_matrix<std::complex<double>, ublas::row_major, ublas::unbounded_array<std::complex<double> > >, 3> () (0);
+#endif
+#endif
+#endif
+
+#ifdef USE_STD_VECTOR
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, std::vector<mp_test_type> >,
+                          ublas::banded_matrix<mp_test_type, ublas::row_major, std::vector<mp_test_type> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<mp_test_type, std::vector<mp_test_type> >,
+                          ublas::banded_matrix<mp_test_type, ublas::row_major, std::vector<mp_test_type> >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<double, std::vector<double> >,
+                          ublas::banded_matrix<double, ublas::row_major, std::vector<double> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<double, std::vector<double> >,
+                          ublas::banded_matrix<double, ublas::row_major, std::vector<double> >, 3> () (0);
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, std::vector<std::complex<mp_test_type> > >,
+                          ublas::banded_matrix<std::complex<mp_test_type>, ublas::row_major, std::vector<std::complex<mp_test_type> > >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, std::vector<std::complex<mp_test_type> > >,
+                          ublas::banded_matrix<std::complex<mp_test_type>, ublas::row_major, std::vector<std::complex<mp_test_type> > >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<double>, std::vector<std::complex<double> > >,
+                          ublas::banded_matrix<std::complex<double>, ublas::row_major, std::vector<std::complex<double> > >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<double>, std::vector<std::complex<double> > >,
+                          ublas::banded_matrix<std::complex<double>, ublas::row_major, std::vector<std::complex<double> > >, 3> () (0);
+#endif
+#endif
+#endif
+#endif
+
+#ifdef USE_DIAGONAL
+#ifdef USE_BOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::bounded_array<mp_test_type, 3> >,
+                          ublas::diagonal_matrix<mp_test_type, ublas::row_major, ublas::bounded_array<mp_test_type, 3 * 3> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::bounded_array<mp_test_type, 3> >,
+                          ublas::diagonal_matrix<mp_test_type, ublas::row_major, ublas::bounded_array<mp_test_type, 3 * 3> >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<double, ublas::bounded_array<double, 3> >,
+                          ublas::diagonal_matrix<double, ublas::row_major, ublas::bounded_array<double, 3 * 3> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<double, ublas::bounded_array<double, 3> >,
+                          ublas::diagonal_matrix<double, ublas::row_major, ublas::bounded_array<double, 3 * 3> >, 3> () (0);
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, ublas::bounded_array<std::complex<mp_test_type>, 3> >,
+                          ublas::diagonal_matrix<std::complex<mp_test_type>, ublas::row_major, ublas::bounded_array<std::complex<mp_test_type>, 3 * 3> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, ublas::bounded_array<std::complex<mp_test_type>, 3> >,
+                          ublas::diagonal_matrix<std::complex<mp_test_type>, ublas::row_major, ublas::bounded_array<std::complex<mp_test_type>, 3 * 3> >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::bounded_array<std::complex<double>, 3> >,
+                          ublas::diagonal_matrix<std::complex<double>, ublas::row_major, ublas::bounded_array<std::complex<double>, 3 * 3> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::bounded_array<std::complex<double>, 3> >,
+                          ublas::diagonal_matrix<std::complex<double>, ublas::row_major, ublas::bounded_array<std::complex<double>, 3 * 3> >, 3> () (0);
+#endif
+#endif
+#endif
+
+#ifdef USE_UNBOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::unbounded_array<mp_test_type> >,
+                          ublas::diagonal_matrix<mp_test_type, ublas::row_major, ublas::unbounded_array<mp_test_type> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::unbounded_array<mp_test_type> >,
+                          ublas::diagonal_matrix<mp_test_type, ublas::row_major, ublas::unbounded_array<mp_test_type> >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<double, ublas::unbounded_array<double> >,
+                          ublas::diagonal_matrix<double, ublas::row_major, ublas::unbounded_array<double> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<double, ublas::unbounded_array<double> >,
+                          ublas::diagonal_matrix<double, ublas::row_major, ublas::unbounded_array<double> >, 3> () (0);
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, ublas::unbounded_array<std::complex<mp_test_type> > >,
+                          ublas::diagonal_matrix<std::complex<mp_test_type>, ublas::row_major, ublas::unbounded_array<std::complex<mp_test_type> > >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, ublas::unbounded_array<std::complex<mp_test_type> > >,
+                          ublas::diagonal_matrix<std::complex<mp_test_type>, ublas::row_major, ublas::unbounded_array<std::complex<mp_test_type> > >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::unbounded_array<std::complex<double> > >,
+                          ublas::diagonal_matrix<std::complex<double>, ublas::row_major, ublas::unbounded_array<std::complex<double> > >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::unbounded_array<std::complex<double> > >,
+                          ublas::diagonal_matrix<std::complex<double>, ublas::row_major, ublas::unbounded_array<std::complex<double> > >, 3> () (0);
+#endif
+#endif
+#endif
+
+#ifdef USE_STD_VECTOR
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, std::vector<mp_test_type> >,
+                          ublas::diagonal_matrix<mp_test_type, ublas::row_major, std::vector<mp_test_type> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<mp_test_type, std::vector<mp_test_type> >,
+                          ublas::diagonal_matrix<mp_test_type, ublas::row_major, std::vector<mp_test_type> >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<double, std::vector<double> >,
+                          ublas::diagonal_matrix<double, ublas::row_major, std::vector<double> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<double, std::vector<double> >,
+                          ublas::diagonal_matrix<double, ublas::row_major, std::vector<double> >, 3> () (0);
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, std::vector<std::complex<mp_test_type> > >,
+                          ublas::diagonal_matrix<std::complex<mp_test_type>, ublas::row_major, std::vector<std::complex<mp_test_type> > >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, std::vector<std::complex<mp_test_type> > >,
+                          ublas::diagonal_matrix<std::complex<mp_test_type>, ublas::row_major, std::vector<std::complex<mp_test_type> > >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<double>, std::vector<std::complex<double> > >,
+                          ublas::diagonal_matrix<std::complex<double>, ublas::row_major, std::vector<std::complex<double> > >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<double>, std::vector<std::complex<double> > >,
+                          ublas::diagonal_matrix<std::complex<double>, ublas::row_major, std::vector<std::complex<double> > >, 3> () (0);
+#endif
+#endif
+#endif
+#endif
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test43.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test43.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,326 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test4.hpp"
+
+// Test matrix expression templates
+template<class M, int N>
+struct test_my_matrix {
+    typedef typename M::value_type value_type;
+
+    template<class MP>
+    void test_with (MP &m1, MP &m2, MP &m3) const {
+        {
+            value_type t;
+
+            // Default Construct
+            default_construct<MP>::test ();
+            
+            // Copy and swap
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m1 = m2;
+            std::cout << "m1 = m2 = " << m1 << std::endl;
+            m1.assign_temporary (m2);
+            std::cout << "m1.assign_temporary (m2) = " << m1 << std::endl;
+            m1.swap (m2);
+            std::cout << "m1.swap (m2) = " << m1 << " " << m2 << std::endl;
+
+            // Zero assignment
+            m1 = ublas::zero_matrix<> (m1.size1 (), m1.size2 ());
+            std::cout << "m1.zero_matrix = " << m1 << std::endl;
+            m1 = m2;
+
+            // Unary matrix operations resulting in a matrix
+            initialize_matrix (m1);
+            m2 = - m1;
+            std::cout << "- m1 = " << m2 << std::endl;
+            m2 = ublas::conj (m1);
+            std::cout << "conj (m1) = " << m2 << std::endl;
+
+            // Binary matrix operations resulting in a matrix
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m3 = m1 + m2;
+            std::cout << "m1 + m2 = " << m3 << std::endl;
+            m3 = m1 - m2;
+            std::cout << "m1 - m2 = " << m3 << std::endl;
+
+            // Scaling a matrix
+            t = N;
+            initialize_matrix (m1);
+            m2 = value_type (1.) * m1;
+            std::cout << "1. * m1 = " << m2 << std::endl;
+            m2 = t * m1;
+            std::cout << "N * m1 = " << m2 << std::endl;
+            initialize_matrix (m1);
+            m2 = m1 * value_type (1.);
+            std::cout << "m1 * 1. = " << m2 << std::endl;
+            m2 = m1 * t;
+            std::cout << "m1 * N = " << m2 << std::endl;
+
+            // Some assignments
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m2 += m1;
+            std::cout << "m2 += m1 = " << m2 << std::endl;
+            m2 -= m1;
+            std::cout << "m2 -= m1 = " << m2 << std::endl;
+            m2 = m2 + m1;
+            std::cout << "m2 = m2 + m1 = " << m2 << std::endl;
+            m2 = m2 - m1;
+            std::cout << "m2 = m2 - m1 = " << m2 << std::endl;
+            m1 *= value_type (1.);
+            std::cout << "m1 *= 1. = " << m1 << std::endl;
+            m1 *= t;
+            std::cout << "m1 *= N = " << m1 << std::endl;
+
+            // Transpose
+            initialize_matrix (m1);
+            m2 = ublas::trans (m1);
+            std::cout << "trans (m1) = " << m2 << std::endl;
+
+            // Hermitean
+            initialize_matrix (m1);
+            m2 = ublas::herm (m1);
+            std::cout << "herm (m1) = " << m2 << std::endl;
+
+            // Matrix multiplication
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            // Banded times banded isn't banded
+            std::cout << "prod (m1, m2) = " << ublas::prod (m1, m2) << std::endl;
+        }
+    }
+    void operator () () const {
+        {
+#ifdef USE_BANDED
+            M m1 (N, N, 1, 1), m2 (N, N, 1, 1), m3 (N, N, 1, 1);
+#endif
+#ifdef USE_DIAGONAL
+            M m1 (N, N), m2 (N, N), m3 (N, N);
+#endif
+            test_with (m1, m2, m3);
+
+#ifdef USE_RANGE
+            ublas::matrix_range<M> mr1 (m1, ublas::range (0, N), ublas::range (0, N)),
+                                   mr2 (m2, ublas::range (0, N), ublas::range (0, N)),
+                                   mr3 (m3, ublas::range (0, N), ublas::range (0, N));
+            test_with (mr1, mr2, mr3);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_slice<M> ms1 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                   ms2 (m2, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                   ms3 (m3, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (ms1, ms2, ms3);
+#endif
+        }
+
+#ifdef USE_ADAPTOR
+        {
+#ifdef USE_BANDED
+            M m1 (N, N, 1, 1), m2 (N, N, 1, 1), m3 (N, N, 1, 1);
+            ublas::banded_adaptor<M> bam1 (m1, 1, 1), bam2 (m2, 1, 1), bam3 (m3, 1, 1);
+            test_with (bam1, bam2, bam3);
+
+#ifdef USE_RANGE
+            ublas::matrix_range<ublas::banded_adaptor<M> > mr1 (bam1, ublas::range (0, N), ublas::range (0, N)),
+                                                           mr2 (bam2, ublas::range (0, N), ublas::range (0, N)),
+                                                           mr3 (bam3, ublas::range (0, N), ublas::range (0, N));
+            test_with (mr1, mr2, mr3);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_slice<ublas::banded_adaptor<M> > ms1 (bam1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                                           ms2 (bam2, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                                           ms3 (bam3, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (ms1, ms2, ms3);
+#endif
+#endif
+#ifdef USE_DIAGONAL
+            M m1 (N, N), m2 (N, N), m3 (N, N);
+            ublas::diagonal_adaptor<M> dam1 (m1), dam2 (m2), dam3 (m3);
+            test_with (dam1, dam2, dam3);
+
+#ifdef USE_RANGE
+            ublas::matrix_range<ublas::diagonal_adaptor<M> > mr1 (dam1, ublas::range (0, N), ublas::range (0, N)),
+                                                             mr2 (dam2, ublas::range (0, N), ublas::range (0, N)),
+                                                             mr3 (dam3, ublas::range (0, N), ublas::range (0, N));
+            test_with (mr1, mr2, mr3);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_slice<ublas::diagonal_adaptor<M> > ms1 (dam1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                                             ms2 (dam2, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                                             ms3 (dam3, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (ms1, ms2, ms3);
+#endif
+#endif
+        }
+#endif
+
+    }
+};
+
+// Test matrix
+void test_matrix () {
+    std::cout << "test_matrix" << std::endl;
+
+#ifdef USE_BANDED
+#ifdef USE_BOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, bounded_array" << std::endl;
+    test_my_matrix<ublas::banded_matrix<mp_test_type, ublas::row_major, ublas::bounded_array<mp_test_type, 3 * 3> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, bounded_array" << std::endl;
+    test_my_matrix<ublas::banded_matrix<double, ublas::row_major, ublas::bounded_array<double, 3 * 3> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, bounded_array" << std::endl;
+    test_my_matrix<ublas::banded_matrix<std::complex<mp_test_type>, ublas::row_major, ublas::bounded_array<std::complex<mp_test_type>, 3 * 3> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, bounded_array" << std::endl;
+    test_my_matrix<ublas::banded_matrix<std::complex<double>, ublas::row_major, ublas::bounded_array<std::complex<double>, 3 * 3> >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_UNBOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, unbounded_array" << std::endl;
+    test_my_matrix<ublas::banded_matrix<mp_test_type, ublas::row_major, ublas::unbounded_array<mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, unbounded_array" << std::endl;
+    test_my_matrix<ublas::banded_matrix<double, ublas::row_major, ublas::unbounded_array<double> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, unbounded_array" << std::endl;
+    test_my_matrix<ublas::banded_matrix<std::complex<mp_test_type>, ublas::row_major, ublas::unbounded_array<std::complex<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, unbounded_array" << std::endl;
+    test_my_matrix<ublas::banded_matrix<std::complex<double>, ublas::row_major, ublas::unbounded_array<std::complex<double> > >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_STD_VECTOR
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, std::vector" << std::endl;
+    test_my_matrix<ublas::banded_matrix<mp_test_type, ublas::row_major, std::vector<mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, std::vector" << std::endl;
+    test_my_matrix<ublas::banded_matrix<double, ublas::row_major, std::vector<double> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, std::vector" << std::endl;
+    test_my_matrix<ublas::banded_matrix<std::complex<mp_test_type>, ublas::row_major, std::vector<std::complex<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, std::vector" << std::endl;
+    test_my_matrix<ublas::banded_matrix<std::complex<double>, ublas::row_major, std::vector<std::complex<double> > >, 3 > () ();
+#endif
+#endif
+#endif
+#endif
+
+#ifdef USE_DIAGONAL
+#ifdef USE_BOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, bounded_array" << std::endl;
+    test_my_matrix<ublas::diagonal_matrix<mp_test_type, ublas::row_major, ublas::bounded_array<mp_test_type, 3 * 3> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, bounded_array" << std::endl;
+    test_my_matrix<ublas::diagonal_matrix<double, ublas::row_major, ublas::bounded_array<double, 3 * 3> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, bounded_array" << std::endl;
+    test_my_matrix<ublas::diagonal_matrix<std::complex<mp_test_type>, ublas::row_major, ublas::bounded_array<std::complex<mp_test_type>, 3 * 3> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, bounded_array" << std::endl;
+    test_my_matrix<ublas::diagonal_matrix<std::complex<double>, ublas::row_major, ublas::bounded_array<std::complex<double>, 3 * 3> >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_UNBOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, unbounded_array" << std::endl;
+    test_my_matrix<ublas::diagonal_matrix<mp_test_type, ublas::row_major, ublas::unbounded_array<mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, unbounded_array" << std::endl;
+    test_my_matrix<ublas::diagonal_matrix<double, ublas::row_major, ublas::unbounded_array<double> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, unbounded_array" << std::endl;
+    test_my_matrix<ublas::diagonal_matrix<std::complex<mp_test_type>, ublas::row_major, ublas::unbounded_array<std::complex<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, unbounded_array" << std::endl;
+    test_my_matrix<ublas::diagonal_matrix<std::complex<double>, ublas::row_major, ublas::unbounded_array<std::complex<double> > >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_STD_VECTOR
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, std::vector" << std::endl;
+    test_my_matrix<ublas::diagonal_matrix<mp_test_type, ublas::row_major, std::vector<mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, std::vector" << std::endl;
+    test_my_matrix<ublas::diagonal_matrix<double, ublas::row_major, std::vector<double> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, std::vector" << std::endl;
+    test_my_matrix<ublas::diagonal_matrix<std::complex<mp_test_type>, ublas::row_major, std::vector<std::complex<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, std::vector" << std::endl;
+    test_my_matrix<ublas::diagonal_matrix<std::complex<double>, ublas::row_major, std::vector<std::complex<double> > >, 3 > () ();
+#endif
+#endif
+#endif
+#endif
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test5.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test5.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,19 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test5.hpp"
+
+int main () {
+    test_matrix_vector ();
+    test_matrix ();
+    return 0;
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test5.hpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test5.hpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,35 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#ifndef TEST5_H
+#define TEST5_H
+
+#include <iostream>
+
+#include <boost/numeric/ublas/vector.hpp>
+#include <boost/numeric/ublas/matrix.hpp>
+#include <boost/numeric/ublas/matrix_proxy.hpp>
+#include <boost/numeric/ublas/triangular.hpp>
+#include <boost/numeric/ublas/io.hpp>
+
+namespace ublas = boost::numeric::ublas;
+
+#include "common/init.hpp"
+
+void test_matrix_vector ();
+void test_matrix ();
+
+
+// FIXME slice are failing in assignment to zero elements
+#undef USE_SLICE
+
+#endif
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test52.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test52.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,214 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test5.hpp"
+
+// Test matrix & vector expression templates
+template<class V, class M, int N>
+struct test_my_matrix_vector {
+    typedef typename V::value_type value_type;
+
+    template<class VP, class MP>
+    void test_with (VP &v1, VP &v2, MP &m1) const {
+        {
+            // Rows and columns
+            initialize_matrix (m1);
+            for (int i = 0; i < N; ++ i) {
+                v2 = ublas::row (m1, i);
+                std::cout << "row (m, " << i << ") = " << v2 << std::endl;
+                v2 = ublas::column (m1, i);
+                std::cout << "column (m, " << i << ") = " << v2 << std::endl;
+            }
+
+            // Outer product
+            initialize_vector (v1);
+            initialize_vector (v2);
+            v1 (0) = 0;
+            v2 (N - 1) = 0;
+            m1 = ublas::outer_prod (v1, v2);
+            std::cout << "outer_prod (v1, v2) = " << m1 << std::endl;
+
+            // Matrix vector product
+            initialize_matrix (m1);
+            initialize_vector (v1);
+            v2 = ublas::prod (m1, v1);
+            std::cout << "prod (m1, v1) = " << v2 << std::endl;
+            v2 = ublas::prod (v1, m1);
+            std::cout << "prod (v1, m1) = " << v2 << std::endl;
+        }
+    }
+    void operator () () const {
+        {
+            V v1 (N), v2 (N);
+            M m1 (N, N);
+            test_with (v1, v2, m1);
+
+            ublas::matrix_row<M> mr1 (m1, N - 1), mr2 (m1, N - 1);
+            test_with (mr1, mr2, m1);
+
+            ublas::matrix_column<M> mc1 (m1, 0), mc2 (m1, 0);
+            test_with (mc1, mc2, m1);
+
+#ifdef USE_RANGE
+            ublas::matrix_vector_range<M> mvr1 (m1, ublas::range (0, N), ublas::range (0, N)),
+                                          mvr2 (m1, ublas::range (0, N), ublas::range (0, N));
+            test_with (mvr1, mvr2, m1);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_vector_slice<M> mvs1 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                          mvs2 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (mvs1, mvs2, m1);
+#endif
+        }
+    }
+
+    void operator () (int) const {
+#ifdef USE_ADAPTOR
+        {
+            V v1 (N), v2 (N);
+            M m1 (N, N);
+            ublas::triangular_adaptor<M> tam1 (m1);
+            test_with (v1, v2, tam1);
+
+            ublas::matrix_row<ublas::triangular_adaptor<M> > mr1 (tam1, N - 1), mr2 (tam1, N - 1);
+            test_with (mr1, mr2, tam1);
+
+            ublas::matrix_column<ublas::triangular_adaptor<M> > mc1 (tam1, 0), mc2 (tam1, 0);
+            test_with (mc1, mc2, tam1);
+
+#ifdef USE_RANGE
+            ublas::matrix_vector_range<ublas::triangular_adaptor<M> > mvr1 (tam1, ublas::range (0, N), ublas::range (0, N)),
+                                                                      mvr2 (tam1, ublas::range (0, N), ublas::range (0, N));
+            test_with (mvr1, mvr2, tam1);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_vector_slice<ublas::triangular_adaptor<M> > mvs1 (tam1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                                                      mvs2 (tam1, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (mvs1, mvs2, tam1);
+#endif
+        }
+#endif
+    }
+};
+
+// Test matrix & vector
+void test_matrix_vector () {
+    std::cout << "test_matrix_vector" << std::endl;
+
+#ifdef USE_BOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::bounded_array<mp_test_type, 3> >,
+                          ublas::triangular_matrix<mp_test_type, ublas::lower, ublas::row_major, ublas::bounded_array<mp_test_type, 3 * 3> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::bounded_array<mp_test_type, 3> >,
+                          ublas::triangular_matrix<mp_test_type, ublas::lower, ublas::row_major, ublas::bounded_array<mp_test_type, 3 * 3> >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<double, ublas::bounded_array<double, 3> >,
+                          ublas::triangular_matrix<double, ublas::lower, ublas::row_major, ublas::bounded_array<double, 3 * 3> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<double, ublas::bounded_array<double, 3> >,
+                          ublas::triangular_matrix<double, ublas::lower, ublas::row_major, ublas::bounded_array<double, 3 * 3> >, 3> () (0);
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, ublas::bounded_array<std::complex<mp_test_type>, 3> >,
+                          ublas::triangular_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, ublas::bounded_array<std::complex<mp_test_type>, 3 * 3> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, ublas::bounded_array<std::complex<mp_test_type>, 3> >,
+                          ublas::triangular_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, ublas::bounded_array<std::complex<mp_test_type>, 3 * 3> >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::bounded_array<std::complex<double>, 3> >,
+                          ublas::triangular_matrix<std::complex<double>, ublas::lower, ublas::row_major, ublas::bounded_array<std::complex<double>, 3 * 3> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::bounded_array<std::complex<double>, 3> >,
+                          ublas::triangular_matrix<std::complex<double>, ublas::lower, ublas::row_major, ublas::bounded_array<std::complex<double>, 3 * 3> >, 3> () (0);
+#endif
+#endif
+#endif
+
+#ifdef USE_UNBOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::unbounded_array<mp_test_type> >,
+                          ublas::triangular_matrix<mp_test_type, ublas::lower, ublas::row_major, ublas::unbounded_array<mp_test_type> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::unbounded_array<mp_test_type> >,
+                          ublas::triangular_matrix<mp_test_type, ublas::lower, ublas::row_major, ublas::unbounded_array<mp_test_type> >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<double, ublas::unbounded_array<double> >,
+                          ublas::triangular_matrix<double, ublas::lower, ublas::row_major, ublas::unbounded_array<double> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<double, ublas::unbounded_array<double> >,
+                          ublas::triangular_matrix<double, ublas::lower, ublas::row_major, ublas::unbounded_array<double> >, 3> () (0);
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, ublas::unbounded_array<std::complex<mp_test_type> > >,
+                          ublas::triangular_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, ublas::unbounded_array<std::complex<mp_test_type> > >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, ublas::unbounded_array<std::complex<mp_test_type> > >,
+                          ublas::triangular_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, ublas::unbounded_array<std::complex<mp_test_type> > >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::unbounded_array<std::complex<double> > >,
+                          ublas::triangular_matrix<std::complex<double>, ublas::lower, ublas::row_major, ublas::unbounded_array<std::complex<double> > >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::unbounded_array<std::complex<double> > >,
+                          ublas::triangular_matrix<std::complex<double>, ublas::lower, ublas::row_major, ublas::unbounded_array<std::complex<double> > >, 3> () (0);
+#endif
+#endif
+#endif
+
+#ifdef USE_STD_VECTOR
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, std::vector<mp_test_type> >,
+                          ublas::triangular_matrix<mp_test_type, ublas::lower, ublas::row_major, std::vector<mp_test_type> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<mp_test_type, std::vector<mp_test_type> >,
+                          ublas::triangular_matrix<mp_test_type, ublas::lower, ublas::row_major, std::vector<mp_test_type> >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<double, std::vector<double> >,
+                          ublas::triangular_matrix<double, ublas::lower, ublas::row_major, std::vector<double> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<double, std::vector<double> >,
+                          ublas::triangular_matrix<double, ublas::lower, ublas::row_major, std::vector<double> >, 3> () (0);
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, std::vector<std::complex<mp_test_type> > >,
+                          ublas::triangular_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, std::vector<std::complex<mp_test_type> > >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, std::vector<std::complex<mp_test_type> > >,
+                          ublas::triangular_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, std::vector<std::complex<mp_test_type> > >, 3> () (0);
+
+    std::cout << "std::complex<double>, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<double>, std::vector<std::complex<double> > >,
+                          ublas::triangular_matrix<std::complex<double>, ublas::lower, ublas::row_major, std::vector<std::complex<double> > >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<double>, std::vector<std::complex<double> > >,
+                          ublas::triangular_matrix<std::complex<double>, ublas::lower, ublas::row_major, std::vector<std::complex<double> > >, 3> () (0);
+#endif
+#endif
+#endif
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test53.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test53.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,223 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test5.hpp"
+
+// Test matrix expression templates
+template<class M, int N>
+struct test_my_matrix {
+    typedef typename M::value_type value_type;
+
+    template<class MP>
+    void test_with (MP &m1, MP &m2, MP &m3) const {
+        {
+            value_type t;
+
+            // Default Construct
+            default_construct<MP>::test ();
+            
+            // Copy and swap
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m1 = m2;
+            std::cout << "m1 = m2 = " << m1 << std::endl;
+            m1.assign_temporary (m2);
+            std::cout << "m1.assign_temporary (m2) = " << m1 << std::endl;
+            m1.swap (m2);
+            std::cout << "m1.swap (m2) = " << m1 << " " << m2 << std::endl;
+
+            // Zero assignment
+            m1 = ublas::zero_matrix<> (m1.size1 (), m1.size2 ());
+            std::cout << "m1.zero_matrix = " << m1 << std::endl;
+            m1 = m2;
+
+            // Unary matrix operations resulting in a matrix
+            initialize_matrix (m1);
+            m2 = - m1;
+            std::cout << "- m1 = " << m2 << std::endl;
+            m2 = ublas::conj (m1);
+            std::cout << "conj (m1) = " << m2 << std::endl;
+
+            // Binary matrix operations resulting in a matrix
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m3 = m1 + m2;
+            std::cout << "m1 + m2 = " << m3 << std::endl;
+            m3 = m1 - m2;
+            std::cout << "m1 - m2 = " << m3 << std::endl;
+
+            // Scaling a matrix
+            t = N;
+            initialize_matrix (m1);
+            m2 = value_type (1.) * m1;
+            std::cout << "1. * m1 = " << m2 << std::endl;
+            m2 = t * m1;
+            std::cout << "N * m1 = " << m2 << std::endl;
+            initialize_matrix (m1);
+            m2 = m1 * value_type (1.);
+            std::cout << "m1 * 1. = " << m2 << std::endl;
+            m2 = m1 * t;
+            std::cout << "m1 * N = " << m2 << std::endl;
+
+            // Some assignments
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m2 += m1;
+            std::cout << "m2 += m1 = " << m2 << std::endl;
+            m2 -= m1;
+            std::cout << "m2 -= m1 = " << m2 << std::endl;
+            m2 = m2 + m1;
+            std::cout << "m2 = m2 + m1 = " << m2 << std::endl;
+            m2 = m2 - m1;
+            std::cout << "m2 = m2 - m1 = " << m2 << std::endl;
+            m1 *= value_type (1.);
+            std::cout << "m1 *= 1. = " << m1 << std::endl;
+            m1 *= t;
+            std::cout << "m1 *= N = " << m1 << std::endl;
+
+            // Transpose
+            initialize_matrix (m1);
+            // Transpose of a triangular isn't triangular of the same kind
+            std::cout << "trans (m1) = " << ublas::trans (m1) << std::endl;
+
+            // Hermitian
+            initialize_matrix (m1);
+            // Hermitian of a triangular isn't hermitian of the same kind
+            std::cout << "herm (m1) = " << ublas::herm (m1) << std::endl;
+
+            // Matrix multiplication
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m3 = ublas::prod (m1, m2);
+            std::cout << "prod (m1, m2) = " << m3 << std::endl;
+        }
+    }
+    void operator () () const {
+        {
+            M m1 (N, N), m2 (N, N), m3 (N, N);
+            test_with (m1, m2, m3);
+
+#ifdef USE_RANGE
+            ublas::matrix_range<M> mr1 (m1, ublas::range (0, N), ublas::range (0, N)),
+                                   mr2 (m2, ublas::range (0, N), ublas::range (0, N)),
+                                   mr3 (m3, ublas::range (0, N), ublas::range (0, N));
+            test_with (mr1, mr2, mr3);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_slice<M> ms1 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                   ms2 (m2, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                   ms3 (m3, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (ms1, ms2, ms3);
+#endif
+        }
+
+#ifdef USE_ADAPTOR
+        {
+            M m1 (N, N), m2 (N, N), m3 (N, N);
+            ublas::triangular_adaptor<M> tam1 (m1), tam2 (m2), tam3 (m3);
+            test_with (tam1, tam2, tam3);
+
+#ifdef USE_RANGE
+            ublas::matrix_range<ublas::triangular_adaptor<M> > mr1 (tam1, ublas::range (0, N), ublas::range (0, N)),
+                                                               mr2 (tam2, ublas::range (0, N), ublas::range (0, N)),
+                                                               mr3 (tam3, ublas::range (0, N), ublas::range (0, N));
+            test_with (mr1, mr2, mr3);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_slice<ublas::triangular_adaptor<M> > ms1 (tam1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                                               ms2 (tam2, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                                               ms3 (tam3, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (ms1, ms2, ms3);
+#endif
+        }
+#endif
+    }
+};
+
+// Test matrix
+void test_matrix () {
+    std::cout << "test_matrix" << std::endl;
+
+#ifdef USE_BOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, bounded_array" << std::endl;
+    test_my_matrix<ublas::triangular_matrix<mp_test_type, ublas::lower, ublas::row_major, ublas::bounded_array<mp_test_type, 3 * 3> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, bounded_array" << std::endl;
+    test_my_matrix<ublas::triangular_matrix<double, ublas::lower, ublas::row_major, ublas::bounded_array<double, 3 * 3> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, bounded_array" << std::endl;
+    test_my_matrix<ublas::triangular_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, ublas::bounded_array<std::complex<mp_test_type>, 3 * 3> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, bounded_array" << std::endl;
+    test_my_matrix<ublas::triangular_matrix<std::complex<double>, ublas::lower, ublas::row_major, ublas::bounded_array<std::complex<double>, 3 * 3> >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_UNBOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, unbounded_array" << std::endl;
+    test_my_matrix<ublas::triangular_matrix<mp_test_type, ublas::lower, ublas::row_major, ublas::unbounded_array<mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, unbounded_array" << std::endl;
+    test_my_matrix<ublas::triangular_matrix<double, ublas::lower, ublas::row_major, ublas::unbounded_array<double> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, unbounded_array" << std::endl;
+    test_my_matrix<ublas::triangular_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, ublas::unbounded_array<std::complex<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, unbounded_array" << std::endl;
+    test_my_matrix<ublas::triangular_matrix<std::complex<double>, ublas::lower, ublas::row_major, ublas::unbounded_array<std::complex<double> > >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_STD_VECTOR
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, std::vector" << std::endl;
+    test_my_matrix<ublas::triangular_matrix<mp_test_type, ublas::lower, ublas::row_major, std::vector<mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, std::vector" << std::endl;
+    test_my_matrix<ublas::triangular_matrix<double, ublas::lower, ublas::row_major, std::vector<double> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, std::vector" << std::endl;
+    test_my_matrix<ublas::triangular_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, std::vector<std::complex<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+std::cout << "std::complex<double>, std::vector" << std::endl;
+    test_my_matrix<ublas::triangular_matrix<std::complex<double>, ublas::lower, ublas::row_major, std::vector<std::complex<double> > >, 3 > () ();
+#endif
+#endif
+#endif
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test6.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test6.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,19 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test6.hpp"
+
+int main () {
+    test_matrix_vector ();
+    test_matrix ();
+    return 0;
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test6.hpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test6.hpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,32 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#ifndef TEST6_H
+#define TEST6_H
+
+#include <iostream>
+
+#include <boost/numeric/ublas/vector.hpp>
+#include <boost/numeric/ublas/matrix.hpp>
+#include <boost/numeric/ublas/matrix_proxy.hpp>
+#include <boost/numeric/ublas/symmetric.hpp>
+#include <boost/numeric/ublas/io.hpp>
+
+namespace ublas = boost::numeric::ublas;
+
+#include "common/init.hpp"
+
+void test_matrix_vector ();
+void test_matrix ();
+
+
+#endif
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test62.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test62.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,218 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test6.hpp"
+
+// Test matrix & vector expression templates
+template<class V, class M, int N>
+struct test_my_matrix_vector {
+    typedef typename V::value_type value_type;
+
+    template<class VP, class MP>
+    void test_with (VP &v1, VP &v2, MP &m1) const {
+        {
+            // Rows and columns
+            initialize_matrix (m1);
+            for (int i = 0; i < N; ++ i) {
+                v2 = ublas::row (m1, i);
+                std::cout << "row (m, " << i << ") = " << v2 << std::endl;
+                v2 = ublas::column (m1, i);
+                std::cout << "column (m, " << i << ") = " << v2 << std::endl;
+            }
+
+            // Outer product
+            initialize_vector (v1);
+            initialize_vector (v2);
+            v1 (0) = 0;
+            v1 (N - 1) = 0;
+            v2 (0) = 0;
+            v2 (N - 1) = 0;
+            m1 = ublas::outer_prod (v1, v2);
+            std::cout << "outer_prod (v1, v2) = " << m1 << std::endl;
+
+            // Matrix vector product
+            initialize_matrix (m1);
+            initialize_vector (v1);
+            v2 = ublas::prod (m1, v1);
+            std::cout << "prod (m1, v1) = " << v2 << std::endl;
+            v2 = ublas::prod (v1, m1);
+            std::cout << "prod (v1, m1) = " << v2 << std::endl;
+        }
+    }
+    void operator () () const {
+        {
+            V v1 (N), v2 (N);
+            M m1 (N, N);
+            test_with (v1, v2, m1);
+
+            ublas::matrix_row<M> mr1 (m1, N - 1), mr2 (m1, N - 1);
+            test_with (mr1, mr2, m1);
+
+            ublas::matrix_column<M> mc1 (m1, 0), mc2 (m1, 0);
+            test_with (mc1, mc2, m1);
+
+#ifdef USE_RANGE
+            ublas::matrix_vector_range<M> mvr1 (m1, ublas::range (0, N), ublas::range (0, N)),
+                                          mvr2 (m1, ublas::range (0, N), ublas::range (0, N));
+            test_with (mvr1, mvr2, m1);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_vector_slice<M> mvs1 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                          mvs2 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (mvs1, mvs2, m1);
+#endif
+        }
+    }
+
+    void operator () (int) const {
+#ifdef USE_ADAPTOR
+        {
+            V v1 (N), v2 (N);
+            M m1 (N, N);
+            ublas::symmetric_adaptor<M> tam1 (m1);
+            test_with (v1, v2, tam1);
+
+            ublas::matrix_row<ublas::symmetric_adaptor<M> > mr1 (tam1, N - 1), mr2 (tam1, N - 1);
+            test_with (mr1, mr2, tam1);
+
+            ublas::matrix_column<ublas::symmetric_adaptor<M> > mc1 (tam1, 0), mc2 (tam1, 0);
+            test_with (mc1, mc2, tam1);
+
+#ifdef USE_RANGE
+            ublas::matrix_vector_range<ublas::symmetric_adaptor<M> > mvr1 (tam1, ublas::range (0, N), ublas::range (0, N)),
+                                                                     mvr2 (tam1, ublas::range (0, N), ublas::range (0, N));
+            test_with (mvr1, mvr2, tam1);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_vector_slice<ublas::symmetric_adaptor<M> > mvs1 (tam1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                                                     mvs2 (tam1, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (mvs1, mvs2, tam1);
+#endif
+        }
+#endif
+    }
+};
+
+// Test matrix & vector
+void test_matrix_vector () {
+    std::cout << "test_matrix_vector" << std::endl;
+
+#ifdef USE_BOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::bounded_array<mp_test_type, 3> >,
+                          ublas::symmetric_matrix<mp_test_type, ublas::lower, ublas::row_major, ublas::bounded_array<mp_test_type, 3 * 3> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::bounded_array<mp_test_type, 3> >,
+                          ublas::symmetric_matrix<mp_test_type, ublas::lower, ublas::row_major, ublas::bounded_array<mp_test_type, 3 * 3> >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<double, ublas::bounded_array<double, 3> >,
+                          ublas::symmetric_matrix<double, ublas::lower, ublas::row_major, ublas::bounded_array<double, 3 * 3> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<double, ublas::bounded_array<double, 3> >,
+                          ublas::symmetric_matrix<double, ublas::lower, ublas::row_major, ublas::bounded_array<double, 3 * 3> >, 3> () (0);
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, ublas::bounded_array<std::complex<mp_test_type>, 3> >,
+                          ublas::symmetric_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, ublas::bounded_array<std::complex<mp_test_type>, 3 * 3> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, ublas::bounded_array<std::complex<mp_test_type>, 3> >,
+                          ublas::symmetric_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, ublas::bounded_array<std::complex<mp_test_type>, 3 * 3> >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::bounded_array<std::complex<double>, 3> >,
+                          ublas::symmetric_matrix<std::complex<double>, ublas::lower, ublas::row_major, ublas::bounded_array<std::complex<double>, 3 * 3> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::bounded_array<std::complex<double>, 3> >,
+                          ublas::symmetric_matrix<std::complex<double>, ublas::lower, ublas::row_major, ublas::bounded_array<std::complex<double>, 3 * 3> >, 3> () (0);
+#endif
+#endif
+#endif
+
+#ifdef USE_UNBOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::unbounded_array<mp_test_type> >,
+                          ublas::symmetric_matrix<mp_test_type, ublas::lower, ublas::row_major, ublas::unbounded_array<mp_test_type> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<mp_test_type, ublas::unbounded_array<mp_test_type> >,
+                          ublas::symmetric_matrix<mp_test_type, ublas::lower, ublas::row_major, ublas::unbounded_array<mp_test_type> >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<double, ublas::unbounded_array<double> >,
+                          ublas::symmetric_matrix<double, ublas::lower, ublas::row_major, ublas::unbounded_array<double> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<double, ublas::unbounded_array<double> >,
+                          ublas::symmetric_matrix<double, ublas::lower, ublas::row_major, ublas::unbounded_array<double> >, 3> () (0);
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, ublas::unbounded_array<std::complex<mp_test_type> > >,
+                          ublas::symmetric_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, ublas::unbounded_array<std::complex<mp_test_type> > >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, ublas::unbounded_array<std::complex<mp_test_type> > >,
+                          ublas::symmetric_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, ublas::unbounded_array<std::complex<mp_test_type> > >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::unbounded_array<std::complex<double> > >,
+                          ublas::symmetric_matrix<std::complex<double>, ublas::lower, ublas::row_major, ublas::unbounded_array<std::complex<double> > >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<double>, ublas::unbounded_array<std::complex<double> > >,
+                          ublas::symmetric_matrix<std::complex<double>, ublas::lower, ublas::row_major, ublas::unbounded_array<std::complex<double> > >, 3> () (0);
+#endif
+#endif
+#endif
+
+#ifdef USE_STD_VECTOR
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<mp_test_type, std::vector<mp_test_type> >,
+                          ublas::symmetric_matrix<mp_test_type, ublas::lower, ublas::row_major, std::vector<mp_test_type> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<mp_test_type, std::vector<mp_test_type> >,
+                          ublas::symmetric_matrix<mp_test_type, ublas::lower, ublas::row_major, std::vector<mp_test_type> >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<double, std::vector<double> >,
+                          ublas::symmetric_matrix<double, ublas::lower, ublas::row_major, std::vector<double> >, 3> () ();
+    test_my_matrix_vector<ublas::vector<double, std::vector<double> >,
+                          ublas::symmetric_matrix<double, ublas::lower, ublas::row_major, std::vector<double> >, 3> () (0);
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, std::vector<std::complex<mp_test_type> > >,
+                          ublas::symmetric_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, std::vector<std::complex<mp_test_type> > >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<mp_test_type>, std::vector<std::complex<mp_test_type> > >,
+                          ublas::symmetric_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, std::vector<std::complex<mp_test_type> > >, 3> () (0);
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<std::complex<double>, std::vector<std::complex<double> > >,
+                          ublas::symmetric_matrix<std::complex<double>, ublas::lower, ublas::row_major, std::vector<std::complex<double> > >, 3> () ();
+    test_my_matrix_vector<ublas::vector<std::complex<double>, std::vector<std::complex<double> > >,
+                          ublas::symmetric_matrix<std::complex<double>, ublas::lower, ublas::row_major, std::vector<std::complex<double> > >, 3> () (0);
+#endif
+#endif
+#endif
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test63.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test63.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,223 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test6.hpp"
+
+// Test matrix expression templates
+template<class M, int N>
+struct test_my_matrix {
+    typedef typename M::value_type value_type;
+
+    template<class MP>
+    void test_with (MP &m1, MP &m2, MP &m3) const {
+        {
+            value_type t;
+
+            // Default Construct
+            default_construct<MP>::test ();
+            
+            // Copy and swap
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m1 = m2;
+            std::cout << "m1 = m2 = " << m1 << std::endl;
+            m1.assign_temporary (m2);
+            std::cout << "m1.assign_temporary (m2) = " << m1 << std::endl;
+            m1.swap (m2);
+            std::cout << "m1.swap (m2) = " << m1 << " " << m2 << std::endl;
+
+            // Zero assignment
+            m1 = ublas::zero_matrix<> (m1.size1 (), m1.size2 ());
+            std::cout << "m1.zero_matrix = " << m1 << std::endl;
+            m1 = m2;
+
+            // Unary matrix operations resulting in a matrix
+            initialize_matrix (m1);
+            m2 = - m1;
+            std::cout << "- m1 = " << m2 << std::endl;
+            m2 = ublas::conj (m1);
+            std::cout << "conj (m1) = " << m2 << std::endl;
+
+            // Binary matrix operations resulting in a matrix
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m3 = m1 + m2;
+            std::cout << "m1 + m2 = " << m3 << std::endl;
+            m3 = m1 - m2;
+            std::cout << "m1 - m2 = " << m3 << std::endl;
+
+            // Scaling a matrix
+            t = N;
+            initialize_matrix (m1);
+            m2 = value_type (1.) * m1;
+            std::cout << "1. * m1 = " << m2 << std::endl;
+            m2 = t * m1;
+            std::cout << "N * m1 = " << m2 << std::endl;
+            initialize_matrix (m1);
+            m2 = m1 * value_type (1.);
+            std::cout << "m1 * 1. = " << m2 << std::endl;
+            m2 = m1 * t;
+            std::cout << "m1 * N = " << m2 << std::endl;
+
+            // Some assignments
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m2 += m1;
+            std::cout << "m2 += m1 = " << m2 << std::endl;
+            m2 -= m1;
+            std::cout << "m2 -= m1 = " << m2 << std::endl;
+            m2 = m2 + m1;
+            std::cout << "m2 = m2 + m1 = " << m2 << std::endl;
+            m2 = m2 - m1;
+            std::cout << "m2 = m1 - m1 = " << m2 << std::endl;
+            m1 *= value_type (1.);
+            std::cout << "m1 *= 1. = " << m1 << std::endl;
+            m1 *= t;
+            std::cout << "m1 *= N = " << m1 << std::endl;
+
+            // Transpose
+            initialize_matrix (m1);
+            m2 = ublas::trans (m1);
+            std::cout << "trans (m1) = " << m2 << std::endl;
+
+            // Hermitean
+            initialize_matrix (m1);
+            m2 = ublas::herm (m1);
+            std::cout << "herm (m1) = " << m2 << std::endl;
+
+            // Matrix multiplication
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m3 = ublas::prod (m1, m2);
+            std::cout << "prod (m1, m2) = " << m3 << std::endl;
+        }
+    }
+    void operator () () const {
+        {
+            M m1 (N, N), m2 (N, N), m3 (N, N);
+            test_with (m1, m2, m3);
+
+#ifdef USE_RANGE
+            ublas::matrix_range<M> mr1 (m1, ublas::range (0, N), ublas::range (0, N)),
+                                   mr2 (m2, ublas::range (0, N), ublas::range (0, N)),
+                                   mr3 (m3, ublas::range (0, N), ublas::range (0, N));
+            test_with (mr1, mr2, mr3);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_slice<M> ms1 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                   ms2 (m2, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                   ms3 (m3, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (ms1, ms2, ms3);
+#endif
+        }
+
+#ifdef USE_ADAPTOR
+        {
+            M m1 (N, N), m2 (N, N), m3 (N, N);
+            ublas::symmetric_adaptor<M> sam1 (m1), sam2 (m2), sam3 (m3);
+            test_with (sam1, sam2, sam3);
+
+#ifdef USE_RANGE
+            ublas::matrix_range<ublas::symmetric_adaptor<M> > mr1 (sam1, ublas::range (0, N), ublas::range (0, N)),
+                                                              mr2 (sam2, ublas::range (0, N), ublas::range (0, N)),
+                                                              mr3 (sam3, ublas::range (0, N), ublas::range (0, N));
+            test_with (mr1, mr2, mr3);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_slice<ublas::symmetric_adaptor<M> > ms1 (sam1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                                              ms2 (sam2, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                                              ms3 (sam3, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (ms1, ms2, ms3);
+#endif
+        }
+#endif
+    }
+};
+
+// Test matrix
+void test_matrix () {
+    std::cout << "test_matrix" << std::endl;
+
+#ifdef USE_BOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, bounded_array" << std::endl;
+    test_my_matrix<ublas::symmetric_matrix<mp_test_type, ublas::lower, ublas::row_major, ublas::bounded_array<mp_test_type, 3 * 3> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, bounded_array" << std::endl;
+    test_my_matrix<ublas::symmetric_matrix<double, ublas::lower, ublas::row_major, ublas::bounded_array<double, 3 * 3> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, bounded_array" << std::endl;
+    test_my_matrix<ublas::symmetric_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, ublas::bounded_array<std::complex<mp_test_type>, 3 * 3> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, bounded_array" << std::endl;
+    test_my_matrix<ublas::symmetric_matrix<std::complex<double>, ublas::lower, ublas::row_major, ublas::bounded_array<std::complex<double>, 3 * 3> >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_UNBOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, unbounded_array" << std::endl;
+    test_my_matrix<ublas::symmetric_matrix<mp_test_type, ublas::lower, ublas::row_major, ublas::unbounded_array<mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, unbounded_array" << std::endl;
+    test_my_matrix<ublas::symmetric_matrix<double, ublas::lower, ublas::row_major, ublas::unbounded_array<double> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, unbounded_array" << std::endl;
+    test_my_matrix<ublas::symmetric_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, ublas::unbounded_array<std::complex<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, unbounded_array" << std::endl;
+    test_my_matrix<ublas::symmetric_matrix<std::complex<double>, ublas::lower, ublas::row_major, ublas::unbounded_array<std::complex<double> > >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_STD_VECTOR
+#ifdef USE_FLOAT
+    std::cout << "mp_test_type, std::vector" << std::endl;
+    test_my_matrix<ublas::symmetric_matrix<mp_test_type, ublas::lower, ublas::row_major, std::vector<mp_test_type> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "double, std::vector" << std::endl;
+    test_my_matrix<ublas::symmetric_matrix<double, ublas::lower, ublas::row_major, std::vector<double> >, 3 > () ();
+#endif
+
+#ifdef USE_STD_COMPLEX
+#ifdef USE_FLOAT
+    std::cout << "std::complex<mp_test_type>, std::vector" << std::endl;
+    test_my_matrix<ublas::symmetric_matrix<std::complex<mp_test_type>, ublas::lower, ublas::row_major, std::vector<std::complex<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "std::complex<double>, std::vector" << std::endl;
+    test_my_matrix<ublas::symmetric_matrix<std::complex<double>, ublas::lower, ublas::row_major, std::vector<std::complex<double> > >, 3 > () ();
+#endif
+#endif
+#endif
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test7.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test7.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,31 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include <iostream>
+
+#include <boost/numeric/interval.hpp>
+#include <boost/numeric/interval/io.hpp>
+
+#include <boost/numeric/ublas/vector.hpp>
+#include <boost/numeric/ublas/matrix.hpp>
+#include <boost/numeric/ublas/io.hpp>
+
+#include "test7.hpp"
+
+// this testcase requires fix of task #2473 
+
+int main () {
+    test_vector ();
+    test_matrix_vector ();
+    test_matrix ();
+    return 0;
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test7.hpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test7.hpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,36 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#ifndef TEST7_H
+#define TEST7_H
+
+#include <iostream>
+
+#include <boost/numeric/interval.hpp>
+#include <boost/numeric/interval/io.hpp>
+
+#include <boost/numeric/ublas/vector.hpp>
+#include <boost/numeric/ublas/vector_proxy.hpp>
+#include <boost/numeric/ublas/matrix.hpp>
+#include <boost/numeric/ublas/matrix_proxy.hpp>
+#include <boost/numeric/ublas/io.hpp>
+
+namespace ublas = boost::numeric::ublas;
+
+#include "common/init.hpp"
+
+void test_vector ();
+void test_matrix_vector ();
+void test_matrix ();
+
+
+#endif
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test71.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test71.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,170 @@
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test7.hpp"
+
+// Test vector expression templates
+template<class V, int N>
+struct test_my_vector {
+    typedef typename V::value_type value_type;
+    typedef typename V::size_type size_type;
+    typedef typename ublas::type_traits<value_type>::real_type real_type;
+
+    template<class VP>
+    void test_with (VP &v1, VP &v2, VP &v3) const {
+        {
+            value_type t;
+            size_type i;
+            real_type n;
+
+            // Copy and swap
+            initialize_vector (v1);
+            initialize_vector (v2);
+            v1 = v2;
+            std::cout << "v1 = v2 = " << v1 << std::endl;
+            v1.assign_temporary (v2);
+            std::cout << "v1.assign_temporary (v2) = " << v1 << std::endl;
+            v1.swap (v2);
+            std::cout << "v1.swap (v2) = " << v1 << " " << v2 << std::endl;
+
+            // Zero assignment
+            v1 = ublas::zero_vector<value_type> (v1.size ());
+            std::cout << "v1.zero_vector = " << v1 << std::endl;
+            v1 = v2;
+
+            // Unary vector operations resulting in a vector
+            initialize_vector (v1);
+            v2 = - v1;
+            std::cout << "- v1 = " << v2 << std::endl;
+            v2 = ublas::conj (v1);
+            std::cout << "conj (v1) = " << v2 << std::endl;
+
+            // Binary vector operations resulting in a vector
+            initialize_vector (v1);
+            initialize_vector (v2);
+            v3 = v1 + v2;
+            std::cout << "v1 + v2 = " << v3 << std::endl;
+
+            v3 = v1 - v2;
+            std::cout << "v1 - v2 = " << v3 << std::endl;
+
+            // Scaling a vector
+            t = value_type (N);
+            initialize_vector (v1);
+            v2 = value_type (1.) * v1;
+            std::cout << "1. * v1 = " << v2 << std::endl;
+//            v2 = t * v1;
+            std::cout << "N * v1 = " << v2 << std::endl;
+            initialize_vector (v1);
+//            v2 = v1 * value_type (1.);
+            std::cout << "v1 * 1. = " << v2 << std::endl;
+//            v2 = v1 * t;
+            std::cout << "v1 * N = " << v2 << std::endl;
+
+            // Some assignments
+            initialize_vector (v1);
+            initialize_vector (v2);
+            v2 += v1;
+            std::cout << "v2 += v1 = " << v2 << std::endl;
+            v2 -= v1;
+            std::cout << "v2 -= v1 = " << v2 << std::endl;
+            v2 = v2 + v1;
+            std::cout << "v2 = v2 + v1 = " << v2 << std::endl;
+            v2 = v2 - v1;
+            std::cout << "v2 = v2 - v1 = " << v2 << std::endl;
+            v1 *= value_type (1.);
+            std::cout << "v1 *= 1. = " << v1 << std::endl;
+            v1 *= t;
+            std::cout << "v1 *= N = " << v1 << std::endl;
+
+            // Unary vector operations resulting in a scalar
+            initialize_vector (v1);
+            t = ublas::sum (v1);
+            std::cout << "sum (v1) = " << t << std::endl;
+            n = ublas::norm_1 (v1);
+            std::cout << "norm_1 (v1) = " << n << std::endl;
+            n = ublas::norm_2 (v1);
+            std::cout << "norm_2 (v1) = " << n << std::endl;
+            n = ublas::norm_inf (v1);
+            std::cout << "norm_inf (v1) = " << n << std::endl;
+
+            i = ublas::index_norm_inf (v1);
+            std::cout << "index_norm_inf (v1) = " << i << std::endl;
+
+            // Binary vector operations resulting in a scalar
+            initialize_vector (v1);
+            initialize_vector (v2);
+            t = ublas::inner_prod (v1, v2);
+            std::cout << "inner_prod (v1, v2) = " << t << std::endl;
+        }
+    }
+    void operator () () const {
+        {
+            V v1 (N), v2 (N), v3 (N);
+            test_with (v1, v2, v3);
+
+#ifdef USE_RANGE
+            ublas::vector_range<V> vr1 (v1, ublas::range (0, N)),
+                                   vr2 (v2, ublas::range (0, N)),
+                                   vr3 (v3, ublas::range (0, N));
+            test_with (vr1, vr2, vr3);
+#endif
+
+#ifdef USE_SLICE
+            ublas::vector_slice<V> vs1 (v1, ublas::slice (0, 1, N)),
+                                   vs2 (v2, ublas::slice (0, 1, N)),
+                                   vs3 (v3, ublas::slice (0, 1, N));
+            test_with (vs1, vs2, vs3);
+#endif
+        }
+    }
+};
+
+// Test vector
+void test_vector () {
+    std::cout << "test_vector" << std::endl;
+
+#ifdef USE_BOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "boost::numeric::interval<mp_test_type>, bounded_array" << std::endl;
+    test_my_vector<ublas::vector<boost::numeric::interval<mp_test_type>, ublas::bounded_array<boost::numeric::interval<mp_test_type>, 3> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "boost::numeric::interval<double>, bounded_array" << std::endl;
+    test_my_vector<ublas::vector<boost::numeric::interval<double>, ublas::bounded_array<boost::numeric::interval<double>, 3> >, 3 > () ();
+#endif
+#endif
+
+#ifdef USE_UNBOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "boost::numeric::interval<mp_test_type>, unbounded_array" << std::endl;
+    test_my_vector<ublas::vector<boost::numeric::interval<mp_test_type>, ublas::unbounded_array<boost::numeric::interval<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "boost::numeric::interval<double>, unbounded_array" << std::endl;
+    test_my_vector<ublas::vector<boost::numeric::interval<double>, ublas::unbounded_array<boost::numeric::interval<double> > >, 3 > () ();
+#endif
+#endif
+
+#ifdef USE_STD_VECTOR
+#ifdef USE_FLOAT
+    std::cout << "boost::numeric::interval<mp_test_type>, std::vector" << std::endl;
+    test_my_vector<ublas::vector<boost::numeric::interval<mp_test_type>, std::vector<boost::numeric::interval<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "boost::numeric::interval<double>, std::vector" << std::endl;
+    test_my_vector<ublas::vector<boost::numeric::interval<double>, std::vector<boost::numeric::interval<double> > >, 3 > () ();
+#endif
+#endif
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test72.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test72.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,165 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test7.hpp"
+
+// Test matrix & vector expression templates
+template<class V, class M, int N>
+struct test_my_matrix_vector {
+    typedef typename V::value_type value_type;
+
+    template<class VP, class MP>
+    void test_with (VP &v1, VP &v2, MP &m1) const {
+        {
+            // Rows and columns
+            initialize_matrix (m1);
+            for (int i = 0; i < N; ++ i) {
+                v1 = ublas::row (m1, i);
+                std::cout << "row (m, " << i << ") = " << v1 << std::endl;
+                v1 = ublas::column (m1, i);
+                std::cout << "column (m, " << i << ") = " << v1 << std::endl;
+            }
+
+            // Outer product
+            initialize_vector (v1);
+            initialize_vector (v2);
+            m1 = ublas::outer_prod (v1, v2);
+            std::cout << "outer_prod (v1, v2) = " << m1 << std::endl;
+
+            // Matrix vector product
+            initialize_matrix (m1);
+            initialize_vector (v1);
+            v2 = ublas::prod (m1, v1);
+            std::cout << "prod (m1, v1) = " << v2 << std::endl;
+            v2 = ublas::prod (v1, m1);
+            std::cout << "prod (v1, m1) = " << v2 << std::endl;
+        }
+    }
+    void operator () () const {
+        {
+            V v1 (N), v2 (N);
+            M m1 (N, N);
+            test_with (v1, v2, m1);
+
+            ublas::matrix_row<M> mr1 (m1, 0), mr2 (m1, 1);
+            test_with (mr1, mr2, m1);
+
+            ublas::matrix_column<M> mc1 (m1, 0), mc2 (m1, 1);
+            test_with (mc1, mc2, m1);
+
+#ifdef USE_RANGE
+            ublas::matrix_vector_range<M> mvr1 (m1, ublas::range (0, N), ublas::range (0, N)),
+                                          mvr2 (m1, ublas::range (0, N), ublas::range (0, N));
+            test_with (mvr1, mvr2, m1);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_vector_slice<M> mvs1 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                          mvs2 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (mvs1, mvs2, m1);
+#endif
+        }
+    }
+};
+
+// Test matrix & vector
+void test_matrix_vector () {
+    std::cout << "test_matrix_vector" << std::endl;
+
+#ifdef USE_MATRIX
+#ifdef USE_BOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "boost::numeric::interval<mp_test_type>, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<boost::numeric::interval<mp_test_type>, ublas::bounded_array<boost::numeric::interval<mp_test_type>, 3> >,
+                          ublas::matrix<boost::numeric::interval<mp_test_type>, ublas::row_major, ublas::bounded_array<boost::numeric::interval<mp_test_type>, 3 * 3> >, 3> () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "boost::numeric::interval<double>, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<boost::numeric::interval<double>, ublas::bounded_array<boost::numeric::interval<double>, 3> >,
+                          ublas::matrix<boost::numeric::interval<double>, ublas::row_major, ublas::bounded_array<boost::numeric::interval<double>, 3 * 3> >, 3> () ();
+#endif
+#endif
+
+#ifdef USE_UNBOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "boost::numeric::interval<mp_test_type>, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<boost::numeric::interval<mp_test_type>, ublas::unbounded_array<boost::numeric::interval<mp_test_type> > >,
+                          ublas::matrix<boost::numeric::interval<mp_test_type>, ublas::row_major, ublas::unbounded_array<boost::numeric::interval<mp_test_type> > >, 3> () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "boost::numeric::interval<double>, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<boost::numeric::interval<double>, ublas::unbounded_array<boost::numeric::interval<double> > >,
+                          ublas::matrix<boost::numeric::interval<double>, ublas::row_major, ublas::unbounded_array<boost::numeric::interval<double> > >, 3> () ();
+#endif
+#endif
+
+#ifdef USE_STD_VECTOR
+#ifdef USE_FLOAT
+    std::cout << "boost::numeric::interval<mp_test_type>, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<boost::numeric::interval<mp_test_type>, std::vector<boost::numeric::interval<mp_test_type> > >,
+                          ublas::matrix<boost::numeric::interval<mp_test_type>, ublas::row_major, std::vector<boost::numeric::interval<mp_test_type> > >, 3> () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "boost::numeric::interval<double>, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<boost::numeric::interval<double>, std::vector<boost::numeric::interval<double> > >,
+                          ublas::matrix<boost::numeric::interval<double>, ublas::row_major, std::vector<boost::numeric::interval<double> > >, 3> () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_VECTOR_OF_VECTOR
+#ifdef USE_BOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "boost::numeric::interval<mp_test_type>, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<boost::numeric::interval<mp_test_type>, ublas::bounded_array<boost::numeric::interval<mp_test_type>, 3> >,
+                          ublas::vector_of_vector<boost::numeric::interval<mp_test_type>, ublas::row_major, ublas::bounded_array<ublas::bounded_array<boost::numeric::interval<mp_test_type>, 3>, 3 + 1> >, 3> () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "boost::numeric::interval<double>, bounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<boost::numeric::interval<double>, ublas::bounded_array<boost::numeric::interval<double>, 3> >,
+                          ublas::vector_of_vector<boost::numeric::interval<double>, ublas::row_major, ublas::bounded_array<ublas::bounded_array<boost::numeric::interval<double>, 3>, 3 + 1> >, 3> () ();
+#endif
+#endif
+
+#ifdef USE_UNBOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "boost::numeric::interval<mp_test_type>, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<boost::numeric::interval<mp_test_type>, ublas::unbounded_array<boost::numeric::interval<mp_test_type> > >,
+                          ublas::vector_of_vector<boost::numeric::interval<mp_test_type>, ublas::row_major, ublas::unbounded_array<ublas::unbounded_array<boost::numeric::interval<mp_test_type> > > >, 3> () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "boost::numeric::interval<double>, unbounded_array" << std::endl;
+    test_my_matrix_vector<ublas::vector<boost::numeric::interval<double>, ublas::unbounded_array<boost::numeric::interval<double> > >,
+                          ublas::vector_of_vector<boost::numeric::interval<double>, ublas::row_major, ublas::unbounded_array<ublas::unbounded_array<boost::numeric::interval<double> > > >, 3> () ();
+#endif
+#endif
+
+#ifdef USE_STD_VECTOR
+#ifdef USE_FLOAT
+    std::cout << "boost::numeric::interval<mp_test_type>, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<boost::numeric::interval<mp_test_type>, std::vector<boost::numeric::interval<mp_test_type> > >,
+                          ublas::vector_of_vector<boost::numeric::interval<mp_test_type>, ublas::row_major, std::vector<std::vector<boost::numeric::interval<mp_test_type> > > >, 3> () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "boost::numeric::interval<double>, std::vector" << std::endl;
+    test_my_matrix_vector<ublas::vector<boost::numeric::interval<double>, std::vector<boost::numeric::interval<double> > >,
+                          ublas::vector_of_vector<boost::numeric::interval<double>, ublas::row_major, std::vector<std::vector<boost::numeric::interval<double> > > >, 3> () ();
+#endif
+#endif
+#endif
+}
Added: sandbox/big_number/libs/multiprecision/test/ublas_interop/test73.cpp
==============================================================================
--- (empty file)
+++ sandbox/big_number/libs/multiprecision/test/ublas_interop/test73.cpp	2012-08-07 04:10:07 EDT (Tue, 07 Aug 2012)
@@ -0,0 +1,202 @@
+//
+//  Copyright (c) 2000-2002
+//  Joerg Walter, Mathias Koch
+//
+//  Distributed under the Boost Software License, Version 1.0. (See
+//  accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt)
+//
+//  The authors gratefully acknowledge the support of
+//  GeNeSys mbH & Co. KG in producing this work.
+//
+
+#include "test7.hpp"
+
+// Test matrix expression templates
+template<class M, int N>
+struct test_my_matrix {
+    typedef typename M::value_type value_type;
+
+    template<class MP>
+    void test_with (MP &m1, MP &m2, MP &m3) const {
+        {
+            value_type t;
+
+            // Copy and swap
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m1 = m2;
+            std::cout << "m1 = m2 = " << m1 << std::endl;
+            m1.assign_temporary (m2);
+            std::cout << "m1.assign_temporary (m2) = " << m1 << std::endl;
+            m1.swap (m2);
+            std::cout << "m1.swap (m2) = " << m1 << " " << m2 << std::endl;
+
+            // Zero assignment
+            m1 = ublas::zero_matrix<value_type> (m1.size1 (), m1.size2 ());
+            std::cout << "m1.zero_matrix = " << m1 << std::endl;
+            m1 = m2;
+
+            // Unary matrix operations resulting in a matrix
+            initialize_matrix (m1);
+            m2 = - m1;
+            std::cout << "- m1 = " << m2 << std::endl;
+            m2 = ublas::conj (m1);
+            std::cout << "conj (m1) = " << m2 << std::endl;
+
+            // Binary matrix operations resulting in a matrix
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m3 = m1 + m2;
+            std::cout << "m1 + m2 = " << m3 << std::endl;
+            m3 = m1 - m2;
+            std::cout << "m1 - m2 = " << m3 << std::endl;
+
+            // Scaling a matrix
+            t = N;
+            initialize_matrix (m1);
+            m2 = value_type (1.) * m1;
+            std::cout << "1. * m1 = " << m2 << std::endl;
+            m2 = t * m1;
+            std::cout << "N * m1 = " << m2 << std::endl;
+            initialize_matrix (m1);
+            m2 = m1 * value_type (1.);
+            std::cout << "m1 * 1. = " << m2 << std::endl;
+            m2 = m1 * t;
+            std::cout << "m1 * N = " << m2 << std::endl;
+
+            // Some assignments
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m2 += m1;
+            std::cout << "m2 += m1 = " << m2 << std::endl;
+            m2 -= m1;
+            std::cout << "m2 -= m1 = " << m2 << std::endl;
+            m2 = m2 + m1;
+            std::cout << "m2 = m2 + m1 = " << m2 << std::endl;
+            m2 = m2 - m1;
+            std::cout << "m2 = m1 - m1 = " << m2 << std::endl;
+            m1 *= value_type (1.);
+            std::cout << "m1 *= 1. = " << m1 << std::endl;
+            m1 *= t;
+            std::cout << "m1 *= N = " << m1 << std::endl;
+
+            // Transpose
+            initialize_matrix (m1);
+            m2 = ublas::trans (m1);
+            std::cout << "trans (m1) = " << m2 << std::endl;
+
+            // Hermitean
+            initialize_matrix (m1);
+            m2 = ublas::herm (m1);
+            std::cout << "herm (m1) = " << m2 << std::endl;
+
+            // Matrix multiplication
+            initialize_matrix (m1);
+            initialize_matrix (m2);
+            m3 = ublas::prod (m1, m2);
+            std::cout << "prod (m1, m2) = " << m3 << std::endl;
+        }
+    }
+    void operator () () const {
+        {
+            M m1 (N, N), m2 (N, N), m3 (N, N);
+            test_with (m1, m2, m3);
+
+#ifdef USE_RANGE
+            ublas::matrix_range<M> mr1 (m1, ublas::range (0, N), ublas::range (0, N)),
+                                   mr2 (m2, ublas::range (0, N), ublas::range (0, N)),
+                                   mr3 (m3, ublas::range (0, N), ublas::range (0, N));
+            test_with (mr1, mr2, mr3);
+#endif
+
+#ifdef USE_SLICE
+            ublas::matrix_slice<M> ms1 (m1, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                   ms2 (m2, ublas::slice (0, 1, N), ublas::slice (0, 1, N)),
+                                   ms3 (m3, ublas::slice (0, 1, N), ublas::slice (0, 1, N));
+            test_with (ms1, ms2, ms3);
+#endif
+        }
+    }
+};
+
+// Test matrix
+void test_matrix () {
+    std::cout << "test_matrix" << std::endl;
+
+#ifdef USE_MATRIX
+#ifdef USE_BOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "boost::numeric::interval<mp_test_type>, bounded_array" << std::endl;
+    test_my_matrix<ublas::matrix<boost::numeric::interval<mp_test_type>, ublas::row_major, ublas::bounded_array<boost::numeric::interval<mp_test_type>, 3 * 3> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "boost::numeric::interval<double>, bounded_array" << std::endl;
+    test_my_matrix<ublas::matrix<boost::numeric::interval<double>, ublas::row_major, ublas::bounded_array<boost::numeric::interval<double>, 3 * 3> >, 3 > () ();
+#endif
+#endif
+
+#ifdef USE_UNBOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "boost::numeric::interval<mp_test_type>, unbounded_array" << std::endl;
+    test_my_matrix<ublas::matrix<boost::numeric::interval<mp_test_type>, ublas::row_major, ublas::unbounded_array<boost::numeric::interval<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "boost::numeric::interval<double>, unbounded_array" << std::endl;
+    test_my_matrix<ublas::matrix<boost::numeric::interval<double>, ublas::row_major, ublas::unbounded_array<boost::numeric::interval<double> > >, 3 > () ();
+#endif
+#endif
+
+#ifdef USE_STD_VECTOR
+#ifdef USE_FLOAT
+    std::cout << "boost::numeric::interval<mp_test_type>, std::vector" << std::endl;
+    test_my_matrix<ublas::matrix<boost::numeric::interval<mp_test_type>, ublas::row_major, std::vector<boost::numeric::interval<mp_test_type> > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "boost::numeric::interval<double>, std::vector" << std::endl;
+    test_my_matrix<ublas::matrix<boost::numeric::interval<double>, ublas::row_major, std::vector<boost::numeric::interval<double> > >, 3 > () ();
+#endif
+#endif
+#endif
+
+#ifdef USE_VECTOR_OF_VECTOR
+#ifdef USE_BOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "boost::numeric::interval<mp_test_type>, bounded_array" << std::endl;
+    test_my_matrix<ublas::vector_of_vector<boost::numeric::interval<mp_test_type>, ublas::row_major, ublas::bounded_array<ublas::bounded_array<boost::numeric::interval<mp_test_type>, 3>, 3 + 1> >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "boost::numeric::interval<double>, bounded_array" << std::endl;
+    test_my_matrix<ublas::vector_of_vector<boost::numeric::interval<double>, ublas::row_major, ublas::bounded_array<ublas::bounded_array<boost::numeric::interval<double>, 3>, 3 + 1> >, 3 > () ();
+#endif
+#endif
+
+#ifdef USE_UNBOUNDED_ARRAY
+#ifdef USE_FLOAT
+    std::cout << "boost::numeric::interval<mp_test_type>, unbounded_array" << std::endl;
+    test_my_matrix<ublas::vector_of_vector<boost::numeric::interval<mp_test_type>, ublas::row_major, ublas::unbounded_array<ublas::unbounded_array<boost::numeric::interval<mp_test_type> > > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "boost::numeric::interval<double>, unbounded_array" << std::endl;
+    test_my_matrix<ublas::vector_of_vector<boost::numeric::interval<double>, ublas::row_major, ublas::unbounded_array<ublas::unbounded_array<boost::numeric::interval<double> > > >, 3 > () ();
+#endif
+#endif
+
+#ifdef USE_STD_VECTOR
+#ifdef USE_FLOAT
+    std::cout << "boost::numeric::interval<mp_test_type>, std::vector" << std::endl;
+    test_my_matrix<ublas::vector_of_vector<boost::numeric::interval<mp_test_type>, ublas::row_major, std::vector<std::vector<boost::numeric::interval<mp_test_type> > > >, 3 > () ();
+#endif
+
+#ifdef USE_DOUBLE
+    std::cout << "boost::numeric::interval<double>, std::vector" << std::endl;
+    test_my_matrix<ublas::vector_of_vector<boost::numeric::interval<double>, ublas::row_major, std::vector<std::vector<boost::numeric::interval<double> > > >, 3 > () ();
+#endif
+#endif
+#endif
+}