Skip to content

Commit

Permalink
Use golden search extrema finder in tide model test
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Corry <[email protected]>
  • Loading branch information
kylecorry31 committed Nov 26, 2024
1 parent 33cd83c commit 1218fbf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.kylecorry.trail_sense.tools.tides

import com.kylecorry.sol.math.optimization.GoldenSearchExtremaFinder
import com.kylecorry.sol.math.statistics.Statistics
import com.kylecorry.sol.science.oceanography.OceanographyService
import com.kylecorry.sol.science.oceanography.TidalHarmonic
Expand Down Expand Up @@ -226,7 +227,7 @@ class TideModelTest {
val ocean = OceanographyService()
val start = expected.first().time.atStartOfDay()
val end = expected.first().time.atEndOfDay()
val actual = ocean.getTides(calculator, start, end)
val actual = ocean.getTides(calculator, start, end, GoldenSearchExtremaFinder(30.0, 1.0))
assertEquals(expected.size, actual.size)
return actual.zip(expected).map {
check(it.first, it.second)
Expand Down

0 comments on commit 1218fbf

Please sign in to comment.