Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:42:51

0001 //==============================================================================
0002 //         Copyright 2014          LRI    UMR 8623 CNRS/Univ Paris Sud XI
0003 //         Copyright 2014          NumScale SAS
0004 //
0005 //          Distributed under the Boost Software License, Version 1.0.
0006 //                 See accompanying file LICENSE.txt or copy at
0007 //                     http://www.boost.org/LICENSE_1_0.txt
0008 //==============================================================================
0009 #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_NT2_NT2_RESIZE_HPP_INCLUDED
0010 #define BOOST_NUMERIC_ODEINT_EXTERNAL_NT2_NT2_RESIZE_HPP_INCLUDED
0011 
0012 #include <nt2/core/container/table/table.hpp>
0013 
0014 #include <boost/numeric/odeint/util/same_size.hpp>
0015 
0016 namespace boost { namespace numeric { namespace odeint {
0017 
0018 template<typename T, typename S>
0019 struct is_resizeable< nt2::container::table<T,S> >
0020 {
0021   typedef boost::true_type type;
0022   static const bool value = type::value;
0023 };
0024 
0025 template<typename T, typename S>
0026 struct same_size_impl< nt2::container::table<T,S>
0027                      , nt2::container::table<T,S>
0028                      >
0029 {
0030   static bool same_size ( const nt2::container::table<T,S> &v1
0031                         , const nt2::container::table<T,S> &v2
0032                         )
0033   {
0034     return v1.extent() == v2.extent();
0035   }
0036 };
0037 
0038 template<typename T, typename S>
0039 struct resize_impl< nt2::container::table<T,S>
0040                   , nt2::container::table<T,S>
0041                   >
0042 {
0043   static void resize ( nt2::container::table<T,S> &v1
0044                      , const nt2::container::table<T,S> &v2
0045                      )
0046   {
0047     v1.resize( v2.extent() );
0048   }
0049 };
0050 } } }
0051 
0052 #endif