Yagami.YagamiCore.Zbrent
— MethodZbrent{F,T<:AbstractFloat}(f::F, a::T, fx::T, x::T, b::T, tol::T, itermax::Int=100, __iter::Int=0)
Create a new instance of Zbrent
for finding the minimum of a function f
. The parameters are:
f
: the function to find the minimum of.itermax
: the maximum number of iterations to perform.tol
: the tolerance for convergence. (note it is not the absolute tolerance)
Yagami.YagamiCore.Zbrent
— Method`Zbrent([type=Float64]; f::F, itermax::Int=100, tol::T=T(TOL)) where {F,T<:AbstractFloat}`
Create a new instance of Zbrent
for finding the minimum of a function f
. The parameters are:
type
: the type of the floating point numbers to use (default isFloat64
).f
: the function to find the minimum of.itermax
: the maximum number of iterations to perform.tol
: the tolerance for convergence (default isT(TOL)
).
Yagami.YagamiCore.bracketmin
— Methodbracketmin(z::Zbrent{F,T},min_val=0.0,multiplier=2.0) where {F,T<:AbstractFloat} Bracket the function z.f
to find a minimum. This function sets the initial bounds for the Brent's method. It uses the golden section search to find a point where the function value is lower than the initial bounds.
Yagami.YagamiCore.findraymin
— Methodfindraymin(zb::Zbrent{F,T}) where {F,T<:AbstractFloat}
Find the minimum of the function zb.f
using the Brent's method. The function zb.f
must be defined such that it returns a value for a given input x
. The method uses a combination of bisection, secant, and inverse quadratic interpolation to find the minimum.
Yagami.YagamiCore.infologger
— Methodinfologger(filename::String)
Create a logger that writes log messages to a file. This logger uses the FormatLogger
to format messages and write them to the specified file.