Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions src/SolverUtilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ Notes
- Often used to quickly generate temporary graphs for a variety of local calculations.
- does not yet support split `_` characters in auto-find `lastVar` from `varPattern`.
- Will always add a factor, but will skip adding variable labels that already exist in `dfg`.

DevNotes
- TODO allow pts to be full MKD beliefs, part of replacing old `approxConvCircular`, see #1351
"""
function _buildGraphByFactorAndTypes!(fct::AbstractFactor,
varTypes::Tuple,
Expand All @@ -158,6 +161,7 @@ function _buildGraphByFactorAndTypes!(fct::AbstractFactor,
# add the necessary variables
exists(dfg, vars[s_]) ? nothing : addVariable!(dfg, vars[s_], vTyp)
# set the numerical values if available
# TODO allow pts to come in as full MKD beliefs, not just one point
((0 < length(pts)) && (pts[s_] isa Nothing)) ? nothing : initManual!(dfg, vars[s_], [pts[s_],], solveKey, bw=ones(getDimension(vTyp)))
end
# if newFactor then add the factor on vars, else assume only one existing factor between vars
Expand Down
11 changes: 10 additions & 1 deletion src/services/ApproxConv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,16 @@ end
# group partial dimension factors by selected dimensions -- i.e. [(1,)], [(1,2),(1,2)], [(2,);(2;)]



# WIP, see `_buildGraphByFactorAndTypes!` where pts are full MKD Beliefs, following #1351
# Legacy use in RoMEPlotting: plotFactor
# function approxConvBelief(fct::AbstractFactorRelative,
# varTypes::Union{<:Tuple,<:AbstractVector{<:InstanceType{T}}},
# mkds::Union{<:Tuple,<:AbstractVector{<:InstanceType{T}}};
# tfg::AbstractDFG=_buildGraphByFactorAndTypes!(fct,)
# ) where {T <: InferenceVariable}
# #

# end



Expand Down