670 lines
126 KiB
XML
670 lines
126 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="rel-op_2common_8hpp" kind="file">
|
||
|
<compoundname>common.hpp</compoundname>
|
||
|
<includedby refid="rel-op_8hh" local="no">/usr/include/gecode/set/rel-op.hh</includedby>
|
||
|
<includedby refid="set_2sequence_8hh" local="no">/usr/include/gecode/set/sequence.hh</includedby>
|
||
|
<invincdepgraph>
|
||
|
<node id="31613">
|
||
|
<label>/usr/include/gecode/set/element.hh</label>
|
||
|
<link refid="set_2element_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="31612">
|
||
|
<label>/usr/include/gecode/set/rel-op.hh</label>
|
||
|
<link refid="rel-op_8hh_source"/>
|
||
|
<childnode refid="31613" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="31614" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="31611">
|
||
|
<label>/usr/include/gecode/set/rel-op/common.hpp</label>
|
||
|
<link refid="rel-op/common.hpp"/>
|
||
|
<childnode refid="31612" relation="include">
|
||
|
</childnode>
|
||
|
<childnode refid="31615" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
<node id="31615">
|
||
|
<label>/usr/include/gecode/set/sequence.hh</label>
|
||
|
<link refid="set_2sequence_8hh_source"/>
|
||
|
</node>
|
||
|
<node id="31614">
|
||
|
<label>/usr/include/gecode/set/rel-op/post.hpp</label>
|
||
|
<link refid="set_2rel-op_2post_8hpp_source"/>
|
||
|
<childnode refid="31612" relation="include">
|
||
|
</childnode>
|
||
|
</node>
|
||
|
</invincdepgraph>
|
||
|
<innernamespace refid="namespaceGecode">Gecode</innernamespace>
|
||
|
<innernamespace refid="namespaceGecode_1_1Set">Gecode::Set</innernamespace>
|
||
|
<innernamespace refid="namespaceGecode_1_1Set_1_1RelOp">Gecode::Set::RelOp</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/>*<sp/><sp/><sp/><sp/><sp/>Christian<sp/>Schulte<sp/><schulte@gecode.org></highlight></codeline>
|
||
|
<codeline lineno="6"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/><sp/>Contributing<sp/>authors:</highlight></codeline>
|
||
|
<codeline lineno="8"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Gabor<sp/>Szokoli<sp/><szokoli@gecode.org></highlight></codeline>
|
||
|
<codeline lineno="9"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="10"><highlight class="comment"><sp/>*<sp/><sp/>Copyright:</highlight></codeline>
|
||
|
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Guido<sp/>Tack,<sp/>2004</highlight></codeline>
|
||
|
<codeline lineno="12"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Christian<sp/>Schulte,<sp/>2004</highlight></codeline>
|
||
|
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Gabor<sp/>Szokoli,<sp/>2004</highlight></codeline>
|
||
|
<codeline lineno="14"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/><sp/>Last<sp/>modified:</highlight></codeline>
|
||
|
<codeline lineno="16"><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="17"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>$Revision:<sp/>13068<sp/>$</highlight></codeline>
|
||
|
<codeline lineno="18"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="19"><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="20"><highlight class="comment"><sp/>*<sp/><sp/>development<sp/>environment:</highlight></codeline>
|
||
|
<codeline lineno="21"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>http://www.gecode.org</highlight></codeline>
|
||
|
<codeline lineno="22"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="23"><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="24"><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="25"><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="26"><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="27"><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="28"><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="29"><highlight class="comment"><sp/>*<sp/><sp/>the<sp/>following<sp/>conditions:</highlight></codeline>
|
||
|
<codeline lineno="30"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="31"><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="32"><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="33"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="34"><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="35"><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="36"><highlight class="comment"><sp/>*<sp/><sp/>MERCHANTABILITY,<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>AND</highlight></codeline>
|
||
|
<codeline lineno="37"><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="38"><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="39"><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="40"><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="41"><highlight class="comment"><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="42"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="44"><highlight class="normal"></highlight><highlight class="preprocessor">#ifndef<sp/>__GECODE_SET_RELOP_COMM_ICC__</highlight></codeline>
|
||
|
<codeline lineno="45"><highlight class="preprocessor"></highlight><highlight class="preprocessor">#define<sp/>__GECODE_SET_RELOP_COMM_ICC__</highlight></codeline>
|
||
|
<codeline lineno="46"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="47"><highlight class="normal"></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">Gecode<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="48"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="49"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View0,<sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View1></highlight></codeline>
|
||
|
<codeline lineno="50"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="51"><highlight class="normal"><sp/><sp/>viewarrayshared(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Space&<sp/>home,</highlight></codeline>
|
||
|
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>ViewArray<View0>&<sp/>va,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>View1&<sp/>y)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>va.shared(home,y);</highlight></codeline>
|
||
|
<codeline lineno="54"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="55"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="56"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><></highlight></codeline>
|
||
|
<codeline lineno="57"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="58"><highlight class="normal"><sp/><sp/>viewarrayshared<Set::SingletonView,Set::SetView></highlight></codeline>
|
||
|
<codeline lineno="59"><highlight class="normal"><sp/><sp/>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Space&,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>ViewArray<Set::SingletonView>&,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Set::SetView&)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="60"><highlight class="normal"><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="61"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="62"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="63"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><></highlight></codeline>
|
||
|
<codeline lineno="64"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="65"><highlight class="normal"><sp/><sp/>viewarrayshared<Set::ComplementView<Set::SingletonView>,Set::SetView></highlight></codeline>
|
||
|
<codeline lineno="66"><highlight class="normal"><sp/><sp/>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Space&,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>ViewArray<Set::ComplementView<Set::SingletonView><sp/>>&,</highlight></codeline>
|
||
|
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Set::SetView&)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="68"><highlight class="normal"><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="69"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="70"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="71"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><></highlight></codeline>
|
||
|
<codeline lineno="72"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="73"><highlight class="normal"><sp/><sp/>viewarrayshared<Set::ComplementView<Set::SingletonView>,</highlight></codeline>
|
||
|
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Set::ComplementView<Set::SetView><sp/>></highlight></codeline>
|
||
|
<codeline lineno="75"><highlight class="normal"><sp/><sp/>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Space&,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>ViewArray<Set::ComplementView<Set::SingletonView><sp/>>&,</highlight></codeline>
|
||
|
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>Set::ComplementView<Set::SetView>&)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="77"><highlight class="normal"><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="78"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="79"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="80"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="81" refid="namespaceGecode_1_1Set_1_1RelOp" refkind="compound"><highlight class="normal"></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">Set<sp/>{<sp/></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">RelOp<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="82"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="83"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
||
|
<codeline lineno="84"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Detect<sp/>sharing<sp/>between<sp/>3<sp/>variables</highlight></codeline>
|
||
|
<codeline lineno="85"><highlight class="comment"><sp/><sp/><sp/>*</highlight></codeline>
|
||
|
<codeline lineno="86"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><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/>View0,<sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View1,<sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View2></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"><highlight class="normal"><sp/><sp/>shared(View0<sp/>v0,<sp/>View1<sp/>v1,<sp/>View2<sp/>v2)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>shared(v0,v1)<sp/>||<sp/>shared(v0,v2)<sp/>||<sp/>shared(v1,v2);</highlight></codeline>
|
||
|
<codeline lineno="91"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="92"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="93"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View0,<sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View1,<sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View2></highlight></codeline>
|
||
|
<codeline lineno="94"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5" kindref="member">ExecStatus</ref><sp/>interCard(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,</highlight></codeline>
|
||
|
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal">&<sp/>retmodified,<sp/>View0&<sp/>x0,<sp/>View1&<sp/>x1,<sp/>View2&<sp/>x2)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>modified<sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
|
||
|
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">do</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>retmodified<sp/>|=<sp/>modified;</highlight></codeline>
|
||
|
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>modified<sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
|
||
|
<codeline lineno="100"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View0></ref><sp/>x0ub(x0);</highlight></codeline>
|
||
|
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View1></ref><sp/>x1ub(x1);</highlight></codeline>
|
||
|
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Union" kindref="compound">Iter::Ranges::Union<LubRanges<View0></ref>,<sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View1></ref><sp/>></highlight></codeline>
|
||
|
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>u1(x0ub,x1ub);</highlight></codeline>
|
||
|
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>s1<sp/>=<sp/><ref refid="group__FuncIterRangesOp_1ga9f9ab6d72452ad86b95cd65abf463161" kindref="member">Iter::Ranges::size</ref>(u1);</highlight></codeline>
|
||
|
<codeline lineno="107"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x0.cardMin()<sp/>+<sp/>x1.cardMin()<sp/>><sp/>s1)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,</highlight></codeline>
|
||
|
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x2.cardMin(home,<sp/>x0.cardMin()+x1.cardMin()-s1));</highlight></codeline>
|
||
|
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="112"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>unsigned<sp/>int<sp/>res<sp/>=<sp/>std::max(x0.cardMin()+</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(x1.cardMin()<s1<sp/>?</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="115"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>0<sp/>:<sp/>x1.cardMin()-s1),</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::max(x0.cardMin(),</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="117"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x1.cardMin()));</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>x2.cardMin(home,res));</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="120"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="121"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="122"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GlbRanges" kindref="compound">GlbRanges<View0></ref><sp/>x0lb(x0);</highlight></codeline>
|
||
|
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GlbRanges" kindref="compound">GlbRanges<View1></ref><sp/>x1lb(x1);</highlight></codeline>
|
||
|
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Union" kindref="compound">Iter::Ranges::Union<GlbRanges<View0></ref>,<sp/><ref refid="classGecode_1_1Set_1_1GlbRanges" kindref="compound">GlbRanges<View1></ref><sp/>></highlight></codeline>
|
||
|
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>u1(x0lb,x1lb);</highlight></codeline>
|
||
|
<codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>s1<sp/>=<sp/><ref refid="group__FuncIterRangesOp_1ga9f9ab6d72452ad86b95cd65abf463161" kindref="member">Iter::Ranges::size</ref>(u1);</highlight></codeline>
|
||
|
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,</highlight></codeline>
|
||
|
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x2.cardMax(home,</highlight></codeline>
|
||
|
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x0.cardMax()+x1.cardMax()-s1));</highlight></codeline>
|
||
|
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="131"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x2.cardMax()<sp/><<sp/>x1.cardMin())</highlight></codeline>
|
||
|
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,</highlight></codeline>
|
||
|
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x0.cardMax(home,</highlight></codeline>
|
||
|
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="namespaceGecode_1_1Set_1_1Limits_1a82e5a0891d539b2d58db3a9347ac138b" kindref="member">Set::Limits::card</ref>+x2.cardMax()-x1.cardMin()));</highlight></codeline>
|
||
|
<codeline lineno="136"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x2.cardMax()<sp/><<sp/>x0.cardMin())</highlight></codeline>
|
||
|
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,</highlight></codeline>
|
||
|
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x1.cardMax(home,</highlight></codeline>
|
||
|
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="namespaceGecode_1_1Set_1_1Limits_1a82e5a0891d539b2d58db3a9347ac138b" kindref="member">Set::Limits::card</ref>+x2.cardMax()-x0.cardMin()));</highlight></codeline>
|
||
|
<codeline lineno="141"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,</highlight></codeline>
|
||
|
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x0.cardMin(home,x2.cardMin()));</highlight></codeline>
|
||
|
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,</highlight></codeline>
|
||
|
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x1.cardMin(home,x2.cardMin()));</highlight></codeline>
|
||
|
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal">(modified);</highlight></codeline>
|
||
|
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a13bb69056fb9293e8df98c0e347ba634" kindref="member">ES_FIX</ref>;</highlight></codeline>
|
||
|
<codeline lineno="148"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="149"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View0,<sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View1,<sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View2></highlight></codeline>
|
||
|
<codeline lineno="150"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5" kindref="member">ExecStatus</ref><sp/>unionCard(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,</highlight></codeline>
|
||
|
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal">&<sp/>retmodified,<sp/>View0&<sp/>x0,<sp/>View1&<sp/>x1,<sp/>View2&<sp/>x2)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>modified<sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
|
||
|
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">do</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="154"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>retmodified<sp/>|=<sp/>modified;</highlight></codeline>
|
||
|
<codeline lineno="155"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>modified<sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
|
||
|
<codeline lineno="156"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View0></ref><sp/>x0ub(x0);</highlight></codeline>
|
||
|
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View1></ref><sp/>x1ub(x1);</highlight></codeline>
|
||
|
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Inter" kindref="compound">Iter::Ranges::Inter<LubRanges<View0></ref>,<sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View1></ref><sp/>><sp/>i1(x0ub,x1ub);</highlight></codeline>
|
||
|
<codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>s1<sp/>=<sp/><ref refid="group__FuncIterRangesOp_1ga9f9ab6d72452ad86b95cd65abf463161" kindref="member">Iter::Ranges::size</ref>(i1);</highlight></codeline>
|
||
|
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>res<sp/>=<sp/><ref refid="group__TaskModelFloatArith_1ga958cb25ae9754d6cc35c7c6e34ebc1e3" kindref="member">std::max</ref>(x0.cardMin()+</highlight></codeline>
|
||
|
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(x1.cardMin()<s1<sp/>?</highlight></codeline>
|
||
|
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>0<sp/>:<sp/>x1.cardMin()-s1),</highlight></codeline>
|
||
|
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__TaskModelFloatArith_1ga958cb25ae9754d6cc35c7c6e34ebc1e3" kindref="member">std::max</ref>(x0.cardMin(),</highlight></codeline>
|
||
|
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x1.cardMin()));</highlight></codeline>
|
||
|
<codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>x2.cardMin(home,res));</highlight></codeline>
|
||
|
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="169"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View0></ref><sp/>x0ub(x0);</highlight></codeline>
|
||
|
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View1></ref><sp/>x1ub(x1);</highlight></codeline>
|
||
|
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Union" kindref="compound">Iter::Ranges::Union<LubRanges<View0></ref>,<sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View1></ref><sp/>><sp/>u1(x0ub,x1ub);</highlight></codeline>
|
||
|
<codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>s1<sp/>=<sp/><ref refid="group__FuncIterRangesOp_1ga9f9ab6d72452ad86b95cd65abf463161" kindref="member">Iter::Ranges::size</ref>(u1);</highlight></codeline>
|
||
|
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,</highlight></codeline>
|
||
|
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x2.cardMax(home,</highlight></codeline>
|
||
|
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="group__TaskModelFloatArith_1ga121700708772a60191be6256c3c0d151" kindref="member">std::min</ref>(x0.cardMax()+x1.cardMax(),s1)));</highlight></codeline>
|
||
|
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</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="keywordflow">if</highlight><highlight class="normal"><sp/>(x2.cardMin()<sp/>><sp/>x1.cardMax())</highlight></codeline>
|
||
|
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,</highlight></codeline>
|
||
|
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x0.cardMin(home,x2.cardMin()<sp/>-<sp/>x1.cardMax()));</highlight></codeline>
|
||
|
<codeline lineno="183"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x2.cardMin()<sp/>><sp/>x0.cardMax())</highlight></codeline>
|
||
|
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,</highlight></codeline>
|
||
|
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x1.cardMin(home,x2.cardMin()<sp/>-<sp/>x0.cardMax()));</highlight></codeline>
|
||
|
<codeline lineno="187"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,</highlight></codeline>
|
||
|
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x0.cardMax(home,x2.cardMax()));</highlight></codeline>
|
||
|
<codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,</highlight></codeline>
|
||
|
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x1.cardMax(home,x2.cardMax()));</highlight></codeline>
|
||
|
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal">(modified);</highlight></codeline>
|
||
|
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a13bb69056fb9293e8df98c0e347ba634" kindref="member">ES_FIX</ref>;</highlight></codeline>
|
||
|
<codeline lineno="194"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="195"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="196"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View0,<sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View1></highlight></codeline>
|
||
|
<codeline lineno="197"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5" kindref="member">ExecStatus</ref></highlight></codeline>
|
||
|
<codeline lineno="198"><highlight class="normal"><sp/><sp/>unionNCard(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal">&<sp/>modified,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View0></ref>&<sp/>x,</highlight></codeline>
|
||
|
<codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>View1&<sp/>y,<sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>&<sp/>unionOfDets)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="200"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>xsize<sp/>=<sp/>x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>();</highlight></codeline>
|
||
|
<codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Max(Xi.cardMin)<sp/><=<sp/>y.card<sp/><=<sp/>Sum(Xi.cardMax)</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Xi.card<sp/><=y.cardMax</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>cardMaxSum=unionOfDets.<ref refid="classGecode_1_1Set_1_1BndSet_1a057b3dad3bb84170fe390ddfde1b993b" kindref="member">size</ref>();</highlight></codeline>
|
||
|
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>maxValid<sp/>=<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
|
||
|
<codeline lineno="205"><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=xsize;<sp/>i--;<sp/>){</highlight></codeline>
|
||
|
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>cardMaxSum+=x[i].cardMax();</highlight></codeline>
|
||
|
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cardMaxSum<sp/><<sp/>x[i].cardMax())<sp/>{<sp/>maxValid<sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;<sp/>}<sp/></highlight><highlight class="comment">//overflow</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>y.cardMin(home,x[i].cardMin())<sp/>);</highlight></codeline>
|
||
|
<codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>x[i].cardMax(home,y.cardMax())<sp/>);</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">if</highlight><highlight class="normal"><sp/>(maxValid)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>y.cardMax(home,cardMaxSum));</highlight></codeline>
|
||
|
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//y.cardMin<sp/>-<sp/>Sum(Xj.cardMax)<sp/><=<sp/>Xi.card</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="215"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>()<sp/>==<sp/>0)</highlight></codeline>
|
||
|
<codeline lineno="217"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5ac32341b682bca52b8617a8ad004023ef" kindref="member">ES_NOFIX</ref>;</highlight></codeline>
|
||
|
<codeline lineno="218"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Region" kindref="compound">Region</ref><sp/>r(home);</highlight></codeline>
|
||
|
<codeline lineno="220"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//TODO:<sp/>overflow<sp/>management<sp/>is<sp/>a<sp/>waste<sp/>now.</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">*<sp/>rightSum<sp/>=<sp/>r.<ref refid="classGecode_1_1Region_1a167cff2d16f08d890fff11f80e519233" kindref="member">alloc</ref><</highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">>(xsize);</highlight></codeline>
|
||
|
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>rightSum[xsize-1]=0;</highlight></codeline>
|
||
|
<codeline lineno="224"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="225"><highlight class="normal"><sp/><sp/><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>()-1;i--;)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rightSum[i]<sp/>=<sp/>rightSum[i+1]<sp/>+<sp/>x[i+1].cardMax();</highlight></codeline>
|
||
|
<codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rightSum[i]<sp/><<sp/>rightSum[i+1])<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="228"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//overflow,<sp/>fill<sp/>the<sp/>rest<sp/>of<sp/>the<sp/>array.</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><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=i;<sp/>j>0;j--)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rightSum[j]=<ref refid="namespaceGecode_1_1Set_1_1Limits_1a82e5a0891d539b2d58db3a9347ac138b" kindref="member">Limits::card</ref>;</highlight></codeline>
|
||
|
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="232"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
|
||
|
<codeline lineno="233"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="234"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="235"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="236"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Size<sp/>of<sp/>union<sp/>of<sp/>determied<sp/>vars<sp/>missing<sp/>from<sp/>x<sp/>sneaked<sp/>in<sp/>here:</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="237"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>leftAcc=unionOfDets.<ref refid="classGecode_1_1Set_1_1BndSet_1a057b3dad3bb84170fe390ddfde1b993b" kindref="member">size</ref>();</highlight></codeline>
|
||
|
<codeline lineno="238"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="239"><highlight class="normal"><sp/><sp/><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=0;<sp/>i<xsize;i++)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>jsum<sp/>=<sp/>leftAcc+rightSum[i];</highlight></codeline>
|
||
|
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//If<sp/>jsum<sp/>did<sp/>not<sp/>overflow<sp/>and<sp/>is<sp/>less<sp/>than<sp/>y.cardMin:</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(jsum<sp/>>=<sp/>leftAcc<sp/>&&<sp/><sp/>jsum<sp/><<sp/>y.cardMin())<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>x[i].cardMin(home,y.cardMin()-jsum));</highlight></codeline>
|
||
|
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>leftAcc<sp/>+=<sp/>x[i].cardMax();</highlight></codeline>
|
||
|
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(leftAcc<sp/><<sp/>x[i].cardMax())<sp/>{leftAcc<sp/>=<sp/><ref refid="namespaceGecode_1_1Set_1_1Limits_1a82e5a0891d539b2d58db3a9347ac138b" kindref="member">Limits::card</ref>;}</highlight></codeline>
|
||
|
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="249"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//y.cardMin<sp/>-<sp/>|U(Xj.ub)|<sp/><=<sp/>Xi.card</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="251"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>*<sp/>rightUnion<sp/>=</highlight></codeline>
|
||
|
<codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="normal"><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>*</highlight><highlight class="keyword">></highlight><highlight class="normal">(r.<ref refid="classGecode_1_1Region_1a6c9123960b7c49dd2d6595ebfccfe7d6" kindref="member">ralloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>)*xsize));</highlight></codeline>
|
||
|
<codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/>(&rightUnion[xsize-1])<sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="256"><highlight class="normal"><sp/><sp/><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=xsize-1;i--;){</highlight></codeline>
|
||
|
<codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1BndSetRanges" kindref="compound">BndSetRanges</ref><sp/>prev(rightUnion[i+1]);</highlight></codeline>
|
||
|
<codeline lineno="258"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View0></ref><sp/>prevX(x[i+1]);</highlight></codeline>
|
||
|
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Union" kindref="compound">Iter::Ranges::Union< BndSetRanges,LubRanges<View0></ref><sp/>></highlight></codeline>
|
||
|
<codeline lineno="260"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>iter(prev,prevX);</highlight></codeline>
|
||
|
<codeline lineno="261"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/>(&rightUnion[i])<sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="262"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rightUnion[i].<ref refid="classGecode_1_1Set_1_1GLBndSet_1acf31e1ebe21a4d3138c6655c06b19ac0" kindref="member">includeI</ref>(home,<sp/>iter);</highlight></codeline>
|
||
|
<codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="264"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="265"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//union<sp/>of<sp/>determied<sp/>vars<sp/>missing<sp/>from<sp/>x<sp/>sneaked<sp/>in<sp/>here:</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="266"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref><sp/>leftAcc;</highlight></codeline>
|
||
|
<codeline lineno="267"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>leftAcc.<ref refid="classGecode_1_1Set_1_1BndSet_1a4d00b2876d4c92e788b50cb927cf3751" kindref="member">update</ref>(home,unionOfDets);</highlight></codeline>
|
||
|
<codeline lineno="268"><highlight class="normal"><sp/><sp/><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=0;<sp/>i<xsize;<sp/>i++)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="269"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1BndSetRanges" kindref="compound">BndSetRanges</ref><sp/>left(leftAcc);</highlight></codeline>
|
||
|
<codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1BndSetRanges" kindref="compound">BndSetRanges</ref><sp/>right(rightUnion[i]);</highlight></codeline>
|
||
|
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Union" kindref="compound">Iter::Ranges::Union</ref><<ref refid="classGecode_1_1Set_1_1BndSetRanges" kindref="compound">BndSetRanges</ref>,</highlight></codeline>
|
||
|
<codeline lineno="272"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>BndSetRanges><sp/>iter(left,<sp/>right);</highlight></codeline>
|
||
|
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>unionSize<sp/>=<sp/><ref refid="group__FuncIterRangesOp_1ga9f9ab6d72452ad86b95cd65abf463161" kindref="member">Iter::Ranges::size</ref>(iter);</highlight></codeline>
|
||
|
<codeline lineno="274"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(y.cardMin()<sp/>><sp/>unionSize)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="275"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,</highlight></codeline>
|
||
|
<codeline lineno="276"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x[i].cardMin(home,<sp/>y.cardMin()<sp/>-<sp/>unionSize)<sp/>);</highlight></codeline>
|
||
|
<codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View0></ref><sp/>xiub(x[i]);</highlight></codeline>
|
||
|
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>leftAcc.<ref refid="classGecode_1_1Set_1_1GLBndSet_1acf31e1ebe21a4d3138c6655c06b19ac0" kindref="member">includeI</ref>(home,<sp/>xiub);</highlight></codeline>
|
||
|
<codeline lineno="280"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="281"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="282"><highlight class="normal"><sp/><sp/><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=xsize;<sp/>i--;)</highlight></codeline>
|
||
|
<codeline lineno="283"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rightUnion[i].dispose(home);</highlight></codeline>
|
||
|
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>leftAcc.<ref refid="classGecode_1_1Set_1_1BndSet_1a4fd106aef04d3546920c07e0d94024de" kindref="member">dispose</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="286"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="287"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//no<sp/>need<sp/>for<sp/>this:<sp/>|y.lb<sp/>-<sp/>U(Xj.cardMax)|<sp/><=<sp/>S.card</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="288"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="289"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5ac32341b682bca52b8617a8ad004023ef" kindref="member">ES_NOFIX</ref>;</highlight></codeline>
|
||
|
<codeline lineno="290"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="291"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="292"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="293"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
||
|
<codeline lineno="294"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Xi<sp/>UB<sp/>is<sp/>subset<sp/>of<sp/>YUB</highlight></codeline>
|
||
|
<codeline lineno="295"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Subscribes<sp/>to<sp/>Y<sp/>UB</highlight></codeline>
|
||
|
<codeline lineno="296"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="297"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View0,<sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View1></highlight></codeline>
|
||
|
<codeline lineno="298"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5" kindref="member">ExecStatus</ref></highlight></codeline>
|
||
|
<codeline lineno="299"><highlight class="normal"><sp/><sp/>unionNXiUB(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,</highlight></codeline>
|
||
|
<codeline lineno="300"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal">&<sp/>modified,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View0></ref>&<sp/>x,<sp/>View1&<sp/>y,</highlight></codeline>
|
||
|
<codeline lineno="301"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref><sp/>&)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="302"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>xsize<sp/>=<sp/>x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>();</highlight></codeline>
|
||
|
<codeline lineno="303"><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=xsize;<sp/>i--;<sp/>)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="304"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View1></ref><sp/>yub(y);</highlight></codeline>
|
||
|
<codeline lineno="305"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>x[i].intersectI(home,<sp/>yub));</highlight></codeline>
|
||
|
<codeline lineno="306"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="307"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a13bb69056fb9293e8df98c0e347ba634" kindref="member">ES_FIX</ref>;</highlight></codeline>
|
||
|
<codeline lineno="308"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="309"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="310"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>cardinality<sp/>rules<sp/>for<sp/>PartitionN<sp/>constraint</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="311"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View0,<sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View1></highlight></codeline>
|
||
|
<codeline lineno="312"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5" kindref="member">ExecStatus</ref></highlight></codeline>
|
||
|
<codeline lineno="313"><highlight class="normal"><sp/><sp/>partitionNCard(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,</highlight></codeline>
|
||
|
<codeline lineno="314"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal">&<sp/>modified,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View0></ref>&<sp/>x,<sp/>View1&<sp/>y,</highlight></codeline>
|
||
|
<codeline lineno="315"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>&<sp/>unionOfDets)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="316"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>cardMinSum=unionOfDets.<ref refid="classGecode_1_1Set_1_1BndSet_1a057b3dad3bb84170fe390ddfde1b993b" kindref="member">size</ref>();</highlight></codeline>
|
||
|
<codeline lineno="317"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>cardMaxSum=unionOfDets.<ref refid="classGecode_1_1Set_1_1BndSet_1a057b3dad3bb84170fe390ddfde1b993b" kindref="member">size</ref>();</highlight></codeline>
|
||
|
<codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>xsize<sp/>=<sp/>x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>();</highlight></codeline>
|
||
|
<codeline lineno="319"><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=xsize;<sp/>i--;<sp/>)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>cardMinSum+=x[i].cardMin();</highlight></codeline>
|
||
|
<codeline lineno="321"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cardMinSum<sp/><<sp/>x[i].cardMin())<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="322"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//sum<sp/>of<sp/>mins<sp/>overflows:<sp/>fail<sp/>the<sp/>space.</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="323"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK(ME_SET_FAILED);</highlight></codeline>
|
||
|
<codeline lineno="324"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="325"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="326"><highlight class="normal"><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>y.cardMin(home,cardMinSum));</highlight></codeline>
|
||
|
<codeline lineno="327"><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=xsize;<sp/>i--;<sp/>)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="328"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>cardMaxSum+=x[i].cardMax();</highlight></codeline>
|
||
|
<codeline lineno="329"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(cardMaxSum<sp/><<sp/>x[i].cardMax())<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="330"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//sum<sp/>of<sp/>maxes<sp/>overflows:<sp/>no<sp/>useful<sp/>information<sp/>to<sp/>tell.</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="331"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>overflow;</highlight></codeline>
|
||
|
<codeline lineno="332"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="333"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="334"><highlight class="normal"><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>y.cardMax(home,cardMaxSum));</highlight></codeline>
|
||
|
<codeline lineno="335"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>()<sp/>==<sp/>0)</highlight></codeline>
|
||
|
<codeline lineno="337"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5ac32341b682bca52b8617a8ad004023ef" kindref="member">ES_NOFIX</ref>;</highlight></codeline>
|
||
|
<codeline lineno="338"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="339"><highlight class="normal"><sp/><sp/>overflow:</highlight></codeline>
|
||
|
<codeline lineno="340"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="341"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Cardinality<sp/>of<sp/>each<sp/>x[i]<sp/>limited<sp/>by<sp/>cardinality<sp/>of<sp/>y<sp/>minus<sp/>all<sp/>x[j]s:</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="342"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="343"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="344"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Region" kindref="compound">Region</ref><sp/>r(home);</highlight></codeline>
|
||
|
<codeline lineno="345"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">*<sp/>rightMinSum<sp/>=<sp/>r.<ref refid="classGecode_1_1Region_1a167cff2d16f08d890fff11f80e519233" kindref="member">alloc</ref><</highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">>(xsize);</highlight></codeline>
|
||
|
<codeline lineno="346"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">*<sp/>rightMaxSum<sp/>=<sp/>r.<ref refid="classGecode_1_1Region_1a167cff2d16f08d890fff11f80e519233" kindref="member">alloc</ref><</highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal">>(xsize);</highlight></codeline>
|
||
|
<codeline lineno="347"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>rightMinSum[xsize-1]=0;</highlight></codeline>
|
||
|
<codeline lineno="348"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>rightMaxSum[xsize-1]=0;</highlight></codeline>
|
||
|
<codeline lineno="349"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="350"><highlight class="normal"><sp/><sp/><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>()-1;i--;)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="351"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rightMaxSum[i]<sp/>=<sp/>rightMaxSum[i+1]<sp/>+<sp/>x[i+1].cardMax();</highlight></codeline>
|
||
|
<codeline lineno="352"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rightMaxSum[i]<sp/><<sp/>rightMaxSum[i+1])<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="353"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//overflow,<sp/>fill<sp/>the<sp/>rest<sp/>of<sp/>the<sp/>array.</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="354"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><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=i;<sp/>j>0;j--)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="355"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rightMaxSum[j]=<ref refid="namespaceGecode_1_1Set_1_1Limits_1a82e5a0891d539b2d58db3a9347ac138b" kindref="member">Limits::card</ref>;</highlight></codeline>
|
||
|
<codeline lineno="356"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="357"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">break</highlight><highlight class="normal">;</highlight></codeline>
|
||
|
<codeline lineno="358"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="359"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="360"><highlight class="normal"><sp/><sp/><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>()-1;i--;)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="361"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rightMinSum[i]<sp/>=<sp/>rightMinSum[i+1]<sp/>+<sp/>x[i+1].cardMin();</highlight></codeline>
|
||
|
<codeline lineno="362"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rightMinSum[i]<sp/><<sp/>rightMinSum[i+1])<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="363"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//overflow,<sp/>fail<sp/>the<sp/>space</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="364"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK(ME_SET_FAILED);</highlight></codeline>
|
||
|
<codeline lineno="365"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="366"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="367"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>leftMinAcc=unionOfDets.<ref refid="classGecode_1_1Set_1_1BndSet_1a057b3dad3bb84170fe390ddfde1b993b" kindref="member">size</ref>();</highlight></codeline>
|
||
|
<codeline lineno="368"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>leftMaxAcc=unionOfDets.<ref refid="classGecode_1_1Set_1_1BndSet_1a057b3dad3bb84170fe390ddfde1b993b" kindref="member">size</ref>();</highlight></codeline>
|
||
|
<codeline lineno="369"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="370"><highlight class="normal"><sp/><sp/><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=0;<sp/>i<xsize;i++)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="371"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>maxSum<sp/>=<sp/>leftMaxAcc+rightMaxSum[i];</highlight></codeline>
|
||
|
<codeline lineno="372"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>minSum<sp/>=<sp/>leftMinAcc+rightMinSum[i];</highlight></codeline>
|
||
|
<codeline lineno="373"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//If<sp/>maxSum<sp/>did<sp/>not<sp/>overflow<sp/>and<sp/>is<sp/>less<sp/>than<sp/>y.cardMin:</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="374"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(maxSum<sp/>>=<sp/>leftMaxAcc<sp/>&&<sp/><sp/>maxSum<sp/><<sp/>y.cardMin())<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="375"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>x[i].cardMin(home,y.cardMin()-maxSum));</highlight></codeline>
|
||
|
<codeline lineno="376"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="377"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="378"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Overflow,<sp/>fail.</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="379"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(minSum<sp/><<sp/>leftMinAcc<sp/>||<sp/>y.cardMax()<sp/><<sp/>minSum)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="380"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK(ME_SET_FAILED);</highlight></codeline>
|
||
|
<codeline lineno="381"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="382"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="383"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>x[i].cardMax(home,y.cardMax()-minSum));</highlight></codeline>
|
||
|
<codeline lineno="384"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="385"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="386"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>leftMaxAcc<sp/>+=<sp/>x[i].cardMax();</highlight></codeline>
|
||
|
<codeline lineno="387"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(leftMaxAcc<sp/><<sp/>x[i].cardMax())</highlight></codeline>
|
||
|
<codeline lineno="388"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>leftMaxAcc<sp/>=<sp/><ref refid="namespaceGecode_1_1Set_1_1Limits_1a82e5a0891d539b2d58db3a9347ac138b" kindref="member">Limits::card</ref>;</highlight></codeline>
|
||
|
<codeline lineno="389"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>leftMinAcc<sp/>+=<sp/>x[i].cardMin();</highlight></codeline>
|
||
|
<codeline lineno="390"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(leftMinAcc<sp/><<sp/>x[i].cardMin())</highlight></codeline>
|
||
|
<codeline lineno="391"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK(ME_SET_FAILED);</highlight></codeline>
|
||
|
<codeline lineno="392"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="393"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="394"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="395"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5ac32341b682bca52b8617a8ad004023ef" kindref="member">ES_NOFIX</ref>;</highlight></codeline>
|
||
|
<codeline lineno="396"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="397"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="398"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Xi<sp/>LB<sp/>includes<sp/>YLB<sp/>minus<sp/>union<sp/>Xj<sp/>UB</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="399"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Xi<sp/>UB<sp/>is<sp/>subset<sp/>of<sp/>YUB<sp/>minus<sp/>union<sp/>of<sp/>Xj<sp/>LBs</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="400"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View0,<sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View1></highlight></codeline>
|
||
|
<codeline lineno="401"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5" kindref="member">ExecStatus</ref></highlight></codeline>
|
||
|
<codeline lineno="402"><highlight class="normal"><sp/><sp/>partitionNXi(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,</highlight></codeline>
|
||
|
<codeline lineno="403"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal">&<sp/>modified,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View0></ref>&<sp/>x,<sp/>View1&<sp/>y)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="404"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>xsize<sp/>=<sp/>x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>();</highlight></codeline>
|
||
|
<codeline lineno="405"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Region" kindref="compound">Region</ref><sp/>r(home);</highlight></codeline>
|
||
|
<codeline lineno="406"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>*<sp/>afterUB<sp/>=</highlight></codeline>
|
||
|
<codeline lineno="407"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="normal"><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>*</highlight><highlight class="keyword">></highlight><highlight class="normal">(r.<ref refid="classGecode_1_1Region_1a6c9123960b7c49dd2d6595ebfccfe7d6" kindref="member">ralloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>)*xsize));</highlight></codeline>
|
||
|
<codeline lineno="408"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>*<sp/>afterLB<sp/>=</highlight></codeline>
|
||
|
<codeline lineno="409"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="normal"><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>*</highlight><highlight class="keyword">></highlight><highlight class="normal">(r.<ref refid="classGecode_1_1Region_1a6c9123960b7c49dd2d6595ebfccfe7d6" kindref="member">ralloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>)*xsize));</highlight></codeline>
|
||
|
<codeline lineno="410"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="411"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="412"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref><sp/>sofarAfterUB;</highlight></codeline>
|
||
|
<codeline lineno="413"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref><sp/>sofarAfterLB;</highlight></codeline>
|
||
|
<codeline lineno="414"><highlight class="normal"><sp/><sp/><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=xsize;<sp/>i--;)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="415"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/>(&afterUB[i])<sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="416"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/>(&afterLB[i])<sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="417"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>afterUB[i].<ref refid="classGecode_1_1Set_1_1BndSet_1a4d00b2876d4c92e788b50cb927cf3751" kindref="member">update</ref>(home,sofarAfterUB);</highlight></codeline>
|
||
|
<codeline lineno="418"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>afterLB[i].<ref refid="classGecode_1_1Set_1_1BndSet_1a4d00b2876d4c92e788b50cb927cf3751" kindref="member">update</ref>(home,sofarAfterLB);</highlight></codeline>
|
||
|
<codeline lineno="419"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View0></ref><sp/>xiub(x[i]);</highlight></codeline>
|
||
|
<codeline lineno="420"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GlbRanges" kindref="compound">GlbRanges<View0></ref><sp/>xilb(x[i]);</highlight></codeline>
|
||
|
<codeline lineno="421"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sofarAfterUB.<ref refid="classGecode_1_1Set_1_1GLBndSet_1acf31e1ebe21a4d3138c6655c06b19ac0" kindref="member">includeI</ref>(home,xiub);</highlight></codeline>
|
||
|
<codeline lineno="422"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sofarAfterLB.<ref refid="classGecode_1_1Set_1_1GLBndSet_1acf31e1ebe21a4d3138c6655c06b19ac0" kindref="member">includeI</ref>(home,xilb);</highlight></codeline>
|
||
|
<codeline lineno="423"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="424"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>sofarAfterUB.<ref refid="classGecode_1_1Set_1_1BndSet_1a4fd106aef04d3546920c07e0d94024de" kindref="member">dispose</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="425"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>sofarAfterLB.<ref refid="classGecode_1_1Set_1_1BndSet_1a4fd106aef04d3546920c07e0d94024de" kindref="member">dispose</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="426"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="427"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="428"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="429"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref><sp/>sofarBeforeUB;</highlight></codeline>
|
||
|
<codeline lineno="430"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref><sp/>sofarBeforeLB;</highlight></codeline>
|
||
|
<codeline lineno="431"><highlight class="normal"><sp/><sp/><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=0;<sp/>i<xsize;<sp/>i++)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="432"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View1></ref><sp/>yub(y);</highlight></codeline>
|
||
|
<codeline lineno="433"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1BndSetRanges" kindref="compound">BndSetRanges</ref><sp/>slb(sofarBeforeLB);</highlight></codeline>
|
||
|
<codeline lineno="434"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1BndSetRanges" kindref="compound">BndSetRanges</ref><sp/>afterlb(afterLB[i]);</highlight></codeline>
|
||
|
<codeline lineno="435"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Union" kindref="compound">Iter::Ranges::Union</ref><<ref refid="classGecode_1_1Set_1_1BndSetRanges" kindref="compound">BndSetRanges</ref>,</highlight></codeline>
|
||
|
<codeline lineno="436"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>BndSetRanges><sp/>xjlb(slb,<sp/>afterlb);</highlight></codeline>
|
||
|
<codeline lineno="437"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Diff" kindref="compound">Iter::Ranges::Diff<LubRanges<View1></ref>,</highlight></codeline>
|
||
|
<codeline lineno="438"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Union" kindref="compound">Iter::Ranges::Union</ref><BndSetRanges,</highlight></codeline>
|
||
|
<codeline lineno="439"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>BndSetRanges><sp/>><sp/>diff1(yub,<sp/>xjlb);</highlight></codeline>
|
||
|
<codeline lineno="440"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>x[i].intersectI(home,diff1));</highlight></codeline>
|
||
|
<codeline lineno="441"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="442"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GlbRanges" kindref="compound">GlbRanges<View1></ref><sp/>ylb(y);</highlight></codeline>
|
||
|
<codeline lineno="443"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>BndSetRanges<sp/>sub(sofarBeforeUB);</highlight></codeline>
|
||
|
<codeline lineno="444"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>BndSetRanges<sp/>afterub(afterUB[i]);</highlight></codeline>
|
||
|
<codeline lineno="445"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Union" kindref="compound">Iter::Ranges::Union</ref><BndSetRanges,</highlight></codeline>
|
||
|
<codeline lineno="446"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>BndSetRanges><sp/>xjub(sub,<sp/>afterub);</highlight></codeline>
|
||
|
<codeline lineno="447"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Diff" kindref="compound">Iter::Ranges::Diff<GlbRanges<View1></ref>,</highlight></codeline>
|
||
|
<codeline lineno="448"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Union" kindref="compound">Iter::Ranges::Union</ref><BndSetRanges,</highlight></codeline>
|
||
|
<codeline lineno="449"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>BndSetRanges><sp/>><sp/>diff2(ylb,<sp/>xjub);</highlight></codeline>
|
||
|
<codeline lineno="450"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>x[i].includeI(home,diff2));</highlight></codeline>
|
||
|
<codeline lineno="451"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="452"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View0></ref><sp/>xiub(x[i]);</highlight></codeline>
|
||
|
<codeline lineno="453"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GlbRanges" kindref="compound">GlbRanges<View0></ref><sp/>xilb(x[i]);</highlight></codeline>
|
||
|
<codeline lineno="454"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sofarBeforeUB.<ref refid="classGecode_1_1Set_1_1GLBndSet_1acf31e1ebe21a4d3138c6655c06b19ac0" kindref="member">includeI</ref>(home,xiub);</highlight></codeline>
|
||
|
<codeline lineno="455"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sofarBeforeLB.<ref refid="classGecode_1_1Set_1_1GLBndSet_1acf31e1ebe21a4d3138c6655c06b19ac0" kindref="member">includeI</ref>(home,xilb);</highlight></codeline>
|
||
|
<codeline lineno="456"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="457"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>sofarBeforeLB.<ref refid="classGecode_1_1Set_1_1BndSet_1a4fd106aef04d3546920c07e0d94024de" kindref="member">dispose</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="458"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>sofarBeforeUB.<ref refid="classGecode_1_1Set_1_1BndSet_1a4fd106aef04d3546920c07e0d94024de" kindref="member">dispose</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="459"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="460"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="461"><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=xsize;i--;)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="462"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>afterUB[i].<ref refid="classGecode_1_1Set_1_1BndSet_1a4fd106aef04d3546920c07e0d94024de" kindref="member">dispose</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="463"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>afterLB[i].<ref refid="classGecode_1_1Set_1_1BndSet_1a4fd106aef04d3546920c07e0d94024de" kindref="member">dispose</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="464"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="465"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="466"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5ac32341b682bca52b8617a8ad004023ef" kindref="member">ES_NOFIX</ref>;</highlight></codeline>
|
||
|
<codeline lineno="467"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="468"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="469"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Xi<sp/>UB<sp/>is<sp/>subset<sp/>of<sp/>YUB<sp/>minus<sp/>union<sp/>of<sp/>Xj<sp/>LBs</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="470"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View0,<sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View1></highlight></codeline>
|
||
|
<codeline lineno="471"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5" kindref="member">ExecStatus</ref></highlight></codeline>
|
||
|
<codeline lineno="472"><highlight class="normal"><sp/><sp/>partitionNXiUB(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,</highlight></codeline>
|
||
|
<codeline lineno="473"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal">&<sp/>modified,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View0></ref>&<sp/>x,<sp/>View1&<sp/>y,</highlight></codeline>
|
||
|
<codeline lineno="474"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>&<sp/>unionOfDets)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="475"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>xsize<sp/>=<sp/>x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>();</highlight></codeline>
|
||
|
<codeline lineno="476"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Region" kindref="compound">Region</ref><sp/>r(home);</highlight></codeline>
|
||
|
<codeline lineno="477"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>*<sp/>afterLB<sp/>=</highlight></codeline>
|
||
|
<codeline lineno="478"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="normal"><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>*</highlight><highlight class="keyword">></highlight><highlight class="normal">(r.<ref refid="classGecode_1_1Region_1a6c9123960b7c49dd2d6595ebfccfe7d6" kindref="member">ralloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>)*xsize));</highlight></codeline>
|
||
|
<codeline lineno="479"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="480"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="481"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref><sp/>sofarAfterLB;</highlight></codeline>
|
||
|
<codeline lineno="482"><highlight class="normal"><sp/><sp/><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=xsize;<sp/>i--;)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="483"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/>(&afterLB[i])<sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="484"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>afterLB[i].<ref refid="classGecode_1_1Set_1_1BndSet_1a4d00b2876d4c92e788b50cb927cf3751" kindref="member">update</ref>(home,sofarAfterLB);</highlight></codeline>
|
||
|
<codeline lineno="485"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GlbRanges" kindref="compound">GlbRanges<View0></ref><sp/>xilb(x[i]);</highlight></codeline>
|
||
|
<codeline lineno="486"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sofarAfterLB.<ref refid="classGecode_1_1Set_1_1GLBndSet_1acf31e1ebe21a4d3138c6655c06b19ac0" kindref="member">includeI</ref>(home,xilb);</highlight></codeline>
|
||
|
<codeline lineno="487"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="488"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>sofarAfterLB.<ref refid="classGecode_1_1Set_1_1BndSet_1a4fd106aef04d3546920c07e0d94024de" kindref="member">dispose</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="489"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="490"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="491"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="492"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref><sp/>sofarBeforeLB;</highlight></codeline>
|
||
|
<codeline lineno="493"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>sofarBeforeLB.<ref refid="classGecode_1_1Set_1_1BndSet_1a4d00b2876d4c92e788b50cb927cf3751" kindref="member">update</ref>(home,unionOfDets);</highlight></codeline>
|
||
|
<codeline lineno="494"><highlight class="normal"><sp/><sp/><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=0;<sp/>i<xsize;<sp/>i++)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="495"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View1></ref><sp/>yub(y);</highlight></codeline>
|
||
|
<codeline lineno="496"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1BndSetRanges" kindref="compound">BndSetRanges</ref><sp/>slb(sofarBeforeLB);</highlight></codeline>
|
||
|
<codeline lineno="497"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1BndSetRanges" kindref="compound">BndSetRanges</ref><sp/>afterlb(afterLB[i]);</highlight></codeline>
|
||
|
<codeline lineno="498"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Union" kindref="compound">Iter::Ranges::Union</ref><<ref refid="classGecode_1_1Set_1_1BndSetRanges" kindref="compound">BndSetRanges</ref>,</highlight></codeline>
|
||
|
<codeline lineno="499"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>BndSetRanges><sp/>xjlb(slb,<sp/>afterlb);</highlight></codeline>
|
||
|
<codeline lineno="500"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Diff" kindref="compound">Iter::Ranges::Diff<LubRanges<View1></ref>,</highlight></codeline>
|
||
|
<codeline lineno="501"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Union" kindref="compound">Iter::Ranges::Union</ref><BndSetRanges,</highlight></codeline>
|
||
|
<codeline lineno="502"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>BndSetRanges><sp/>><sp/>diff1(yub,<sp/>xjlb);</highlight></codeline>
|
||
|
<codeline lineno="503"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>x[i].intersectI(home,diff1));</highlight></codeline>
|
||
|
<codeline lineno="504"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="505"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GlbRanges" kindref="compound">GlbRanges<View0></ref><sp/>xilb(x[i]);</highlight></codeline>
|
||
|
<codeline lineno="506"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sofarBeforeLB.<ref refid="classGecode_1_1Set_1_1GLBndSet_1acf31e1ebe21a4d3138c6655c06b19ac0" kindref="member">includeI</ref>(home,xilb);</highlight></codeline>
|
||
|
<codeline lineno="507"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="508"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>sofarBeforeLB.<ref refid="classGecode_1_1Set_1_1BndSet_1a4fd106aef04d3546920c07e0d94024de" kindref="member">dispose</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="509"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="510"><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=xsize;<sp/>i--;)</highlight></codeline>
|
||
|
<codeline lineno="511"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>afterLB[i].dispose(home);</highlight></codeline>
|
||
|
<codeline lineno="512"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5ac32341b682bca52b8617a8ad004023ef" kindref="member">ES_NOFIX</ref>;</highlight></codeline>
|
||
|
<codeline lineno="513"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="514"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="515"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Xi<sp/>LB<sp/>includes<sp/>YLB<sp/>minus<sp/>union<sp/>Xj<sp/>UB</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="516"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View0,<sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View1></highlight></codeline>
|
||
|
<codeline lineno="517"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5" kindref="member">ExecStatus</ref></highlight></codeline>
|
||
|
<codeline lineno="518"><highlight class="normal"><sp/><sp/>partitionNXiLB(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,</highlight></codeline>
|
||
|
<codeline lineno="519"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal">&<sp/>modified,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View0></ref>&<sp/>x,<sp/>View1&<sp/>y,</highlight></codeline>
|
||
|
<codeline lineno="520"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>&<sp/>unionOfDets)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="521"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>xsize<sp/>=<sp/>x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>();</highlight></codeline>
|
||
|
<codeline lineno="522"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Region" kindref="compound">Region</ref><sp/>r(home);</highlight></codeline>
|
||
|
<codeline lineno="523"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>*<sp/>afterUB<sp/>=</highlight></codeline>
|
||
|
<codeline lineno="524"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="normal"><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>*</highlight><highlight class="keyword">></highlight><highlight class="normal">(r.<ref refid="classGecode_1_1Region_1a6c9123960b7c49dd2d6595ebfccfe7d6" kindref="member">ralloc</ref>(</highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(<ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>)*xsize));</highlight></codeline>
|
||
|
<codeline lineno="525"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="526"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="527"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref><sp/>sofarAfterUB;</highlight></codeline>
|
||
|
<codeline lineno="528"><highlight class="normal"><sp/><sp/><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=xsize;<sp/>i--;)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="529"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/>(&afterUB[i])<sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="530"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>afterUB[i].<ref refid="classGecode_1_1Set_1_1BndSet_1a4d00b2876d4c92e788b50cb927cf3751" kindref="member">update</ref>(home,sofarAfterUB);</highlight></codeline>
|
||
|
<codeline lineno="531"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View0></ref><sp/>xiub(x[i]);</highlight></codeline>
|
||
|
<codeline lineno="532"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sofarAfterUB.<ref refid="classGecode_1_1Set_1_1GLBndSet_1acf31e1ebe21a4d3138c6655c06b19ac0" kindref="member">includeI</ref>(home,xiub);</highlight></codeline>
|
||
|
<codeline lineno="533"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="534"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>sofarAfterUB.<ref refid="classGecode_1_1Set_1_1BndSet_1a4fd106aef04d3546920c07e0d94024de" kindref="member">dispose</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="535"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="536"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="537"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
||
|
<codeline lineno="538"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//The<sp/>union<sp/>of<sp/>previously<sp/>determined<sp/>x[j]-s<sp/>is<sp/>added<sp/>to<sp/>the<sp/>mix<sp/>here:</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="539"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref><sp/>sofarBeforeUB;</highlight></codeline>
|
||
|
<codeline lineno="540"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>sofarBeforeUB.<ref refid="classGecode_1_1Set_1_1BndSet_1a4d00b2876d4c92e788b50cb927cf3751" kindref="member">update</ref>(home,unionOfDets);</highlight></codeline>
|
||
|
<codeline lineno="541"><highlight class="normal"><sp/><sp/><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=0;<sp/>i<xsize;<sp/>i++)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="542"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GlbRanges" kindref="compound">GlbRanges<View1></ref><sp/>ylb(y);</highlight></codeline>
|
||
|
<codeline lineno="543"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1BndSetRanges" kindref="compound">BndSetRanges</ref><sp/>sub(sofarBeforeUB);</highlight></codeline>
|
||
|
<codeline lineno="544"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1BndSetRanges" kindref="compound">BndSetRanges</ref><sp/>afterub(afterUB[i]);</highlight></codeline>
|
||
|
<codeline lineno="545"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Union" kindref="compound">Iter::Ranges::Union</ref><<ref refid="classGecode_1_1Set_1_1BndSetRanges" kindref="compound">BndSetRanges</ref>,</highlight></codeline>
|
||
|
<codeline lineno="546"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>BndSetRanges><sp/>xjub(sub,<sp/>afterub);</highlight></codeline>
|
||
|
<codeline lineno="547"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Diff" kindref="compound">Iter::Ranges::Diff<GlbRanges<View1></ref>,</highlight></codeline>
|
||
|
<codeline lineno="548"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1Union" kindref="compound">Iter::Ranges::Union</ref><BndSetRanges,</highlight></codeline>
|
||
|
<codeline lineno="549"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>BndSetRanges><sp/>><sp/>diff2(ylb,<sp/>xjub);</highlight></codeline>
|
||
|
<codeline lineno="550"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>x[i].includeI(home,diff2));</highlight></codeline>
|
||
|
<codeline lineno="551"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="552"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View0></ref><sp/>xiub(x[i]);</highlight></codeline>
|
||
|
<codeline lineno="553"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sofarBeforeUB.<ref refid="classGecode_1_1Set_1_1GLBndSet_1acf31e1ebe21a4d3138c6655c06b19ac0" kindref="member">includeI</ref>(home,xiub);</highlight></codeline>
|
||
|
<codeline lineno="554"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="555"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>sofarBeforeUB.<ref refid="classGecode_1_1Set_1_1BndSet_1a4fd106aef04d3546920c07e0d94024de" kindref="member">dispose</ref>(home);</highlight></codeline>
|
||
|
<codeline lineno="556"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="557"><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=xsize;i--;)</highlight></codeline>
|
||
|
<codeline lineno="558"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>afterUB[i].dispose(home);</highlight></codeline>
|
||
|
<codeline lineno="559"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5ac32341b682bca52b8617a8ad004023ef" kindref="member">ES_NOFIX</ref>;</highlight></codeline>
|
||
|
<codeline lineno="560"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="561"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="562"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Y<sp/>LB<sp/>contains<sp/>union<sp/>of<sp/>X<sp/>LBs</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="563"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View0,<sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View1></highlight></codeline>
|
||
|
<codeline lineno="564"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5" kindref="member">ExecStatus</ref></highlight></codeline>
|
||
|
<codeline lineno="565"><highlight class="normal"><sp/><sp/>partitionNYLB(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,</highlight></codeline>
|
||
|
<codeline lineno="566"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal">&<sp/>modified,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View0></ref>&<sp/>x,<sp/>View1&<sp/>y,</highlight></codeline>
|
||
|
<codeline lineno="567"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>&<sp/>unionOfDets)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="568"><highlight class="normal"><sp/><sp/><sp/><sp/>assert(unionOfDets.<ref refid="classGecode_1_1Set_1_1BndSet_1ad5fc6491a5d55b3668c42dba6d40a612" kindref="member">isConsistent</ref>());</highlight></codeline>
|
||
|
<codeline lineno="569"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>xsize<sp/>=<sp/>x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>();</highlight></codeline>
|
||
|
<codeline lineno="570"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Region" kindref="compound">Region</ref><sp/>r(home);</highlight></codeline>
|
||
|
<codeline lineno="571"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GlbRanges" kindref="compound">GlbRanges<View0></ref>*<sp/>xLBs<sp/>=<sp/>r.<ref refid="classGecode_1_1Region_1a167cff2d16f08d890fff11f80e519233" kindref="member">alloc</ref><<ref refid="classGecode_1_1Set_1_1GlbRanges" kindref="compound">GlbRanges<View0></ref><sp/>>(xsize);</highlight></codeline>
|
||
|
<codeline lineno="572"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nonEmptyCounter=0;</highlight></codeline>
|
||
|
<codeline lineno="573"><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/>xsize;<sp/>i--;<sp/>)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="574"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GlbRanges" kindref="compound">GlbRanges<View0></ref><sp/>r(x[i]);</highlight></codeline>
|
||
|
<codeline lineno="575"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(r())<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="576"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>xLBs[nonEmptyCounter]<sp/>=<sp/>r;</highlight></codeline>
|
||
|
<codeline lineno="577"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nonEmptyCounter++;</highlight></codeline>
|
||
|
<codeline lineno="578"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="579"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="580"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(nonEmptyCounter<sp/>!=0)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="581"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1NaryUnion" kindref="compound">Iter::Ranges::NaryUnion</ref><sp/>xLBUnion(r,xLBs,nonEmptyCounter);</highlight></codeline>
|
||
|
<codeline lineno="582"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1BndSetRanges" kindref="compound">BndSetRanges</ref><sp/>dets(unionOfDets);</highlight></codeline>
|
||
|
<codeline lineno="583"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>xLBUnion<sp/>|=<sp/>dets;</highlight></codeline>
|
||
|
<codeline lineno="584"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>y.includeI(home,xLBUnion));</highlight></codeline>
|
||
|
<codeline lineno="585"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="586"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a13bb69056fb9293e8df98c0e347ba634" kindref="member">ES_FIX</ref>;</highlight></codeline>
|
||
|
<codeline lineno="587"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="588"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="589"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">//<sp/>Y<sp/>UB<sp/>is<sp/>subset<sp/>of<sp/>union<sp/>of<sp/>X<sp/>UBs</highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="590"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View0,<sp/></highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View1></highlight></codeline>
|
||
|
<codeline lineno="591"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5" kindref="member">ExecStatus</ref></highlight></codeline>
|
||
|
<codeline lineno="592"><highlight class="normal"><sp/><sp/>partitionNYUB(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,</highlight></codeline>
|
||
|
<codeline lineno="593"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal">&<sp/>modified,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View0></ref>&<sp/>x,<sp/>View1&<sp/>y,</highlight></codeline>
|
||
|
<codeline lineno="594"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1GLBndSet" kindref="compound">GLBndSet</ref>&<sp/>unionOfDets)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="595"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>xsize<sp/>=<sp/>x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>();</highlight></codeline>
|
||
|
<codeline lineno="596"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Region" kindref="compound">Region</ref><sp/>r(home);</highlight></codeline>
|
||
|
<codeline lineno="597"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View0></ref>*<sp/>xUBs<sp/>=<sp/>r.<ref refid="classGecode_1_1Region_1a167cff2d16f08d890fff11f80e519233" kindref="member">alloc</ref><<ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View0></ref><sp/>>(xsize);</highlight></codeline>
|
||
|
<codeline lineno="598"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>nonEmptyCounter=0;</highlight></codeline>
|
||
|
<codeline lineno="599"><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/>xsize;<sp/>i--;<sp/>)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="600"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1LubRanges" kindref="compound">LubRanges<View0></ref><sp/>r(x[i]);</highlight></codeline>
|
||
|
<codeline lineno="601"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(r())<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="602"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>xUBs[nonEmptyCounter]<sp/>=<sp/>r;</highlight></codeline>
|
||
|
<codeline lineno="603"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>nonEmptyCounter++;</highlight></codeline>
|
||
|
<codeline lineno="604"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="605"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="606"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(nonEmptyCounter<sp/>!=<sp/>0)<sp/>{</highlight></codeline>
|
||
|
<codeline lineno="607"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Iter_1_1Ranges_1_1NaryUnion" kindref="compound">Iter::Ranges::NaryUnion</ref><sp/>xUBUnion(r,xUBs,nonEmptyCounter);</highlight></codeline>
|
||
|
<codeline lineno="608"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Set_1_1BndSetRanges" kindref="compound">BndSetRanges</ref><sp/>dets(unionOfDets);</highlight></codeline>
|
||
|
<codeline lineno="609"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>xUBUnion<sp/>|=<sp/>dets;</highlight></codeline>
|
||
|
<codeline lineno="610"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK_MODIFIED(modified,<sp/>y.intersectI(home,xUBUnion));</highlight></codeline>
|
||
|
<codeline lineno="611"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="612"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a13bb69056fb9293e8df98c0e347ba634" kindref="member">ES_FIX</ref>;</highlight></codeline>
|
||
|
<codeline lineno="613"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
||
|
<codeline lineno="614"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="615"><highlight class="normal">}}}</highlight></codeline>
|
||
|
<codeline lineno="616"><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="617"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
|
||
|
<codeline lineno="618"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
|
||
|
<codeline lineno="619"><highlight class="normal"></highlight><highlight class="comment">//<sp/>STATISTICS:<sp/>set-prop</highlight><highlight class="normal"></highlight></codeline>
|
||
|
</programlisting>
|
||
|
<location file="/usr/include/gecode/set/rel-op/common.hpp"/>
|
||
|
</compounddef>
|
||
|
</doxygen>
|