1
0

04-ODT-01-切出区间.svg 1.5 KB

123456789
  1. <svg xmlns="http://www.w3.org/2000/svg" width="940" height="300" viewBox="0 0 940 300">
  2. <style>.t{font:16px sans-serif;fill:#1f2937}.s{font:13px sans-serif;fill:#475569}.seg{fill:#fff;stroke:#2563eb;stroke-width:3}.mid{fill:#fef3c7;stroke:#d97706;stroke-width:4}.a{stroke:#16a34a;stroke-width:4;fill:none}</style>
  3. <rect width="940" height="300" fill="#f8fafc"/><text x="32" y="34" class="t" font-weight="bold">ODT 的统一接口:split(l)、split(r+1) 后,中间迭代器范围恰好覆盖 [l,r]</text>
  4. <g transform="translate(55 90)"><rect x="0" y="0" width="145" height="55" rx="8" class="seg"/><rect x="145" y="0" width="130" height="55" rx="8" class="mid"/><rect x="275" y="0" width="160" height="55" rx="8" class="mid"/><rect x="435" y="0" width="140" height="55" rx="8" class="seg"/><g class="t" text-anchor="middle"><text x="72" y="33">前缀段</text><text x="210" y="33">中央段 1</text><text x="355" y="33">中央段 2</text><text x="505" y="33">后缀段</text></g></g>
  5. <line x1="200" y1="70" x2="200" y2="170" stroke="#dc2626" stroke-width="3" stroke-dasharray="7 5"/><line x1="635" y1="70" x2="635" y2="170" stroke="#dc2626" stroke-width="3" stroke-dasharray="7 5"/>
  6. <text x="173" y="61" class="s">begin</text><text x="610" y="61" class="s">end</text>
  7. <path d="M360 170 v46" class="a"/><path d="M360 216 l-9 -14 h18z" fill="#16a34a"/>
  8. <text x="70" y="250" class="s">add:逐段改 value;assign:erase(begin,end) 再插 [l,r,x];查询:按 (value,length) 聚合。</text>
  9. </svg>