Skip to content

Commit

Permalink
Merge pull request #660 from JuliaRobotics/maint/1Q20/cleanup
Browse files Browse the repository at this point in the history
cleanup, bugfix, exports
  • Loading branch information
dehann authored Mar 26, 2020
2 parents 070248b + beb0f44 commit 8b4845d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/ExplicitDiscreteMarginalizations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ end
"""
$(SIGNATURES)
This function explicitly codes that marginalization of a discrete categorical selection variable for ambiguous data association situations. Improved implementations should implicitly induce the same behaviour through summation (integration) when marginalizing any number of discrete variables. This function populates `allelements` with particle indices associated with particular multihypothesis selection while `activehypo` simultaneously contains the hypothesis index and factor graph variables associated with that hypothesis selection. The return value `certainidx` are the hypotheses that are not in question.
This function explicitly encodes the marginalization of a discrete categorical selection variable for ambiguous data association situations. Improved implementations should implicitly induce the same behaviour through summation (integration) when marginalizing any number of discrete variables. This function populates `allelements` with particle indices associated with particular multihypothesis selection while `activehypo` simultaneously contains the hypothesis index and factor graph variables associated with that hypothesis selection. The return value `certainidx` are the hypotheses that are not in question.
Notes:
- Issue 427, race condition during initialization since n-ary variables not resolvable without other init.
Expand Down
6 changes: 3 additions & 3 deletions src/FGOSUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,11 @@ function getPPESuggestedAll(dfg::AbstractDFG,
#
# get values
vsyms = listVariables(dfg, regexFilter) |> sortDFG
slamPPE = map(x->getVariablePPE(dfg, x), vsyms)
slamPPE = map(x->getVariablePPE(dfg, x).suggested, vsyms)
# sizes to convert to matrix
rumax = zeros(Int, 2)
for varr in slamPPE
rumax[2] = length(varr)
for ppe in slamPPE
rumax[2] = length(ppe)
rumax[1] = maximum(rumax)
end

Expand Down
6 changes: 4 additions & 2 deletions src/IncrementalInference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,10 @@ export AbstractDFG,
categoricalfromstring,
extractdistribution,

FactorGraph,
# FactorGraph,
SolverParams,
getSolvable,
setSolvable!,
addNode!,
addVariable!,
deleteVariable!,
Expand Down Expand Up @@ -229,7 +231,6 @@ export AbstractDFG,
getCliqSiblingsPriorityInitOrder,
isCliqFullDim,
getVariable,
# getVert, # deprecated use DFG.getVariable getFactor instead
getCliqueData,
setCliqueData!,
getManifolds,
Expand Down Expand Up @@ -343,6 +344,7 @@ export AbstractDFG,
#functors need
getSample,
freshSamples!,
freshSamples,

#Visualization
writeGraphPdf, # deprecated, but first move code to drawGraph before deleting
Expand Down
4 changes: 4 additions & 0 deletions src/SolverUtilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ function freshSamples!(ccwl::CommonConvWrapper, N::Int=1)
freshSamples!(ccwl, N, FactorMetadata(),)
end

function freshSamples(dfg::AbstractDFG, sym::Symbol, N::Int=1)
freshSamples(getFactorType(dfg, sym))
end

function shuffleXAltD(X::Vector{Float64}, Alt::Vector{Float64}, d::Int, p::Vector{Int})
# n = length(X)
Y = deepcopy(Alt)
Expand Down

0 comments on commit 8b4845d

Please sign in to comment.