integrale_sol.h 1.75 KB
Newer Older
Olivier Mullier's avatar
Olivier Mullier committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
 * <one line to give the library's name and an idea of what it does.>
 * Copyright (C) 2019  <copyright holder> <email>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef INTEGRALE_SOL_H
#define INTEGRALE_SOL_H

#include "zero.h"

/**
 * @todo write docs
 */
class integrale_sol
{
private:
    zero * _inf;
    zero * _sup;
    ibex::Interval _res_integrale;
    bool _min_candidate;
    bool _max_candidate;
    
public:
Olivier Mullier's avatar
Olivier Mullier committed
37
    integrale_sol(zero *inf, zero *sup, const ibex::Interval & res);
Olivier Mullier's avatar
Olivier Mullier committed
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
    
    inline zero * get_inf_bound() const {return _inf;};
    inline zero * get_sup_bound() const {return _sup;};
    inline ibex::Interval get_res_integrale() const {return _res_integrale;};
    inline bool is_min_candidate(){return _min_candidate;};
    inline bool is_max_candidate(){return _max_candidate;};
    void set_min_candidate(bool min){_min_candidate = min;};
    void set_max_candidate(bool max){_max_candidate = max;};
    
    
    integrale_sol & operator+=(const integrale_sol &rhs);
};

integrale_sol operator+(const integrale_sol &, const integrale_sol &);
std::ostream& operator<<(std::ostream& os, const integrale_sol& inte_sol);

#endif // INTEGRALE_SOL_H