00-连通-01-缩点.svg 1.8 KB

1234567891011
  1. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 300" role="img" aria-labelledby="title desc">
  2. <title id="title">强连通分量缩点为 DAG</title><desc id="desc">三个互相可达团被缩成三个点,团之间只保留单向箭头。</desc>
  3. <style>text{font-family:system-ui,sans-serif;fill:#172033}.blob{fill:#dbeafe;stroke:#2563eb;stroke-width:4}.node{fill:#fff;stroke:#2563eb;stroke-width:3}.arr{stroke:#475569;stroke-width:4;fill:none}.label{font-size:25px;font-weight:700}.note{font-size:19px}</style>
  4. <text x="30" y="34" class="note">团内任意两点都能来回;缩成一个点后,只关心团与团的方向。</text>
  5. <ellipse class="blob" cx="160" cy="160" rx="115" ry="83"/><circle class="node" cx="120" cy="150" r="23"/><circle class="node" cx="180" cy="105" r="23"/><circle class="node" cx="205" cy="190" r="23"/><text class="label" x="111" y="159">A</text><text class="label" x="171" y="114">B</text><text class="label" x="196" y="199">C</text>
  6. <ellipse class="blob" cx="425" cy="160" rx="85" ry="68"/><circle class="node" cx="398" cy="145" r="23"/><circle class="node" cx="452" cy="177" r="23"/><text class="label" x="389" y="154">D</text><text class="label" x="443" y="186">E</text>
  7. <ellipse class="blob" cx="655" cy="160" rx="55" ry="48"/><circle class="node" cx="655" cy="160" r="23"/><text class="label" x="647" y="169">F</text>
  8. <path class="arr" d="M275 160 L334 160" marker-end="url(#a)"/><path class="arr" d="M510 160 L594 160" marker-end="url(#a)"/>
  9. <text x="97" y="274" class="note">{A,B,C}</text><text x="380" y="274" class="note">{D,E}</text><text x="628" y="274" class="note">{F}</text>
  10. <defs><marker id="a" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M0 0 L10 5 L0 10z" fill="#475569"/></marker></defs>
  11. </svg>