Sha256: 152dabc74f6793ae5aede7499fb4eb81207dd2a7bc93cad5d02fce914163b406
Contents?: true
Size: 626 Bytes
Versions: 3
Compression:
Stored size: 626 Bytes
Contents
require File.dirname(__FILE__)+'/../lib/statsample' require 'test/unit' class StatsampleResampleTestCase < Test::Unit::TestCase def initialize(*args) super end def test_basic r=Statsample::Resample.generate(20,1,10) assert_equal(20,r.size) assert(r.min>=1) assert(r.max<=10) end 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 end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
statsample-0.3.0 | test/test_resample.rb |
statsample-0.3.1 | test/test_resample.rb |
statsample-0.3.2 | test/test_resample.rb |