JuliaRobotics / IncrementalInference.jl

Compare 2c4af62 ... +4 ... c053410

Coverage Reach
services/EvalFactor.jl services/CalcFactor.jl services/GraphInit.jl services/CliqueTypes.jl services/FactorGradients.jl services/BayesNet.jl services/ApproxConv.jl services/HeatmapSampler.jl JunctionTree.jl ParametricUtils.jl CliqueStateMachine.jl TreeDebugTools.jl TreeMessageUtils.jl Factors/GenericFunctions.jl Factors/Mixture.jl Factors/Circular.jl Factors/LinearRelative.jl Factors/DefaultPrior.jl Factors/PartialPriorPassThrough.jl Factors/MsgPrior.jl Factors/EuclidDistance.jl Factors/GenericMarginal.jl Factors/PartialPrior.jl FactorGraph.jl CliqStateMachineUtils.jl SolverAPI.jl entities/JunctionTreeTypes.jl entities/OptionalDensities.jl entities/AliasScalarSampling.jl entities/BeliefTypes.jl entities/CliqueTypes.jl entities/FactorOperationalMemory.jl entities/FactorGradients.jl entities/SolverParams.jl FGOSUtils.jl CanonicalGraphExamples.jl NumericalCalculations.jl SerializingDistributions.jl ParametricCSMFunctions.jl ExplicitDiscreteMarginalizations.jl SolveTree.jl SolverUtilities.jl Flux/FluxModelsSerialization.jl Flux/FluxModelsDistribution.jl TreeBasedInitialization.jl AnalysisTools.jl DeconvUtils.jl TetherUtils.jl ODE/DERelative.jl ccolamd.jl SubGraphFunctions.jl ManifoldSampling.jl AdditionalUtils.jl DispatchPackedConversions.jl TreeMessageAccessors.jl GraphProductOperations.jl EmbeddedPlottingUtils.jl ConsolidateParametricRelatives.jl CompareUtils.jl SerializationMKD.jl RequireInteractiveUtils.jl NeedsResolution.jl Variables/DefaultVariables.jl VariableStatistics.jl IncrementalInference.jl DefaultNodeTypes.jl Deprecated.jl

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 3 of 4 files from the diff.

@@ -8,11 +8,55 @@
Loading
8 8
getFactorOperationalMemoryType(dfg::NoSolverParams) = CommonConvWrapper
9 9
10 10
11 -
# Helper function to construct CF from a CCW
12 -
CalcFactor(ccwl::CommonConvWrapper) = CalcFactor( ccwl.usrfnc!, _getFMdThread(ccwl), 0, length(ccwl.measurement), ccwl.measurement, ccwl.params, true)
11 +
12 +
13 +
function _getDimensionsPartial(ccw::CommonConvWrapper)
14 +
  # @warn "_getDimensionsPartial not ready for use yet"
15 +
  ccw.partialDims
16 +
end
17 +
_getDimensionsPartial(data::GenericFunctionNodeData) = _getCCW(data) |> _getDimensionsPartial
18 +
_getDimensionsPartial(fct::DFGFactor) = _getDimensionsPartial(_getCCW(fct))
19 +
_getDimensionsPartial(fg::AbstractDFG, lbl::Symbol) = _getDimensionsPartial(getFactor(fg, lbl))
20 +
21 +
22 +
"""
23 +
    $SIGNATURES
24 +
Get `.factormetadata` for each CPT in CCW for a specific factor in `fg`. 
25 +
"""
26 +
_getFMdThread(ccw::CommonConvWrapper, 
27 +
              thrid::Int=Threads.threadid()) = ccw.cpt[thrid].factormetadata
28 +
#
29 +
_getFMdThread(fc::Union{GenericFunctionNodeData,DFGFactor}, 
30 +
              thrid::Int=Threads.threadid()) = _getFMdThread(_getCCW(fc), thrid)
31 +
#
32 +
_getFMdThread(dfg::AbstractDFG,
33 +
              lbl::Symbol,
34 +
              thrid::Int=Threads.threadid()) = _getFMdThread(_getCCW(dfg, lbl), thrid)
35 +
#
13 36
14 37
15 38
39 +
40 +
# Helper function to construct CF from a CCW
41 +
function CalcFactor(ccwl::CommonConvWrapper;
42 +
                    factor = ccwl.usrfnc!, 
43 +
                    metadata = _getFMdThread(ccwl), 
44 +
                    _sampleIdx = 0, 
45 +
                    _measCount = length(ccwl.measurement),
46 +
                    _legacyMeas = ccwl.measurement, 
47 +
                    _legacyParams = ccwl.params, 
48 +
                    _allowThreads = true )
49 +
  #
50 +
  CalcFactor( factor,
51 +
              metadata,
52 +
              _sampleIdx,
53 +
              _measCount,
54 +
              _legacyMeas,
55 +
              _legacyParams,
56 +
              _allowThreads )
