Word size of this xorshift generator.
The number of bits of state of this generator. This must be a positive multiple of the size in bits of UIntType. If nbits is large this struct may occupy slightly more memory than this so it can use a circular counter instead of shifting the entire array.
The direction and magnitude of the 1st shift. Positive means left, negative means right.
The direction and magnitude of the 2nd shift. Positive means left, negative means right.
The direction and magnitude of the 3rd shift. Positive means left, negative means right.
Output of the internal xorshift engine is multiplied by a constant to eliminate linear artifacts except in the low-order bits. This constant must be an odd number other than 1.
Return type of opCall. By default same as StateUInt but can be set to a narrower unsigned type in which case the high bits of the multiplication result are returned.
Note: If sa, sb, and sc are all positive (which if interpreted as same-direction shifts could not result in a full-period xorshift generator) the shift directions are instead implicitly right-left-right when bits == UIntType.sizeof * 8 and in all other cases left-right-right. This maintains full compatibility with older versions of XorshiftStarEngine that took all shifts as unsigned magnitudes.
Template for the xorshift* family of generators (Vigna, 2016; draft 2014).
<blockquote> xorshift* generators are very fast, high-quality PRNGs (pseudorandom number generators) obtained by scrambling the output of a Marsaglia xorshift generator with a 64-bit invertible multiplier (as suggested by Marsaglia in his paper). They are an excellent choice for all non-cryptographic applications, as they are incredibly fast, have long periods and their output passes strong statistical test suites. </blockquote>