function MultiPulse(dataflow, stamp, pulses, encode) {
    const p = this;
    let c = 0;
    this.dataflow = dataflow;
    this.stamp = stamp;
    this.fields = null;
    this.encode = encode || null;
    this.pulses = pulses;
    for (const pulse of pulses) {
      if (pulse.stamp !== stamp) continue;
      if (pulse.fields) {
        const hash = p.fields || (p.fields = {});
        for (const f in pulse.fields) {
          hash[f] = 1;
        }
      }
      if (pulse.changed(p.ADD)) c |= p.ADD;
      if (pulse.changed(p.REM)) c |= p.REM;
      if (pulse.changed(p.MOD)) c |= p.MOD;
    }
    this.changes = c;
  }
Represents a set of multiple pulses. Used as input for operators
that accept multiple pulses at a time. Contained pulses are
accessible via the public "pulses" array property. This pulse doe
not carry added, removed or modified tuples directly. However,
the visit method can be used to traverse all such tuples contained
in sub-pulses with a timestamp matching this parent multi-pulse.
@constructor
@param {Dataflow} dataflow - The backing dataflow instance.
@param {number} stamp - The timestamp.
@param {Array<Pulse>} pulses - The sub-pulses for this multi-pulse.