From 8e40226da893cec31901c58d225e7ef0bf3f416a Mon Sep 17 00:00:00 2001 From: Yingbo Ma Date: Tue, 13 Oct 2020 19:54:30 -0400 Subject: [PATCH] Fix the readme example --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d70aba956..be93d8355 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Fast implementations of root finding algorithms in Julia that satisfy the SciML common interface. ```julia -using NonlinearSolve +using NonlinearSolve, StaticArrays f(u,p) = u .* u .- 2 u0 = @SVector[1.0, 1.0] @@ -41,9 +41,11 @@ f(u, p) = u .* u .- 2.0 u0 = (1.0, 2.0) # brackets probB = NonlinearProblem(f, u0) solver = init(probB, Falsi()) # Can iterate the solver object -solve!(solver) +solver = solve!(solver) ``` +Note that the `solver` object is actually immutable since we want to make it live on the stack for the sake of performance. + ## Roadmap The current algorithms should support automatic differentiation, though improved adjoint overloads are planned