239 lines
44 KiB
XML
239 lines
44 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="narrowing_8hpp" kind="file">
|
|
<compoundname>narrowing.hpp</compoundname>
|
|
<includedby refid="sorted_8hh" local="no">/usr/include/gecode/int/sorted.hh</includedby>
|
|
<invincdepgraph>
|
|
<node id="19469">
|
|
<label>/usr/include/gecode/int/sorted.hh</label>
|
|
<link refid="sorted_8hh_source"/>
|
|
</node>
|
|
<node id="19468">
|
|
<label>/usr/include/gecode/int/sorted/narrowing.hpp</label>
|
|
<link refid="narrowing.hpp"/>
|
|
<childnode refid="19469" relation="include">
|
|
</childnode>
|
|
</node>
|
|
</invincdepgraph>
|
|
<innernamespace refid="namespaceGecode">Gecode</innernamespace>
|
|
<innernamespace refid="namespaceGecode_1_1Int">Gecode::Int</innernamespace>
|
|
<innernamespace refid="namespaceGecode_1_1Int_1_1Sorted">Gecode::Int::Sorted</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/>Patrick<sp/>Pekczynski<sp/><pekczynski@ps.uni-sb.de></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/>Patrick<sp/>Pekczynski,<sp/>2004</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/>2012-09-07<sp/>17:31:22<sp/>+0200<sp/>(Fri,<sp/>07<sp/>Sep<sp/>2012)<sp/>$<sp/>by<sp/>$Author:<sp/>schulte<sp/>$</highlight></codeline>
|
|
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>$Revision:<sp/>13068<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/><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/><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/><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/><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/><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/><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/><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/><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/><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/><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/><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/><sp/>MERCHANTABILITY,<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>AND</highlight></codeline>
|
|
<codeline lineno="31"><highlight class="comment"><sp/>*<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/><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/><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/><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">Int<sp/>{<sp/></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">Sorted<sp/>{</highlight></codeline>
|
|
<codeline lineno="39"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="56"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="57"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="58" refid="namespaceGecode_1_1Int_1_1Sorted_1adcdcd10eff8ffd29056ccbb4ab507855" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1_1Int_1_1Sorted_1adcdcd10eff8ffd29056ccbb4ab507855" kindref="member">computesccs</ref>(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View></ref>&<sp/>x,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View></ref>&<sp/>y,</highlight></codeline>
|
|
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>phi[],<sp/><ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent" kindref="compound">SccComponent</ref><sp/>sinfo[],<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>scclist[])<sp/>{</highlight></codeline>
|
|
<codeline lineno="60"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>number<sp/>of<sp/>sccs<sp/>is<sp/>bounded<sp/>by<sp/>xs<sp/>(number<sp/>of<sp/>x-nodes)</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>xs<sp/>=<sp/>x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>();</highlight></codeline>
|
|
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Region" kindref="compound">Region</ref><sp/>r(home);</highlight></codeline>
|
|
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Support_1_1StaticStack" kindref="compound">Support::StaticStack<int,Region></ref><sp/>cs(r,xs);</highlight></codeline>
|
|
<codeline lineno="65"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//select<sp/>an<sp/>y<sp/>node<sp/>from<sp/>the<sp/>graph</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>j<sp/>=<sp/>0;<sp/>j<sp/><<sp/>xs;<sp/>j++)<sp/>{</highlight></codeline>
|
|
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>yjmin<sp/>=<sp/>y[j].min();<sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>the<sp/>processed<sp/>min</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(!cs.<ref refid="classGecode_1_1Support_1_1StaticStack_1a02834b1075e03ece518fa4edd35a6543" kindref="member">empty</ref>()<sp/>&&<sp/>x[phi[sinfo[cs.<ref refid="classGecode_1_1Support_1_1StaticStack_1a2090f793485d7a504bd30d76903e45b7" kindref="member">top</ref>()].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1abee8dfd036d1febb73233fb8a6f4f700" kindref="member">rightmost</ref>]].max()<sp/><<sp/>yjmin)<sp/>{</highlight></codeline>
|
|
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>the<sp/>topmost<sp/>scc<sp/>cannot<sp/>"reach"<sp/>y_j<sp/>or<sp/>a<sp/>node<sp/>to<sp/>the<sp/>right<sp/>of<sp/>it</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cs.<ref refid="classGecode_1_1Support_1_1StaticStack_1a0f3dcf1d3600548d935de5569aac8f6e" kindref="member">pop</ref>();</highlight></codeline>
|
|
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="73"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>a<sp/>component<sp/>has<sp/>the<sp/>form<sp/>C(y-Node,<sp/>matching<sp/>x-Node)</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>C<sp/>is<sp/>a<sp/>minimal<sp/>scc<sp/>in<sp/>the<sp/>oriented<sp/>intersection<sp/>graph</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>we<sp/>only<sp/>store<sp/>y_j-Node,<sp/>since<sp/>\phi(j)<sp/>gives<sp/>the<sp/>matching<sp/>X-node</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/><sp/><sp/><sp/><sp/>=<sp/>phi[j];</highlight></codeline>
|
|
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ximin<sp/>=<sp/>x[i].min();</highlight></codeline>
|
|
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(!cs.<ref refid="classGecode_1_1Support_1_1StaticStack_1a02834b1075e03ece518fa4edd35a6543" kindref="member">empty</ref>()<sp/>&&<sp/>ximin<sp/><=<sp/>y[sinfo[cs.<ref refid="classGecode_1_1Support_1_1StaticStack_1a2090f793485d7a504bd30d76903e45b7" kindref="member">top</ref>()].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1abee8dfd036d1febb73233fb8a6f4f700" kindref="member">rightmost</ref>].max())<sp/>{</highlight></codeline>
|
|
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>y_j<sp/>can<sp/>"reach"<sp/>cs.top()<sp/>,</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>i.e.<sp/>component<sp/>c<sp/>can<sp/>reach<sp/>component<sp/>cs.top()</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>merge<sp/>c<sp/>and<sp/>cs.top()<sp/>into<sp/>new<sp/>component</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>top<sp/>=<sp/>cs.<ref refid="classGecode_1_1Support_1_1StaticStack_1a2090f793485d7a504bd30d76903e45b7" kindref="member">top</ref>();</highlight></codeline>
|
|
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>connecting</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sinfo[sinfo[j].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1a468801ad4b107cbf03fd0001d8286519" kindref="member">leftmost</ref>].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1a8db49110c7b738e5fbee38188cab9f0a" kindref="member">left</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>top;</highlight></codeline>
|
|
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sinfo[top].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1ab690a24e559719ebcdf69e48ef842064" kindref="member">right</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>sinfo[j].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1a468801ad4b107cbf03fd0001d8286519" kindref="member">leftmost</ref>;</highlight></codeline>
|
|
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>moving<sp/>leftmost</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sinfo[j].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1a468801ad4b107cbf03fd0001d8286519" kindref="member">leftmost</ref><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>sinfo[top].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1a468801ad4b107cbf03fd0001d8286519" kindref="member">leftmost</ref>;</highlight></codeline>
|
|
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>moving<sp/>rightmost</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sinfo[sinfo[top].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1a468801ad4b107cbf03fd0001d8286519" kindref="member">leftmost</ref>].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1abee8dfd036d1febb73233fb8a6f4f700" kindref="member">rightmost</ref><sp/>=<sp/>j;</highlight></codeline>
|
|
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>cs.<ref refid="classGecode_1_1Support_1_1StaticStack_1a0f3dcf1d3600548d935de5569aac8f6e" kindref="member">pop</ref>();</highlight></codeline>
|
|
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>cs.<ref refid="classGecode_1_1Support_1_1StaticStack_1aa4163f1b6a52870024cc02baf5d72259" kindref="member">push</ref>(j);</highlight></codeline>
|
|
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/>cs.<ref refid="classGecode_1_1Support_1_1StaticStack_1a3f3bfaefda148fd91a7424ce721a5758" kindref="member">reset</ref>();</highlight></codeline>
|
|
<codeline lineno="96"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="97"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>now<sp/>we<sp/>mark<sp/>all<sp/>components<sp/>with<sp/>the<sp/>respective<sp/>scc-number</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>labeling<sp/>is<sp/>bound<sp/>by<sp/>O(k)<sp/>which<sp/>is<sp/>bound<sp/>by<sp/>O(n)</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="100"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/><<sp/>xs;<sp/>i++)<sp/>{</highlight></codeline>
|
|
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(sinfo[i].left<sp/>==<sp/>i)<sp/>{<sp/></highlight><highlight class="comment">//<sp/>only<sp/>label<sp/>variables<sp/>in<sp/>sccs</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>scc<sp/>=<sp/>sinfo[i].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1abee8dfd036d1febb73233fb8a6f4f700" kindref="member">rightmost</ref>;</highlight></codeline>
|
|
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>z<sp/><sp/><sp/>=<sp/>i;</highlight></codeline>
|
|
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//bound<sp/>by<sp/>the<sp/>size<sp/>of<sp/>the<sp/>largest<sp/>scc<sp/>=<sp/>k</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(sinfo[z].right<sp/>!=<sp/>z)<sp/>{</highlight></codeline>
|
|
<codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sinfo[z].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1abee8dfd036d1febb73233fb8a6f4f700" kindref="member">rightmost</ref><sp/><sp/><sp/>=<sp/>scc;</highlight></codeline>
|
|
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>scclist[phi[z]]<sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>scc;</highlight></codeline>
|
|
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>z<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>sinfo[z].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1ab690a24e559719ebcdf69e48ef842064" kindref="member">right</ref>;</highlight></codeline>
|
|
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sinfo[z].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1abee8dfd036d1febb73233fb8a6f4f700" kindref="member">rightmost</ref><sp/><sp/><sp/><sp/><sp/>=<sp/>scc;</highlight></codeline>
|
|
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>scclist[phi[z]]<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>=<sp/>scc;</highlight></codeline>
|
|
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="115"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="116"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="132"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View,<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>Perm></highlight></codeline>
|
|
<codeline lineno="133"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="134" refid="namespaceGecode_1_1Int_1_1Sorted_1acdaa6e92839937a6393ef1b3ddb36f41" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1_1Int_1_1Sorted_1acdaa6e92839937a6393ef1b3ddb36f41" kindref="member">narrow_domx</ref>(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,</highlight></codeline>
|
|
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View></ref>&<sp/>x,</highlight></codeline>
|
|
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View></ref>&<sp/>y,</highlight></codeline>
|
|
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View></ref>&<sp/>z,</highlight></codeline>
|
|
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>tau[],</highlight></codeline>
|
|
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">[],</highlight></codeline>
|
|
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>scclist[],</highlight></codeline>
|
|
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent" kindref="compound">SccComponent</ref><sp/>sinfo[],</highlight></codeline>
|
|
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal">&<sp/>nofix)<sp/>{</highlight></codeline>
|
|
<codeline lineno="143"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>xs<sp/>=<sp/>x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>();</highlight></codeline>
|
|
<codeline lineno="145"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>For<sp/>every<sp/>x<sp/>node</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;<sp/>i<sp/><<sp/>xs;<sp/>i++)<sp/>{</highlight></codeline>
|
|
<codeline lineno="148"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>xmin<sp/>=<sp/>x[i].min();</highlight></codeline>
|
|
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
|
<codeline lineno="151"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>take<sp/>the<sp/>scc-list<sp/>for<sp/>the<sp/>current<sp/>x<sp/>node</highlight></codeline>
|
|
<codeline lineno="152"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>start<sp/>from<sp/>the<sp/>leftmost<sp/>reachable<sp/>y<sp/>node<sp/>of<sp/>the<sp/>scc</highlight></codeline>
|
|
<codeline lineno="153"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>and<sp/>check<sp/>which<sp/>Y<sp/>node<sp/>in<sp/>the<sp/>scc<sp/>is</highlight></codeline>
|
|
<codeline lineno="154"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>really<sp/>the<sp/>rightmost<sp/>node<sp/>intersecting<sp/>x,<sp/>i.e.</highlight></codeline>
|
|
<codeline lineno="155"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>search<sp/>for<sp/>the<sp/>greatest<sp/>lower<sp/>bound<sp/>of<sp/>x</highlight></codeline>
|
|
<codeline lineno="156"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>start<sp/>=<sp/>sinfo[scclist[i]].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1a468801ad4b107cbf03fd0001d8286519" kindref="member">leftmost</ref>;</highlight></codeline>
|
|
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(y[start].max()<sp/><<sp/>xmin)<sp/>{</highlight></codeline>
|
|
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>start<sp/>=<sp/>sinfo[start].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1ab690a24e559719ebcdf69e48ef842064" kindref="member">right</ref>;</highlight></codeline>
|
|
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="161"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(Perm)<sp/>{</highlight></codeline>
|
|
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>start<sp/>is<sp/>the<sp/>leftmost-position<sp/>for<sp/>x_i</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>that<sp/>denotes<sp/>the<sp/>lower<sp/>bound<sp/>on<sp/>p_i</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="165"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__TaskVarMEPC_1gafa985ae465bd12df08e29252cdb7519b" kindref="member">ModEvent</ref><sp/>me_plb<sp/>=<sp/>z[i].gq(home,<sp/>start);</highlight></codeline>
|
|
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="namespaceGecode_1a93e4dea4e5e021b4f58d0ccc78ac1523" kindref="member">me_failed</ref>(me_plb))<sp/>{</highlight></codeline>
|
|
<codeline lineno="168"><highlight class="normal"><sp/><sp/><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="169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nofix<sp/>|=<sp/>(<ref refid="namespaceGecode_1ab0c2b67fac58a0d289893450d8a9b2bd" kindref="member">me_modified</ref>(me_plb)<sp/>&&<sp/>start<sp/>!=<sp/>z[i].min());</highlight></codeline>
|
|
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="172"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__TaskVarMEPC_1gafa985ae465bd12df08e29252cdb7519b" kindref="member">ModEvent</ref><sp/>me_lb<sp/>=<sp/>x[i].gq(home,<sp/>y[start].min());</highlight></codeline>
|
|
<codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="namespaceGecode_1a93e4dea4e5e021b4f58d0ccc78ac1523" kindref="member">me_failed</ref>(me_lb))<sp/>{</highlight></codeline>
|
|
<codeline lineno="175"><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="176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>nofix<sp/>|=<sp/>(<ref refid="namespaceGecode_1ab0c2b67fac58a0d289893450d8a9b2bd" kindref="member">me_modified</ref>(me_lb)<sp/>&&</highlight></codeline>
|
|
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>y[start].min()<sp/>!=<sp/>x[i].min());</highlight></codeline>
|
|
<codeline lineno="179"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ptau<sp/>=<sp/>tau[xs<sp/>-<sp/>1<sp/>-<sp/>i];</highlight></codeline>
|
|
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>xmax<sp/>=<sp/>x[ptau].max();</highlight></codeline>
|
|
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
|
<codeline lineno="183"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>take<sp/>the<sp/>scc-list<sp/>for<sp/>the<sp/>current<sp/>x<sp/>node</highlight></codeline>
|
|
<codeline lineno="184"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>start<sp/>from<sp/>the<sp/>rightmost<sp/>reachable<sp/>node<sp/>and<sp/>check<sp/>which</highlight></codeline>
|
|
<codeline lineno="185"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>y<sp/>node<sp/>in<sp/>the<sp/>scc<sp/>is</highlight></codeline>
|
|
<codeline lineno="186"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>really<sp/>the<sp/>rightmost<sp/>node<sp/>intersecting<sp/>x,<sp/>i.e.</highlight></codeline>
|
|
<codeline lineno="187"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>search<sp/>for<sp/>the<sp/>smallest<sp/>upper<sp/>bound<sp/>of<sp/>x</highlight></codeline>
|
|
<codeline lineno="188"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>start<sp/>=<sp/>sinfo[scclist[ptau]].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1abee8dfd036d1febb73233fb8a6f4f700" kindref="member">rightmost</ref>;</highlight></codeline>
|
|
<codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(y[start].min()<sp/>><sp/>xmax)<sp/>{</highlight></codeline>
|
|
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>start<sp/>=<sp/>sinfo[start].<ref refid="classGecode_1_1Int_1_1Sorted_1_1SccComponent_1a8db49110c7b738e5fbee38188cab9f0a" kindref="member">left</ref>;</highlight></codeline>
|
|
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="193"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="194"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(Perm)<sp/>{</highlight></codeline>
|
|
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//start<sp/>is<sp/>the<sp/>rightmost-position<sp/>for<sp/>x_i</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//that<sp/>denotes<sp/>the<sp/>upper<sp/>bound<sp/>on<sp/>p_i</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__TaskVarMEPC_1gafa985ae465bd12df08e29252cdb7519b" kindref="member">ModEvent</ref><sp/>me_pub<sp/>=<sp/>z[ptau].lq(home,<sp/>start);</highlight></codeline>
|
|
<codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="namespaceGecode_1a93e4dea4e5e021b4f58d0ccc78ac1523" kindref="member">me_failed</ref>(me_pub))<sp/>{</highlight></codeline>
|
|
<codeline lineno="199"><highlight class="normal"><sp/><sp/><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="200"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nofix<sp/>|=<sp/>(<ref refid="namespaceGecode_1ab0c2b67fac58a0d289893450d8a9b2bd" kindref="member">me_modified</ref>(me_pub)<sp/>&&<sp/>start<sp/>!=<sp/>z[ptau].max());</highlight></codeline>
|
|
<codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="203"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__TaskVarMEPC_1gafa985ae465bd12df08e29252cdb7519b" kindref="member">ModEvent</ref><sp/>me_ub<sp/>=<sp/>x[ptau].lq(home,<sp/>y[start].max());</highlight></codeline>
|
|
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="namespaceGecode_1a93e4dea4e5e021b4f58d0ccc78ac1523" kindref="member">me_failed</ref>(me_ub))<sp/>{</highlight></codeline>
|
|
<codeline lineno="206"><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="207"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>nofix<sp/>|=<sp/>(<ref refid="namespaceGecode_1ab0c2b67fac58a0d289893450d8a9b2bd" kindref="member">me_modified</ref>(me_ub)<sp/>&&</highlight></codeline>
|
|
<codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>y[start].max()<sp/>!=<sp/>x[ptau].max());</highlight></codeline>
|
|
<codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="211"><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="212"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="213"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="224"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="225"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="226" refid="namespaceGecode_1_1Int_1_1Sorted_1a01efcaeedc8b1881281cb1b75e2f3e2b" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1_1Int_1_1Sorted_1a01efcaeedc8b1881281cb1b75e2f3e2b" kindref="member">narrow_domy</ref>(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,</highlight></codeline>
|
|
<codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View></ref>&<sp/>x,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View></ref>&<sp/>y,</highlight></codeline>
|
|
<codeline lineno="228"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>phi[],<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>phiprime[],<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal">&<sp/>nofix)<sp/>{</highlight></codeline>
|
|
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i=x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>();<sp/>i--;<sp/>)<sp/>{</highlight></codeline>
|
|
<codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__TaskVarMEPC_1gafa985ae465bd12df08e29252cdb7519b" kindref="member">ModEvent</ref><sp/>me_lb<sp/>=<sp/>y[i].gq(home,<sp/>x[phiprime[i]].min());</highlight></codeline>
|
|
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="namespaceGecode_1a93e4dea4e5e021b4f58d0ccc78ac1523" kindref="member">me_failed</ref>(me_lb))<sp/>{</highlight></codeline>
|
|
<codeline lineno="232"><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="233"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="234"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>nofix<sp/>|=<sp/>(<ref refid="namespaceGecode_1ab0c2b67fac58a0d289893450d8a9b2bd" kindref="member">me_modified</ref>(me_lb)<sp/>&&</highlight></codeline>
|
|
<codeline lineno="235"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x[phiprime[i]].min()<sp/>!=<sp/>y[i].min());</highlight></codeline>
|
|
<codeline lineno="236"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="237"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__TaskVarMEPC_1gafa985ae465bd12df08e29252cdb7519b" kindref="member">ModEvent</ref><sp/>me_ub<sp/>=<sp/>y[i].lq(home,<sp/>x[phi[i]].max());</highlight></codeline>
|
|
<codeline lineno="238"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="namespaceGecode_1a93e4dea4e5e021b4f58d0ccc78ac1523" kindref="member">me_failed</ref>(me_ub))<sp/>{</highlight></codeline>
|
|
<codeline lineno="239"><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="240"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>nofix<sp/>|=<sp/>(<ref refid="namespaceGecode_1ab0c2b67fac58a0d289893450d8a9b2bd" kindref="member">me_modified</ref>(me_ub)<sp/>&&</highlight></codeline>
|
|
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x[phi[i]].max()<sp/>!=<sp/>y[i].max());</highlight></codeline>
|
|
<codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="244"><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="245"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="246"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="247"><highlight class="normal">}}}</highlight></codeline>
|
|
<codeline lineno="248"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="249"><highlight class="normal"></highlight><highlight class="comment">//<sp/>STATISTICS:<sp/>int-prop</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="250"><highlight class="normal"></highlight></codeline>
|
|
</programlisting>
|
|
<location file="/usr/include/gecode/int/sorted/narrowing.hpp"/>
|
|
</compounddef>
|
|
</doxygen>
|