Why?
- Simplify serialization, pack/unpack factor only depends on the factor and does not need the full factor graph
- Simplify PackedFunctionNodeData{T}, GenericFunctionNodeData{T} where T <: Union{<:AbstractPackedFactor, <:AbstractFactor, <:FactorOperationalMemory}
Questions to be answered
If it can be split so that factor solver data only contains the working memory serialization becomes easy as solver data is just ignored and rehydrated when unpacked for use by the solver and there can possibly be no PackedFactor.
- What fields are always constant?
- DF: Almost everything in
FactorNodeData is constant and can move to FactorFDG -- but, need to checking how CCW is built upon FactorCompute
- Will it impact more complicated factor types?
No, this should not touch the current usrfun field functionallity.
- Should we build factor data (w.r.t. the compute part FactorOperationalMemory/CCW) lazily from DFG and only "inflate" when used in IIF. That is, move
reconstFactorData out of DFG?
- JT I believe so, that way we don't need a fg to unpack a factor and don't need to calculate ccw if never used (eg plotting).
'constant' in this case means not changed by the solver
In other words:
Should we move non FactorOperationalMemory to DFGFactor:
Maybe: fnc, multihypo, nullhypo, inflation ?
that way we split solverData <: FactorOperationalMemory and constants
Why?
Questions to be answered
If it can be split so that factor solver data only contains the working memory serialization becomes easy as solver data is just ignored and rehydrated when unpacked for use by the solver and there can possibly be no PackedFactor.
FactorNodeDatais constant and can move to FactorFDG -- but, need to checking howCCWis built uponFactorComputeNo, this should not touch the current
usrfunfield functionallity.reconstFactorDataout of DFG?'constant' in this case means not changed by the solver
In other words:
Should we move non FactorOperationalMemory to DFGFactor:
Maybe: fnc, multihypo, nullhypo, inflation ?
that way we split solverData <: FactorOperationalMemory and constants