Skip to content

feat: Add a method to get the current state of Random\Engine\PcgOneseq128XslRr64 engine #17937

@Crovitche-1623

Description

@Crovitche-1623

Description

Actually a jump method is available to moves the algorithm’s state ahead by the number of steps given by advance. However, there are no built-in method to retrieve the current state of the algorithm.

This force to keep a class that decorates this engine to save the state of the algorithm although the state is known internally (I imagine) if we want to restore the state later (e.g. when creating a new engine).

It would be a good improvement to have a getState() method that returns the number of steps the algorithm has already advanced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions