Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support StaticArrays (MVector) #242

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/levenberg_marquardt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ function Base.show(io::IO, tr::LMTrace)
return
end

struct LMResults{O,T,Tval,N}
struct LMResults{O,T,Tval,N,Arr<:AbstractArray{T, N}}
method::O
initial_x::Array{T,N}
minimizer::Array{T,N}
initial_x::Arr
minimizer::Arr
minimum::Tval
iterations::Int
iteration_converged::Bool
Expand Down Expand Up @@ -146,8 +146,8 @@ function levenberg_marquardt(
# Create buffers
n = length(x)
m = length(value(df))
JJ = Matrix{T}(undef, n, n)
n_buffer = Vector{T}(undef, n)
JJ = transpose(jacobian(df))*jacobian(df)
n_buffer = similar(x)
Jdelta_buffer = similar(value(df))

# and an alias for the jacobian
Expand Down