155 lines
24 KiB
XML
155 lines
24 KiB
XML
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
|
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.6">
|
|
<compounddef id="nodevisitor_8hpp" kind="file">
|
|
<compoundname>nodevisitor.hpp</compoundname>
|
|
<includedby refid="nodevisitor_8hh" local="no">/usr/include/gecode/gist/nodevisitor.hh</includedby>
|
|
<invincdepgraph>
|
|
<node id="7960">
|
|
<label>/usr/include/gecode/gist/nodevisitor.hpp</label>
|
|
<link refid="nodevisitor.hpp"/>
|
|
<childnode refid="7961" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="7961">
|
|
<label>/usr/include/gecode/gist/nodevisitor.hh</label>
|
|
<link refid="nodevisitor_8hh_source"/>
|
|
</node>
|
|
</invincdepgraph>
|
|
<innernamespace refid="namespaceGecode">Gecode</innernamespace>
|
|
<innernamespace refid="namespaceGecode_1_1Gist">Gecode::Gist</innernamespace>
|
|
<briefdescription>
|
|
</briefdescription>
|
|
<detaileddescription>
|
|
</detaileddescription>
|
|
<programlisting>
|
|
<codeline lineno="1"><highlight class="comment">/*<sp/>-*-<sp/>mode:<sp/>C++;<sp/>c-basic-offset:<sp/>2;<sp/>indent-tabs-mode:<sp/>nil<sp/>-*-<sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
|
|
<codeline lineno="3"><highlight class="comment"><sp/>*<sp/><sp/>Main<sp/>authors:</highlight></codeline>
|
|
<codeline lineno="4"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Guido<sp/>Tack<sp/><tack@gecode.org></highlight></codeline>
|
|
<codeline lineno="5"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="6"><highlight class="comment"><sp/>*<sp/><sp/>Copyright:</highlight></codeline>
|
|
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Guido<sp/>Tack,<sp/>2006</highlight></codeline>
|
|
<codeline lineno="8"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="9"><highlight class="comment"><sp/>*<sp/><sp/>Last<sp/>modified:</highlight></codeline>
|
|
<codeline lineno="10"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>$Date:<sp/>2010-07-30<sp/>17:08:42<sp/>+0200<sp/>(Fri,<sp/>30<sp/>Jul<sp/>2010)<sp/>$<sp/>by<sp/>$Author:<sp/>tack<sp/>$</highlight></codeline>
|
|
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>$Revision:<sp/>11315<sp/>$</highlight></codeline>
|
|
<codeline lineno="12"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/><sp/>This<sp/>file<sp/>is<sp/>part<sp/>of<sp/>Gecode,<sp/>the<sp/>generic<sp/>constraint</highlight></codeline>
|
|
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/><sp/>development<sp/>environment:</highlight></codeline>
|
|
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>http://www.gecode.org</highlight></codeline>
|
|
<codeline lineno="16"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/>Permission<sp/>is<sp/>hereby<sp/>granted,<sp/>free<sp/>of<sp/>charge,<sp/>to<sp/>any<sp/>person<sp/>obtaining</highlight></codeline>
|
|
<codeline lineno="18"><highlight class="comment"><sp/>*<sp/>a<sp/>copy<sp/>of<sp/>this<sp/>software<sp/>and<sp/>associated<sp/>documentation<sp/>files<sp/>(the</highlight></codeline>
|
|
<codeline lineno="19"><highlight class="comment"><sp/>*<sp/>"Software"),<sp/>to<sp/>deal<sp/>in<sp/>the<sp/>Software<sp/>without<sp/>restriction,<sp/>including</highlight></codeline>
|
|
<codeline lineno="20"><highlight class="comment"><sp/>*<sp/>without<sp/>limitation<sp/>the<sp/>rights<sp/>to<sp/>use,<sp/>copy,<sp/>modify,<sp/>merge,<sp/>publish,</highlight></codeline>
|
|
<codeline lineno="21"><highlight class="comment"><sp/>*<sp/>distribute,<sp/>sublicense,<sp/>and/or<sp/>sell<sp/>copies<sp/>of<sp/>the<sp/>Software,<sp/>and<sp/>to</highlight></codeline>
|
|
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/>permit<sp/>persons<sp/>to<sp/>whom<sp/>the<sp/>Software<sp/>is<sp/>furnished<sp/>to<sp/>do<sp/>so,<sp/>subject<sp/>to</highlight></codeline>
|
|
<codeline lineno="23"><highlight class="comment"><sp/>*<sp/>the<sp/>following<sp/>conditions:</highlight></codeline>
|
|
<codeline lineno="24"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="25"><highlight class="comment"><sp/>*<sp/>The<sp/>above<sp/>copyright<sp/>notice<sp/>and<sp/>this<sp/>permission<sp/>notice<sp/>shall<sp/>be</highlight></codeline>
|
|
<codeline lineno="26"><highlight class="comment"><sp/>*<sp/>included<sp/>in<sp/>all<sp/>copies<sp/>or<sp/>substantial<sp/>portions<sp/>of<sp/>the<sp/>Software.</highlight></codeline>
|
|
<codeline lineno="27"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="28"><highlight class="comment"><sp/>*<sp/>THE<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>"AS<sp/>IS",<sp/>WITHOUT<sp/>WARRANTY<sp/>OF<sp/>ANY<sp/>KIND,</highlight></codeline>
|
|
<codeline lineno="29"><highlight class="comment"><sp/>*<sp/>EXPRESS<sp/>OR<sp/>IMPLIED,<sp/>INCLUDING<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO<sp/>THE<sp/>WARRANTIES<sp/>OF</highlight></codeline>
|
|
<codeline lineno="30"><highlight class="comment"><sp/>*<sp/>MERCHANTABILITY,<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>AND</highlight></codeline>
|
|
<codeline lineno="31"><highlight class="comment"><sp/>*<sp/>NONINFRINGEMENT.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL<sp/>THE<sp/>AUTHORS<sp/>OR<sp/>COPYRIGHT<sp/>HOLDERS<sp/>BE</highlight></codeline>
|
|
<codeline lineno="32"><highlight class="comment"><sp/>*<sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>CLAIM,<sp/>DAMAGES<sp/>OR<sp/>OTHER<sp/>LIABILITY,<sp/>WHETHER<sp/>IN<sp/>AN<sp/>ACTION</highlight></codeline>
|
|
<codeline lineno="33"><highlight class="comment"><sp/>*<sp/>OF<sp/>CONTRACT,<sp/>TORT<sp/>OR<sp/>OTHERWISE,<sp/>ARISING<sp/>FROM,<sp/>OUT<sp/>OF<sp/>OR<sp/>IN<sp/>CONNECTION</highlight></codeline>
|
|
<codeline lineno="34"><highlight class="comment"><sp/>*<sp/>WITH<sp/>THE<sp/>SOFTWARE<sp/>OR<sp/>THE<sp/>USE<sp/>OR<sp/>OTHER<sp/>DEALINGS<sp/>IN<sp/>THE<sp/>SOFTWARE.</highlight></codeline>
|
|
<codeline lineno="35"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="36"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="37"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="38"><highlight class="normal"></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">Gecode<sp/>{<sp/></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">Gist<sp/>{</highlight></codeline>
|
|
<codeline lineno="39"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="40"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Cursor></highlight></codeline>
|
|
<codeline lineno="41"><highlight class="normal"><sp/><sp/>forceinline</highlight></codeline>
|
|
<codeline lineno="42" refid="classGecode_1_1Gist_1_1NodeVisitor_1a9b4cdf49f9a152431c807b917ec9253d" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Gist_1_1NodeVisitor_1a9b4cdf49f9a152431c807b917ec9253d" kindref="member">NodeVisitor<Cursor>::NodeVisitor</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Cursor&<sp/>c0)<sp/>:<sp/>c(c0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="44"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Cursor></highlight></codeline>
|
|
<codeline lineno="45"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="46" refid="classGecode_1_1Gist_1_1NodeVisitor_1aaa48ba858b4dd010faf37bdd1d287944" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Gist_1_1NodeVisitor_1aaa48ba858b4dd010faf37bdd1d287944" kindref="member">NodeVisitor<Cursor>::setCursor</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Cursor&<sp/>c0)<sp/>{<sp/>c<sp/>=<sp/>c0;<sp/>}</highlight></codeline>
|
|
<codeline lineno="47"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="48"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Cursor></highlight></codeline>
|
|
<codeline lineno="49"><highlight class="normal"><sp/><sp/>forceinline<sp/>Cursor&</highlight></codeline>
|
|
<codeline lineno="50" refid="classGecode_1_1Gist_1_1NodeVisitor_1a8aa1a16f84407334f462429c395ae5d0" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Gist_1_1NodeVisitor_1a8aa1a16f84407334f462429c395ae5d0" kindref="member">NodeVisitor<Cursor>::getCursor</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>c;<sp/>}</highlight></codeline>
|
|
<codeline lineno="51"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="52"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Cursor></highlight></codeline>
|
|
<codeline lineno="53"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="54" refid="classGecode_1_1Gist_1_1PostorderNodeVisitor_1a418abfc25fdfc5d8d5860dc127616326" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Gist_1_1PostorderNodeVisitor_1a418abfc25fdfc5d8d5860dc127616326" kindref="member">PostorderNodeVisitor<Cursor>::moveToLeaf</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(c.mayMoveDownwards())<sp/>{</highlight></codeline>
|
|
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>c.moveDownwards();</highlight></codeline>
|
|
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="58"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="59"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="60"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Cursor></highlight></codeline>
|
|
<codeline lineno="61" refid="classGecode_1_1Gist_1_1PostorderNodeVisitor_1a010f86e243f5c426f19f8d3a192921f0" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Gist_1_1PostorderNodeVisitor_1a010f86e243f5c426f19f8d3a192921f0" kindref="member">PostorderNodeVisitor<Cursor>::PostorderNodeVisitor</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Cursor&<sp/>c0)</highlight></codeline>
|
|
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/><ref refid="classGecode_1_1Gist_1_1NodeVisitor" kindref="compound">NodeVisitor</ref><Cursor>(c0)<sp/>{</highlight></codeline>
|
|
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Gist_1_1PostorderNodeVisitor_1a418abfc25fdfc5d8d5860dc127616326" kindref="member">moveToLeaf</ref>();</highlight></codeline>
|
|
<codeline lineno="64"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="65"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="66"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Cursor></highlight></codeline>
|
|
<codeline lineno="67"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="68" refid="classGecode_1_1Gist_1_1PostorderNodeVisitor_1a490ed923911d986f3da3acebd1a4133b" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Gist_1_1PostorderNodeVisitor_1a490ed923911d986f3da3acebd1a4133b" kindref="member">PostorderNodeVisitor<Cursor>::next</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/>c.processCurrentNode();</highlight></codeline>
|
|
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(c.mayMoveSidewards())<sp/>{</highlight></codeline>
|
|
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>c.moveSidewards();</highlight></codeline>
|
|
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>moveToLeaf();</highlight></codeline>
|
|
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(c.mayMoveUpwards())<sp/>{</highlight></codeline>
|
|
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>c.moveUpwards();</highlight></codeline>
|
|
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
|
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="79"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="80"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="81"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Cursor></highlight></codeline>
|
|
<codeline lineno="82"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="83" refid="classGecode_1_1Gist_1_1PostorderNodeVisitor_1a6034cffddd9839b8a22116169365cbfb" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Gist_1_1PostorderNodeVisitor_1a6034cffddd9839b8a22116169365cbfb" kindref="member">PostorderNodeVisitor<Cursor>::run</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(next())<sp/>{}</highlight></codeline>
|
|
<codeline lineno="85"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="86"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="87"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Cursor></highlight></codeline>
|
|
<codeline lineno="88"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="89" refid="classGecode_1_1Gist_1_1PreorderNodeVisitor_1afb756ddfdb1a5b3493c23aaf48c1f31a" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Gist_1_1PreorderNodeVisitor_1afb756ddfdb1a5b3493c23aaf48c1f31a" kindref="member">PreorderNodeVisitor<Cursor>::backtrack</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(!<sp/>c.mayMoveSidewards()<sp/>&&<sp/>c.mayMoveUpwards())<sp/>{</highlight></codeline>
|
|
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>c.moveUpwards();</highlight></codeline>
|
|
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!<sp/>c.mayMoveUpwards())<sp/>{</highlight></codeline>
|
|
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
|
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>c.moveSidewards();</highlight></codeline>
|
|
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="99"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="100"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="101"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Cursor></highlight></codeline>
|
|
<codeline lineno="102" refid="classGecode_1_1Gist_1_1PreorderNodeVisitor_1a41d8898d812d694fbe46f55622164336" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Gist_1_1PreorderNodeVisitor_1a41d8898d812d694fbe46f55622164336" kindref="member">PreorderNodeVisitor<Cursor>::PreorderNodeVisitor</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Cursor&<sp/>c0)</highlight></codeline>
|
|
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/><ref refid="classGecode_1_1Gist_1_1NodeVisitor" kindref="compound">NodeVisitor</ref><Cursor>(c0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="104"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="105"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Cursor></highlight></codeline>
|
|
<codeline lineno="106"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="107" refid="classGecode_1_1Gist_1_1PreorderNodeVisitor_1a6227ac2d91b2c056f1b2cb347b522a3a" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Gist_1_1PreorderNodeVisitor_1a6227ac2d91b2c056f1b2cb347b522a3a" kindref="member">PreorderNodeVisitor<Cursor>::next</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/>c.processCurrentNode();</highlight></codeline>
|
|
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(c.mayMoveDownwards())<sp/>{</highlight></codeline>
|
|
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>c.moveDownwards();</highlight></codeline>
|
|
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(c.mayMoveSidewards())<sp/>{</highlight></codeline>
|
|
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>c.moveSidewards();</highlight></codeline>
|
|
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
|
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>backtrack();</highlight></codeline>
|
|
<codeline lineno="115"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="117"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="118"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="119"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Cursor></highlight></codeline>
|
|
<codeline lineno="120"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="121" refid="classGecode_1_1Gist_1_1PreorderNodeVisitor_1a6ba849bcb0fb80620afdafe24f925236" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Gist_1_1PreorderNodeVisitor_1a6ba849bcb0fb80620afdafe24f925236" kindref="member">PreorderNodeVisitor<Cursor>::run</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{</highlight></codeline>
|
|
<codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(next())<sp/>{}</highlight></codeline>
|
|
<codeline lineno="123"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="124"><highlight class="normal">}}</highlight></codeline>
|
|
<codeline lineno="125"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="126"><highlight class="normal"></highlight><highlight class="comment">//<sp/>STATISTICS:<sp/>gist-any</highlight><highlight class="normal"></highlight></codeline>
|
|
</programlisting>
|
|
<location file="/usr/include/gecode/gist/nodevisitor.hpp"/>
|
|
</compounddef>
|
|
</doxygen>
|