|
1 | 1 |
|
2 | 2 | dfg = LightDFG{NoSolverParams, VARTYPE, FACTYPE}()
|
3 |
| -DistributedFactorGraphs.DFGVariableSummary(label::Symbol) = DFGVariableSummary(label, DistributedFactorGraphs.now(), Symbol[], Dict{Symbol, MeanMaxPPE}(), :NA, 0) |
4 |
| -DistributedFactorGraphs.DFGFactorSummary(label::Symbol) = DFGFactorSummary(label, Symbol[], 0, Symbol[]) |
| 3 | +DistributedFactorGraphs.DFGVariableSummary(label::Symbol) = DFGVariableSummary(label, DistributedFactorGraphs.now(), Set{Symbol}(), Dict{Symbol, MeanMaxPPE}(), :Pose2, Dict{Symbol,AbstractBigDataEntry}(), 0) |
| 4 | +DistributedFactorGraphs.DFGFactorSummary(label::Symbol) = DFGFactorSummary(label, DistributedFactorGraphs.now(), Set{Symbol}(), 0, Symbol[]) |
5 | 5 |
|
6 | 6 | v1 = VARTYPE(:a)
|
7 | 7 | v2 = VARTYPE(:b)
|
8 | 8 | f1 = FACTYPE(:f1)
|
9 | 9 |
|
10 | 10 | #add tags for filters
|
11 |
| -append!(v1.tags, [:VARIABLE, :POSE]) |
12 |
| -append!(v2.tags, [:VARIABLE, :LANDMARK]) |
13 |
| -append!(f1.tags, [:FACTOR]) |
| 11 | +union!(v1.tags, [:VARIABLE, :POSE]) |
| 12 | +union!(v2.tags, [:VARIABLE, :LANDMARK]) |
| 13 | +union!(f1.tags, [:FACTOR]) |
14 | 14 |
|
15 | 15 | #Force softtypename
|
16 |
| -isa(v1, DFGVariableSummary) && (v1.softtypename = :Pose2) |
| 16 | +# isa(v1, DFGVariableSummary) && (v1.softtypename = :Pose2) |
17 | 17 |
|
18 | 18 | # @testset "Creating Graphs" begin
|
19 | 19 | global dfg,v1,v2,f1
|
|
102 | 102 | @test getVariablePPEs(v1) == v1.ppeDict
|
103 | 103 | @test getVariablePPE(v1, :notfound) == nothing
|
104 | 104 | @test getSofttype(v1) == :Pose2
|
105 |
| - @test internalId(v1) == v1._internalId |
| 105 | + @test getInternalId(v1) == v1._internalId |
106 | 106 | end
|
107 | 107 | # @test solverData(v1) === v1.solverDataDict[:default]
|
108 | 108 | # @test getData(v1) === v1.solverDataDict[:default]
|
|
117 | 117 | # @test getData(f1) == f1.data
|
118 | 118 | # Internal function
|
119 | 119 | if FACTYPE == DFGFactorSummary
|
120 |
| - @test internalId(f1) == f1._internalId |
| 120 | + @test getInternalId(f1) == f1._internalId |
121 | 121 | end
|
122 | 122 |
|
123 | 123 | end
|
@@ -164,12 +164,12 @@ end
|
164 | 164 | @testset "Adjacency Matrices" begin
|
165 | 165 | global dfg,v1,v2,f1
|
166 | 166 | # Normal
|
167 |
| - adjMat = getAdjacencyMatrix(dfg) |
168 |
| - @test size(adjMat) == (2,4) |
169 |
| - @test symdiff(adjMat[1, :], [nothing, :a, :b, :orphan]) == Symbol[] |
170 |
| - @test symdiff(adjMat[2, :], [:f1, :f1, :f1, nothing]) == Symbol[] |
| 167 | + @test_throws ErrorException getAdjacencyMatrix(dfg) |
| 168 | + # @test size(adjMat) == (2,4) |
| 169 | + # @test symdiff(adjMat[1, :], [nothing, :a, :b, :orphan]) == Symbol[] |
| 170 | + # @test symdiff(adjMat[2, :], [:f1, :f1, :f1, nothing]) == Symbol[] |
171 | 171 | #sparse
|
172 |
| - adjMat, v_ll, f_ll = getAdjacencyMatrixSparse(dfg) |
| 172 | + adjMat, v_ll, f_ll = getBiadjacencyMatrix(dfg) |
173 | 173 | @test size(adjMat) == (1,3)
|
174 | 174 |
|
175 | 175 | # Checking the elements of adjacency, its not sorted so need indexing function
|
|
0 commit comments