Chris@102: /* Chris@102: [auto_generated] Chris@102: boost/numeric/odeint/util/multi_array_adaption.hpp Chris@102: Chris@102: [begin_description] Chris@102: tba. Chris@102: [end_description] Chris@102: Chris@102: Copyright 2009-2012 Karsten Ahnert Chris@102: Copyright 2009-2012 Mario Mulansky Chris@102: Chris@102: Distributed under the Boost Software License, Version 1.0. Chris@102: (See accompanying file LICENSE_1_0.txt or Chris@102: copy at http://www.boost.org/LICENSE_1_0.txt) Chris@102: */ Chris@102: Chris@102: Chris@102: #ifndef BOOST_NUMERIC_ODEINT_UTIL_MULTI_ARRAY_ADAPTION_HPP_DEFINED Chris@102: #define BOOST_NUMERIC_ODEINT_UTIL_MULTI_ARRAY_ADAPTION_HPP_DEFINED Chris@102: Chris@102: Chris@102: Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: Chris@102: Chris@102: namespace boost { Chris@102: namespace numeric { Chris@102: namespace odeint { Chris@102: Chris@102: template< typename T > Chris@102: struct is_multi_array Chris@102: { Chris@102: typedef boost::false_type type; Chris@102: const static bool value = type::value; Chris@102: }; Chris@102: Chris@102: template< typename T > Chris@102: struct is_resizeable_multi_array Chris@102: { Chris@102: typedef boost::false_type type; Chris@102: const static bool value = type::value; Chris@102: }; Chris@102: Chris@102: Chris@102: Chris@102: template< typename V , size_t Dim , typename A > Chris@102: struct is_multi_array< boost::multi_array< V , Dim , A > > Chris@102: { Chris@102: typedef boost::true_type type; Chris@102: const static bool value = type::value; Chris@102: }; Chris@102: Chris@102: template< typename V , size_t Dim , typename A > Chris@102: struct is_resizeable_multi_array< boost::multi_array< V , Dim , A > > Chris@102: { Chris@102: typedef boost::true_type type; Chris@102: const static bool value = type::value; Chris@102: }; Chris@102: Chris@102: Chris@102: Chris@102: Chris@102: template< typename T > Chris@102: struct is_resizeable_sfinae< T , typename boost::enable_if< typename is_resizeable_multi_array< T >::type >::type > Chris@102: { Chris@102: typedef boost::true_type type; Chris@102: const static bool value = type::value; Chris@102: }; Chris@102: Chris@102: Chris@102: Chris@102: Chris@102: Chris@102: template< typename T1 , typename T2 > Chris@102: struct same_size_impl_sfinae< T1 , T2 , Chris@102: typename boost::enable_if< Chris@102: typename boost::mpl::and_< Chris@102: is_multi_array< T1 > , Chris@102: is_multi_array< T2 > , Chris@102: boost::mpl::bool_< T1::dimensionality == T2::dimensionality > Chris@102: >::type Chris@102: >::type > Chris@102: { Chris@102: static bool same_size( T1 const &x1 , T2 const &x2 ) Chris@102: { Chris@102: for( size_t i=0 ; i Chris@102: struct resize_impl_sfinae< T1 , T2 , Chris@102: typename boost::enable_if< Chris@102: typename boost::mpl::and_< Chris@102: is_resizeable_multi_array< T1 > , Chris@102: is_multi_array< T2 > , Chris@102: boost::mpl::bool_< T1::dimensionality == T2::dimensionality > Chris@102: >::type Chris@102: >::type > Chris@102: { Chris@102: static void resize( T1 &x1 , const T2 &x2 ) Chris@102: { Chris@102: boost::array< int , T1::dimensionality > extents; Chris@102: for( size_t i=0 ; i origins; Chris@102: for( size_t i=0 ; i