numerix_doc 0.4
/Users/mourrain/Devel/mmx/numerix/include/numerix/complex_interval.hpp
Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : complex_interval.hpp
00004 * DESCRIPTION: Complexified intervals
00005 * COPYRIGHT  : (C) 2005  Joris van der Hoeven
00006 *******************************************************************************
00007 * This software falls under the GNU general public license and comes WITHOUT
00008 * ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for more details.
00009 * If you don't have this file, write to the Free Software Foundation, Inc.,
00010 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00011 ******************************************************************************/
00012 
00013 #ifndef __MMX_COMPLEX_INTERVAL_HPP
00014 #define __MMX_COMPLEX_INTERVAL_HPP
00015 #include <numerix/interval.hpp>
00016 #include <numerix/complex.hpp>
00017 namespace mmx {
00018 #define TMPL template<typename C>
00019 #define Interval interval<C>
00020 #define Complex complex<C>
00021 #define Complex_interval complex<interval<C> >
00022 
00023 TMPL
00024 struct make_ball_helper<Complex_interval,Complex,C> {
00025   static inline Complex_interval val (const Complex& c, const C& r) {
00026     return Complex_interval (make_ball<Interval,C,C> (Re (c), r),
00027                                 make_ball<Interval,C,C> (Im (c), r)); }
00028 };
00029 
00030 TMPL inline C abs_down (const Complex_interval& z) {
00031   return lower (abs (z)); }
00032 TMPL inline C abs_up (const Complex_interval& z) {
00033   return upper (abs (z)); }
00034 
00035 #undef TMPL
00036 #undef Interval
00037 #undef Complex
00038 #undef Complex_interval
00039 } // namespace mmx
00040 #endif // __MMX_COMPLEX_HPP
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines