3 boost/numeric/odeint/external/blaze/blaze_resize.hpp
9 Copyright 2009-2012 Karsten Ahnert
10 Copyright 2009-2012 Mario Mulansky
12 Distributed under the Boost Software License, Version 1.0.
13 (See accompanying file LICENSE_1_0.txt or
14 copy at http://www.boost.org/LICENSE_1_0.txt)
18 #ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_BLAZE_BLAZE_RESIZE_HPP_INCLUDED
19 #define BOOST_NUMERIC_ODEINT_EXTERNAL_BLAZE_BLAZE_RESIZE_HPP_INCLUDED
21 #include <boost/numeric/odeint/util/is_resizeable.hpp>
22 #include <boost/numeric/odeint/util/resize.hpp>
23 #include <boost/numeric/odeint/util/same_size.hpp>
25 #include <blaze/math/dense/DynamicVector.h>
31 template< typename T , bool TF >
32 struct is_resizeable< blaze::DynamicVector< T , TF > >
34 typedef boost::true_type type;
35 const static bool value = type::value;
38 template< typename T1 , bool TF1, typename T2 , bool TF2 >
39 struct same_size_impl< blaze::DynamicVector< T1 , TF1 > , blaze::DynamicVector< T2 , TF2 > >
41 static bool same_size( const blaze::DynamicVector< T1 , TF1 > &x1 , const blaze::DynamicVector< T2 , TF2 > &x2 )
43 return x1.size() == x2.size();
47 template< typename T1 , bool TF1, typename T2 , bool TF2 >
48 struct resize_impl< blaze::DynamicVector< T1 , TF1 > , blaze::DynamicVector< T2 , TF2 > >
50 static void resize( blaze::DynamicVector< T1 , TF1 > &x1 , const blaze::DynamicVector< T2 , TF2 > &x2 )
52 x1.resize( x2.size() );
58 } // namespace numeric
62 #endif // BOOST_NUMERIC_ODEINT_EXTERNAL_BLAZE_BLAZE_RESIZE_HPP_INCLUDED