Skip to content

Commit 4172150

Browse files
committed
Fixing issue #7
1 parent b64672d commit 4172150

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/services/GraphsDFG.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ end
6262
$(SIGNATURES)
6363
Add a DFGFactor to a DFG.
6464
"""
65-
function addFactor!(dfg::GraphsDFG, factor::DFGFactor, variables::Vector{DFGVariable})::Bool
65+
function addFactor!(dfg::GraphsDFG, variables::Vector{DFGVariable}, factor::DFGFactor)::Bool
6666
if haskey(dfg.labelDict, factor.label)
6767
error("Factor '$(factor.label)' already exists in the factor graph")
6868
end

test/interfaceTests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ f1 = DFGFactor(:f1)
77
addVariable!(dfg, v1)
88
@test_throws Exception addVariable!(dfg, v1)
99
addVariable!(dfg, v2)
10-
addFactor!(dfg, f1, [v1, v2])
10+
addFactor!(dfg, [v1, v2], f1)
1111
@test_throws Exception addFactor!(dfg, DFGFactor("f2"), [v1, DFGVariable("Nope")])
1212
end
1313

@@ -71,7 +71,7 @@ numNodes = 10
7171
dfg = testDFGAPI()
7272
verts = map(n -> DFGVariable(Symbol("x$n")), 1:numNodes)
7373
map(v -> addVariable!(dfg, v), verts)
74-
map(n -> addFactor!(dfg, DFGFactor(Symbol("x$(n)x$(n+1)f1")), [verts[n], verts[n+1]]), 1:(numNodes-1))
74+
map(n -> addFactor!(dfg, [verts[n], verts[n+1]], DFGFactor(Symbol("x$(n)x$(n+1)f1"))), 1:(numNodes-1))
7575
# map(n -> addFactor!(dfg, [verts[n], verts[n+2]], DFGFactor(Symbol("x$(n)x$(n+2)f2"))), 1:2:(numNodes-2))
7676

7777
@testset "Getting Neighbors" begin

0 commit comments

Comments
 (0)