Class: GSLng::RNG::Uniform
- Inherits:
-
GSLng::RNG
- Object
- GSLng::RNG
- GSLng::RNG::Uniform
- Defined in:
- lib/gslng/rng/uniform.rb
Instance Attribute Summary collapse
- #ptr ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(min, max, generator_type = nil) ⇒ Uniform
constructor
Creates a new Uniform distribution with values in [min,max).
-
#sample ⇒ Float
(also: #get)
Obtain a sample from this distribution.
Methods inherited from GSLng::RNG
Constructor Details
#initialize(min, max, generator_type = nil) ⇒ Uniform
Creates a new Uniform distribution with values in [min,max)
10 11 12 13 |
# File 'lib/gslng/rng/uniform.rb', line 10 def initialize(min, max, generator_type = nil) super(generator_type) @min,@max = min,max end |
Instance Attribute Details
#ptr ⇒ Object (readonly)
4 5 6 |
# File 'lib/gslng/rng/uniform.rb', line 4 def ptr @ptr end |