File indexing completed on 2025-01-18 09:42:51
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef BOOST_NUMERIC_ODEINT_MTL4_MTL4_ALGEBRA_DISPATCHER_HPP_INCLUDED
0018 #define BOOST_NUMERIC_ODEINT_MTL4_MTL4_ALGEBRA_DISPATCHER_HPP_INCLUDED
0019
0020 #include <boost/numeric/mtl/mtl.hpp>
0021
0022 #include <boost/numeric/odeint/algebra/vector_space_algebra.hpp>
0023 #include <boost/numeric/odeint/algebra/algebra_dispatcher.hpp>
0024
0025 namespace boost {
0026 namespace numeric {
0027 namespace odeint {
0028
0029 template<typename Value, typename Parameters>
0030 struct algebra_dispatcher< mtl::dense_vector< Value , Parameters > >
0031 {
0032 typedef vector_space_algebra algebra_type;
0033 };
0034
0035 template<typename Value, typename Parameters>
0036 struct algebra_dispatcher< mtl::dense2D< Value , Parameters > >
0037 {
0038 typedef vector_space_algebra algebra_type;
0039 };
0040
0041 template<typename Value , size_t BitMask , typename Parameters>
0042 struct algebra_dispatcher< mtl::morton_dense< Value , BitMask, Parameters > >
0043 {
0044 typedef vector_space_algebra algebra_type;
0045 };
0046
0047 template<typename Value, typename Parameters>
0048 struct algebra_dispatcher< mtl::compressed2D< Value , Parameters > >
0049 {
0050 typedef vector_space_algebra algebra_type;
0051 };
0052
0053
0054
0055 template<typename Value, typename Parameters>
0056 struct vector_space_norm_inf< mtl::dense_vector< Value , Parameters > >
0057 {
0058 typedef Value result_type;
0059 Value operator()( const mtl::dense_vector< Value , Parameters > &x ) const
0060 {
0061 return mtl::infinity_norm(x);
0062 }
0063 };
0064
0065 template<typename Value, typename Parameters>
0066 struct vector_space_norm_inf< mtl::dense2D< Value , Parameters > >
0067 {
0068 typedef Value result_type;
0069 Value operator()( const mtl::dense2D< Value , Parameters > &x ) const
0070 {
0071 return mtl::infinity_norm(x);
0072 }
0073 };
0074
0075 template<typename Value , size_t BitMask , typename Parameters>
0076 struct vector_space_norm_inf< mtl::morton_dense< Value , BitMask , Parameters > >
0077 {
0078 typedef Value result_type;
0079 Value operator()( const mtl::morton_dense< Value , BitMask , Parameters > &x ) const
0080 {
0081 return mtl::infinity_norm(x);
0082 }
0083 };
0084
0085 template<typename Value, typename Parameters>
0086 struct vector_space_norm_inf< mtl::compressed2D< Value , Parameters > >
0087 {
0088 typedef Value result_type;
0089 Value operator()( const mtl::compressed2D< Value , Parameters > &x ) const
0090 {
0091 return mtl::infinity_norm(x);
0092 }
0093 };
0094
0095 }
0096 }
0097 }
0098
0099 #endif