rand: add methods to allow greater control over PCGSource#30
rand: add methods to allow greater control over PCGSource#30DeedleFake wants to merge 3 commits intogolang:masterfrom
PCGSource#30Conversation
|
Should that be |
|
This PR (HEAD: 20a3031) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/exp/+/398354 to see it. Tip: You can toggle comments from me using the |
|
Message from Rob Pike: Patch Set 1: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/398354. |
|
This PR (HEAD: 776a471) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/exp/+/398354 to see it. Tip: You can toggle comments from me using the |
|
Message from Rob Pike: Patch Set 3: Code-Review+2 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/398354. |
|
Message from Rob Pike: Patch Set 3: -Code-Review (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/398354. |
|
This PR (HEAD: 7f2d908) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/exp/+/398354 to see it. Tip: You can toggle comments from me using the |
|
Message from Rob Pike: Patch Set 4: Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/398354. |
For golang/go#49934.
Add two methods to
PCGSource,Seed128andState.The standard
Seedmethod only allows seeding with auint64, but the PCG internal state is, effectively, auint128.Seed128allows the user to pass both the high and low bits for this state as twouint64s, allowing much greater control over the generator's state.Statedoes the opposite, returning the entire 128-bit state as twouint64s.