API Reference
HandyG.libhandyg_path — Function
libhandyg_path() -> StringReturn the filesystem path of the libhandyg shared library (provided by HandyG_jll).
HandyG.HandyG — Module
HandyGJulia bindings for the Fortran library handyG.
The main entrypoints are:
G,G!: scalar evaluation in superflat / flat / condensed formG_batch!: batch evaluation for large workloads (fixed-depth column-major matrices)inum:i0±prescription inputs (structure-of-arrays, allocation-free hot paths)
See docs/src/ for the user manual.
HandyG.INum — Type
INum{T<:Real}Scalar value with an explicit i0± prescription (upstream handyG inum).
Fields:
c::Complex{T}: complex valuei0::Int8:+1or-1
Construct with inum.
HandyG.INumMat — Type
INumMat{T}Structure-of-arrays (SoA) representation of a matrix of inum values, intended for batch calls.
Fields:
c:StridedMatrix{Complex{T}}i0:StridedMatrix{Int8}
Construct with inum.
HandyG.INumVec — Type
INumVec{T}Structure-of-arrays (SoA) representation of a vector of inum values.
Fields:
c:StridedVector{Complex{T}}i0:StridedVector{Int8}
Construct with inum.
HandyG.G! — Method
G!(out::Ref{ComplexF64}, m::AbstractVector{<:Integer}, z, y) -> outConvenience overload for condensed form that accepts any integer element type for m.
This method converts m to the C-ABI element type (Cint) using an internal thread-local scratch buffer. It may allocate only when the scratch buffer grows. For allocation-free hot paths, pass m::Vector{Cint}.
HandyG.G — Method
G(m::AbstractVector{<:Integer}, z, y) -> ComplexF64Convenience overload for condensed form that accepts any integer element type for m.
This method converts m to the C-ABI element type (Cint) using an internal thread-local scratch buffer. It may allocate only when the scratch buffer grows. For allocation-free hot paths, pass m::Vector{Cint}.
HandyG.G — Method
G(g::StridedVector{Float64}) -> ComplexF64
G(g::StridedVector{ComplexF64}) -> ComplexF64
G(z::StridedVector, y) -> ComplexF64
G(m::StridedVector{Cint}, z::StridedVector, y) -> ComplexF64
G(z::INumVec, y::INum) -> ComplexF64
G(m::StridedVector{Cint}, z::INumVec, y::INum) -> ComplexF64Evaluate a generalized polylogarithm using handyG.
Dispatch selects one of the upstream calling conventions:
- superflat:
G(g)whereg = [z..., y] - flat:
G(z, y) - condensed:
G(m, z, y)
For explicit i0± prescriptions, use inum inputs.
HandyG.G_batch! — Method
G_batch!(out, args..., len::AbstractVector{<:Integer}) -> outConvenience overloads that accept any integer element type for len (and m in condensed form).
For len, these methods convert to Cint using an internal thread-local scratch buffer and may allocate only when the scratch buffer grows. For condensed batch m, a Matrix{Cint} is allocated for ABI compatibility.
For allocation-free hot paths, pass len::Vector{Cint} and (if applicable) m::Matrix{Cint}.
HandyG.G_batch! — Method
G_batch!(out, g, len) -> out
G_batch!(out, z, y, len) -> out
G_batch!(out, m, z, y, len) -> outBatched evaluation for many independent GPL calls.
Batch inputs use fixed-depth column-major matrices (depth_max, N) and a len::Vector{Cint} giving the active length of each column. Results are written to out::Vector{ComplexF64} of length N.
HandyG.clearcache! — Method
clearcache!()
clearcache()Clear handyG's internal caches.
The upstream authors recommend calling this between phase-space points in Monte Carlo workloads.
HandyG.inum — Method
inum(z::Complex{T}, i0::Integer=+1) where {T<:Real} -> INum{T}
inum(x::T, i0::Integer=+1) where {T<:Real} -> INum{T}
inum(c::StridedVector{Complex{T}}, i0::StridedVector{Int8}) where {T<:Real} -> INumVec{T}
inum(c::StridedMatrix{Complex{T}}, i0::StridedMatrix{Int8}) where {T<:Real} -> INumMat{T}Create i0±-aware inputs (upstream handyG inum).
i0 should be Int8(+1) or Int8(-1). For complex values with non-zero imaginary part, upstream handyG treats the sign of imag(z) as the prescription regardless of i0.
HandyG.inum — Method
inum(c::StridedVector{Complex{T}}, i0::AbstractVector{<:Integer}) where {T<:Real} -> INumVec{T}Convenience overload accepting any integer element type for i0.
This allocates a temporary Vector{Int8}. For allocation-free hot paths, pass i0::Vector{Int8}.
HandyG.inum — Method
inum(c::StridedMatrix{Complex{T}}, i0::AbstractMatrix{<:Integer}) where {T<:Real} -> INumMat{T}Convenience overload accepting any integer element type for i0.
This allocates a temporary Matrix{Int8}. For allocation-free hot paths, pass i0::Matrix{Int8}.
HandyG.set_hoelder_circle! — Method
set_hoelder_circle!(x::Float64)Set the Hölder circle size (hCircle in the upstream API).
HandyG.set_lidelta! — Method
set_lidelta!(x::Float64)Set the polylog series truncation threshold (Lidel in the upstream API).
HandyG.set_mpldelta! — Method
set_mpldelta!(x::Float64)Set the MPL truncation threshold (MPLdel in the upstream API).
HandyG.set_options! — Method
set_options!(; mpldelta=nothing, lidelta=nothing, hoelder_circle=nothing)Convenience wrapper to set multiple runtime options at once.