Skip to content

Commit 9dbc720

Browse files
committed
rename SamplerTypes (to close to SamplerType) to SamplerUnion
1 parent 3050f01 commit 9dbc720

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

base/random/RNGs.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## RandomDevice
44

5-
# SamplerTypes(Union{X,Y,...}) == Union{SamplerType{X},SamplerType{Y},...}
6-
SamplerTypes(U::Union) = Union{map(T->SamplerType{T}, Base.uniontypes(U))...}
7-
const SamplerBoolBitInteger = SamplerTypes(Union{Bool, Base.BitInteger})
5+
# SamplerUnion(Union{X,Y,...}) == Union{SamplerType{X},SamplerType{Y},...}
6+
SamplerUnion(U::Union) = Union{map(T->SamplerType{T}, Base.uniontypes(U))...}
7+
const SamplerBoolBitInteger = SamplerUnion(Union{Bool, Base.BitInteger})
88

99
if Sys.iswindows()
1010
struct RandomDevice <: AbstractRNG
@@ -244,7 +244,7 @@ rand(r::MersenneTwister, st::SamplerTrivial{<:FloatInterval}) = rand_generic(r,
244244
#### integers
245245

246246
rand(r::MersenneTwister,
247-
T::SamplerTypes(Union{Bool,Int8,UInt8,Int16,UInt16,Int32,UInt32})) =
247+
T::SamplerUnion(Union{Bool,Int8,UInt8,Int16,UInt16,Int32,UInt32})) =
248248
rand_ui52_raw(r) % T[]
249249

250250
function rand(r::MersenneTwister, ::SamplerType{UInt64})

0 commit comments

Comments
 (0)