Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /*
0002  [auto_generated]
0003  boost/numeric/odeint/algebra/detail/norm_inf.hpp
0004 
0005  [begin_description]
0006  Default reduce implementation.
0007  [end_description]
0008 
0009  Copyright 2013 Karsten Ahnert
0010  Copyright 2013 Mario Mulansky
0011 
0012  Distributed under the Boost Software License, Version 1.0.
0013  (See accompanying file LICENSE_1_0.txt or
0014  copy at http://www.boost.org/LICENSE_1_0.txt)
0015  */
0016 
0017 
0018 #ifndef BOOST_NUMERIC_ODEINT_ALGEBRA_DETAIL_NORM_INF_HPP_INCLUDED
0019 #define BOOST_NUMERIC_ODEINT_ALGEBRA_DETAIL_NORM_INF_HPP_INCLUDED
0020 
0021 #include <cmath>
0022 
0023 namespace boost {
0024 namespace numeric {
0025 namespace odeint {
0026 namespace detail {
0027 
0028 template< typename Value , class Iterator1 >
0029 inline Value norm_inf( Iterator1 first1 , Iterator1 last1 , Value init )
0030 {
0031     using std::max;
0032     using std::abs;
0033     for( ; first1 != last1 ; )
0034         init = max( init , abs( *first1++ ) );
0035     return init;
0036 }
0037 
0038 
0039 } // detail
0040 } // odeint
0041 } // numeric
0042 } // boost
0043 
0044 
0045 #endif // BOOST_NUMERIC_ODEINT_ALGEBRA_DETAIL_NORM_INF_HPP_INCLUDED