We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba71014 commit b089a6fCopy full SHA for b089a6f
src/Common.jl
@@ -9,6 +9,7 @@ export lsTypes, lsfTypes
9
export lsWho, lsfWho
10
export *
11
export findClosestTimestamp, findVariableNearTimestamp
12
+export hasTags
13
14
*(a::Symbol, b::AbstractString)::Symbol = Symbol(string(a,b))
15
@@ -403,3 +404,17 @@ function findVariableNearTimestamp(dfg::AbstractDFG,
403
404
405
return RET
406
end
407
+
408
409
+"""
410
+ $SIGNATURES
411
412
+Determine if a variable or factor has all the tags listed in `stags`.
413
414
+function hasTags(dfg::InMemoryDFGTypes,
415
+ sym::Symbol,
416
+ stags::Vector{Symbol})::Bool
417
+ #
418
+ alltags = union( (ls(dfg, sym) .|> x->tags(getFactor(dfg,x)))...)
419
+ length(filter(x->x in alltags, stags)) == length(stags)
420
+end
0 commit comments