Class DiscreteSystem<TShared, TInternal>

Implementation of System for discrete systems. Manages particle states generated by stateless generators.

Type Parameters

  • TShared

    Values which are shared between all particles in a group and are not mutated by them - the model parameter values for that group

  • TInternal

    Internal state values which can be mutated by generators, used to improve efficiency of the system by e.g. caching calculation results for use by other particles.

Hierarchy (View Summary)

Implements

Constructors

Accessors

Methods

  • Runs the system from its current time to the given time, causing its state to be updated. Calls the update method on the generator for each particle.

    Parameters

    • time: number

      The time to run to

    Returns void

  • Updates shared (parameter) values for all groups in the system.

    Parameters

    • newShared: TShared[]

      Updated parameter values. The length must match the existing number of groups in the system.

    Returns void