Skip to content

Commit 27c7abd

Browse files
authored
Merge pull request #382 from JuliaRobotics/master
v0.7.4-rc1
2 parents bfc3c3b + 85d50ca commit 27c7abd

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "DistributedFactorGraphs"
22
uuid = "b5cc3c7e-6572-11e9-2517-99fb8daf2f04"
3-
version = "0.7.3"
3+
version = "0.7.4"
44

55
[deps]
66
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
@@ -21,7 +21,7 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
2121
Unmarshal = "cbff2730-442d-58d7-89d1-8e530c41eb02"
2222

2323
[compat]
24-
Colors = "0.8, 0.9, 0.10, 0.11"
24+
Colors = "0.8, 0.9, 0.10, 0.11, 0.12"
2525
Distributions = "0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 0.24, 0.25, 1"
2626
DocStringExtensions = "0.8, 0.9, 0.10, 1"
2727
Graphs = "0.10.2, 0.11, 1"

src/DistributedFactorGraphs.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export mergeVariableData!, mergeGraphVariableData!
191191
export natural_lt, sortDFG
192192

193193
## List
194-
export ls, lsf
194+
export ls, lsf, ls2
195195
export lsTypes, lsfTypes
196196
export lsWho, lsfWho
197197
export isPrior, lsfPriors
@@ -224,7 +224,7 @@ export
224224
compareFactorGraphs
225225

226226

227-
## Deprecated exports should be listed in Deprecated.jl if possible, otherwise here
227+
## Deprecated exports should be listed in Deprecated.jl if possible, otherwise here
228228

229229

230230
## needsahome.jl

src/services/AbstractDFG.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,15 @@ function lsf(dfg::G, ::Type{T}) where {G <: AbstractDFG, T <: FunctorInferenceTy
538538
ls(dfg, T)
539539
end
540540

541+
"""
542+
$(SIGNATURES)
543+
Helper to return neighbors at distance 2 around a given node label.
544+
"""
545+
function ls2(dfg::AbstractDFG, label::Symbol)
546+
l2 = getNeighborhood(dfg, label, 2)
547+
l1 = getNeighborhood(dfg, label, 1)
548+
return setdiff(l2, l1)
549+
end
541550

542551
"""
543552
$SIGNATURES

test/testBlocks.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ end
3030
Base.:(==)(a::TestCCW, b::TestCCW) = a.usrfnc! == b.usrfnc!
3131

3232

33-
global testDFGAPI = LightDFG
3433
global testDFGAPI = GraphsDFG
34+
global testDFGAPI = LightDFG
3535

3636
#test Specific definitions
3737
# struct TestInferenceVariable1 <: InferenceVariable end
@@ -731,6 +731,7 @@ function testGroup!(fg, v1, v2, f0, f1)
731731
@test getVariableType(v1) == TestSofttype1()
732732
@test getVariableType(fg,:a) == TestSofttype1()
733733

734+
@test ls2(fg, :a) == [:b]
734735

735736
#TODO what is lsTypes supposed to return?
736737
@test_broken lsTypes(fg)

0 commit comments

Comments
 (0)