• Main Page
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

intvcapd.h

Go to the documentation of this file.
00001 /// @addtogroup unifexp
00002 /// @{
00003 
00004 /////////////////////////////////////////////////////////////////////////////
00005 ///
00006 /// @file intvcapd.h
00007 ///
00008 /// This file contains some definitions necessary to use intervals
00009 /// from the CAPD library.
00010 /// Please, note that in the most of the code, BOOST intervals are used.
00011 /// However, one may prefer to use the CAPD intervals occassionally,
00012 /// because of the additional functions (sin, cos, log, exp) defined there.
00013 ///
00014 /// @author Pawel Pilarczyk
00015 ///
00016 /////////////////////////////////////////////////////////////////////////////
00017 
00018 // Copyright (C) 2013 by Pawel Pilarczyk.
00019 //
00020 // This file is part of my research program package.  This is free software;
00021 // you can redistribute it and/or modify it under the terms of the GNU
00022 // General Public License as published by the Free Software Foundation;
00023 // either version 2 of the License, or (at your option) any later version.
00024 //
00025 // This software is distributed in the hope that it will be useful,
00026 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00027 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00028 // GNU General Public License for more details.
00029 //
00030 // You should have received a copy of the GNU General Public License along
00031 // with this software; see the file "license.txt".  If not, write to the
00032 // Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00033 // MA 02111-1307, USA.
00034 
00035 // Started on February 3, 2013. Last revision: February 3, 2013.
00036 
00037 #ifndef _intvcapd_h_
00038 #define _intvcapd_h_
00039 
00040 #include "capd/intervals/lib.h"
00041 #ifndef __USE_FILIB__
00042 #include "capd/rounding/DoubleRounding.h"
00043 #endif
00044 
00045 
00046 namespace unifexp {
00047 
00048 // --------------------------------------------------
00049 // ------------- intervals and rounding -------------
00050 // --------------------------------------------------
00051 
00052 /// The type of an interval (from the CAPD library 2.9/3.0 beta).
00053 typedef capd::DInterval IntervalType;
00054 
00055 /// Resets the rounding switches of the processor
00056 /// and sets rounding mode to the default one (to the nearest).
00057 /// It is necessary in some cases, e.g., if the CAPD leaves
00058 /// incorrect rounding mode after doing some interval operations.
00059 /// If the "filib" interval library is used then this function does nothing.
00060 inline void resetRounding ()
00061 {
00062 #ifndef __USE_FILIB__
00063         capd::rounding::DoubleRounding::roundNearest ();
00064 #endif
00065         return;
00066 } /* resetRounding */
00067 
00068 
00069 } // namespace unifexp
00070 
00071 #endif // _intvcapd_h_
00072 
00073 /// @}
00074 

Generated on Sun Feb 3 2013 12:40:31 for The Uniform Expansion Software by  doxygen 1.7.2