12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #ifndef BOOST_NUMERIC_ODEINT_ALGEBRA_DETAIL_NORM_INF_HPP_INCLUDED
- #define BOOST_NUMERIC_ODEINT_ALGEBRA_DETAIL_NORM_INF_HPP_INCLUDED
- #include <cmath>
- #include <algorithm>
- namespace boost {
- namespace numeric {
- namespace odeint {
- namespace detail {
- template< typename Value , class Iterator1 >
- inline Value norm_inf( Iterator1 first1 , Iterator1 last1 , Value init )
- {
- using std::max;
- using std::abs;
- for( ; first1 != last1 ; )
- init = max( init , abs( *first1++ ) );
- return init;
- }
- }
- }
- }
- }
- #endif
|