00-KRT-01-DSU与事件卡.svg 2.4 KB

1234567891011121314
  1. <svg xmlns="http://www.w3.org/2000/svg" width="960" height="360" viewBox="0 0 960 360">
  2. <style>.t{font:16px sans-serif;fill:#1f2937}.s{font:13px sans-serif;fill:#475569}.c{fill:#eff6ff;stroke:#2563eb;stroke-width:3}.event{fill:#fff7ed;stroke:#ea580c;stroke-width:3}.edge{stroke:#64748b;stroke-width:3}.a{stroke:#16a34a;stroke-width:4}</style>
  3. <rect width="960" height="360" fill="#f8fafc"/><text x="32" y="35" class="t" font-weight="bold">DSU 的现在:只记住一个大泡泡</text>
  4. <ellipse cx="205" cy="185" rx="160" ry="82" fill="#dbeafe" stroke="#2563eb" stroke-width="3"/>
  5. <g class="c"><circle cx="95" cy="185" r="23"/><circle cx="155" cy="135" r="23"/><circle cx="215" cy="205" r="23"/><circle cx="280" cy="135" r="23"/><circle cx="325" cy="215" r="23"/></g>
  6. <g class="t" text-anchor="middle"><text x="95" y="191">1</text><text x="155" y="141">2</text><text x="215" y="211">3</text><text x="280" y="141">4</text><text x="325" y="221">5</text></g>
  7. <text x="72" y="295" class="s">都在同一集合,却忘了 2 与 4 何时先相遇</text>
  8. <path d="M400 180 H485" class="a" fill="none"/><path d="M485 180 l-14 -8 v16z" fill="#16a34a"/><text x="410" y="155" class="s">保存每次合并事件</text>
  9. <text x="545" y="35" class="t" font-weight="bold">重构树的历史:内部节点是一张事件卡</text>
  10. <g class="edge"><line x1="745" y1="85" x2="675" y2="160"/><line x1="745" y1="85" x2="835" y2="245"/><line x1="675" y1="160" x2="620" y2="245"/><line x1="675" y1="160" x2="740" y2="245"/><line x1="620" y1="245" x2="580" y2="315"/><line x1="620" y1="245" x2="650" y2="315"/><line x1="740" y1="245" x2="720" y2="315"/><line x1="740" y1="245" x2="790" y2="315"/></g>
  11. <g class="event"><rect x="715" y="58" width="60" height="42" rx="7"/><rect x="645" y="138" width="60" height="42" rx="7"/><rect x="590" y="223" width="60" height="42" rx="7"/><rect x="710" y="223" width="60" height="42" rx="7"/></g>
  12. <g class="c"><circle cx="580" cy="315" r="19"/><circle cx="650" cy="315" r="19"/><circle cx="720" cy="315" r="19"/><circle cx="790" cy="315" r="19"/><circle cx="835" cy="245" r="19"/></g>
  13. <g class="t" text-anchor="middle"><text x="745" y="85">9@6</text><text x="675" y="165">8@5</text><text x="620" y="250">6@2</text><text x="740" y="250">7@3</text><text x="580" y="321">1</text><text x="650" y="321">2</text><text x="720" y="321">3</text><text x="790" y="321">4</text><text x="835" y="251">5</text></g>
  14. </svg>