1 //==============================================================================
2 // Copyright 2014 LRI UMR 8623 CNRS/Univ Paris Sud XI
3 // Copyright 2014 NumScale SAS
5 // Distributed under the Boost Software License, Version 1.0.
6 // See accompanying file LICENSE.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt
8 //==============================================================================
9 #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_NT2_NT2_RESIZE_HPP_INCLUDED
10 #define BOOST_NUMERIC_ODEINT_EXTERNAL_NT2_NT2_RESIZE_HPP_INCLUDED
12 #include <nt2/core/container/table/table.hpp>
14 #include <boost/numeric/odeint/util/same_size.hpp>
16 namespace boost { namespace numeric { namespace odeint {
18 template<typename T, typename S>
19 struct is_resizeable< nt2::container::table<T,S> >
21 typedef boost::true_type type;
22 static const bool value = type::value;
25 template<typename T, typename S>
26 struct same_size_impl< nt2::container::table<T,S>
27 , nt2::container::table<T,S>
30 static bool same_size ( const nt2::container::table<T,S> &v1
31 , const nt2::container::table<T,S> &v2
34 return v1.extent() == v2.extent();
38 template<typename T, typename S>
39 struct resize_impl< nt2::container::table<T,S>
40 , nt2::container::table<T,S>
43 static void resize ( nt2::container::table<T,S> &v1
44 , const nt2::container::table<T,S> &v2
47 v1.resize( v2.extent() );