code: public void add(double datum) {
          dbuf[nd++] = datum;
          if (datum < q0) {
              q0 = datum;
          }
          if (datum > qm) {
              qm = datum;
          }
          if (nd == nbuf) {
              update();
          }
      }
docs: Assimilate a new value from the stream.