Mean.put

Adds the contents of rhs to this instance.

  1. void put(double element)
  2. void put(typeof(this) rhs)
    struct Mean
    void
    put
    pure nothrow @safe
    (
    typeof(this) rhs
    )

Examples

1 Mean mean1, mean2, combined;
2 foreach(i; 0..5) {
3    mean1.put(i);
4 }
5 
6 foreach(i; 5..10) {
7    mean2.put(i);
8 }
9 
10 mean1.put(mean2);
11 
12 foreach(i; 0..10) {
13    combined.put(i);
14 }
15 
16 assert(approxEqual(combined.mean, mean1.mean));

Meta