57 +
end
58 +
59 +
16 60
"""
17 61
    $SIGNATURES
18 62
@@ -520,4 +564,7 @@
Loading
520 564
521 565
522 566
567 +
568 +
569 +
523 570
#

@@ -24,6 +24,9 @@
Loading
24 24
## Deprecate code below before v0.27
25 25
##==============================================================================
26 26
27 +
@deprecate manikde!(pts::AbstractVector, bws::Vector{<:Real}, variableType::Union{InstanceType{<:InferenceVariable}, InstanceType{<:AbstractFactor}} ) manikde!(variableType,pts,bws)
28 +
@deprecate manikde!(pts::AbstractVector, varType::Union{InstanceType{<:InferenceVariable}, InstanceType{<:AbstractFactor}}) manikde!(varType, pts)
29 +
27 30
@deprecate generateCanonicalFG_Kaess(w...;kw...) generateGraph_Kaess(w...;kw...)
28 31
@deprecate generateCanonicalFG_EuclidDistance(w...;kw...) generateGraph_EuclidDistance(w...;kw...)
29 32
@deprecate generateCanonicalFG_lineStep(w...;kw...) generateGraph_LineStep(w...;kw...)

@@ -112,54 +112,53 @@
Loading
112 112
113 113
114 114
115 -
function _getDimensionsPartial(ccw::CommonConvWrapper)
116 -
  # @warn "_getDimensionsPartial not ready for use yet"
117 -
  ccw.partialDims
118 -
end
119 -
_getDimensionsPartial(data::GenericFunctionNodeData) = _getCCW(data) |> _getDimensionsPartial
120 -
_getDimensionsPartial(fct::DFGFactor) = _getDimensionsPartial(_getCCW(fct))
121 -
_getDimensionsPartial(fg::AbstractDFG, lbl::Symbol) = _getDimensionsPartial(getFactor(fg, lbl))
115 +
# function _getDimensionsPartial(ccw::CommonConvWrapper)
116 +
#   # @warn "_getDimensionsPartial not ready for use yet"
117 +
#   ccw.partialDims
118 +
# end
119 +
# _getDimensionsPartial(data::GenericFunctionNodeData) = _getCCW(data) |> _getDimensionsPartial
120 +
# _getDimensionsPartial(fct::DFGFactor) = _getDimensionsPartial(_getCCW(fct))
121 +
# _getDimensionsPartial(fg::AbstractDFG, lbl::Symbol) = _getDimensionsPartial(getFactor(fg, lbl))
122 122
123 123
124 -
"""
125 -
    $SIGNATURES
126 -
Get `.factormetadata` for each CPT in CCW for a specific factor in `fg`. 
127 -
"""
128 -
_getFMdThread(ccw::CommonConvWrapper, 
129 -
              thrid::Int=Threads.threadid()) = ccw.cpt[thrid].factormetadata
130 -
#
131 -
_getFMdThread(fc::Union{GenericFunctionNodeData,DFGFactor}, 
132 -
              thrid::Int=Threads.threadid()) = _getFMdThread(_getCCW(fc), thrid)
133 -
#
134 -
_getFMdThread(dfg::AbstractDFG,
135 -
              lbl::Symbol,
136 -
              thrid::Int=Threads.threadid()) = _getFMdThread(_getCCW(dfg, lbl), thrid)
137 -
#
124 +
# """
125 +
#     $SIGNATURES
126 +
# Get `.factormetadata` for each CPT in CCW for a specific factor in `fg`. 
127 +
# """
128 +
# _getFMdThread(ccw::CommonConvWrapper, 
129 +
#               thrid::Int=Threads.threadid()) = ccw.cpt[thrid].factormetadata
130 +
# #
131 +
# _getFMdThread(fc::Union{GenericFunctionNodeData,DFGFactor}, 
132 +
#               thrid::Int=Threads.threadid()) = _getFMdThread(_getCCW(fc), thrid)
133 +
# #
134 +
# _getFMdThread(dfg::AbstractDFG,
135 +
#               lbl::Symbol,
136 +
#               thrid::Int=Threads.threadid()) = _getFMdThread(_getCCW(dfg, lbl), thrid)
137 +
# #
138 138
139 139
140 140
141 141
# extend convenience function (Matrix or Vector{P})
142 -
function manikde!(pts::AbstractVector{P},
143 -
                  bws::Vector{<:Real},
144 -
                  variableType::Union{InstanceType{<:InferenceVariable}, InstanceType{<:AbstractFactor}}  ) where P
142 +
function manikde!(variableType::Union{InstanceType{<:InferenceVariable}, InstanceType{<:AbstractFactor}},
143 +
                  pts::AbstractVector{P},
144 +
                  bws::Vector{<:Real} ) where {P <: Union{<:AbstractArray,<:Number,<:ProductRepr,<:Manifolds.ArrayPartition} }
145 145
  #
146 146
  M = getManifold(variableType)
147 147
  infoPerCoord=ones(AMP.getNumberCoords(M, pts[1]))
148 148
  return AMP.manikde!(M, pts, bw=bws, infoPerCoord=infoPerCoord)
149 149
end
150 150
151 -
function manikde!(pts::AbstractVector{P}, 
152 -
                  vartype::Union{InstanceType{<:InferenceVariable}, InstanceType{<:AbstractFactor}}) where P
151 +
152 +
function manikde!(vartype::Union{InstanceType{<:InferenceVariable}, InstanceType{<:AbstractFactor}},
153 +
                  pts::AbstractVector{P} ) where {P <: Union{<:AbstractArray,<:Number,<:ProductRepr,<:Manifolds.ArrayPartition} }
153 154
  #
154 155
  M = getManifold(vartype)
155 -
  # @info "WHAT" vartype, M
156 -
  # @show pts[1]
157 -
  # @show manifold_dimension(M)
158 156
  infoPerCoord=ones(manifold_dimension(M))
159 157
  return AMP.manikde!(M, pts, infoPerCoord=infoPerCoord)
160 158
end
161 159
162 160
161 +
163 162
"""
164 163
    $SIGNATURES
165 164

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
src +<.01% 77.26%
Project Totals (67 files) 77.26%
Loading