This commit is contained in:
krahets
2024-09-28 09:26:59 +08:00
parent 55b91eb967
commit 8ffc9616e9
34 changed files with 548 additions and 591 deletions
+1 -1
View File
@@ -3609,7 +3609,7 @@
<!-- Page content -->
<h1 id="92-basic-operations-on-graphs">9.2 &nbsp; Basic operations on graphs<a class="headerlink" href="#92-basic-operations-on-graphs" title="Permanent link">&para;</a></h1>
<p>The basic operations on graphs can be divided into operations on "edges" and operations on "vertices". Under the two representation methods of "adjacency matrix" and "adjacency list", the implementation methods are different.</p>
<p>The basic operations on graphs can be divided into operations on "edges" and operations on "vertices". Under the two representation methods of "adjacency matrix" and "adjacency list", the implementations are different.</p>
<h2 id="921-implementation-based-on-adjacency-matrix">9.2.1 &nbsp; Implementation based on adjacency matrix<a class="headerlink" href="#921-implementation-based-on-adjacency-matrix" title="Permanent link">&para;</a></h2>
<p>Given an undirected graph with <span class="arithmatex">\(n\)</span> vertices, the various operations are implemented as shown in Figure 9-7.</p>
<ul>