Add .save property to XoshiroEngine, Xoroshiro128Plus, PermutedCongruentialEngine, and PhobosRandom wrapper
LatestMakes mir.random
PRNGs that satisfy Phobos std.random.isUniformRNG
also satisfy std.range.primitives.isForwardRange
. Affected PRNGs and templates:
mir.random.engine.xoshiro
:Xoshiro256StarStar
,Xoshiro128StarStar_32
,Xoroshiro128Plus
,XoshiroEngine
.mir.random.engine.pcg
:pcg32
,pcg32_oneseq
,pcg32_fast
,pcg8_once_insecure
,pcg16_once_insecure
,pcg32_once_insecure
,pcg64_once_insecure
,pcg8_oneseq_once_insecure
,pcg16_oneseq_once_insecure
,pcg32_oneseq_once_insecure
,pcg64_oneseq_once_insecure
;PermutedCongruentialEngine
as long asoutput_previous
is true andstreamType
is notstream_t.unique
.mir.random.engine.PhobosRandom!Engine
as long as the representation ofEngine
contains no pointers other than function pointers and itsopCall()
and destructor (if any) are@safe
andpure
. All PRNGs defined inmir.random
meet these conditions.
Prior to this the only mir.random
PRNGs that implemented .save
were mir.random.engine.splitmix.SplitMix64
and Splittable64
.