Skip to content

Commit

Permalink
generalize type
Browse files Browse the repository at this point in the history
  • Loading branch information
francescoalemanno committed Mar 18, 2022
1 parent 5d7dffc commit 220204a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/FixedPoint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ returns a named tuple (x, error, iters) where:
`iters` : total number of iterations performed
"""
function afps(
f,
x;
f::Fun,
x::Mat;
iters::Int = 5000,
vel::Float64 = 0.9,
ep::Float64 = 0.01,
tol::Float64 = 1e-12,
vel::T = 0.9,
ep::T = 0.01,
tol::T = 1e-12,
grad_norm = x -> maximum(abs, x),
)
) where {T <: Number, Mat<:Union{AbstractArray{T},T}, Fun <: Function}
x_n = identity.(x)
v_n = zero(x_n)
β = vel
Expand Down

0 comments on commit 220204a

Please sign in to comment.