diff --git a/src/CloudGraphsDFG/services/CloudGraphsDFG.jl b/src/CloudGraphsDFG/services/CloudGraphsDFG.jl index 6b543ad2..7ccc23cb 100644 --- a/src/CloudGraphsDFG/services/CloudGraphsDFG.jl +++ b/src/CloudGraphsDFG/services/CloudGraphsDFG.jl @@ -236,8 +236,8 @@ function getVariable(dfg::CloudGraphsDFG, label::Union{Symbol, String}) for ppe in listPPEs(dfg, label) variable.ppeDict[ppe] = getPPE(dfg, label, ppe) end - for solverKey in listVariableSolverData(dfg, label) - variable.solverDataDict[solverKey] = getVariableSolverData(dfg, label, solverKey) + for solveKey in listVariableSolverData(dfg, label) + variable.solverDataDict[solveKey] = getVariableSolverData(dfg, label, solveKey) end dataDict = getDataEntries(dfg, label) for (k,v) in dataDict @@ -543,7 +543,7 @@ function _unpackPPE(dfg::G, packedPPE::Dict{String, Any})::AbstractPointParametr end function listPPEs(dfg::CloudGraphsDFG, variablekey::Symbol; currentTransaction::Union{Nothing, Neo4j.Transaction}=nothing)::Vector{Symbol} - return _listVarSubnodesForType(dfg, variablekey, MeanMaxPPE, "solverKey"; currentTransaction=currentTransaction) + return _listVarSubnodesForType(dfg, variablekey, MeanMaxPPE, "solveKey"; currentTransaction=currentTransaction) end function getPPE(dfg::CloudGraphsDFG, variablekey::Symbol, ppekey::Symbol=:default; currentTransaction::Union{Nothing, Neo4j.Transaction}=nothing)::AbstractPointParametricEst @@ -578,8 +578,8 @@ function addPPE!(dfg::CloudGraphsDFG, ppe::P; currentTransaction::Union{Nothing, Neo4j.Transaction}=nothing)::AbstractPointParametricEst where {P <: AbstractPointParametricEst} - if ppe.solverKey in listPPEs(dfg, variablekey, currentTransaction=currentTransaction) - error("PPE '$(ppe.solverKey)' already exists") + if ppe.solveKey in listPPEs(dfg, variablekey, currentTransaction=currentTransaction) + error("PPE '$(ppe.solveKey)' already exists") end softType = getSofttype(dfg, variablekey) # Add additional properties for the PPE @@ -600,8 +600,8 @@ function updatePPE!( ppe::P; currentTransaction::Union{Nothing, Neo4j.Transaction}=nothing)::P where {P <: AbstractPointParametricEst} - if !(ppe.solverKey in listPPEs(dfg, variablekey, currentTransaction=currentTransaction)) - @warn "PPE '$(ppe.solverKey)' does not exist, adding" + if !(ppe.solveKey in listPPEs(dfg, variablekey, currentTransaction=currentTransaction)) + @warn "PPE '$(ppe.solveKey)' does not exist, adding" end softType = getSofttype(dfg, variablekey, currentTransaction=currentTransaction) # Add additional properties for the PPE @@ -727,11 +727,11 @@ function _unpackVariableNodeData(dfg::G, packedDict::Dict{String, Any})::Variabl end function listVariableSolverData(dfg::CloudGraphsDFG, variablekey::Symbol; currentTransaction::Union{Nothing, Neo4j.Transaction}=nothing)::Vector{Symbol} - return _listVarSubnodesForType(dfg, variablekey, VariableNodeData, "solverKey"; currentTransaction=currentTransaction) + return _listVarSubnodesForType(dfg, variablekey, VariableNodeData, "solveKey"; currentTransaction=currentTransaction) end -function getVariableSolverData(dfg::CloudGraphsDFG, variablekey::Symbol, solverKey::Symbol=:default; currentTransaction::Union{Nothing, Neo4j.Transaction}=nothing)::VariableNodeData - properties = _getVarSubnodeProperties(dfg, variablekey, VariableNodeData, solverKey; currentTransaction=currentTransaction) +function getVariableSolverData(dfg::CloudGraphsDFG, variablekey::Symbol, solveKey::Symbol=:default; currentTransaction::Union{Nothing, Neo4j.Transaction}=nothing)::VariableNodeData + properties = _getVarSubnodeProperties(dfg, variablekey, VariableNodeData, solveKey; currentTransaction=currentTransaction) return _unpackVariableNodeData(dfg, properties) end @@ -739,8 +739,8 @@ function addVariableSolverData!(dfg::CloudGraphsDFG, variablekey::Symbol, vnd::VariableNodeData; currentTransaction::Union{Nothing, Neo4j.Transaction}=nothing)::VariableNodeData - if vnd.solverKey in listVariableSolverData(dfg, variablekey, currentTransaction=currentTransaction) - error("Solver data '$(vnd.solverKey)' already exists") + if vnd.solveKey in listVariableSolverData(dfg, variablekey, currentTransaction=currentTransaction) + error("Solver data '$(vnd.solveKey)' already exists") end retPacked = _matchmergeVariableSubnode!( dfg, @@ -758,8 +758,8 @@ function updateVariableSolverData!(dfg::CloudGraphsDFG, useCopy::Bool=true, fields::Vector{Symbol}=Symbol[]; currentTransaction::Union{Nothing, Neo4j.Transaction}=nothing)::VariableNodeData - if !(vnd.solverKey in listVariableSolverData(dfg, variablekey, currentTransaction=currentTransaction)) - @warn "Solver data '$(vnd.solverKey)' does not exist, adding rather than updating." + if !(vnd.solveKey in listVariableSolverData(dfg, variablekey, currentTransaction=currentTransaction)) + @warn "Solver data '$(vnd.solveKey)' does not exist, adding rather than updating." end # TODO: Update this to use the selective parameters from fields. retPacked = _matchmergeVariableSubnode!( @@ -772,13 +772,13 @@ function updateVariableSolverData!(dfg::CloudGraphsDFG, return _unpackVariableNodeData(dfg, retPacked) end -function deleteVariableSolverData!(dfg::CloudGraphsDFG, variablekey::Symbol, solverKey::Symbol=:default; currentTransaction::Union{Nothing, Neo4j.Transaction}=nothing)::VariableNodeData +function deleteVariableSolverData!(dfg::CloudGraphsDFG, variablekey::Symbol, solveKey::Symbol=:default; currentTransaction::Union{Nothing, Neo4j.Transaction}=nothing)::VariableNodeData retPacked = _deleteVarSubnode!( dfg, variablekey, :SOLVERDATA, _getLabelsForType(dfg, VariableNodeData, parentKey=variablekey), - solverKey, + solveKey, currentTransaction=currentTransaction) return _unpackVariableNodeData(dfg, retPacked) end @@ -839,12 +839,12 @@ function updateVariableSolverData!(dfg::CloudGraphsDFG, end function mergeVariableSolverData!(dfg::CloudGraphsDFG, sourceVariable::DFGVariable) - for solverKey in listVariableSolverData(dfg, sourceVariable.label) + for solveKey in listVariableSolverData(dfg, sourceVariable.label) updateVariableSolverData!( dfg, sourceVariable.label, - getVariableSolverData(dfg, sourceVariable, solverKey), - solverKey) + getVariableSolverData(dfg, sourceVariable, solveKey), + solveKey) end end diff --git a/src/CloudGraphsDFG/services/CommonFunctions.jl b/src/CloudGraphsDFG/services/CommonFunctions.jl index 71aeb561..d0e694c5 100644 --- a/src/CloudGraphsDFG/services/CommonFunctions.jl +++ b/src/CloudGraphsDFG/services/CommonFunctions.jl @@ -249,8 +249,8 @@ function _getLabelsForInst(dfg::CloudGraphsDFG, labels = _getLabelsForType(dfg, typeof(inst), parentKey=parentKey) typeof(inst) <: DFGVariable && push!(labels, String(getLabel(inst))) typeof(inst) <: DFGFactor && push!(labels, String(getLabel(inst))) - typeof(inst) <: AbstractPointParametricEst && push!(labels, String(inst.solverKey)) - typeof(inst) <: VariableNodeData && push!(labels, String(inst.solverKey)) + typeof(inst) <: AbstractPointParametricEst && push!(labels, String(inst.solveKey)) + typeof(inst) <: VariableNodeData && push!(labels, String(inst.solveKey)) typeof(inst) <: AbstractDataEntry && push!(labels, String(inst.label)) return labels end @@ -316,8 +316,8 @@ function _matchmergeVariableSubnode!( result = commit(tx) end length(result.errors) > 0 && error(string(result.errors)) - length(result.results[1]["data"]) != 1 && error("Cannot find subnode '$(ppe.solverKey)' for variable '$variablekey'") - length(result.results[1]["data"][1]["row"]) != 1 && error("Cannot find subnode '$(ppe.solverKey)' for variable '$variablekey'") + length(result.results[1]["data"]) != 1 && error("Cannot find subnode '$(ppe.solveKey)' for variable '$variablekey'") + length(result.results[1]["data"][1]["row"]) != 1 && error("Cannot find subnode '$(ppe.solveKey)' for variable '$variablekey'") return result.results[1]["data"][1]["row"][1] end diff --git a/src/Deprecated.jl b/src/Deprecated.jl index 8072963d..41f54445 100644 --- a/src/Deprecated.jl +++ b/src/Deprecated.jl @@ -5,7 +5,7 @@ ##============================================================================== ## Remove in 0.11 ##============================================================================== -@deprecate addVariableSolverData!(dfg::AbstractDFG, variablekey::Symbol, vnd::VariableNodeData, solverKey::Symbol) addVariableSolverData!(dfg, variablekey, vnd) +@deprecate addVariableSolverData!(dfg::AbstractDFG, variablekey::Symbol, vnd::VariableNodeData, solveKey::Symbol) addVariableSolverData!(dfg, variablekey, vnd) @deprecate updatePPE!(dfg::AbstractDFG, variablekey::Symbol, ppe::AbstractPointParametricEst, ppekey::Symbol) updatePPE!(dfg, variablekey, ppe) diff --git a/src/entities/DFGVariable.jl b/src/entities/DFGVariable.jl index 2abd71c0..44990dc9 100644 --- a/src/entities/DFGVariable.jl +++ b/src/entities/DFGVariable.jl @@ -32,10 +32,10 @@ mutable struct VariableNodeData{T<:InferenceVariable} dontmargin::Bool solveInProgress::Int solvedCount::Int - solverKey::Symbol + solveKey::Symbol events::Dict{Symbol,Threads.Condition} - VariableNodeData{T}(; solverKey::Symbol=:default) where {T <:InferenceVariable} = - new{T}(zeros(1,1), zeros(1,1), Symbol[], Int[], 0, false, :NOTHING, Symbol[], T(), false, 0.0, false, false, 0, 0, solverKey, Dict{Symbol,Threads.Condition}()) + VariableNodeData{T}(; solveKey::Symbol=:default) where {T <:InferenceVariable} = + new{T}(zeros(1,1), zeros(1,1), Symbol[], Int[], 0, false, :NOTHING, Symbol[], T(), false, 0.0, false, false, 0, 0, solveKey, Dict{Symbol,Threads.Condition}()) VariableNodeData{T}(val::Array{Float64,2}, bw::Array{Float64,2}, BayesNetOutVertIDs::Array{Symbol,1}, @@ -50,12 +50,12 @@ mutable struct VariableNodeData{T<:InferenceVariable} dontmargin::Bool, solveInProgress::Int=0, solvedCount::Int=0, - solverKey::Symbol=:default, + solveKey::Symbol=:default, events::Dict{Symbol,Threads.Condition}=Dict{Symbol,Threads.Condition}()) where T <: InferenceVariable = new{T}(val,bw,BayesNetOutVertIDs,dimIDs,dims, eliminated,BayesNetVertID,separator, softtype::T,initialized,inferdim,ismargin, - dontmargin, solveInProgress, solvedCount, solverKey, events) + dontmargin, solveInProgress, solvedCount, solveKey, events) end ##------------------------------------------------------------------------------ @@ -75,17 +75,17 @@ VariableNodeData(val::Array{Float64,2}, dontmargin::Bool, solveInProgress::Int=0, solvedCount::Int=0, - solverKey::Symbol=:default + solveKey::Symbol=:default ) where T <: InferenceVariable = VariableNodeData{T}(val,bw,BayesNetOutVertIDs,dimIDs,dims, eliminated,BayesNetVertID,separator, softtype::T,initialized,inferdim,ismargin, dontmargin, solveInProgress, solvedCount, - solverKey) + solveKey) -VariableNodeData(softtype::T; solverKey::Symbol=:default) where T <: InferenceVariable = - VariableNodeData{T}(zeros(1,1), zeros(1,1), Symbol[], Int[], 0, false, :NOTHING, Symbol[], softtype, false, 0.0, false, false, 0, 0, solverKey) +VariableNodeData(softtype::T; solveKey::Symbol=:default) where T <: InferenceVariable = + VariableNodeData{T}(zeros(1,1), zeros(1,1), Symbol[], Int[], 0, false, :NOTHING, Symbol[], softtype, false, 0.0, false, false, 0, 0, solveKey) ##============================================================================== ## PackedVariableNodeData.jl @@ -117,7 +117,7 @@ mutable struct PackedVariableNodeData dontmargin::Bool solveInProgress::Int solvedCount::Int - solverKey::Symbol + solveKey::Symbol PackedVariableNodeData() = new() PackedVariableNodeData(x1::Vector{Float64}, x2::Int, @@ -136,7 +136,7 @@ mutable struct PackedVariableNodeData x15::Bool, x16::Int, solvedCount::Int, - solverKey::Symbol) = new(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16, solvedCount, solverKey) + solveKey::Symbol) = new(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16, solvedCount, solveKey) # More permissive constructor needed for unmarshalling PackedVariableNodeData(x1::Vector, x2::Int, @@ -155,12 +155,12 @@ mutable struct PackedVariableNodeData x15::Bool, x16::Int, solvedCount::Int, - solverKey::Symbol) = new( + solveKey::Symbol) = new( convert(Vector{Float64},x1),x2, convert(Vector{Float64},x3),x4, convert(Vector{Symbol},x5), convert(Vector{Int},x6),x7,x8,x9, - convert(Vector{Symbol},x10),x11,x12,x13,x14,x15,x16, solvedCount, solverKey) + convert(Vector{Symbol},x10),x11,x12,x13,x14,x15,x16, solvedCount, solveKey) end ##============================================================================== @@ -182,7 +182,7 @@ abstract type AbstractPointParametricEst end Data container to store Parameteric Point Estimate (PPE) for mean and max. """ struct MeanMaxPPE <: AbstractPointParametricEst - solverKey::Symbol #repeated because of Sam's request + solveKey::Symbol #repeated because of Sam's request suggested::Vector{Float64} max::Vector{Float64} mean::Vector{Float64} @@ -192,7 +192,7 @@ end ##------------------------------------------------------------------------------ ## Constructors -MeanMaxPPE(solverKey::Symbol, suggested::Vector{Float64}, max::Vector{Float64}, mean::Vector{Float64}) = MeanMaxPPE(solverKey, suggested, max, mean, now(UTC)) +MeanMaxPPE(solveKey::Symbol, suggested::Vector{Float64}, max::Vector{Float64}, mean::Vector{Float64}) = MeanMaxPPE(solveKey, suggested, max, mean, now(UTC)) ## Metadata """ diff --git a/src/services/DFGVariable.jl b/src/services/DFGVariable.jl index 79894323..59acf598 100644 --- a/src/services/DFGVariable.jl +++ b/src/services/DFGVariable.jl @@ -446,10 +446,10 @@ Add variable solver data, errors if it already exists. """ function addVariableSolverData!(dfg::AbstractDFG, variablekey::Symbol, vnd::VariableNodeData)::VariableNodeData var = getVariable(dfg, variablekey) - if haskey(var.solverDataDict, vnd.solverKey) - error("VariableNodeData '$(vnd.solverKey)' already exists") + if haskey(var.solverDataDict, vnd.solveKey) + error("VariableNodeData '$(vnd.solveKey)' already exists") end - var.solverDataDict[vnd.solverKey] = vnd + var.solverDataDict[vnd.solveKey] = vnd return vnd end @@ -458,8 +458,8 @@ end Add a new solver data entry from a deepcopy of the source variable solver data. NOTE: Copies the solver data. """ -addVariableSolverData!(dfg::AbstractDFG, sourceVariable::DFGVariable, solverKey::Symbol=:default) = - addVariableSolverData!(dfg, sourceVariable.label, deepcopy(getSolverData(sourceVariable, solverKey))) +addVariableSolverData!(dfg::AbstractDFG, sourceVariable::DFGVariable, solveKey::Symbol=:default) = + addVariableSolverData!(dfg, sourceVariable.label, deepcopy(getSolverData(sourceVariable, solveKey))) """ @@ -482,48 +482,48 @@ function updateVariableSolverData!(dfg::AbstractDFG, verbose::Bool=true ) #This is basically just setSolverData var = getVariable(dfg, variablekey) - if verbose && !haskey(var.solverDataDict, vnd.solverKey) - @warn "VariableNodeData '$(vnd.solverKey)' does not exist, adding" + if verbose && !haskey(var.solverDataDict, vnd.solveKey) + @warn "VariableNodeData '$(vnd.solveKey)' does not exist, adding" end # for InMemoryDFGTypes do memory copy or repointing, for cloud this would be an different kind of update. usevnd = useCopy ? deepcopy(vnd) : vnd # should just one, or many pointers be updated? - if haskey(var.solverDataDict, vnd.solverKey) && isa(var.solverDataDict[vnd.solverKey], VariableNodeData) && length(fields) != 0 + if haskey(var.solverDataDict, vnd.solveKey) && isa(var.solverDataDict[vnd.solveKey], VariableNodeData) && length(fields) != 0 # change multiple pointers inside the VND var.solverDataDict[solvekey] for field in fields - destField = getfield(var.solverDataDict[vnd.solverKey], field) + destField = getfield(var.solverDataDict[vnd.solveKey], field) srcField = getfield(usevnd, field) if isa(destField, Array) && size(destField) == size(srcField) # use broadcast (in-place operation) destField .= srcField else # change pointer of destination VND object member - setfield!(var.solverDataDict[vnd.solverKey], field, srcField) + setfield!(var.solverDataDict[vnd.solveKey], field, srcField) end end else # change a single pointer in var.solverDataDict - var.solverDataDict[vnd.solverKey] = usevnd + var.solverDataDict[vnd.solveKey] = usevnd end - return var.solverDataDict[vnd.solverKey] + return var.solverDataDict[vnd.solveKey] end function updateVariableSolverData!(dfg::AbstractDFG, variablekey::Symbol, vnd::VariableNodeData, - solverKey::Symbol, + solveKey::Symbol, useCopy::Bool=true, fields::Vector{Symbol}=Symbol[], verbose::Bool=true) # TODO not very clean - if vnd.solverKey != solverKey - @warn "TODO It looks like solverKey as parameter is deprecated, set it in vnd, or keep this function?" + if vnd.solveKey != solveKey + @warn "TODO It looks like solveKey as parameter is deprecated, set it in vnd, or keep this function?" usevnd = useCopy ? deepcopy(vnd) : vnd - usevnd.solverKey = solverKey + usevnd.solveKey = solveKey return updateVariableSolverData!(dfg, variablekey, usevnd, useCopy, fields, verbose) else return updateVariableSolverData!(dfg, variablekey, vnd, useCopy, fields, verbose) @@ -533,25 +533,25 @@ end updateVariableSolverData!(dfg::AbstractDFG, sourceVariable::DFGVariable, - solverKey::Symbol=:default, + solveKey::Symbol=:default, useCopy::Bool=true, fields::Vector{Symbol}=Symbol[] ) = - updateVariableSolverData!(dfg, sourceVariable.label, getSolverData(sourceVariable, solverKey), useCopy, fields) + updateVariableSolverData!(dfg, sourceVariable.label, getSolverData(sourceVariable, solveKey), useCopy, fields) function updateVariableSolverData!(dfg::AbstractDFG, sourceVariables::Vector{<:DFGVariable}, - solverKey::Symbol=:default, + solveKey::Symbol=:default, useCopy::Bool=true, fields::Vector{Symbol}=Symbol[] ) #I think cloud would do this in bulk for speed for var in sourceVariables - updateVariableSolverData!(dfg, var.label, getSolverData(var, solverKey), useCopy, fields) + updateVariableSolverData!(dfg, var.label, getSolverData(var, solveKey), useCopy, fields) end end """ $SIGNATURES -Duplicate a supersolve (solverKey). +Duplicate a supersolve (solveKey). """ function deepcopySolvekeys!(dfg::AbstractDFG, dest::Symbol, @@ -562,7 +562,7 @@ function deepcopySolvekeys!(dfg::AbstractDFG, # for x in labels sd = deepcopy(getSolverData(getVariable(dfg,x), src)) - sd.solverKey = dest + sd.solveKey = dest updateVariableSolverData!(dfg, x, sd, true, Symbol[], verbose ) end end @@ -572,13 +572,13 @@ const deepcopySupersolve! = deepcopySolvekeys! $(SIGNATURES) Delete variable solver data, returns the deleted element. """ -function deleteVariableSolverData!(dfg::AbstractDFG, variablekey::Symbol, solverKey::Symbol=:default)::VariableNodeData +function deleteVariableSolverData!(dfg::AbstractDFG, variablekey::Symbol, solveKey::Symbol=:default)::VariableNodeData var = getVariable(dfg, variablekey) - if !haskey(var.solverDataDict, solverKey) - error("VariableNodeData '$(solverKey)' does not exist") + if !haskey(var.solverDataDict, solveKey) + error("VariableNodeData '$(solveKey)' does not exist") end - vnd = pop!(var.solverDataDict, solverKey) + vnd = pop!(var.solverDataDict, solveKey) return vnd end @@ -586,8 +586,8 @@ end $(SIGNATURES) Delete variable solver data, returns the deleted element. """ -deleteVariableSolverData!(dfg::AbstractDFG, sourceVariable::DFGVariable, solverKey::Symbol=:default) = - deleteVariableSolverData!(dfg, sourceVariable.label, solverKey) +deleteVariableSolverData!(dfg::AbstractDFG, sourceVariable::DFGVariable, solveKey::Symbol=:default) = + deleteVariableSolverData!(dfg, sourceVariable.label, solveKey) ##------------------------------------------------------------------------------ ## SET: list, merge @@ -630,7 +630,7 @@ mergeVariableSolverData!(dfg::AbstractDFG, sourceVariable::DFGVariable) = me Get the parametric point estimate (PPE) for a variable in the factor graph for a given solve key. Notes -- Defaults on keywords `solverKey` and `method` +- Defaults on keywords `solveKey` and `method` Related getMeanPPE, getMaxPPE, getKDEMean, getKDEFit, getPPEs, getVariablePPEs @@ -650,10 +650,10 @@ Add variable PPE, errors if it already exists. """ function addPPE!(dfg::AbstractDFG, variablekey::Symbol, ppe::P)::AbstractPointParametricEst where {P <: AbstractPointParametricEst} var = getVariable(dfg, variablekey) - if haskey(var.ppeDict, ppe.solverKey) - error("PPE '$(ppe.solverKey)' already exists") + if haskey(var.ppeDict, ppe.solveKey) + error("PPE '$(ppe.solveKey)' already exists") end - var.ppeDict[ppe.solverKey] = ppe + var.ppeDict[ppe.solveKey] = ppe return ppe end @@ -672,11 +672,11 @@ Update PPE data if it exists, otherwise add it -- one call per `key::Symbol=:def """ function updatePPE!(dfg::AbstractDFG, variablekey::Symbol, ppe::P)::P where {P <: AbstractPointParametricEst} var = getVariable(dfg, variablekey) - if !haskey(var.ppeDict, ppe.solverKey) - @warn "PPE '$(ppe.solverKey)' does not exist, adding" + if !haskey(var.ppeDict, ppe.solveKey) + @warn "PPE '$(ppe.solveKey)' does not exist, adding" end #for InMemoryDFGTypes, cloud would update here - var.ppeDict[ppe.solverKey] = ppe + var.ppeDict[ppe.solveKey] = ppe return ppe end diff --git a/src/services/Serialization.jl b/src/services/Serialization.jl index 54a80c03..8991de60 100644 --- a/src/services/Serialization.jl +++ b/src/services/Serialization.jl @@ -149,7 +149,7 @@ function packVariableNodeData(dfg::G, d::VariableNodeData)::PackedVariableNodeDa d.dontmargin, d.solveInProgress, d.solvedCount, - d.solverKey) + d.solveKey) end function unpackVariableNodeData(dfg::G, d::PackedVariableNodeData)::VariableNodeData where G <: AbstractDFG @@ -172,7 +172,7 @@ function unpackVariableNodeData(dfg::G, d::PackedVariableNodeData)::VariableNode return VariableNodeData{st}(M3,M4, d.BayesNetOutVertIDs, d.dimIDs, d.dims, d.eliminated, d.BayesNetVertID, d.separator, - st(), d.initialized, d.inferdim, d.ismargin, d.dontmargin, d.solveInProgress, d.solvedCount, d.solverKey) + st(), d.initialized, d.inferdim, d.ismargin, d.dontmargin, d.solveInProgress, d.solvedCount, d.solveKey) end ##============================================================================== diff --git a/test/testBlocks.jl b/test/testBlocks.jl index 0fbec656..916840b7 100644 --- a/test/testBlocks.jl +++ b/test/testBlocks.jl @@ -573,7 +573,7 @@ function PPETestBlock!(fg, v1) @test_throws ErrorException getPPE(fg, :a, :default) # Update add it - @test @test_logs (:warn, Regex("'$(ppe.solverKey)' does not exist")) match_mode=:any updatePPE!(fg, :a, ppe) == ppe + @test @test_logs (:warn, Regex("'$(ppe.solveKey)' does not exist")) match_mode=:any updatePPE!(fg, :a, ppe) == ppe # Update update it @test updatePPE!(fg, :a, ppe) == ppe @test deletePPE!(fg, :a, :default) == ppe @@ -684,7 +684,7 @@ function VSDTestBlock!(fg, v1) # **VariableNodeData** # - `getSolveInProgress` - vnd = VariableNodeData{TestSofttype1}(solverKey=:parametric) + vnd = VariableNodeData{TestSofttype1}(solveKey=:parametric) @test addVariableSolverData!(fg, :a, vnd) == vnd @test_throws ErrorException addVariableSolverData!(fg, :a, vnd) @@ -738,7 +738,7 @@ function VSDTestBlock!(fg, v1) # Add new VND of type ContinuousScalar to :x0 # Could also do VariableNodeData(ContinuousScalar()) - vnd = VariableNodeData{TestSofttype1}(solverKey=:parametric) + vnd = VariableNodeData{TestSofttype1}(solveKey=:parametric) addVariableSolverData!(fg, :a, vnd) @test setdiff(listVariableSolverData(fg, :a), [:default, :parametric]) == [] # Get the data back - note that this is a reference to above.