Commit 42f4baff authored by Olivier Mullier's avatar Olivier Mullier
Browse files

nouvelle version de création

parent e2e3b4d8
......@@ -114,12 +114,10 @@ void IntegralII::compute_integral()
it_sols ++;
}
delete current;
//Calcul de l'intégrale entre les intervalles
IntegralRR integrale_milieu(_inf_endpoint.ub(), _sup_endpoint.lb(), _f);
_solution.first = min + integrale_milieu;
_solution.second = max + integrale_milieu;
//=======================================================================
current = new ibex::Interval(_sup_endpoint.ub());
res_temp.clear();
......
......@@ -38,7 +38,7 @@ private:
std::list<ibex::Interval*>& compute_list_of_zeros(ibex::Interval searchdomain);
public:
IntegralII(const ibex::Interval & inf, const ibex::Interval & sup, ibex::Function * f) : _inf_endpoint(inf), _sup_endpoint(sup), _f(f){};
IntegralII(const ibex::Interval & inf, const ibex::Interval & sup, ibex::Function * f) : _inf_endpoint(inf), _sup_endpoint(sup), _f(f){compute_integral();};
ibex::Interval get_inf_endpoint() const {return _inf_endpoint;};
ibex::Interval get_sup_endpoint() const {return _sup_endpoint;};
......
......@@ -5,12 +5,11 @@
int main(){
cout << setprecision(15);
ibex::Variable x(1);
ibex::Function f(x, ibex::sin(x));
ibex::Function f(x, ibex::cos(x));
ibex::Interval inf_inter(0, 5);
ibex::Interval sup_inter(9, 10);
ibex::Interval sup_inter(7, 15);
IntegralII integ_inter(inf_inter, sup_inter, &f);
integ_inter.compute_integral();
cout << "Result: " << endl;
cout << integ_inter << endl;
return EXIT_SUCCESS;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment