Commit 42f4baff6beacbda06a7d18cd7270e206d57abf7

Authored by Olivier Mullier
1 parent e2e3b4d8

nouvelle version de création

Showing 3 changed files with 3 additions and 6 deletions   Show diff stats
src/integralii.cpp
... ... @@ -114,12 +114,10 @@ void IntegralII::compute_integral()
114 114 it_sols ++;
115 115 }
116 116 delete current;
117   -
118 117 //Calcul de l'intégrale entre les intervalles
119 118 IntegralRR integrale_milieu(_inf_endpoint.ub(), _sup_endpoint.lb(), _f);
120 119 _solution.first = min + integrale_milieu;
121 120 _solution.second = max + integrale_milieu;
122   -
123 121 //=======================================================================
124 122 current = new ibex::Interval(_sup_endpoint.ub());
125 123 res_temp.clear();
... ...
src/integralii.h
... ... @@ -38,7 +38,7 @@ private:
38 38 std::list<ibex::Interval*>& compute_list_of_zeros(ibex::Interval searchdomain);
39 39  
40 40 public:
41   - IntegralII(const ibex::Interval & inf, const ibex::Interval & sup, ibex::Function * f) : _inf_endpoint(inf), _sup_endpoint(sup), _f(f){};
  41 + IntegralII(const ibex::Interval & inf, const ibex::Interval & sup, ibex::Function * f) : _inf_endpoint(inf), _sup_endpoint(sup), _f(f){compute_integral();};
42 42  
43 43 ibex::Interval get_inf_endpoint() const {return _inf_endpoint;};
44 44 ibex::Interval get_sup_endpoint() const {return _sup_endpoint;};
... ...
src/main.cpp
... ... @@ -5,12 +5,11 @@
5 5 int main(){
6 6 cout << setprecision(15);
7 7 ibex::Variable x(1);
8   - ibex::Function f(x, ibex::sin(x));
  8 + ibex::Function f(x, ibex::cos(x));
9 9 ibex::Interval inf_inter(0, 5);
10   - ibex::Interval sup_inter(9, 10);
  10 + ibex::Interval sup_inter(7, 15);
11 11  
12 12 IntegralII integ_inter(inf_inter, sup_inter, &f);
13   - integ_inter.compute_integral();
14 13 cout << "Result: " << endl;
15 14 cout << integ_inter << endl;
16 15 return EXIT_SUCCESS;
... ...