From d13d56d8dce0bff32d6c6c8e01d0a6ed1ede1e6a Mon Sep 17 00:00:00 2001 From: Mikhail Kagalenko <16374215+kagalenko-m-b@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:31:37 +0300 Subject: [PATCH] Rename project to comply with Julia registry rules --- README.md | 4 ++-- src/{FMin.jl => Fminbnd.jl} | 8 ++++---- test/runtests.jl | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) rename src/{FMin.jl => Fminbnd.jl} (96%) diff --git a/README.md b/README.md index 37b25ec..b16f2d4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# FMin +# Fminbnd -[![Build Status](https://github.com/kagalenko-m-b/FMin.jl/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/kagalenko-m-b/FMin.jl/actions/workflows/CI.yml?query=branch%3Amaster) +[![Build Status](https://github.com/kagalenko-m-b/Fminbnd.jl/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/kagalenko-m-b/Fminbnd.jl/actions/workflows/CI.yml?query=branch%3Amaster) Literal rewrite in Julia of Fortran routine [fmin](http://www.netlib.org/fmm/fmin.f) from Netlib. diff --git a/src/FMin.jl b/src/Fminbnd.jl similarity index 96% rename from src/FMin.jl rename to src/Fminbnd.jl index 913bee9..6beab28 100644 --- a/src/FMin.jl +++ b/src/Fminbnd.jl @@ -1,8 +1,8 @@ -module FMin +module Fminbnd -export fmin +export fminbnd """ - x = fmin(ax, bx, f, tol) + x = fminbnd(ax, bx, f, tol) an approximation x to the point where f attains a minimum on @@ -48,7 +48,7 @@ minimization without derivatives, prentice - hall, inc. (1973). Rewrite in Julia of [fmin from Netlib](http://www.netlib.org/fmm/fmin.f) by Mikhail Kagalenko, January 2024 """ -function fmin(ax::T, bx::T, f::Function, tol::T=eps(T)) where T<:AbstractFloat +function fminbnd(ax::T, bx::T, f::Function, tol::T=eps(T)) where T<:AbstractFloat # # c is the squared inverse of the golden ratio # diff --git a/test/runtests.jl b/test/runtests.jl index 34eb53d..0c5906f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,11 +1,11 @@ -using FMin +using Fminbnd using Test -@testset "FMin.jl" begin +@testset "Fminbnd.jl" begin tol = 1e-8 ax = -4.0 bx = 0.0 x = -pi/2 - xmin = fmin(ax, bx, sin, tol) + xmin = fminbnd(ax, bx, sin, tol) @test abs(xmin - x) <= 10*tol end