Skip to content

Add pad and restore for each DiscreteVariable type #28

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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