The OpenD Programming Language

Mean.put

Adds the contents of rhs to this instance.

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

Examples

Mean mean1, mean2, combined;
foreach(i; 0..5) {
    mean1.put(i);
}

foreach(i; 5..10) {
    mean2.put(i);
}

mean1.put(mean2);

foreach(i; 0..10) {
    combined.put(i);
}

assert(approxEqual(combined.mean, mean1.mean));

Meta