<h4>4.1 <span class="Heading">Operators for digraphs</span></h4>
<dl>
<dt><strong class="Mark"><code class="code"><var class="Arg">digraph1</var> = <var class="Arg">digraph2</var></code></strong></dt>
<dd><p>returns <code class="keyw">true</code> if <var class="Arg">digraph1</var> and <var class="Arg">digraph2</var> have the same vertices, and <code class="code">DigraphEdges(<var class="Arg">digraph1</var>) = DigraphEdges(<var class="Arg">digraph2</var>)</code>, up to some re-ordering of the edge lists.</p>
<p>Note that this operator does not compare the vertex labels of <var class="Arg">digraph1</var> and <var class="Arg">digraph2</var>.</p>
</dd>
<dt><strong class="Mark"><code class="code"><var class="Arg">digraph1</var> < <var class="Arg">digraph2</var></code></strong></dt>
<dd><p>This operator returns <code class="keyw">true</code> if one of the following holds:</p>
<ul>
<li><p>The number <span class="SimpleMath">\(n_1\)</span> of vertices in <var class="Arg">digraph1</var> is less than the number <span class="SimpleMath">\(n_2\)</span> of vertices in <var class="Arg">digraph2</var>;</p>
</li>
<li><p><span class="SimpleMath">\(n_1 = n_2\)</span>, and the number <span class="SimpleMath">\(m_1\)</span> of edges in <var class="Arg">digraph1</var> is less than the number <span class="SimpleMath">\(m_2\)</span> of edges in <var class="Arg">digraph2</var>;</p>
</li>
<li><p><span class="SimpleMath">\(n_1 = n_2\)</span>, <span class="SimpleMath">\(m_1 = m_2\)</span>, and <code class="code">DigraphEdges(<var class="Arg">digraph1</var>)</code> is less than <code class="code">DigraphEdges(<var class="Arg">digraph2</var>)</code> after having both of these sets have been sorted with respect to the lexicographical order.</p>
<p>If <var class="Arg">super</var> and <var class="Arg">sub</var> are digraphs, then this operation returns <code class="keyw">true</code> if <var class="Arg">sub</var> is a subdigraph of <var class="Arg">super</var>, and <code class="keyw">false</code> if it is not.</p>
<p>A digraph <var class="Arg">sub</var> is a <em>subdigraph</em> of a digraph <var class="Arg">super</var> if <var class="Arg">sub</var> and <var class="Arg">super</var> share the same number of vertices, and the collection of edges of <var class="Arg">super</var> (including repeats) contains the collection of edges of <var class="Arg">sub</var> (including repeats).</p>
<p>In other words, <var class="Arg">sub</var> is a subdigraph of <var class="Arg">super</var> if and only if <code class="code">DigraphNrVertices(<var class="Arg">sub</var>) = DigraphNrVertices(<var class="Arg">super</var>)</code>, and for each pair of vertices <code class="code">i</code> and <codeclass="code">j</code>, there are at least as many edges of the form <code class="code">[i, j]</code> in <var class="Arg">super</var> as there are in <var class="Arg">sub</var>.</p>
<p>The operation <code class="code">IsUndirectedSpanningTree</code> returns <code class="keyw">true</code> if the digraph <var class="Arg">sub</var> is an undirected spanning tree of the digraph <var class="Arg">super</var>, and the operation <code class="code">IsUndirectedSpanningForest</code> returns <code class="keyw">true</code> if the digraph <var class="Arg">sub</var> is an undirected spanning forest of the digraph <var class="Arg">super</var>.</p>
<p>An <em>undirected spanning tree</em> of a digraph <var class="Arg">super</var> is a subdigraph of <var class="Arg">super</var> that is an undirected tree (see <code class="func">IsSubdigraph</code> (<a href="chap4_mj.html#X829B911D7EFD2D85"><span class="RefLink">4.1-1</span></a>) and <code class="func">IsUndirectedTree</code> (<a href="chap6_mj.html#X80FC20FA7AC4BC2A"><span class="RefLink">6.6-9</span></a>)). Note that a digraph whose <code class="func">MaximalSymmetricSubdigraph</code> (<a href="chap3_mj.html#X829E3EAC7C4B3B1E"><span class="RefLink">3.3-5</span></a>) is not connected has no undirected spanning trees (see <code class="func">IsConnectedDigraph</code> (<a href="chap6_mj.html#X83C08C0B7EC1A91F"><span class="RefLink">6.6-3</span></a>)).</p>
<p>An <em>undirected spanning forest</em> of a digraph <var class="Arg">super</var> is a subdigraph of <var class="Arg">super</var> that is an undirected forest (see <code class="func">IsSubdigraph</code> (<a href="chap4_mj.html#X829B911D7EFD2D85"><span class="RefLink">4.1-1</span></a>) and <code class="func">IsUndirectedForest</code> (<a href="chap6_mj.html#X80FC20FA7AC4BC2A"><span class="RefLink">6.6-9</span></a>)), and is not contained in any larger such subdigraph of <var class="Arg">super</var>. Equivalently, an undirected spanning forest is a subdigraph of <var class="Arg">super</var> whose connected components coincide with those of the <code class="func">MaximalSymmetricSubdigraph</code> (<a href="chap3_mj.html#X829E3EAC7C4B3B1E"><span class="RefLink">3.3-5</span></a>) of <var class="Arg">super</var> (see <code class="func">DigraphConnectedComponents</code> (<a href="chap5_mj.html#X842FAD6A7B835977"><span class="RefLink">5.4-9</span></a>)).</p>
<p>Note that an undirected spanning tree is an undirected spanning forest that is connected.</p>
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.21Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.