41
41
$(SIGNATURES)
42
42
Create a new CloudGraphs-based DFG factor graph using a Neo4j.Connection.
43
43
"""
44
- function CloudGraphsDFG {T} (neo4jConnection:: Neo4j.Connection , userId:: String , robotId:: String , sessionId:: String , encodePackedTypeFunc, getPackedTypeFunc, decodePackedTypeFunc; description:: String = " CloudGraphs DFG" , solverParams:: T = NoSolverParams (), useCache:: Bool = false ) where T <: AbstractParams
44
+ function CloudGraphsDFG {T} (neo4jConnection:: Neo4j.Connection , userId:: String , robotId:: String , sessionId:: String , encodePackedTypeFunc, getPackedTypeFunc, decodePackedTypeFunc, rebuildFactorMetadata! ; description:: String = " CloudGraphs DFG" , solverParams:: T = NoSolverParams (), useCache:: Bool = false ) where T <: AbstractParams
45
45
graph = Neo4j. getgraph (neo4jConnection)
46
46
neo4jInstance = Neo4jInstance (neo4jConnection, graph)
47
- return CloudGraphsDFG {T} (neo4jInstance, description, userId, robotId, sessionId, encodePackedTypeFunc, getPackedTypeFunc, decodePackedTypeFunc, Dict {Symbol, Int64} (), Dict {Symbol, DFGVariable} (), Dict {Symbol, DFGFactor} (), Symbol[], solverParams, useCache)
47
+ return CloudGraphsDFG {T} (neo4jInstance, description, userId, robotId, sessionId, encodePackedTypeFunc, getPackedTypeFunc, decodePackedTypeFunc, rebuildFactorMetadata!, Dict {Symbol, Int64} (), Dict {Symbol, DFGVariable} (), Dict {Symbol, DFGFactor} (), Symbol[], solverParams, useCache)
48
48
end
49
49
"""
50
50
$(SIGNATURES)
51
51
Create a new CloudGraphs-based DFG factor graph by specifying the Neo4j connection information.
52
52
"""
53
- function CloudGraphsDFG {T} (host:: String , port:: Int , dbUser:: String , dbPassword:: String , userId:: String , robotId:: String , sessionId:: String , encodePackedTypeFunc, getPackedTypeFunc, decodePackedTypeFunc; description:: String = " CloudGraphs DFG" , solverParams:: T = NoSolverParams (), useCache:: Bool = false ) where T <: AbstractParams
53
+ function CloudGraphsDFG {T} (host:: String , port:: Int , dbUser:: String , dbPassword:: String , userId:: String , robotId:: String , sessionId:: String , encodePackedTypeFunc, getPackedTypeFunc, decodePackedTypeFunc, rebuildFactorMetadata! ; description:: String = " CloudGraphs DFG" , solverParams:: T = NoSolverParams (), useCache:: Bool = false ) where T <: AbstractParams
54
54
neo4jConnection = Neo4j. Connection (host, port= port, user= dbUser, password= dbPassword);
55
- return CloudGraphsDFG {T} (neo4jConnection, userId, robotId, sessionId, encodePackedTypeFunc, getPackedTypeFunc, decodePackedTypeFunc, description= description, solverParams= solverParams, useCache= useCache)
55
+ return CloudGraphsDFG {T} (neo4jConnection, userId, robotId, sessionId, encodePackedTypeFunc, getPackedTypeFunc, decodePackedTypeFunc, rebuildFactorMetadata!, description= description, solverParams= solverParams, useCache= useCache)
56
56
end
57
57
58
58
"""
@@ -323,10 +323,10 @@ function getFactor(dfg::CloudGraphsDFG, factorId::Int64)::DFGFactor
323
323
324
324
data = props[" data" ]
325
325
datatype = props[" fnctype" ]
326
- fulltype = getfield (Main, Symbol (datatype))
326
+ # fulltype = getfield(Main, Symbol(datatype))
327
327
packtype = getfield (Main, Symbol (" Packed" * datatype))
328
328
packed = JSON2. read (data, GenericFunctionNodeData{packtype,String})
329
- fullFactor = dfg. decodePackedTypeFunc (packed, " " )
329
+ fullFactor = dfg. decodePackedTypeFunc (dfg, packed )
330
330
331
331
# Include the type
332
332
_variableOrderSymbols = JSON2. read (props[" _variableOrderSymbols" ], Vector{Symbol})
@@ -341,6 +341,9 @@ function getFactor(dfg::CloudGraphsDFG, factorId::Int64)::DFGFactor
341
341
factor. ready = ready
342
342
factor. backendset = backendset
343
343
344
+ # Lastly, rebuild the metadata
345
+ factor = dfg. rebuildFactorMetadata! (dfg, factor)
346
+
344
347
# Add to cache
345
348
push! (dfg. factorCache, factor. label=> factor)
346
349
0 commit comments