diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-03-21 15:45:20 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-03-21 15:46:37 +0900 |
commit | 733b5d5ae2c5d625211e2985ac25728ac3f54883 (patch) | |
tree | a5b214744b256f07e1dc2bd7273035a7808c659f /boost/numeric/odeint/algebra/algebra_dispatcher.hpp | |
parent | 08c1e93fa36a49f49325a07fe91ff92c964c2b6c (diff) | |
download | boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.tar.gz boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.tar.bz2 boost-733b5d5ae2c5d625211e2985ac25728ac3f54883.zip |
Imported Upstream version 1.58.0upstream/1.58.0
Change-Id: If0072143aa26874812e0db6872e1efb10a3e5e94
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/numeric/odeint/algebra/algebra_dispatcher.hpp')
-rw-r--r-- | boost/numeric/odeint/algebra/algebra_dispatcher.hpp | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/boost/numeric/odeint/algebra/algebra_dispatcher.hpp b/boost/numeric/odeint/algebra/algebra_dispatcher.hpp index df5aabac96..88cf159e03 100644 --- a/boost/numeric/odeint/algebra/algebra_dispatcher.hpp +++ b/boost/numeric/odeint/algebra/algebra_dispatcher.hpp @@ -17,8 +17,9 @@ #ifndef BOOST_NUMERIC_ODEINT_ALGEBRA_ALGEBRA_DISPATCHER_HPP_INCLUDED #define BOOST_NUMERIC_ODEINT_ALGEBRA_ALGEBRA_DISPATCHER_HPP_INCLUDED -#include <complex> +#include <boost/numeric/odeint/config.hpp> +#include <complex> #include <boost/type_traits/is_floating_point.hpp> #include <boost/numeric/ublas/vector.hpp> @@ -38,14 +39,14 @@ namespace odeint { template< class StateType , class Enabler = void > struct algebra_dispatcher_sfinae { - // range_algebra is the standard algebra^ + // range_algebra is the standard algebra typedef range_algebra algebra_type; }; template< class StateType > struct algebra_dispatcher : algebra_dispatcher_sfinae< StateType > { }; -//specialize for array +// specialize for array template< class T , size_t N > struct algebra_dispatcher< boost::array< T , N > > { @@ -84,4 +85,26 @@ struct algebra_dispatcher< boost::numeric::ublas::matrix< T , L , A > > } } +#ifdef BOOST_NUMERIC_ODEINT_CXX11 + +// c++11 mode: specialization for std::array if available + +#include <array> + +namespace boost { +namespace numeric { +namespace odeint { + +// specialize for std::array +template< class T , size_t N > +struct algebra_dispatcher< std::array< T , N > > +{ + typedef array_algebra algebra_type; +}; + +} } } + +#endif + + #endif |