class StatsampleResampleTestCase
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
# File pkg/statsample-1.4.0/test/test_resample.rb, line 4 def initialize(*args) super end
Public Instance Methods
test_basic()
click to toggle source
# File pkg/statsample-1.4.0/test/test_resample.rb, line 7 def test_basic r=Statsample::Resample.generate(20,1,10) assert_equal(20,r.size) assert(r.min>=1) assert(r.max<=10) end
test_repeat_and_save()
click to toggle source
# File pkg/statsample-1.4.0/test/test_resample.rb, line 13 def test_repeat_and_save r=Statsample::Resample.repeat_and_save(400) { Statsample::Resample.generate(20,1,10).count(1) } assert_equal(400,r.size) v=Statsample::Vector.new(r,:scale) a=v.count {|x| x > 3} assert(a>=30 && a<=70) end