123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
- <title>GTL - Graph Template Library: pq_node.h Source File</title>
- <link href="doxygen.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <p class="links">
- <a href="../index.html">Home</a> |
- Documentation |
- <a href="../register.html">Download</a> |
- <a href="../platforms.html">Platforms</a> |
- <a href="../refer.html">Projects</a> |
- <a href="../lists.html">Mailing Lists</a> |
- <a href="../history.html">Version History</a>
- </p>
- <!-- Generated by Doxygen 1.5.3 -->
- <div class="tabs">
- <ul>
- <li><a href="index.html"><span>Main Page</span></a></li>
- <li><a href="classes.html"><span>Classes</span></a></li>
- <li class="current"><a href="files.html"><span>Files</span></a></li>
- <li><a href="pages.html"><span>Related Pages</span></a></li>
- </ul>
- </div>
- <h1>pq_node.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//==========================================================================</span>
- <a name="l00002"></a>00002 <span class="comment">//</span>
- <a name="l00003"></a>00003 <span class="comment">// pq_node.h</span>
- <a name="l00004"></a>00004 <span class="comment">//</span>
- <a name="l00005"></a>00005 <span class="comment">//==========================================================================</span>
- <a name="l00006"></a>00006 <span class="comment">// $Id: pq_node.h,v 1.15 2003/04/03 11:48:26 raitner Exp $</span>
- <a name="l00007"></a>00007
- <a name="l00008"></a>00008 <span class="preprocessor">#ifndef PQ_NODE_H</span>
- <a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define PQ_NODE_H</span>
- <a name="l00010"></a>00010 <span class="preprocessor"></span>
- <a name="l00011"></a>00011 <span class="preprocessor">#include <GTL/GTL.h></span>
- <a name="l00012"></a>00012 <span class="preprocessor">#include <GTL/symlist.h></span>
- <a name="l00013"></a>00013 <span class="preprocessor">#include <GTL/graph.h></span>
- <a name="l00014"></a>00014
- <a name="l00015"></a>00015 <span class="preprocessor">#include <list></span>
- <a name="l00016"></a>00016 <span class="preprocessor">#include <iostream></span>
- <a name="l00017"></a>00017
- <a name="l00018"></a>00018 __GTL_BEGIN_NAMESPACE
- <a name="l00019"></a>00019
- <a name="l00020"></a>00020 <span class="keyword">class </span><a class="code" href="a00024.html" title="PQ-Trees.">pq_tree</a>;
- <a name="l00021"></a>00021 <span class="keyword">class </span>p_node;
- <a name="l00022"></a>00022 <span class="keyword">class </span>q_node;
- <a name="l00023"></a>00023 <span class="keyword">class </span>pq_leaf;
- <a name="l00024"></a>00024 <span class="keyword">class </span>direction_indicator;
- <a name="l00025"></a>00025
- <a name="l00029"></a>00029 <span class="keyword">class </span>GTL_EXTERN pq_node
- <a name="l00030"></a>00030 {
- <a name="l00031"></a>00031 <span class="keyword">protected</span>:
- <a name="l00035"></a>00035 <span class="keyword">typedef</span> <a class="code" href="a00027.html" title="List which can be reversed in .">symlist<pq_node*>::iterator</a> iterator;
- <a name="l00036"></a>00036
- <a name="l00040"></a>00040 <span class="keyword">enum</span> PQ_KIND {P_NODE, Q_NODE, LEAF, DIR};
- <a name="l00041"></a>00041
- <a name="l00045"></a>00045 <span class="keyword">enum</span> PQ_MARK {UNMARKED, QUEUED, BLOCKED, UNBLOCKED};
- <a name="l00046"></a>00046
- <a name="l00050"></a>00050 pq_node (<a class="code" href="a00020.html" title="A node in a graph.">node</a> n_, <span class="keywordtype">int</span> id_) : pert_children(0),
- <a name="l00051"></a>00051 pert_leaves(0),
- <a name="l00052"></a>00052 mark (UNMARKED),
- <a name="l00053"></a>00053 n (n_),
- <a name="l00054"></a>00054 id (id_)
- <a name="l00055"></a>00055 {
- <a name="l00056"></a>00056 }
- <a name="l00057"></a>00057
- <a name="l00061"></a>00061 <span class="keyword">virtual</span> ~pq_node ();
- <a name="l00062"></a>00062
- <a name="l00067"></a>00067 <span class="keyword">virtual</span> PQ_KIND kind() <span class="keyword">const</span> = 0;
- <a name="l00068"></a>00068
- <a name="l00073"></a>00073 <span class="keyword">virtual</span> <span class="keywordtype">void</span> partial(iterator)
- <a name="l00074"></a>00074 {
- <a name="l00075"></a>00075 }
- <a name="l00076"></a>00076
- <a name="l00081"></a>00081 <span class="keyword">virtual</span> <span class="keywordtype">void</span> full(iterator)
- <a name="l00082"></a>00082 {
- <a name="l00083"></a>00083 }
- <a name="l00084"></a>00084
- <a name="l00089"></a>00089 <span class="keyword">virtual</span> <span class="keywordtype">void</span> write(ostream&, <span class="keywordtype">int</span>) = 0;
- <a name="l00090"></a>00090
- <a name="l00095"></a>00095 <span class="keyword">virtual</span> <span class="keywordtype">void</span> clear()
- <a name="l00096"></a>00096 {
- <a name="l00097"></a>00097 mark = UNMARKED;
- <a name="l00098"></a>00098 pert_leaves = 0;
- <a name="l00099"></a>00099 pert_children = 0;
- <a name="l00100"></a>00100 }
- <a name="l00101"></a>00101
- <a name="l00102"></a>00102 <span class="comment">// type-casts </span>
- <a name="l00103"></a>00103
- <a name="l00108"></a>00108 <span class="keyword">virtual</span> p_node* P() = 0;
- <a name="l00109"></a>00109
- <a name="l00114"></a>00114 <span class="keyword">virtual</span> q_node* Q() = 0;
- <a name="l00115"></a>00115
- <a name="l00120"></a>00120 <span class="keyword">virtual</span> direction_indicator* D() = 0;
- <a name="l00121"></a>00121
- <a name="l00126"></a>00126 <span class="keyword">virtual</span> pq_leaf* L() = 0;
- <a name="l00127"></a>00127
- <a name="l00128"></a>00128 <span class="comment">//</span>
- <a name="l00129"></a>00129 <span class="comment">// Data used in reductions</span>
- <a name="l00130"></a>00130 <span class="comment">//</span>
- <a name="l00131"></a>00131
- <a name="l00139"></a>00139 <span class="keywordtype">int</span> pert_children;
- <a name="l00140"></a>00140
- <a name="l00147"></a>00147 <span class="keywordtype">int</span> pert_leaves;
- <a name="l00148"></a>00148
- <a name="l00157"></a>00157 <span class="keywordtype">bool</span> is_endmost;
- <a name="l00158"></a>00158
- <a name="l00165"></a>00165 pq_node* father;
- <a name="l00166"></a>00166
- <a name="l00179"></a>00179 PQ_MARK mark;
- <a name="l00180"></a>00180
- <a name="l00185"></a>00185 <a class="code" href="a00027.html" title="List which can be reversed in .">symlist<pq_node*></a> sons;
- <a name="l00186"></a>00186
- <a name="l00191"></a>00191 iterator pos;
- <a name="l00192"></a>00192
- <a name="l00201"></a>00201 list<pq_node*>::iterator lpos;
- <a name="l00202"></a>00202
- <a name="l00203"></a>00203 <span class="comment">//</span>
- <a name="l00204"></a>00204 <span class="comment">// Application specific data (should become template parameter)</span>
- <a name="l00205"></a>00205 <span class="comment">//</span>
- <a name="l00206"></a>00206
- <a name="l00211"></a>00211 <a class="code" href="a00020.html" title="A node in a graph.">node</a> n;
- <a name="l00212"></a>00212
- <a name="l00216"></a>00216 <span class="keywordtype">int</span> id;
- <a name="l00217"></a>00217
- <a name="l00221"></a>00221 <a class="code" href="a00020.html" title="A node in a graph.">node</a> up;
- <a name="l00222"></a>00222
- <a name="l00226"></a>00226 <span class="keywordtype">int</span> up_id;
- <a name="l00227"></a>00227
- <a name="l00228"></a>00228 <span class="comment">//</span>
- <a name="l00229"></a>00229 <span class="comment">// Friends</span>
- <a name="l00230"></a>00230 <span class="comment">//</span>
- <a name="l00231"></a>00231
- <a name="l00236"></a>00236 <span class="keyword">friend</span> <span class="keyword">class </span>q_node;
- <a name="l00237"></a>00237
- <a name="l00242"></a>00242 <span class="keyword">friend</span> <span class="keyword">class </span>p_node;
- <a name="l00243"></a>00243
- <a name="l00248"></a>00248 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00024.html" title="PQ-Trees.">pq_tree</a>;
- <a name="l00249"></a>00249
- <a name="l00254"></a>00254 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00023.html" title="Tests if a graph can be drawn on a plane without any edge crossings.">planarity</a>;
- <a name="l00255"></a>00255
- <a name="l00260"></a>00260 GTL_EXTERN <span class="keyword">friend</span> ostream& operator<<(ostream&, <span class="keyword">const</span> <a class="code" href="a00024.html" title="PQ-Trees.">pq_tree</a>&);
- <a name="l00261"></a>00261 };
- <a name="l00262"></a>00262
- <a name="l00263"></a>00263
- <a name="l00267"></a>00267 <span class="keyword">class </span>GTL_EXTERN p_node : <span class="keyword">public</span> pq_node
- <a name="l00268"></a>00268 {
- <a name="l00269"></a>00269 <span class="keyword">private</span>:
- <a name="l00273"></a>00273 p_node(<a class="code" href="a00020.html" title="A node in a graph.">node</a>, <span class="keywordtype">int</span>);
- <a name="l00274"></a>00274
- <a name="l00278"></a>00278 p_node(<a class="code" href="a00020.html" title="A node in a graph.">node</a>, <span class="keywordtype">int</span>, <a class="code" href="a00027.html" title="List which can be reversed in .">symlist<pq_node*></a>&);
- <a name="l00279"></a>00279
- <a name="l00280"></a>00280 <span class="comment">//</span>
- <a name="l00281"></a>00281 <span class="comment">// pq_node interface</span>
- <a name="l00282"></a>00282 <span class="comment">// </span>
- <a name="l00283"></a>00283
- <a name="l00287"></a>00287 <span class="keywordtype">void</span> partial(iterator);
- <a name="l00288"></a>00288
- <a name="l00292"></a>00292 <span class="keywordtype">void</span> full(iterator);
- <a name="l00293"></a>00293
- <a name="l00298"></a>00298 PQ_KIND kind ()<span class="keyword"> const </span>
- <a name="l00299"></a>00299 <span class="keyword"> </span>{
- <a name="l00300"></a>00300 <span class="keywordflow">return</span> P_NODE;
- <a name="l00301"></a>00301 }
- <a name="l00302"></a>00302
- <a name="l00307"></a>00307 <span class="keywordtype">void</span> write (ostream&, <span class="keywordtype">int</span>);
- <a name="l00308"></a>00308
- <a name="l00312"></a>00312 <span class="keywordtype">void</span> clear ();
- <a name="l00313"></a>00313
- <a name="l00314"></a>00314 <span class="comment">// type-casts</span>
- <a name="l00315"></a>00315
- <a name="l00320"></a>00320 p_node* P()
- <a name="l00321"></a>00321 {
- <a name="l00322"></a>00322 <span class="keywordflow">return</span> <span class="keyword">this</span>;
- <a name="l00323"></a>00323 }
- <a name="l00324"></a>00324
- <a name="l00329"></a>00329 q_node* Q()
- <a name="l00330"></a>00330 {
- <a name="l00331"></a>00331 assert(<span class="keyword">false</span>);
- <a name="l00332"></a>00332 <span class="keywordflow">return</span> 0;
- <a name="l00333"></a>00333 }
- <a name="l00334"></a>00334
- <a name="l00339"></a>00339 direction_indicator* D()
- <a name="l00340"></a>00340 {
- <a name="l00341"></a>00341 assert(<span class="keyword">false</span>);
- <a name="l00342"></a>00342 <span class="keywordflow">return</span> 0;
- <a name="l00343"></a>00343 }
- <a name="l00344"></a>00344
- <a name="l00349"></a>00349 pq_leaf* L()
- <a name="l00350"></a>00350 {
- <a name="l00351"></a>00351 assert(<span class="keyword">false</span>);
- <a name="l00352"></a>00352 <span class="keywordflow">return</span> 0;
- <a name="l00353"></a>00353 }
- <a name="l00354"></a>00354
- <a name="l00355"></a>00355 <span class="comment">//</span>
- <a name="l00356"></a>00356 <span class="comment">// Additional</span>
- <a name="l00357"></a>00357 <span class="comment">//</span>
- <a name="l00358"></a>00358
- <a name="l00364"></a>00364 <a class="code" href="a00027.html" title="List which can be reversed in .">symlist<pq_node*></a> full_sons;
- <a name="l00365"></a>00365
- <a name="l00371"></a>00371 <a class="code" href="a00027.html" title="List which can be reversed in .">symlist<pq_node*></a> partial_sons;
- <a name="l00372"></a>00372
- <a name="l00377"></a>00377 <span class="keywordtype">int</span> child_count;
- <a name="l00378"></a>00378
- <a name="l00383"></a>00383 <span class="keywordtype">int</span> partial_count;
- <a name="l00384"></a>00384
- <a name="l00389"></a>00389 <span class="keywordtype">int</span> full_count;
- <a name="l00390"></a>00390
- <a name="l00391"></a>00391 <span class="comment">//</span>
- <a name="l00392"></a>00392 <span class="comment">// Friends </span>
- <a name="l00393"></a>00393 <span class="comment">//</span>
- <a name="l00394"></a>00394
- <a name="l00399"></a>00399 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00023.html" title="Tests if a graph can be drawn on a plane without any edge crossings.">planarity</a>;
- <a name="l00400"></a>00400
- <a name="l00405"></a>00405 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00024.html" title="PQ-Trees.">pq_tree</a>;
- <a name="l00406"></a>00406
- <a name="l00411"></a>00411 GTL_EXTERN <span class="keyword">friend</span> ostream& operator<<(ostream&, <span class="keyword">const</span> <a class="code" href="a00024.html" title="PQ-Trees.">pq_tree</a>&);
- <a name="l00412"></a>00412 };
- <a name="l00413"></a>00413
- <a name="l00414"></a>00414
- <a name="l00418"></a>00418 <span class="keyword">class </span>GTL_EXTERN q_node : <span class="keyword">public</span> pq_node
- <a name="l00419"></a>00419 {
- <a name="l00420"></a>00420 <span class="keyword">private</span>:
- <a name="l00424"></a>00424 q_node (<a class="code" href="a00020.html" title="A node in a graph.">node</a>, <span class="keywordtype">int</span>);
- <a name="l00425"></a>00425
- <a name="l00426"></a>00426 <span class="comment">//</span>
- <a name="l00427"></a>00427 <span class="comment">// pq_node interface</span>
- <a name="l00428"></a>00428 <span class="comment">// </span>
- <a name="l00429"></a>00429
- <a name="l00433"></a>00433 <span class="keywordtype">void</span> partial(iterator);
- <a name="l00434"></a>00434
- <a name="l00438"></a>00438 <span class="keywordtype">void</span> full(iterator);
- <a name="l00439"></a>00439
- <a name="l00444"></a>00444 PQ_KIND kind()<span class="keyword"> const</span>
- <a name="l00445"></a>00445 <span class="keyword"> </span>{
- <a name="l00446"></a>00446 <span class="keywordflow">return</span> Q_NODE;
- <a name="l00447"></a>00447 }
- <a name="l00448"></a>00448
- <a name="l00453"></a>00453 <span class="keywordtype">void</span> write(ostream&, <span class="keywordtype">int</span>);
- <a name="l00454"></a>00454
- <a name="l00458"></a>00458 <span class="keywordtype">void</span> clear();
- <a name="l00459"></a>00459
- <a name="l00460"></a>00460 <span class="comment">// type-casts</span>
- <a name="l00461"></a>00461
- <a name="l00466"></a>00466 p_node* P()
- <a name="l00467"></a>00467 {
- <a name="l00468"></a>00468 assert (<span class="keyword">false</span>);
- <a name="l00469"></a>00469 <span class="keywordflow">return</span> 0;
- <a name="l00470"></a>00470 }
- <a name="l00471"></a>00471
- <a name="l00476"></a>00476 q_node* Q()
- <a name="l00477"></a>00477 {
- <a name="l00478"></a>00478 <span class="keywordflow">return</span> <span class="keyword">this</span>;
- <a name="l00479"></a>00479 }
- <a name="l00480"></a>00480
- <a name="l00485"></a>00485 direction_indicator* D()
- <a name="l00486"></a>00486 {
- <a name="l00487"></a>00487 assert (<span class="keyword">false</span>);
- <a name="l00488"></a>00488 <span class="keywordflow">return</span> 0;
- <a name="l00489"></a>00489 }
- <a name="l00490"></a>00490
- <a name="l00495"></a>00495 pq_leaf* L()
- <a name="l00496"></a>00496 {
- <a name="l00497"></a>00497 assert (<span class="keyword">false</span>);
- <a name="l00498"></a>00498 <span class="keywordflow">return</span> 0;
- <a name="l00499"></a>00499 }
- <a name="l00500"></a>00500
- <a name="l00501"></a>00501 <span class="comment">//</span>
- <a name="l00502"></a>00502 <span class="comment">// Additional</span>
- <a name="l00503"></a>00503 <span class="comment">//</span>
- <a name="l00504"></a>00504
- <a name="l00510"></a>00510 <span class="keywordtype">void</span> pertinent(iterator);
- <a name="l00511"></a>00511
- <a name="l00518"></a>00518 q_node* merge (iterator);
- <a name="l00519"></a>00519
- <a name="l00524"></a>00524 <span class="keywordtype">void</span> turn ();
- <a name="l00525"></a>00525
- <a name="l00531"></a>00531 iterator pert_begin;
- <a name="l00532"></a>00532
- <a name="l00537"></a>00537 iterator pert_end;
- <a name="l00538"></a>00538
- <a name="l00545"></a>00545 iterator partial_pos[3];
- <a name="l00546"></a>00546
- <a name="l00554"></a>00554 <span class="keywordtype">bool</span> pert_cons;
- <a name="l00555"></a>00555
- <a name="l00560"></a>00560 <span class="keywordtype">int</span> partial_count;
- <a name="l00561"></a>00561
- <a name="l00566"></a>00566 <span class="keywordtype">int</span> full_count;
- <a name="l00567"></a>00567
- <a name="l00568"></a>00568 <span class="comment">//</span>
- <a name="l00569"></a>00569 <span class="comment">// Friends </span>
- <a name="l00570"></a>00570 <span class="comment">//</span>
- <a name="l00571"></a>00571
- <a name="l00576"></a>00576 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00023.html" title="Tests if a graph can be drawn on a plane without any edge crossings.">planarity</a>;
- <a name="l00577"></a>00577
- <a name="l00582"></a>00582 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00024.html" title="PQ-Trees.">pq_tree</a>;
- <a name="l00583"></a>00583 };
- <a name="l00584"></a>00584
- <a name="l00585"></a>00585
- <a name="l00589"></a>00589 <span class="keyword">class </span>GTL_EXTERN pq_leaf : <span class="keyword">public</span> pq_node
- <a name="l00590"></a>00590 {
- <a name="l00591"></a>00591 <span class="keyword">public</span>:
- <a name="l00595"></a>00595 pq_leaf (<span class="keywordtype">int</span>, <span class="keywordtype">int</span>, <a class="code" href="a00010.html" title="An edge in a graph.">edge</a>, <a class="code" href="a00020.html" title="A node in a graph.">node</a>);
- <a name="l00596"></a>00596 <span class="keyword">private</span>:
- <a name="l00601"></a>00601 PQ_KIND kind()<span class="keyword"> const</span>
- <a name="l00602"></a>00602 <span class="keyword"> </span>{
- <a name="l00603"></a>00603 <span class="keywordflow">return</span> LEAF;
- <a name="l00604"></a>00604 }
- <a name="l00605"></a>00605
- <a name="l00610"></a>00610 <span class="keywordtype">void</span> write (ostream&, <span class="keywordtype">int</span>);
- <a name="l00611"></a>00611
- <a name="l00612"></a>00612 <span class="comment">// type-casts</span>
- <a name="l00613"></a>00613
- <a name="l00618"></a>00618 p_node* P()
- <a name="l00619"></a>00619 {
- <a name="l00620"></a>00620 assert(<span class="keyword">false</span>);
- <a name="l00621"></a>00621 <span class="keywordflow">return</span> 0;
- <a name="l00622"></a>00622 }
- <a name="l00623"></a>00623
- <a name="l00628"></a>00628 q_node* Q()
- <a name="l00629"></a>00629 {
- <a name="l00630"></a>00630 assert(<span class="keyword">false</span>);
- <a name="l00631"></a>00631 <span class="keywordflow">return</span> 0;
- <a name="l00632"></a>00632 }
- <a name="l00633"></a>00633
- <a name="l00638"></a>00638 direction_indicator* D()
- <a name="l00639"></a>00639 {
- <a name="l00640"></a>00640 assert(<span class="keyword">false</span>);
- <a name="l00641"></a>00641 <span class="keywordflow">return</span> 0;
- <a name="l00642"></a>00642 }
- <a name="l00643"></a>00643
- <a name="l00648"></a>00648 pq_leaf* L()
- <a name="l00649"></a>00649 {
- <a name="l00650"></a>00650 <span class="keywordflow">return</span> <span class="keyword">this</span>;
- <a name="l00651"></a>00651 }
- <a name="l00652"></a>00652
- <a name="l00653"></a>00653 <span class="comment">//</span>
- <a name="l00654"></a>00654 <span class="comment">// Additional</span>
- <a name="l00655"></a>00655 <span class="comment">//</span>
- <a name="l00656"></a>00656
- <a name="l00660"></a>00660 <span class="keywordtype">int</span> other_id;
- <a name="l00661"></a>00661
- <a name="l00665"></a>00665 <a class="code" href="a00010.html" title="An edge in a graph.">edge</a> e;
- <a name="l00666"></a>00666
- <a name="l00667"></a>00667 <span class="comment">//</span>
- <a name="l00668"></a>00668 <span class="comment">// Friends </span>
- <a name="l00669"></a>00669 <span class="comment">//</span>
- <a name="l00670"></a>00670
- <a name="l00675"></a>00675 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00023.html" title="Tests if a graph can be drawn on a plane without any edge crossings.">planarity</a>;
- <a name="l00676"></a>00676
- <a name="l00681"></a>00681 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00024.html" title="PQ-Trees.">pq_tree</a>;
- <a name="l00682"></a>00682 };
- <a name="l00683"></a>00683
- <a name="l00684"></a>00684
- <a name="l00688"></a>00688 <span class="keyword">class </span>GTL_EXTERN direction_indicator : <span class="keyword">public</span> pq_node
- <a name="l00689"></a>00689 {
- <a name="l00690"></a>00690 <span class="keyword">private</span>:
- <a name="l00694"></a>00694 direction_indicator (<a class="code" href="a00020.html" title="A node in a graph.">node</a> n_, <span class="keywordtype">int</span> id_) : pq_node (n_, id_) { };
- <a name="l00695"></a>00695
- <a name="l00696"></a>00696 <span class="comment">//</span>
- <a name="l00697"></a>00697 <span class="comment">// pq_node interface</span>
- <a name="l00698"></a>00698 <span class="comment">// </span>
- <a name="l00699"></a>00699
- <a name="l00704"></a>00704 PQ_KIND kind()<span class="keyword"> const</span>
- <a name="l00705"></a>00705 <span class="keyword"> </span>{
- <a name="l00706"></a>00706 <span class="keywordflow">return</span> DIR;
- <a name="l00707"></a>00707 }
- <a name="l00708"></a>00708
- <a name="l00713"></a>00713 <span class="keywordtype">void</span> write (ostream& os, <span class="keywordtype">int</span>);
- <a name="l00714"></a>00714
- <a name="l00715"></a>00715 <span class="comment">// type-casts </span>
- <a name="l00716"></a>00716
- <a name="l00721"></a>00721 p_node* P()
- <a name="l00722"></a>00722 {
- <a name="l00723"></a>00723 assert(<span class="keyword">false</span>);
- <a name="l00724"></a>00724 <span class="keywordflow">return</span> 0;
- <a name="l00725"></a>00725 }
- <a name="l00726"></a>00726
- <a name="l00731"></a>00731 q_node* Q()
- <a name="l00732"></a>00732 {
- <a name="l00733"></a>00733 assert(<span class="keyword">false</span>);
- <a name="l00734"></a>00734 <span class="keywordflow">return</span> 0;
- <a name="l00735"></a>00735 }
- <a name="l00736"></a>00736
- <a name="l00741"></a>00741 direction_indicator* D()
- <a name="l00742"></a>00742 {
- <a name="l00743"></a>00743 <span class="keywordflow">return</span> <span class="keyword">this</span>;
- <a name="l00744"></a>00744 }
- <a name="l00745"></a>00745
- <a name="l00750"></a>00750 pq_leaf* L()
- <a name="l00751"></a>00751 {
- <a name="l00752"></a>00752 assert(<span class="keyword">false</span>);
- <a name="l00753"></a>00753 <span class="keywordflow">return</span> 0;
- <a name="l00754"></a>00754 }
- <a name="l00755"></a>00755
- <a name="l00756"></a>00756 <span class="comment">//</span>
- <a name="l00757"></a>00757 <span class="comment">// Additional</span>
- <a name="l00758"></a>00758 <span class="comment">//</span>
- <a name="l00759"></a>00759
- <a name="l00763"></a>00763 <span class="keywordtype">bool</span> direction;
- <a name="l00764"></a>00764
- <a name="l00765"></a>00765 <span class="comment">//</span>
- <a name="l00766"></a>00766 <span class="comment">// Friends </span>
- <a name="l00767"></a>00767 <span class="comment">//</span>
- <a name="l00768"></a>00768
- <a name="l00773"></a>00773 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00023.html" title="Tests if a graph can be drawn on a plane without any edge crossings.">planarity</a>;
- <a name="l00774"></a>00774
- <a name="l00779"></a>00779 <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="a00024.html" title="PQ-Trees.">pq_tree</a>;
- <a name="l00780"></a>00780 };
- <a name="l00781"></a>00781
- <a name="l00782"></a>00782 __GTL_END_NAMESPACE
- <a name="l00783"></a>00783
- <a name="l00784"></a>00784 <span class="preprocessor">#endif</span>
- <a name="l00785"></a>00785 <span class="preprocessor"></span>
- <a name="l00786"></a>00786 <span class="comment">//--------------------------------------------------------------------------</span>
- <a name="l00787"></a>00787 <span class="comment">// end of file</span>
- <a name="l00788"></a>00788 <span class="comment">//--------------------------------------------------------------------------</span>
- </pre></div> <p class="links">
- <a href="http://www.uni-passau.de/">University of Passau</a>
- -
- <a href="http://www.fmi.uni-passau.de/">FMI</a>
- -
- <a href="http://www.fmi.uni-passau.de/fmi/lehrstuehle/brandenburg/">Theoretical
- Computer Science</a>
- </p>
- <div class="copyright">
- Design © 2002, 2003 <a href="mailto:raitner@fmi.uni-passau.de">Marcus Raitner</a>, University of Passau
- </div>
- </body>
- </html>
|