code: function TraceSubset(fullTrace, fullTraceBegin, fullTraceEnd) {
    this._fullTrace = fullTrace;
    this._fullTraceBegin = fullTraceBegin;
    this._fullTraceEnd = fullTraceEnd;
    this._isNTerminal = this._fullTraceBegin === 0;
    this._isCTerminal = this._fullTrace.length() === this._fullTraceEnd;
    var length = this._fullTraceEnd - this._fullTraceBegin;
    if (!this._isCTerminal) {
      ++length;
    }
    if (!this._isNTerminal) {
      ++length;
      this._fullTraceBegin -= 1;
    }
    this._length = length;
  }
docs: a trace subset, e.g. the part of a trace contained in a view. End regions are handled automatically depending on whether the beginning/end of the trace subset coincides with the C- and N-terminus of the full trace.