For redistribution of particles, in order to handle variable size particles, it's necessary to encode particles and pad with e.g. zeros, and then decode back to particles.
We should add a generic pad, restore functions for the base DiscreteVariable type that encodes (e.g. with Python pickling) the object and pad to some maximum size and decodes back to an object respectively. Specific (probably more efficient) implementations of these for individual DiscreteVariable types, such as decision trees and additive structure, can be added.
For redistribution of particles, in order to handle variable size particles, it's necessary to encode particles and pad with e.g. zeros, and then decode back to particles.
We should add a generic
pad
,restore
functions for the base DiscreteVariable type that encodes (e.g. with Python pickling) the object and pad to some maximum size and decodes back to an object respectively. Specific (probably more efficient) implementations of these for individual DiscreteVariable types, such as decision trees and additive structure, can be added.