Skip to content

Example code mutates a ParticleFilterState directly, but ParticleFilterState is undocumented #50

Description

@bzinberg

From #49 (comment):

we should not be mutating the (undocumented) traces field of the (undocumented) ParticleFilterState struct. The reader should (unlike I did) know what their rejuvenation move is supposed to do, but they shouldn't be responsible for knowing what representation invariants a ParticleFilterState has to satisfy, i.e., whether direct mutation (in Julia, outside Gen) is allowed, and if so, what other fields need to be updated simultaneously to maintain data integrity.

In the Gen documentation, particle filter states are treated as black boxes that can only be looked under the hood via Gen APIs. So I think for rejuvenation moves we should either make an API, or document the representation invariants that someone who mutates a ParticleFilterState should maintain.

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