Module: RMatrix::Random::ClassMethods

Defined in:
lib/rmatrix/random.rb

Instance Method Summary collapse

Instance Method Details

#binomialObject



18
19
# File 'lib/rmatrix/random.rb', line 18

def binomial
end

#normal(n = 10, low: 0.0, high: 1.0) ⇒ Object



4
5
# File 'lib/rmatrix/random.rb', line 4

def normal
end

#uniform(n = 10, low: 0.0, high: 1.0) ⇒ Object



7
8
9
10
11
# File 'lib/rmatrix/random.rb', line 7

def uniform(n=10,low: 0.0,high: 1.0)
  M.blank(columns: n).generate do
    ::Random.rand(low..high.to_f)
  end
end