Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Olivier Mullier
interval_integrals
Commits
42f4baff
Commit
42f4baff
authored
Apr 04, 2019
by
Olivier Mullier
Browse files
nouvelle version de création
parent
e2e3b4d8
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/integralii.cpp
View file @
42f4baff
...
...
@@ -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
();
...
...
src/integralii.h
View file @
42f4baff
...
...
@@ -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
;};
...
...
src/main.cpp
View file @
42f4baff
...
...
@@ -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
,
1
0
);
ibex
::
Interval
sup_inter
(
7
,
1
5
);
IntegralII
integ_inter
(
inf_inter
,
sup_inter
,
&
f
);
integ_inter
.
compute_integral
();
cout
<<
"Result: "
<<
endl
;
cout
<<
integ_inter
<<
endl
;
return
EXIT_SUCCESS
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment