Class/Module Index [+]

Quicksearch

Statsample::Resample

Public Class Methods

generate(size,low,upper) click to toggle source
# File lib/statsample/resample.rb, line 8
def generate (size,low,upper)
  range=upper-low+1
  Vector.new((0...size).collect {|x| rand(range)+low },:scale)
end
repeat_and_save(times,&action) click to toggle source
# File lib/statsample/resample.rb, line 4
def repeat_and_save(times,&action)
  (1..times).inject([]) {|a,x| a.push(action.call); a}
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.