EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012) |
---|
[all classes][de.uka.ipd.sdq.statistics] |
name | class, % | method, % | block, % | line, % |
---|---|---|---|---|
Batch.java | 0% (0/1) | 0% (0/6) | 0% (0/38) | 0% (0/12) |
name | class, % | method, % | block, % | line, % |
---|---|---|---|---|
class Batch | 0% (0/1) | 0% (0/6) | 0% (0/38) | 0% (0/12) |
Batch (): void | 0% (0/1) | 0% (0/3) | 0% (0/2) | |
Batch (double, int): void | 0% (0/1) | 0% (0/9) | 0% (0/4) | |
addSample (double): void | 0% (0/1) | 0% (0/13) | 0% (0/3) | |
getMean (): double | 0% (0/1) | 0% (0/7) | 0% (0/1) | |
getSize (): int | 0% (0/1) | 0% (0/3) | 0% (0/1) | |
getSum (): double | 0% (0/1) | 0% (0/3) | 0% (0/1) |
1 | package de.uka.ipd.sdq.statistics; |
2 | |
3 | /** |
4 | * A batch, represented by the batch mean. For efficiency reasons, only the |
5 | * number and sum of contained samples will be stored. |
6 | * |
7 | * @author Philipp Merkle |
8 | * |
9 | */ |
10 | public class Batch { |
11 | |
12 | private int size; |
13 | |
14 | private double sum; |
15 | |
16 | public Batch() { |
17 | super(); |
18 | } |
19 | |
20 | public Batch(double sum, int size) { |
21 | this.sum = sum; |
22 | this.size = size; |
23 | } |
24 | |
25 | public void addSample(double value) { |
26 | sum += value; |
27 | ++size; |
28 | } |
29 | |
30 | public double getMean() { |
31 | return sum / size; |
32 | } |
33 | |
34 | public int getSize() { |
35 | return size; |
36 | } |
37 | |
38 | public double getSum() { |
39 | return sum; |
40 | } |
41 | |
42 | } |
[all classes][de.uka.ipd.sdq.statistics] |
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov |