Skip to content
Snippets Groups Projects
Commit 8b96b264 authored by Olivier Cots's avatar Olivier Cots
Browse files

Update tester_algo_newton.jl

parent 08f7ada5
No related branches found
No related tags found
No related merge requests found
...@@ -5,8 +5,8 @@ Tester l'algorithme de Newton local ...@@ -5,8 +5,8 @@ Tester l'algorithme de Newton local
* afficher : (Bool) affichage ou non des résultats de chaque test * afficher : (Bool) affichage ou non des résultats de chaque test
# Les cas de test (dans l'ordre) # Les cas de test (dans l'ordre)
* fct 1 : x011,x012 * fct 1 : x011, x012
* fct 2 : x021,x022 * fct 2 : x021, x022, x023
""" """
function tester_algo_newton(afficher::Bool,Algorithme_De_Newton::Function) function tester_algo_newton(afficher::Bool,Algorithme_De_Newton::Function)
max_iter = 100 max_iter = 100
...@@ -113,7 +113,7 @@ function tester_algo_newton(afficher::Bool,Algorithme_De_Newton::Function) ...@@ -113,7 +113,7 @@ function tester_algo_newton(afficher::Bool,Algorithme_De_Newton::Function)
sol = [-4.99999958629818e9, 8.673617379884035e-19] sol = [-4.99999958629818e9, 8.673617379884035e-19]
x_min, fx_min, flag, nb_iters = Algorithme_De_Newton(fct2,grad_fct2,hess_fct2,pts1.x023,options) x_min, fx_min, flag, nb_iters = Algorithme_De_Newton(fct2,grad_fct2,hess_fct2,pts1.x023,options)
if (afficher) if (afficher)
afficher_resultats("algorithme de Newton ","fct2","x022",x_min,fx_min,flag,sol_exacte_fct2,nb_iters) afficher_resultats("algorithme de Newton ","fct2","x023",x_min,fx_min,flag,sol_exacte_fct2,nb_iters)
end end
@testset "solution" begin @testset "solution" begin
@test x_min sol atol = tol_erreur @test x_min sol atol = tol_erreur
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment