Skip to content

Commit 0b1ea37

Browse files
committed
update for LevenbergMarquardt kwargs
1 parent 6401a2d commit 0b1ea37

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ KernelDensityEstimate = "0.5.6"
6767
ManifoldDiff = "0.3"
6868
Manifolds = "0.8.15"
6969
ManifoldsBase = "0.13.12, 0.14"
70+
Manopt = "0.4.27"
7071
MetaGraphs = "0.7"
7172
NLSolversBase = "7.6"
7273
NLsolve = "3, 4"

src/ParametricManoptDev.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ function solve_RLM(
174174
fg,
175175
frontals::Vector{Symbol} = ls(fg),
176176
separators::Vector{Symbol} = setdiff(ls(fg), frontals);
177+
kwargs...
177178
)
178179

179180
# get the subgraph formed by all frontals, separators and fully connected factors
@@ -226,7 +227,7 @@ function solve_RLM(
226227
p0 = deepcopy(fro_p)
227228

228229
initial_residual_values = zeros(num_components)
229-
initial_jacF = zeros(num_components, manifold_dimension(MM))
230+
initial_jacobian_f = zeros(num_components, manifold_dimension(MM))
230231
#
231232
#HEX solve
232233
# sparse J 0.025235 seconds (133.65 k allocations: 9.964 MiB
@@ -240,13 +241,14 @@ function solve_RLM(
240241
num_components;
241242
evaluation=InplaceEvaluation(),
242243
initial_residual_values,
243-
initial_jacF,
244+
initial_jacobian_f,
245+
kwargs...
244246
)
245247

246248
return vartypeslist, lm_r
247249
end
248250

249-
function solve_RLM_sparse(fg)
251+
function solve_RLM_sparse(fg; kwargs...)
250252

251253
# get the subgraph formed by all frontals, separators and fully connected factors
252254
varlabels = ls(fg)
@@ -309,6 +311,7 @@ function solve_RLM_sparse(fg)
309311
evaluation=InplaceEvaluation(),
310312
initial_residual_values,
311313
initial_jacobian_f,
314+
kwargs...
312315
)
313316

314317
return vartypeslist, lm_r

src/services/GraphInit.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ function initVariable!(
351351
if solveKey == :parametric
352352
μ, iΣ = getMeasurementParametric(samplable_belief)
353353
vnd = getSolverData(variable, solveKey)
354-
vnd.val[1] .= getPoint(getVariableType(variable), μ)
354+
vnd.val[1] = getPoint(getVariableType(variable), μ)
355355
vnd.bw .= inv(iΣ)
356356
else
357357
points = [samplePoint(M, samplable_belief) for _ = 1:N]

0 commit comments

Comments
 (0)