Skip to content

Commit 1b13334

Browse files
committed
Updated documentation
1 parent 2189693 commit 1b13334

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/src/variable_factor_serialization.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
If you are transferring variables and factors over a wire you need to serialize
44
and deserialize variables and factors.
55

6-
## Packing
6+
## Packing and Unpacking
77

88
Packing is done with the exposed functions `packVariable()::Dict{String, Any}` and
99
`packFactor()::Dict{String, Any}`. You can then serialize this into a string or JSON
1010
as you would normally.
1111

12+
> Note: When you deserialize a factor and want to use it for solving, you must call IncrementalInference.rebuildFactorMetadata!(dfgLoadInto, factor) to reinflate it completely. Please review [FileDFG service](src/FileDFG/services/FileDFG.jl) for an example.
13+
1214
For example:
1315
```julia
1416
using DistributedFactorGraphs
@@ -63,5 +65,4 @@ for f in getFactors(dfg)
6365
JSON2.write(io, fPacked)
6466
close(io)
6567
end
66-
6768
```

0 commit comments

Comments
 (0)