File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -232,10 +232,38 @@ function lsTypes(dfg::G)::Dict{Symbol, Vector{String}} where G <: AbstractDFG
232
232
end
233
233
234
234
235
+ function ls (dfg:: G , :: Type{T} ; solveKey:: Symbol = :default ) where {G <: AbstractDFG , T <: InferenceVariable }
236
+ xx = getVariables (dfg)
237
+ mask = getVariableType .(xx, solveKey= solveKey) .| > typeof .== T
238
+ vxx = view (xx, mask)
239
+ map (x-> x. label, vxx)
240
+ end
241
+
242
+
243
+ function ls (dfg:: G , :: Type{T} ) where {G <: AbstractDFG , T <: FunctorInferenceType }
244
+ xx = getFactors (dfg)
245
+ names = getfield .(typeof .(getFactorType .(xx)), :name ) .| > Symbol
246
+ vxx = view (xx, names .== Symbol (T))
247
+ map (x-> x. label, vxx)
248
+ end
249
+
250
+ function lsf (dfg:: G , :: Type{T} ) where {G <: AbstractDFG , T <: FunctorInferenceType }
251
+ ls (dfg, T)
252
+ end
253
+
254
+
235
255
"""
236
256
$(SIGNATURES)
237
257
Gives back all factor labels that fit the bill:
238
258
lsWho(dfg, :Pose3)
259
+
260
+ Dev Notes
261
+ - Cloud versions will benefit from less data transfer
262
+ - `ls(dfg::C, ::T) where {C <: CloudDFG, T <: ..}`
263
+
264
+ Related
265
+
266
+ ls, lsf, lsfPriors
239
267
"""
240
268
function lsWho (dfg:: AbstractDFG , type:: Symbol ; solveKey:: Symbol = :default ):: Vector{Symbol}
241
269
vars = getVariables (dfg)
252
280
$(SIGNATURES)
253
281
Gives back all factor labels that fit the bill:
254
282
lsfWho(dfg, :Point2Point2)
283
+
284
+ Dev Notes
285
+ - Cloud versions will benefit from less data transfer
286
+ - `ls(dfg::C, ::T) where {C <: CloudDFG, T <: ..}`
287
+
288
+ Related
289
+
290
+ ls, lsf, lsfPriors
255
291
"""
256
292
function lsfWho (dfg:: AbstractDFG , type:: Symbol ):: Vector{Symbol}
257
293
facs = getFactors (dfg)
You can’t perform that action at this time.
0 commit comments