drone 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,46 +0,0 @@
1
- require File.expand_path('../../common', __FILE__)
2
-
3
- require 'drone/utils/uniform_sample'
4
- include Drone
5
-
6
- describe 'EWMA' do
7
- describe "A sample of 100 out of 1000 elements" do
8
- before do
9
- Drone::init_drone()
10
-
11
- @population = (0...1000)
12
- @sample = UniformSample.new('id1', 100)
13
- @population.step(1){|n| @sample.update(n) }
14
- end
15
-
16
- should "have 100 elements" do
17
- @sample.size.should == 100
18
- @sample.values.size.should == 100
19
- end
20
-
21
- should "only have elements from the population" do
22
- arr = @sample.values - @population.to_a
23
- arr.should == []
24
- end
25
- end
26
-
27
- describe "A sample of 100 out of 10 elements" do
28
- before do
29
- @population = (0...10)
30
- @sample = UniformSample.new('id1', 100)
31
- @population.step(1){|n| @sample.update(n) }
32
- end
33
-
34
- should "have 10 elements" do
35
- @sample.size.should == 10
36
- @sample.values.size.should == 10
37
- end
38
-
39
- should "only have elements from the population" do
40
- arr = @sample.values - @population.to_a
41
- arr.should == []
42
- end
43
- end
44
-
45
- end
46
-