Skip to content

Commit

Permalink
Fix precompile and aqua issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Bazdresch committed Apr 25, 2023
1 parent 97365de commit 5e2df5a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ version = "0.1.0"
[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LsqFit = "2fda8390-95c7-5789-9bda-21331edee243"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
LsqFit = "0.13"
RecipesBase = "1"
PrecompileTools = "1"
RecipesBase = "1"
Zygote = "0.6"
julia = "1.8"

[extras]
Expand Down
25 changes: 17 additions & 8 deletions src/SinusoidalRegressions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Sinusoidal parameters SinusoidP{Float64}:
See the documentation for more details.
"""
sinfit(p::Problem, a::Algorithm) = sinfit(p, a)
sinfit(p::Problem, a::Algorithm) = "Not implemented."

function sinfit(p::Sin3Problem, ::IEEE1057)
ieee1057(p)
Expand Down Expand Up @@ -152,14 +152,23 @@ torect(M, θ) = (-M*sin(θ), M*cos(θ))
x = [-1.983, -1.948, -1.837, -1.827, -1.663, -0.815, -0.778, -0.754, -0.518, 0.322, 0.418, 0.781,
0.931, 1.510, 1.607]
y = [ 0.936, 0.810, 0.716, 0.906, 0.247, -1.513, -1.901, -1.565, -1.896, 0.051, 0.021, 1.069,
0.862, 0.183, 0.311]
0.862, 0.183, 0.311]
@compile_workload begin
t2 = ieee1057(x, y)
t1 = ieee1057(x, y, 1.5)
t3 = sinfit_j(x, y)
t4 = sinfit(x, y, initialguess = t3)
t5 = mixlinsinfit_j(x, y)
t6 = mixlinsinfit(x, y, t5)
p1 = Sin3Problem(x, y, 1.5)
t2 = sinfit(p1, IEEE1057())
t3 = sinfit(p1, LevMar())

p2 = Sin4Problem(x, y, f = 1.5)
t4 = sinfit(p2, IEEE1057())
t5 = sinfit(p2, IntegralEquations())
t6 = sinfit(p2, LevMar())
t7 = sinfit(p2, Liang())

p3 = MixedLinSin4Problem(x, y, 1.5)
t8 = sinfit(p3, LevMar())

p4 = MixedLinSin5Problem(x, y)
t9 = sinfit(p3, IntegralEquations())
end
end

Expand Down

0 comments on commit 5e2df5a

Please sign in to comment.