<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Zirkulare Abhängigkeiten überprüfen]]></title><description><![CDATA[<p>Hallo, mir fällt irgendwie kein Einsatz ein. Z.B.:</p>
<pre><code class="language-cpp">struct Ding {
    int num;
    std::vector&lt;Ding const*&gt; abhaengigvon;
};
</code></pre>
<p>Davon hab ich ganz viele in einem Container. Wie könnte ich prüfen ob hier mehrere Dinge untereinander abhängig sind? Also z.B:</p>
<p>A abhängig von B<br />
B abhängig von C<br />
C abhängig von A<br />
--&gt; Boom!</p>
<p>Mein aktueller Ansatz ist es einfach für jedes Ding die Abhängigkeit zu prüfen. Wenn nicht erfüllt erstmal liegen lassen. Das mache ich solange bis entweder<br />
a) alle Dinge aktiviert sind<br />
b) in einem Durchlauf nichts aktiviert werden konnte --&gt; Fehler.</p>
<p>Diesen Fehler möchte ich aber noch ausgeben können, mit einer Meldung a la &quot;Could not continue: A depends on B depends on C depends on A&quot; oder so.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/159613/zirkulare-abhängigkeiten-überprüfen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 11 Sep 2026 03:47:06 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/159613.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 17 Sep 2006 09:46:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Sun, 17 Sep 2006 09:46:00 GMT]]></title><description><![CDATA[<p>Hallo, mir fällt irgendwie kein Einsatz ein. Z.B.:</p>
<pre><code class="language-cpp">struct Ding {
    int num;
    std::vector&lt;Ding const*&gt; abhaengigvon;
};
</code></pre>
<p>Davon hab ich ganz viele in einem Container. Wie könnte ich prüfen ob hier mehrere Dinge untereinander abhängig sind? Also z.B:</p>
<p>A abhängig von B<br />
B abhängig von C<br />
C abhängig von A<br />
--&gt; Boom!</p>
<p>Mein aktueller Ansatz ist es einfach für jedes Ding die Abhängigkeit zu prüfen. Wenn nicht erfüllt erstmal liegen lassen. Das mache ich solange bis entweder<br />
a) alle Dinge aktiviert sind<br />
b) in einem Durchlauf nichts aktiviert werden konnte --&gt; Fehler.</p>
<p>Diesen Fehler möchte ich aber noch ausgeben können, mit einer Meldung a la &quot;Could not continue: A depends on B depends on C depends on A&quot; oder so.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1138887</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1138887</guid><dc:creator><![CDATA[Thomas ** 0]]></dc:creator><pubDate>Sun, 17 Sep 2006 09:46:00 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Sun, 17 Sep 2006 09:58:52 GMT]]></title><description><![CDATA[<p>Nun ist mir was eingefalle, aber ich weiß nicht ob es klappt (hab noch keine lauffähige Version zum testen):</p>
<p>Ich implementiere eine Methode dependsOn(Ding* ding);<br />
Diese schaut zuerst die eigenen Abängigkeiten durch, und wenn dort &quot;ding&quot; nicht drin ist fragt es alle seine Abhängigkeiten. Dadurch frage ich aber unter Umstände manche Dinge doppelt ab:</p>
<p>A braucht B<br />
A braucht C</p>
<p>B und C brauchen D</p>
<p>Nun würde A bei B und C nachfragen, und die fragen beide einmal D. Bei 10 Dingen sollte das nichts ausmachen, aber wenn ich mir das beim Protagetree vorstell glaub ich dass es was ausmacht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1138890</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1138890</guid><dc:creator><![CDATA[Thomas ** 0]]></dc:creator><pubDate>Sun, 17 Sep 2006 09:58:52 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Sun, 17 Sep 2006 10:05:41 GMT]]></title><description><![CDATA[<p>Thomas (: schrieb:</p>
<blockquote>
<p>Hallo, mir fällt irgendwie kein Einsatz ein. Z.B.:</p>
<pre><code class="language-cpp">struct Ding {
    int num;
    std::vector&lt;Ding const*&gt; abhaengigvon;
};
</code></pre>
</blockquote>
<p>über sowas denke ich auch gerade nach. bei mir ein kleines build-system (make-ersatz).</p>
<p>Thomas (: schrieb:</p>
<blockquote>
<p>Davon hab ich ganz viele in einem Container. Wie könnte ich prüfen ob hier mehrere Dinge untereinander abhängig sind? Also z.B:<br />
A abhängig von B<br />
B abhängig von C<br />
C abhängig von A<br />
--&gt; Boom!</p>
</blockquote>
<p>ich denke gleich dran, die transitive hülle zu berechnen. außerdem <a href="http://de.wikipedia.org/wiki/Zyklus_%28Graphentheorie%29" rel="nofollow">http://de.wikipedia.org/wiki/Zyklus_(Graphentheorie)</a></p>
<p>aha. <a href="http://de.wikipedia.org/wiki/Topologische_Sortierung" rel="nofollow">http://de.wikipedia.org/wiki/Topologische_Sortierung</a> fürs vorher-problem. naja, das erledisgt du ja schon nebenbei mit deinem weiteren vorgehen.</p>
<blockquote>
<p>Mein aktueller Ansatz ist es einfach für jedes Ding die Abhängigkeit zu prüfen. Wenn nicht erfüllt erstmal liegen lassen. Das mache ich solange bis entweder<br />
a) alle Dinge aktiviert sind</p>
</blockquote>
<p>jo, klingt sehr gut. man müßte mal genau prüfen, ob das zurückastellen billig ist. zum beispiel in einer queue. kann man dann n nichtzyklische jobs in O(n) abfragen? nicht, daß einem bei 10000 jobs der rechner stehenbleibt.</p>
<blockquote>
<p>b) in einem Durchlauf nichts aktiviert werden konnte --&gt; Fehler.</p>
</blockquote>
<p>ich hab zwar nicht das konzept des &quot;Durchlaufs&quot;, aber b) ist bei mir auch höchst elegant.</p>
<blockquote>
<p>Diesen Fehler möchte ich aber noch ausgeben können, mit einer Meldung a la &quot;Could not continue: A depends on B depends on C depends on A&quot; oder so.</p>
</blockquote>
<p>und jetzt erst die &quot;Zykluserkennung mittels Tiefensuche&quot;.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1138894</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1138894</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Sun, 17 Sep 2006 10:05:41 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Sun, 17 Sep 2006 10:21:19 GMT]]></title><description><![CDATA[<p>Thomas (: schrieb:</p>
<blockquote>
<p>Diese schaut zuerst die eigenen Abängigkeiten durch, und wenn dort &quot;ding&quot; nicht drin ist fragt es alle seine Abhängigkeiten. Dadurch frage ich aber unter Umstände manche Dinge doppelt ab:<br />
A braucht B<br />
A braucht C<br />
B und C brauchen D<br />
Nun würde A bei B und C nachfragen, und die fragen beide einmal D. Bei 10 Dingen sollte das nichts ausmachen, aber wenn ich mir das beim Protagetree vorstell glaub ich dass es was ausmacht.</p>
</blockquote>
<p>dann flute dein netz von A aus, und schau, von wo aus zuerst nach A wasser reinläuft.</p>
<pre><code>//ungetestet
hast einen 
queue&lt;Knoten*&gt; kueste={A}
und eine
set&lt;Knoten*&gt; trocken=alleKnotwenDieEsGibt

in jedem durchlauf machste.. ups, hab ja schon wieder die durchläüfe weggemacht durch ne kontinuierliche schleiife, ich schelm. 

machst halt

while k=kueste.pop()
   trocken.remove(k)
   foreach n in k-&gt;nachbar
      if n==A 
         return gefunden!!!
      else if trocken.has(n)
         kueste.push(n)
         trocken.remove(n)
      endif
   endfor
endwhile
</code></pre>
<p>machste bool trocken in die knoten rein, brauchste das set nicht. und mit Knoten* woherKonntsWasser kannste dann von A aus den kreis zurückgehen bis wieder A kommt und anzeigen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1138906</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1138906</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Sun, 17 Sep 2006 10:21:19 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Sun, 17 Sep 2006 17:08:11 GMT]]></title><description><![CDATA[<p>Danke für die Antworten, hat michs ehr weiter gebracht!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1139109</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1139109</guid><dc:creator><![CDATA[Thomas ** 0]]></dc:creator><pubDate>Sun, 17 Sep 2006 17:08:11 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Mon, 18 Sep 2006 10:03:52 GMT]]></title><description><![CDATA[<p>Wenn du deine Datenstruktur anpasst, kannst du sehr schnelle Graph Scanning Algorithmen verwenden, wie z.B. solche die auf Breitensuche basieren, also O(Kanten + Ecken) Laufzeit haben. Dazu sollte der Graph in Adjazenzlisten Form vorliegen.<br />
Details z.B. bei Wikipedia.</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1139441</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1139441</guid><dc:creator><![CDATA[Mr.Know-it-all]]></dc:creator><pubDate>Mon, 18 Sep 2006 10:03:52 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Mon, 18 Sep 2006 10:21:49 GMT]]></title><description><![CDATA[<p>Mr.Know-it-all schrieb:</p>
<blockquote>
<p>Wenn du deine Datenstruktur anpasst, kannst du sehr schnelle Graph Scanning Algorithmen verwenden, wie z.B. solche die auf Breitensuche basieren, also O(Kanten + Ecken) Laufzeit haben.</p>
</blockquote>
<p>das ist ja fein.<br />
wie ist nochmal die komplexität des von mir angegebenen algos? auch O(Kanten+Ecken)? das schien mir so beim einfach mal abschätzen. wo hab ich mich vertan?</p>
<blockquote>
<p>Dazu sollte der Graph in Adjazenzlisten Form vorliegen.<br />
Details z.B. bei Wikipedia.</p>
</blockquote>
<p>detailangabe abgelehnt. schon ein wenig genauer, falls du hilfreich helfen willst. und ich widerspreche mal prophylaktisch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1139449</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1139449</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Mon, 18 Sep 2006 10:21:49 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Mon, 18 Sep 2006 11:23:52 GMT]]></title><description><![CDATA[<p>volkard, meinst du sowas?<br />
<a href="http://www.boost.org/libs/graph/doc/file_dependency_example.html" rel="nofollow">BGL File Dependency Example</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1139485</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1139485</guid><dc:creator><![CDATA[THX 1138]]></dc:creator><pubDate>Mon, 18 Sep 2006 11:23:52 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Mon, 18 Sep 2006 11:51:27 GMT]]></title><description><![CDATA[<p>1310-Logik schrieb:</p>
<blockquote>
<p>volkard, meinst du sowas?<br />
<a href="http://www.boost.org/libs/graph/doc/file_dependency_example.html" rel="nofollow">BGL File Dependency Example</a></p>
</blockquote>
<p>ja, so ähnlich.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1139499</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1139499</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Mon, 18 Sep 2006 11:51:27 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Mon, 18 Sep 2006 12:16:15 GMT]]></title><description><![CDATA[<p>Naja, da stehts doch:</p>
<blockquote>
<p>depth-first search</p>
<p>Complexity<br />
The time complexity is O(E + V)</p>
</blockquote>
<p>Die Boost Adjazenzliste ist einfach zu benutzen.<br />
Und wenn dir BGL nicht gefällt, kannst es ja nachbauen. Ist aber sehr nett generisch aufgebaut.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1139534</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1139534</guid><dc:creator><![CDATA[THX 1138]]></dc:creator><pubDate>Mon, 18 Sep 2006 12:16:15 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Mon, 18 Sep 2006 12:30:02 GMT]]></title><description><![CDATA[<p>1310-Logik schrieb:</p>
<blockquote>
<p>Naja, da stehts doch:</p>
<blockquote>
<p>depth-first search<br />
Complexity<br />
The time complexity is O(E + V)</p>
</blockquote>
<p>Die Boost Adjazenzliste ist einfach zu benutzen.<br />
Und wenn dir BGL nicht gefällt, kannst es ja nachbauen. Ist aber sehr nett generisch aufgebaut.</p>
</blockquote>
<p>da steht jetzt auch nicht drin, daß man adjazenzlisten nehmen sollte, um O(E+V) zu erreichen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1139540</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1139540</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Mon, 18 Sep 2006 12:30:02 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Mon, 18 Sep 2006 13:38:20 GMT]]></title><description><![CDATA[<p>BGL Docu schrieb:</p>
<blockquote>
<p>The advantage of this matrix format (adjacency matrix Anm.d.Q.) over the adjacency list is that edge insertion and removal is constant time. There are several disadvantages. The first is that the amount of memory used is O(V2) instead of O(V + E) (where E is the number of edges). The second is that operations that traverse all the out-edges of each vertex (such as breadth-first search) run in O(V2) time instead of O(V + E) time for the adjacency list. In short, it is better to use the adjacency_matrix for dense graphs (where E is close to V2) and it is better to use adjacency_list for sparse graphs (where E is much smaller than V2).</p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /><br />
<a href="http://www.boost.org/libs/graph/doc/adjacency_matrix.html" rel="nofollow">Quelle</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1139632</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1139632</guid><dc:creator><![CDATA[THX 1138]]></dc:creator><pubDate>Mon, 18 Sep 2006 13:38:20 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Mon, 18 Sep 2006 18:41:30 GMT]]></title><description><![CDATA[<p>1310-Logik schrieb:</p>
<blockquote>
<p>BGL Docu schrieb:</p>
<blockquote>
<p>The advantage of this matrix format (adjacency matrix Anm.d.Q.) over the adjacency list is that edge insertion and removal is constant time. There are several disadvantages. The first is that the amount of memory used is O(V2) instead of O(V + E) (where E is the number of edges). The second is that operations that traverse all the out-edges of each vertex (such as breadth-first search) run in O(V2) time instead of O(V + E) time for the adjacency list. In short, it is better to use the adjacency_matrix for dense graphs (where E is close to V2) and it is better to use adjacency_list for sparse graphs (where E is much smaller than V2).</p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /><br />
<a href="http://www.boost.org/libs/graph/doc/adjacency_matrix.html" rel="nofollow">Quelle</a></p>
</blockquote>
<p>immernochnicht steht da, daß man adjazenzlisten nehmen sollte, statt dem ursprünglichen</p>
<pre><code class="language-cpp">struct Ding { 
    int num; 
    std::vector&lt;Ding const*&gt; abhaengigvon; 
};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1139932</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1139932</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Mon, 18 Sep 2006 18:41:30 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Tue, 19 Sep 2006 07:26:10 GMT]]></title><description><![CDATA[<p>volkard schrieb:</p>
<blockquote>
<p>immernochnicht steht da, daß man adjazenzlisten nehmen sollte, statt dem ursprünglichen</p>
<pre><code class="language-cpp">struct Ding { 
    int num; 
    std::vector&lt;Ding const*&gt; abhaengigvon; 
};
</code></pre>
</blockquote>
<p>Was unterscheidet denn dieses Konstrukt von ner Adjazenzliste?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1140117</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1140117</guid><dc:creator><![CDATA[THX 1138]]></dc:creator><pubDate>Tue, 19 Sep 2006 07:26:10 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Tue, 19 Sep 2006 12:51:52 GMT]]></title><description><![CDATA[<p>1310-Logik schrieb:</p>
<blockquote>
<p>Was unterscheidet denn dieses Konstrukt von ner Adjazenzliste?</p>
</blockquote>
<p>uups.<br />
gar nichts.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1140341</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1140341</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Tue, 19 Sep 2006 12:51:52 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Tue, 19 Sep 2006 13:08:54 GMT]]></title><description><![CDATA[<p>volkard schrieb:</p>
<blockquote>
<p>1310-Logik schrieb:</p>
<blockquote>
<p>Was unterscheidet denn dieses Konstrukt von ner Adjazenzliste?</p>
</blockquote>
<p>uups.<br />
gar nichts.</p>
</blockquote>
<p>Juhuu :p<br />
Nein nur spass!<br />
Die BGL Doku gibt übrigends auch sehr viel über Umsetzung der Graphentheorie in C++ her. Ist wirklich nett zu gebrauchen, und ähnlich aufgebaut wie die STL und die Algorithmen sind optimiert worden. Aber Du bist sicher mehr fürs selberbasteln <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1140355</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1140355</guid><dc:creator><![CDATA[THX 1138]]></dc:creator><pubDate>Tue, 19 Sep 2006 13:08:54 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Tue, 19 Sep 2006 13:21:32 GMT]]></title><description><![CDATA[<p>1310-Logik schrieb:</p>
<blockquote>
<p>volkard schrieb:</p>
<blockquote>
<p>1310-Logik schrieb:</p>
<blockquote>
<p>Was unterscheidet denn dieses Konstrukt von ner Adjazenzliste?</p>
</blockquote>
<p>uups.<br />
gar nichts.</p>
</blockquote>
<p>Juhuu :p<br />
Nein nur spass!<br />
Die BGL Doku gibt übrigends auch sehr viel über Umsetzung der Graphentheorie in C++ her. Ist wirklich nett zu gebrauchen, und ähnlich aufgebaut wie die STL und die Algorithmen sind optimiert worden. Aber Du bist sicher mehr fürs selberbasteln <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
</blockquote>
<p>Wie wärs mit nem Beispiel? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1140370</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1140370</guid><dc:creator><![CDATA[phlox81]]></dc:creator><pubDate>Tue, 19 Sep 2006 13:21:32 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Tue, 19 Sep 2006 13:31:46 GMT]]></title><description><![CDATA[<p>phlox81 schrieb:</p>
<blockquote>
<p>Wie wärs mit nem Beispiel? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
Was meinst Du? Den Link weiter vorne zB?</p>
<p>1310-Logik schrieb:</p>
<blockquote>
<p><a href="http://www.boost.org/libs/graph/doc/file_dependency_example.html" rel="nofollow">BGL File Dependency Example</a></p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1140380</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1140380</guid><dc:creator><![CDATA[THX 1138]]></dc:creator><pubDate>Tue, 19 Sep 2006 13:31:46 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Tue, 19 Sep 2006 13:58:42 GMT]]></title><description><![CDATA[<p>1310-Logik schrieb:</p>
<blockquote>
<p>phlox81 schrieb:</p>
<blockquote>
<p>Wie wärs mit nem Beispiel? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /><br />
Was meinst Du? Den Link weiter vorne zB?</p>
<p>1310-Logik schrieb:</p>
<blockquote>
<p><a href="http://www.boost.org/libs/graph/doc/file_dependency_example.html" rel="nofollow">BGL File Dependency Example</a></p>
</blockquote>
</blockquote>
<p>Naja, eher wie man aus</p>
<pre><code class="language-cpp">struct Ding {
    int num;
    std::vector&lt;Ding const*&gt; abhaengigvon;
};
</code></pre>
<p>so ne Liste macht. Oder hab ich da was falsch verstanden?<br />
Müsste er jetzt für jedes Element von abhaengigvon eine Edge(this,abhaengigvon) erstellen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1140420</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1140420</guid><dc:creator><![CDATA[phlox81]]></dc:creator><pubDate>Tue, 19 Sep 2006 13:58:42 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Tue, 19 Sep 2006 14:13:57 GMT]]></title><description><![CDATA[<p>Aso..</p>
<p>Du haust die Structs einfach in nen Vector, dann hast Du alle Abhängigkeiten von allen Vertices in einem.<br />
Die Adjazenzliste sieht dann so aus:</p>
<pre><code class="language-cpp">[1] -&gt; [3][5][7][8]
[2] -&gt; [4][5][6]
[3] -&gt; [1][2][8][9]
[4] -&gt; [2][7]
//...usw
</code></pre>
<p>Bessere Abbildung auf <a href="http://www.tilman.de/uni/ws03/alp/adjazenz.php" rel="nofollow">http://www.tilman.de/uni/ws03/alp/adjazenz.php</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1140442</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1140442</guid><dc:creator><![CDATA[THX 1138]]></dc:creator><pubDate>Tue, 19 Sep 2006 14:13:57 GMT</pubDate></item><item><title><![CDATA[Reply to Zirkulare Abhängigkeiten überprüfen on Tue, 19 Sep 2006 15:36:33 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">class Vertex
{
public:
    void add_edge( Vertex target );
    void remove_edge( Vertex target );
private:
    Ding&amp; das_ding;
    std::vector&lt;Vertex*&gt; edges;
};

class adjacency_list
{
public:
// Ein paar nette Methoden spendieren
    void add_vertex( Vertex vert );
    void remove_vertex( Vertex vert );    // Entfernt vert und seine edges
    void clear_vertex( Vertex vert );     // Entfernt nur die edges von vert
    void add_edge( Vertex source, Vertex target );
    void remove_edge( Vertex source, Vertex target );

private:
    std::vector&lt;Vertex*&gt; vertices;
};

// Iteratoren fehlen noch
</code></pre>
<p>Oder so ähnlich, am besten als Template <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1140511</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1140511</guid><dc:creator><![CDATA[THX 1138]]></dc:creator><pubDate>Tue, 19 Sep 2006 15:36:33 GMT</pubDate></item></channel></rss>