MAiNGO
intervalLibrary.h
Go to the documentation of this file.
1 /**********************************************************************************
2  * Copyright (c) 2019 Process Systems Engineering (AVT.SVT), RWTH Aachen University
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License 2.0 which is available at
6  * http://www.eclipse.org/legal/epl-2.0.
7  *
8  * SPDX-License-Identifier: EPL-2.0
9  *
10  * @file intervalLibrary.h
11  *
12  * @brief File defining the interval library to be used and defines the resulting McCormick types.
13  *
14  **********************************************************************************/
15 
16 #pragma once
17 
18 
19 // The interval library to be used is now set via CMake:
20 // - If the CMake option MAiNGO_use_filib is enabled, the pre-processor variable USE_FILIB will be set automatically and filib++ will be used.
21 // - Otherwise, the more basic interval library within MC++ will be used.
22 
23 #ifdef USE_FILIB
24 
25 #include "mcfilib.hpp"
26 
32 typedef filib::interval<double, filib::rounding_strategy::native_switched, filib::interval_mode::i_mode_extended> I;
33 #undef FILIB_TERMINATE // Define this variable if you use filib::interval<double> instead of the above type
34 
35 #else
36 
37 #include "interval.hpp"
38 
44 typedef mc::Interval I;
45 
46 #endif
47 
48 #include "ffunc.hpp"
49 #include "mccormick.hpp"
50 #include "vmccormick.hpp"
51 
57 typedef mc::McCormick<I> MC;
58 
64 typedef mc::vMcCormick<I> vMC;
mc::vMcCormick< I > vMC
A type definition for a vector McCormick variable.
Definition: intervalLibrary.h:64
mc::Interval I
A type definition for an Interval variable using MC++ library.
Definition: intervalLibrary.h:44
mc::McCormick< I > MC
A type definition for a McCormick variable.
Definition: intervalLibrary.h:57