File tree Expand file tree Collapse file tree 4 files changed +17
-8
lines changed Expand file tree Collapse file tree 4 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ JSON2 = "2535ab7d-5cd8-5a07-80ac-9b1792aadce3"
13
13
LightGraphs = " 093fc24a-ae57-5d10-9952-331d41423f4d"
14
14
LinearAlgebra = " 37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
15
15
MetaGraphs = " 626554b9-1ddb-594c-aa3c-2596fe9399a5"
16
- Neo4j = " d2adbeaf-5838-5367-8a2f-e46d570981db"
17
16
Reexport = " 189a3867-3050-52da-a836-e630ba90ab69"
18
17
Requires = " ae029012-a4dd-5104-9daa-d747884805df"
19
18
SparseArrays = " 2f01184e-e22b-5df5-ae63-d93ebab69eaf"
@@ -30,6 +29,7 @@ julia = "0.7, 1"
30
29
[extras ]
31
30
Test = " 8dfed614-e22c-5e08-85e1-65c5234f0b40"
32
31
GraphPlot = " a2cc645c-3eea-5389-862e-a155d0052231"
32
+ Neo4j = " d2adbeaf-5838-5367-8a2f-e46d570981db"
33
33
34
34
[targets ]
35
- test = [" Test" , " GraphPlot" ]
35
+ test = [" Test" , " GraphPlot" , " Neo4j " ]
Original file line number Diff line number Diff line change @@ -789,11 +789,11 @@ end
789
789
790
790
function getAdjacencyMatrixSparse (dfg:: CloudGraphsDFG ):: Tuple{SparseMatrixCSC, Vector{Symbol}, Vector{Symbol}}
791
791
varLabels = getVariableIds (dfg)
792
- factLabels = sort ( getFactorIds (dfg) )
793
- vDict = Dict (varLabels .=> [1 : length (varLabels)... ]. + 1 )
794
- fDict = Dict (factLabels .=> [1 : length (factLabels)... ]. + 1 )
792
+ factLabels = getFactorIds (dfg)
793
+ vDict = Dict (varLabels .=> [1 : length (varLabels)... ])
794
+ fDict = Dict (factLabels .=> [1 : length (factLabels)... ])
795
795
796
- adjMat = spzeros (Int, length (factLabels)+ 1 , length (varLabels)+ 1 )
796
+ adjMat = spzeros (Int, length (factLabels), length (varLabels))
797
797
798
798
# Now ask for all relationships for this session graph
799
799
loadtx = transaction (dfg. neo4jInstance. connection)
Original file line number Diff line number Diff line change @@ -472,11 +472,11 @@ Notes:
472
472
- used by both factor graph variable and Bayes tree clique logic.
473
473
"""
474
474
function isInitialized (var:: DFGVariable ; key:: Symbol = :default ):: Bool
475
- solverData (var, key) && return solverData (var, key). initialized
475
+ solverData (var, key) != nothing && return solverData (var, key). initialized
476
476
return false
477
477
end
478
478
function isInitialized (fct:: DFGFactor ; key:: Symbol = :default ):: Bool
479
- solverData (var, key) && return solverData (fct, key). initialized
479
+ solverData (var, key) != nothing && return solverData (fct, key). initialized
480
480
return false
481
481
end
482
482
function isInitialized (dfg:: G , label:: Symbol ; key:: Symbol = :default ):: Bool where G <: AbstractDFG
Original file line number Diff line number Diff line change 107
107
108
108
@test getSolverParams (dfg) != nothing
109
109
@test setSolverParams (dfg, getSolverParams (dfg)) == getSolverParams (dfg)
110
+
111
+ # solver data is initialized
112
+ @test ! isInitialized (dfg, :a )
113
+ @test ! isInitialized (v2)
114
+
115
+ # TODO Should the next test work?
116
+ @test_broken ! isInitialized (dfg, :f1 )
117
+ @test_broken ! isInitialized (f1)
118
+
110
119
end
111
120
112
121
@testset " Updating Nodes" begin
You can’t perform that action at this time.
0 commit comments