Class: RandomDistribution::ConstantSequence

Inherits:
Sequence show all
Defined in:
lib/redshift/util/random.rb

Constant Summary

Constants included from Math

Math::Infinity

Instance Attribute Summary collapse

Attributes inherited from Sequence

#generator

Instance Method Summary collapse

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

#meanObject (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

#nextObject



86
87
88
# File 'lib/redshift/util/random.rb', line 86

def next
  @mean
end