Class: RandomDistribution::ConstantSequence
- Defined in:
- lib/redshift/util/random.rb
Constant Summary
Constants included from Math
Instance Attribute Summary collapse
-
#mean ⇒ Object
readonly
Returns the value of attribute mean.
Attributes inherited from Sequence
Instance Method Summary collapse
-
#initialize(opt = {}) ⇒ ConstantSequence
constructor
A new instance of ConstantSequence.
- #next ⇒ Object
Methods inherited from Sequence
random_pool_seed, random_seed, serial_count
Constructor Details
#initialize(opt = {}) ⇒ ConstantSequence
Returns a new instance of ConstantSequence.
82 83 84 |
# File 'lib/redshift/util/random.rb', line 82 def initialize opt = {} @mean = Float(opt[:mean] || 0) end |
Instance Attribute Details
#mean ⇒ Object (readonly)
Returns the value of attribute mean.
80 81 82 |
# File 'lib/redshift/util/random.rb', line 80 def mean @mean end |
Instance Method Details
#next ⇒ Object
86 87 88 |
# File 'lib/redshift/util/random.rb', line 86 def next @mean end |