File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -230,3 +230,35 @@ function lsTypes(dfg::G)::Dict{Symbol, Vector{String}} where G <: AbstractDFG
230
230
end
231
231
return alltypes
232
232
end
233
+
234
+
235
+ """
236
+ $(SIGNATURES)
237
+ Gives back all factor labels that fit the bill:
238
+ lsWho(dfg, :Pose3)
239
+ """
240
+ function lsWho (dfg:: AbstractDFG , type:: Symbol ; solveKey:: Symbol = :default ):: Vector{Symbol}
241
+ vars = getVariables (dfg)
242
+ labels = Symbol[]
243
+ for v in vars
244
+ varType = typeof (getVariableType (v, solveKey= solveKey)). name |> Symbol
245
+ varType == type && push! (labels, v. label)
246
+ end
247
+ return labels
248
+ end
249
+
250
+
251
+ """
252
+ $(SIGNATURES)
253
+ Gives back all factor labels that fit the bill:
254
+ lsfWho(dfg, :Point2Point2)
255
+ """
256
+ function lsfWho (dfg:: AbstractDFG , type:: Symbol ):: Vector{Symbol}
257
+ facs = getFactors (dfg)
258
+ labels = Symbol[]
259
+ for f in facs
260
+ facType = typeof (getFactorType (f)). name |> Symbol
261
+ facType == type && push! (labels, f. label)
262
+ end
263
+ return labels
264
+ end
You can’t perform that action at this time.
0 commit comments