Skip to content

Add pad and restore for each DiscreteVariable type #28

@alecksphillips

Description

@alecksphillips

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions