700 lines
95 KiB
XML
700 lines
95 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="lex_8hpp" kind="file">
|
|
<compoundname>lex.hpp</compoundname>
|
|
<includedby refid="int_2rel_8hh" local="no">/usr/include/gecode/int/rel.hh</includedby>
|
|
<invincdepgraph>
|
|
<node id="18905">
|
|
<label>/usr/include/gecode/int/nvalues/int-base.hpp</label>
|
|
<link refid="nvalues_2int-base_8hpp_source"/>
|
|
<childnode refid="18898" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18887">
|
|
<label>/usr/include/gecode/int/arithmetic.hh</label>
|
|
<link refid="int_2arithmetic_8hh_source"/>
|
|
</node>
|
|
<node id="18895">
|
|
<label>/usr/include/gecode/int/gcc/post.hpp</label>
|
|
<link refid="int_2gcc_2post_8hpp_source"/>
|
|
<childnode refid="18896" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18911">
|
|
<label>/usr/include/gecode/int/dom/range.hpp</label>
|
|
<link refid="range_8hpp_source"/>
|
|
<childnode refid="18912" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18902">
|
|
<label>/usr/include/gecode/int/distinct.hh</label>
|
|
<link refid="int_2distinct_8hh_source"/>
|
|
<childnode refid="18903" relation="include">
|
|
</childnode>
|
|
<childnode refid="18904" relation="include">
|
|
</childnode>
|
|
<childnode refid="18895" relation="include">
|
|
</childnode>
|
|
<childnode refid="18905" relation="include">
|
|
</childnode>
|
|
<childnode refid="18906" relation="include">
|
|
</childnode>
|
|
<childnode refid="18907" relation="include">
|
|
</childnode>
|
|
<childnode refid="18908" relation="include">
|
|
</childnode>
|
|
<childnode refid="18909" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18917">
|
|
<label>/usr/include/gecode/int/member/prop.hpp</label>
|
|
<link refid="member_2prop_8hpp_source"/>
|
|
<childnode refid="18918" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18885">
|
|
<label>/usr/include/gecode/int/rel.hh</label>
|
|
<link refid="int_2rel_8hh_source"/>
|
|
<childnode refid="18886" relation="include">
|
|
</childnode>
|
|
<childnode refid="18888" relation="include">
|
|
</childnode>
|
|
<childnode refid="18889" relation="include">
|
|
</childnode>
|
|
<childnode refid="18887" relation="include">
|
|
</childnode>
|
|
<childnode refid="18890" relation="include">
|
|
</childnode>
|
|
<childnode refid="18900" relation="include">
|
|
</childnode>
|
|
<childnode refid="18902" relation="include">
|
|
</childnode>
|
|
<childnode refid="18911" relation="include">
|
|
</childnode>
|
|
<childnode refid="18912" relation="include">
|
|
</childnode>
|
|
<childnode refid="18913" relation="include">
|
|
</childnode>
|
|
<childnode refid="18914" relation="include">
|
|
</childnode>
|
|
<childnode refid="18916" relation="include">
|
|
</childnode>
|
|
<childnode refid="18917" relation="include">
|
|
</childnode>
|
|
<childnode refid="18919" relation="include">
|
|
</childnode>
|
|
<childnode refid="18897" relation="include">
|
|
</childnode>
|
|
<childnode refid="18920" relation="include">
|
|
</childnode>
|
|
<childnode refid="18906" relation="include">
|
|
</childnode>
|
|
<childnode refid="18907" relation="include">
|
|
</childnode>
|
|
<childnode refid="18908" relation="include">
|
|
</childnode>
|
|
<childnode refid="18921" relation="include">
|
|
</childnode>
|
|
<childnode refid="18909" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18888">
|
|
<label>/usr/include/gecode/int/arithmetic/nroot.hpp</label>
|
|
<link refid="nroot_8hpp_source"/>
|
|
<childnode refid="18887" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18886">
|
|
<label>/usr/include/gecode/int/arithmetic/max.hpp</label>
|
|
<link refid="max_8hpp_source"/>
|
|
<childnode refid="18887" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18918">
|
|
<label>/usr/include/gecode/int/member.hh</label>
|
|
<link refid="member_8hh_source"/>
|
|
</node>
|
|
<node id="18920">
|
|
<label>/usr/include/gecode/int/nvalues/bool-gq.hpp</label>
|
|
<link refid="bool-gq_8hpp_source"/>
|
|
<childnode refid="18898" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18901">
|
|
<label>/usr/include/gecode/int/count.hh</label>
|
|
<link refid="count_8hh_source"/>
|
|
</node>
|
|
<node id="18907">
|
|
<label>/usr/include/gecode/int/nvalues/int-gq.hpp</label>
|
|
<link refid="nvalues_2int-gq_8hpp_source"/>
|
|
<childnode refid="18898" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18900">
|
|
<label>/usr/include/gecode/int/count/rel.hpp</label>
|
|
<link refid="rel_8hpp_source"/>
|
|
<childnode refid="18901" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18915">
|
|
<label>/usr/include/gecode/set/element.hh</label>
|
|
<link refid="set_2element_8hh_source"/>
|
|
</node>
|
|
<node id="18908">
|
|
<label>/usr/include/gecode/int/nvalues/int-lq.hpp</label>
|
|
<link refid="nvalues_2int-lq_8hpp_source"/>
|
|
<childnode refid="18898" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18914">
|
|
<label>/usr/include/gecode/int/element.hh</label>
|
|
<link refid="int_2element_8hh_source"/>
|
|
<childnode refid="18915" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18903">
|
|
<label>/usr/include/gecode/int/channel.hh</label>
|
|
<link refid="int_2channel_8hh_source"/>
|
|
</node>
|
|
<node id="18891">
|
|
<label>/usr/include/gecode/int/bool.hh</label>
|
|
<link refid="bool_8hh_source"/>
|
|
<childnode refid="18892" relation="include">
|
|
</childnode>
|
|
<childnode refid="18897" relation="include">
|
|
</childnode>
|
|
<childnode refid="18899" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18919">
|
|
<label>/usr/include/gecode/int/member/re-prop.hpp</label>
|
|
<link refid="re-prop_8hpp_source"/>
|
|
<childnode refid="18918" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18898">
|
|
<label>/usr/include/gecode/int/nvalues.hh</label>
|
|
<link refid="nvalues_8hh_source"/>
|
|
</node>
|
|
<node id="18890">
|
|
<label>/usr/include/gecode/int/bool/ite.hpp</label>
|
|
<link refid="ite_8hpp_source"/>
|
|
<childnode refid="18891" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18921">
|
|
<label>/usr/include/gecode/int/sequence.hh</label>
|
|
<link refid="int_2sequence_8hh_source"/>
|
|
</node>
|
|
<node id="18884">
|
|
<label>/usr/include/gecode/int/rel/lex.hpp</label>
|
|
<link refid="lex.hpp"/>
|
|
<childnode refid="18885" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18892">
|
|
<label>/usr/include/gecode/int/linear/bool-int.hpp</label>
|
|
<link refid="bool-int_8hpp_source"/>
|
|
<childnode refid="18893" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18909">
|
|
<label>/usr/include/gecode/int/sorted/propagate.hpp</label>
|
|
<link refid="sorted_2propagate_8hpp_source"/>
|
|
<childnode refid="18910" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18896">
|
|
<label>/usr/include/gecode/int/gcc.hh</label>
|
|
<link refid="gcc_8hh_source"/>
|
|
</node>
|
|
<node id="18897">
|
|
<label>/usr/include/gecode/int/nvalues/bool-eq.hpp</label>
|
|
<link refid="bool-eq_8hpp_source"/>
|
|
<childnode refid="18898" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18899">
|
|
<label>/usr/include/gecode/int/nvalues/bool-lq.hpp</label>
|
|
<link refid="bool-lq_8hpp_source"/>
|
|
<childnode refid="18898" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18916">
|
|
<label>/usr/include/gecode/int/extensional.hh</label>
|
|
<link refid="extensional_8hh_source"/>
|
|
</node>
|
|
<node id="18910">
|
|
<label>/usr/include/gecode/int/sorted.hh</label>
|
|
<link refid="sorted_8hh_source"/>
|
|
</node>
|
|
<node id="18906">
|
|
<label>/usr/include/gecode/int/nvalues/int-eq.hpp</label>
|
|
<link refid="nvalues_2int-eq_8hpp_source"/>
|
|
<childnode refid="18898" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18894">
|
|
<label>/usr/include/gecode/int/arithmetic/divmod.hpp</label>
|
|
<link refid="divmod_8hpp_source"/>
|
|
<childnode refid="18887" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18893">
|
|
<label>/usr/include/gecode/int/linear.hh</label>
|
|
<link refid="int_2linear_8hh_source"/>
|
|
<childnode refid="18894" relation="include">
|
|
</childnode>
|
|
<childnode refid="18887" relation="include">
|
|
</childnode>
|
|
<childnode refid="18895" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18912">
|
|
<label>/usr/include/gecode/int/dom.hh</label>
|
|
<link refid="dom_8hh_source"/>
|
|
</node>
|
|
<node id="18913">
|
|
<label>/usr/include/gecode/int/element/pair.hpp</label>
|
|
<link refid="pair_8hpp_source"/>
|
|
<childnode refid="18914" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="18904">
|
|
<label>/usr/include/gecode/int/circuit.hh</label>
|
|
<link refid="circuit_8hh_source"/>
|
|
</node>
|
|
<node id="18889">
|
|
<label>/usr/include/gecode/int/arithmetic/pow.hpp</label>
|
|
<link refid="pow_8hpp_source"/>
|
|
<childnode refid="18887" relation="include">
|
|
</childnode>
|
|
</node>
|
|
</invincdepgraph>
|
|
<innernamespace refid="namespaceGecode">Gecode</innernamespace>
|
|
<innernamespace refid="namespaceGecode_1_1Int">Gecode::Int</innernamespace>
|
|
<innernamespace refid="namespaceGecode_1_1Int_1_1Rel">Gecode::Int::Rel</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/>Christian<sp/>Schulte<sp/><schulte@gecode.org></highlight></codeline>
|
|
<codeline lineno="5"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="6"><highlight class="comment"><sp/>*<sp/><sp/>Copyright:</highlight></codeline>
|
|
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Christian<sp/>Schulte,<sp/>2003</highlight></codeline>
|
|
<codeline lineno="8"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="9"><highlight class="comment"><sp/>*<sp/><sp/>Last<sp/>modified:</highlight></codeline>
|
|
<codeline lineno="10"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>$Date:<sp/>2011-07-08<sp/>11:58:02<sp/>+0200<sp/>(Fri,<sp/>08<sp/>Jul<sp/>2011)<sp/>$<sp/>by<sp/>$Author:<sp/>schulte<sp/>$</highlight></codeline>
|
|
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>$Revision:<sp/>12163<sp/>$</highlight></codeline>
|
|
<codeline lineno="12"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/><sp/>This<sp/>file<sp/>is<sp/>part<sp/>of<sp/>Gecode,<sp/>the<sp/>generic<sp/>constraint</highlight></codeline>
|
|
<codeline lineno="14"><highlight class="comment"><sp/>*<sp/><sp/>development<sp/>environment:</highlight></codeline>
|
|
<codeline lineno="15"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>http://www.gecode.org</highlight></codeline>
|
|
<codeline lineno="16"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/>Permission<sp/>is<sp/>hereby<sp/>granted,<sp/>free<sp/>of<sp/>charge,<sp/>to<sp/>any<sp/>person<sp/>obtaining</highlight></codeline>
|
|
<codeline lineno="18"><highlight class="comment"><sp/>*<sp/><sp/>a<sp/>copy<sp/>of<sp/>this<sp/>software<sp/>and<sp/>associated<sp/>documentation<sp/>files<sp/>(the</highlight></codeline>
|
|
<codeline lineno="19"><highlight class="comment"><sp/>*<sp/><sp/>"Software"),<sp/>to<sp/>deal<sp/>in<sp/>the<sp/>Software<sp/>without<sp/>restriction,<sp/>including</highlight></codeline>
|
|
<codeline lineno="20"><highlight class="comment"><sp/>*<sp/><sp/>without<sp/>limitation<sp/>the<sp/>rights<sp/>to<sp/>use,<sp/>copy,<sp/>modify,<sp/>merge,<sp/>publish,</highlight></codeline>
|
|
<codeline lineno="21"><highlight class="comment"><sp/>*<sp/><sp/>distribute,<sp/>sublicense,<sp/>and/or<sp/>sell<sp/>copies<sp/>of<sp/>the<sp/>Software,<sp/>and<sp/>to</highlight></codeline>
|
|
<codeline lineno="22"><highlight class="comment"><sp/>*<sp/><sp/>permit<sp/>persons<sp/>to<sp/>whom<sp/>the<sp/>Software<sp/>is<sp/>furnished<sp/>to<sp/>do<sp/>so,<sp/>subject<sp/>to</highlight></codeline>
|
|
<codeline lineno="23"><highlight class="comment"><sp/>*<sp/><sp/>the<sp/>following<sp/>conditions:</highlight></codeline>
|
|
<codeline lineno="24"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="25"><highlight class="comment"><sp/>*<sp/><sp/>The<sp/>above<sp/>copyright<sp/>notice<sp/>and<sp/>this<sp/>permission<sp/>notice<sp/>shall<sp/>be</highlight></codeline>
|
|
<codeline lineno="26"><highlight class="comment"><sp/>*<sp/><sp/>included<sp/>in<sp/>all<sp/>copies<sp/>or<sp/>substantial<sp/>portions<sp/>of<sp/>the<sp/>Software.</highlight></codeline>
|
|
<codeline lineno="27"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="28"><highlight class="comment"><sp/>*<sp/><sp/>THE<sp/>SOFTWARE<sp/>IS<sp/>PROVIDED<sp/>"AS<sp/>IS",<sp/>WITHOUT<sp/>WARRANTY<sp/>OF<sp/>ANY<sp/>KIND,</highlight></codeline>
|
|
<codeline lineno="29"><highlight class="comment"><sp/>*<sp/><sp/>EXPRESS<sp/>OR<sp/>IMPLIED,<sp/>INCLUDING<sp/>BUT<sp/>NOT<sp/>LIMITED<sp/>TO<sp/>THE<sp/>WARRANTIES<sp/>OF</highlight></codeline>
|
|
<codeline lineno="30"><highlight class="comment"><sp/>*<sp/><sp/>MERCHANTABILITY,<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>AND</highlight></codeline>
|
|
<codeline lineno="31"><highlight class="comment"><sp/>*<sp/><sp/>NONINFRINGEMENT.<sp/>IN<sp/>NO<sp/>EVENT<sp/>SHALL<sp/>THE<sp/>AUTHORS<sp/>OR<sp/>COPYRIGHT<sp/>HOLDERS<sp/>BE</highlight></codeline>
|
|
<codeline lineno="32"><highlight class="comment"><sp/>*<sp/><sp/>LIABLE<sp/>FOR<sp/>ANY<sp/>CLAIM,<sp/>DAMAGES<sp/>OR<sp/>OTHER<sp/>LIABILITY,<sp/>WHETHER<sp/>IN<sp/>AN<sp/>ACTION</highlight></codeline>
|
|
<codeline lineno="33"><highlight class="comment"><sp/>*<sp/><sp/>OF<sp/>CONTRACT,<sp/>TORT<sp/>OR<sp/>OTHERWISE,<sp/>ARISING<sp/>FROM,<sp/>OUT<sp/>OF<sp/>OR<sp/>IN<sp/>CONNECTION</highlight></codeline>
|
|
<codeline lineno="34"><highlight class="comment"><sp/>*<sp/><sp/>WITH<sp/>THE<sp/>SOFTWARE<sp/>OR<sp/>THE<sp/>USE<sp/>OR<sp/>OTHER<sp/>DEALINGS<sp/>IN<sp/>THE<sp/>SOFTWARE.</highlight></codeline>
|
|
<codeline lineno="35"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="36"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="37"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="38"><highlight class="normal"></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">Gecode<sp/>{<sp/></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">Int<sp/>{<sp/></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">Rel<sp/>{</highlight></codeline>
|
|
<codeline lineno="39"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="40"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
|
<codeline lineno="41"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Lexical<sp/>order<sp/>propagator</highlight></codeline>
|
|
<codeline lineno="42"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="43"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="44"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="45" refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1a3ce5375593360980a3d6c3b4c6a37c85" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1adfbf4289d0c1691e62c66f4c54536407" kindref="member">LexLqLe<View>::LexLqLe</ref>(<ref refid="classGecode_1_1Home" kindref="compound">Home</ref><sp/>home,</highlight></codeline>
|
|
<codeline lineno="46"><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/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View></ref>&<sp/>x0,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View></ref>&<sp/>y0,<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>s)</highlight></codeline>
|
|
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/><ref refid="classGecode_1_1Propagator" kindref="compound">Propagator</ref>(home),<sp/>x(x0),<sp/>y(y0),<sp/>strict(s)<sp/>{</highlight></codeline>
|
|
<codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1a2498086d768f13ae0cf9df1f657e1b3c" kindref="member">x</ref>.subscribe(home,<sp/>*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,<sp/>PC_INT_BND);</highlight></codeline>
|
|
<codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/>y.subscribe(home,<sp/>*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,<sp/>PC_INT_BND);</highlight></codeline>
|
|
<codeline lineno="50"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="51"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="52"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="53"><highlight class="normal"><sp/><sp/>forceinline</highlight></codeline>
|
|
<codeline lineno="54" refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1adfbf4289d0c1691e62c66f4c54536407" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1adfbf4289d0c1691e62c66f4c54536407" kindref="member">LexLqLe<View>::LexLqLe</ref>(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>share,<sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe" kindref="compound">LexLqLe<View></ref>&<sp/>p)</highlight></codeline>
|
|
<codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/><ref refid="classGecode_1_1Propagator" kindref="compound">Propagator</ref>(home,share,p),<sp/>strict(p.strict)<sp/>{</highlight></codeline>
|
|
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1a2498086d768f13ae0cf9df1f657e1b3c" kindref="member">x</ref>.update(home,share,p.<ref refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1a2498086d768f13ae0cf9df1f657e1b3c" kindref="member">x</ref>);</highlight></codeline>
|
|
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/>y.update(home,share,p.y);</highlight></codeline>
|
|
<codeline lineno="58"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="59"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="60"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="61"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Actor" kindref="compound">Actor</ref>*</highlight></codeline>
|
|
<codeline lineno="62" refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1adf1fce1fd3c4dfb569ce351325379000" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1adf1fce1fd3c4dfb569ce351325379000" kindref="member">LexLqLe<View>::copy</ref>(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>share)<sp/>{</highlight></codeline>
|
|
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/>(home)<sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe" kindref="compound">LexLqLe<View></ref>(home,share,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="64"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="65"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="66"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="67"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1PropCost" kindref="compound">PropCost</ref></highlight></codeline>
|
|
<codeline lineno="68" refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1a828a8598f5b9c61d38d70fbf51f48cae" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1a828a8598f5b9c61d38d70fbf51f48cae" kindref="member">LexLqLe<View>::cost</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1a129e41c1d037528010d7b6706495a560" kindref="member">ModEventDelta</ref>&)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
|
|
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1PropCost_1a4a383a3772df2c1e49341813edc19b34" kindref="member">PropCost::linear</ref>(<ref refid="classGecode_1_1PropCost_1ad1bebae59ea373495c5bf51ffc249dcda29f70a7d7f550f3822568ddce422d861" kindref="member">PropCost::LO</ref>,<sp/>x.size());</highlight></codeline>
|
|
<codeline lineno="70"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="71"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="72"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="73"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="74" refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1aa455e495b1a034f4cccc00fb5e40123e" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1aa455e495b1a034f4cccc00fb5e40123e" kindref="member">LexLqLe<View>::dispose</ref>(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home)<sp/>{</highlight></codeline>
|
|
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/>assert(!home.<ref refid="classGecode_1_1Space_1a9e1ab1eb6a0da74bd4ddc85e347af44a" kindref="member">failed</ref>());</highlight></codeline>
|
|
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/>x.cancel(home,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,PC_INT_BND);</highlight></codeline>
|
|
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/>y.cancel(home,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,PC_INT_BND);</highlight></codeline>
|
|
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/>(void)<sp/><ref refid="classGecode_1_1Actor_1a143253b3eceda40f36834e38c8ac05d9" kindref="member">Propagator::dispose</ref>(home);</highlight></codeline>
|
|
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(*this);</highlight></codeline>
|
|
<codeline lineno="80"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="81"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="82"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="83"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5" kindref="member">ExecStatus</ref></highlight></codeline>
|
|
<codeline lineno="84" refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1ad608a803d96011a1ed9ffc80f52e68d3" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1ad608a803d96011a1ed9ffc80f52e68d3" kindref="member">LexLqLe<View>::propagate</ref>(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1a129e41c1d037528010d7b6706495a560" kindref="member">ModEventDelta</ref>&)<sp/>{</highlight></codeline>
|
|
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
|
<codeline lineno="86"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>State<sp/>1</highlight></codeline>
|
|
<codeline lineno="87"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*</highlight></codeline>
|
|
<codeline lineno="88"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
|
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>0;</highlight></codeline>
|
|
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>n<sp/>=<sp/>x.size();</highlight></codeline>
|
|
<codeline lineno="92"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>((i<sp/><<sp/>n)<sp/>&&<sp/>(x[i].min()<sp/>==<sp/>y[i].max()))<sp/>{</highlight></codeline>
|
|
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>case:<sp/>=,<sp/>>=</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="95"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK(x[i].lq(home,y[i].max()));</highlight></codeline>
|
|
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK(y[i].gq(home,x[i].min()));</highlight></codeline>
|
|
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>i++;</highlight></codeline>
|
|
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="99"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(i<sp/>==<sp/>n)<sp/></highlight><highlight class="comment">//<sp/>case:<sp/>$</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>strict<sp/>?<sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a839b40c2e7ccebb2e61e92e274833089" kindref="member">ES_FAILED</ref><sp/>:<sp/>home.<ref refid="group__TaskActorStatus_1gafc19cbf71ed90a9e0b414b875103f4c7" kindref="member">ES_SUBSUMED</ref>(*</highlight><highlight class="keyword">this</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="102"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Possible<sp/>cases<sp/>left:<sp/><,<sp/><=,<sp/>><sp/>(yields<sp/>failure),<sp/>?</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK(x[i].lq(home,y[i].max()));</highlight></codeline>
|
|
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_ME_CHECK(y[i].gq(home,x[i].min()));</highlight></codeline>
|
|
<codeline lineno="106"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="107"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x[i].max()<sp/><<sp/>y[i].min())<sp/></highlight><highlight class="comment">//<sp/>case:<sp/><<sp/>(after<sp/>tell)</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="108"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>home.<ref refid="group__TaskActorStatus_1gafc19cbf71ed90a9e0b414b875103f4c7" kindref="member">ES_SUBSUMED</ref>(*</highlight><highlight class="keyword">this</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="109"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>x[i]<sp/>can<sp/>never<sp/>be<sp/>equal<sp/>to<sp/>y[i]<sp/>(otherwise:<sp/>>=)</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>assert(!(x[i].assigned()<sp/>&&<sp/>y[i].assigned()<sp/>&&</highlight></codeline>
|
|
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x[i].val()<sp/>==<sp/>y[i].val()));</highlight></codeline>
|
|
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Remove<sp/>all<sp/>elements<sp/>between<sp/>0...i-1<sp/>as<sp/>they<sp/>are<sp/>assigned<sp/>and<sp/>equal</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>x.drop_fst(i);<sp/>y.drop_fst(i);</highlight></codeline>
|
|
<codeline lineno="115"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>After<sp/>this,<sp/>execution<sp/>continues<sp/>at<sp/>[1]</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="116"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="117"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="118"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
|
<codeline lineno="119"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>State<sp/>2</highlight></codeline>
|
|
<codeline lineno="120"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/><sp/><sp/>prefix:<sp/>(?|<=)</highlight></codeline>
|
|
<codeline lineno="121"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*</highlight></codeline>
|
|
<codeline lineno="122"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="123"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
|
<codeline lineno="124"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>1;</highlight></codeline>
|
|
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>n<sp/>=<sp/>x.size();</highlight></codeline>
|
|
<codeline lineno="126"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>((i<sp/><<sp/>n)<sp/>&&</highlight></codeline>
|
|
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(x[i].min()<sp/>==<sp/>y[i].max())<sp/>&&</highlight></codeline>
|
|
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(x[i].max()<sp/>==<sp/>y[i].min()))<sp/>{<sp/></highlight><highlight class="comment">//<sp/>case:<sp/>=</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>assert(x[i].assigned()<sp/>&&<sp/>y[i].assigned()<sp/>&&</highlight></codeline>
|
|
<codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(x[i].val()<sp/>==<sp/>y[i].val()));</highlight></codeline>
|
|
<codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>i++;</highlight></codeline>
|
|
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="134"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(i<sp/>==<sp/>n)<sp/>{<sp/></highlight><highlight class="comment">//<sp/>case:<sp/>$</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(strict)</highlight></codeline>
|
|
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>rewrite_le;</highlight></codeline>
|
|
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>rewrite_lq;</highlight></codeline>
|
|
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="141"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x[i].max()<sp/><<sp/>y[i].min())<sp/></highlight><highlight class="comment">//<sp/>case:<sp/><</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>rewrite_lq;</highlight></codeline>
|
|
<codeline lineno="144"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x[i].min()<sp/>><sp/>y[i].max())<sp/></highlight><highlight class="comment">//<sp/>case:<sp/>></highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>rewrite_le;</highlight></codeline>
|
|
<codeline lineno="147"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(i<sp/>><sp/>1)<sp/>{</highlight></codeline>
|
|
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Remove<sp/>equal<sp/>elements<sp/>[1...i-1],<sp/>keep<sp/>element<sp/>[0]</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x[i-1]=x[0];<sp/>x.drop_fst(i-1);</highlight></codeline>
|
|
<codeline lineno="151"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>y[i-1]=y[0];<sp/>y.drop_fst(i-1);</highlight></codeline>
|
|
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="154"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="155"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x[1].max()<sp/><=<sp/>y[1].min())<sp/>{</highlight></codeline>
|
|
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>case:<sp/><=<sp/>(invariant:<sp/>not<sp/>=,<sp/><)</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
|
<codeline lineno="158"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>State<sp/>3</highlight></codeline>
|
|
<codeline lineno="159"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/><sp/><sp/>prefix:<sp/>(?|<=),<=</highlight></codeline>
|
|
<codeline lineno="160"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*</highlight></codeline>
|
|
<codeline lineno="161"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>2;</highlight></codeline>
|
|
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>n<sp/>=<sp/>x.size();</highlight></codeline>
|
|
<codeline lineno="164"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>((i<sp/><<sp/>n)<sp/>&&<sp/>(x[i].max()<sp/>==<sp/>y[i].min()))<sp/></highlight><highlight class="comment">//<sp/>case:<sp/><=,<sp/>=</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>i++;</highlight></codeline>
|
|
<codeline lineno="167"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(i<sp/>==<sp/>n)<sp/>{<sp/></highlight><highlight class="comment">//<sp/>case:<sp/>$</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="169"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(strict)</highlight></codeline>
|
|
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><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="171"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>rewrite_lq;</highlight></codeline>
|
|
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="174"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x[i].max()<sp/><<sp/>y[i].min())<sp/></highlight><highlight class="comment">//<sp/>case:<sp/><</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>rewrite_lq;</highlight></codeline>
|
|
<codeline lineno="177"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="178"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x[i].min()<sp/>><sp/>y[i].max())<sp/>{<sp/></highlight><highlight class="comment">//<sp/>case:<sp/>></highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Eliminate<sp/>[i]...[n-1]</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="180"><highlight class="normal"><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<n;<sp/>j++)<sp/>{</highlight></codeline>
|
|
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x[j].cancel(home,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,PC_INT_BND);</highlight></codeline>
|
|
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>y[j].cancel(home,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,PC_INT_BND);</highlight></codeline>
|
|
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="184"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x.size(i);<sp/>y.size(i);</highlight></codeline>
|
|
<codeline lineno="185"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strict<sp/>=<sp/></highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="187"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="188"><highlight class="normal"><sp/><sp/><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="189"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="190"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x[1].min()<sp/>>=<sp/>y[1].max())<sp/>{</highlight></codeline>
|
|
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>case:<sp/>>=<sp/>(invariant:<sp/>not<sp/>=,<sp/>>)</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
|
<codeline lineno="194"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/>State<sp/>4</highlight></codeline>
|
|
<codeline lineno="195"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*<sp/><sp/><sp/>prefix:<sp/>(?|<=)<sp/>>=</highlight></codeline>
|
|
<codeline lineno="196"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*</highlight></codeline>
|
|
<codeline lineno="197"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i<sp/>=<sp/>2;</highlight></codeline>
|
|
<codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>n<sp/>=<sp/>x.size();</highlight></codeline>
|
|
<codeline lineno="200"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>((i<sp/><<sp/>n)<sp/>&&<sp/>(x[i].min()<sp/>==<sp/>y[i].max()))</highlight></codeline>
|
|
<codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>case:<sp/>>=,<sp/>=</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>i++;</highlight></codeline>
|
|
<codeline lineno="204"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(i<sp/>==<sp/>n)<sp/>{<sp/></highlight><highlight class="comment">//<sp/>case:<sp/>$</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(strict)</highlight></codeline>
|
|
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>rewrite_le;</highlight></codeline>
|
|
<codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><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="210"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="211"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x[i].min()<sp/>><sp/>y[i].max())<sp/></highlight><highlight class="comment">//<sp/>case:<sp/>></highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">goto</highlight><highlight class="normal"><sp/>rewrite_le;</highlight></codeline>
|
|
<codeline lineno="214"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x[i].max()<sp/><<sp/>y[i].min())<sp/>{<sp/></highlight><highlight class="comment">//<sp/>case:<sp/><</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Eliminate<sp/>[i]...[n-1]</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="217"><highlight class="normal"><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<n;<sp/>j++)<sp/>{</highlight></codeline>
|
|
<codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x[j].cancel(home,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,PC_INT_BND);</highlight></codeline>
|
|
<codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>y[j].cancel(home,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,PC_INT_BND);</highlight></codeline>
|
|
<codeline lineno="220"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="221"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x.size(i);<sp/>y.size(i);</highlight></codeline>
|
|
<codeline lineno="222"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>strict<sp/>=<sp/></highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</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">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a13bb69056fb9293e8df98c0e347ba634" kindref="member">ES_FIX</ref>;</highlight></codeline>
|
|
<codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="227"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="228"><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="229"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="230"><highlight class="normal"><sp/><sp/>rewrite_le:</highlight></codeline>
|
|
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/>GECODE_REWRITE(*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,<ref refid="classGecode_1_1Int_1_1Rel_1_1Le" kindref="compound">Le<View>::post</ref>(home(*</highlight><highlight class="keyword">this</highlight><highlight class="normal">),x[0],y[0]));</highlight></codeline>
|
|
<codeline lineno="232"><highlight class="normal"><sp/><sp/>rewrite_lq:</highlight></codeline>
|
|
<codeline lineno="233"><highlight class="normal"><sp/><sp/><sp/><sp/>GECODE_REWRITE(*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,<ref refid="classGecode_1_1Int_1_1Rel_1_1Lq" kindref="compound">Lq<View>::post</ref>(home(*</highlight><highlight class="keyword">this</highlight><highlight class="normal">),x[0],y[0]));</highlight></codeline>
|
|
<codeline lineno="234"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="235"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="236"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="237"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5" kindref="member">ExecStatus</ref></highlight></codeline>
|
|
<codeline lineno="238" refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1a13138fdb3041dc6e886058186d12bd47" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe_1a13138fdb3041dc6e886058186d12bd47" kindref="member">LexLqLe<View>::post</ref>(<ref refid="classGecode_1_1Home" kindref="compound">Home</ref><sp/>home,</highlight></codeline>
|
|
<codeline lineno="239"><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/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View></ref>&<sp/>x,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View></ref>&<sp/>y,<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>strict)<sp/>{</highlight></codeline>
|
|
<codeline lineno="240"><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/>y.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>())<sp/>{</highlight></codeline>
|
|
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>y.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>(x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>());<sp/>strict=</highlight><highlight class="keyword">false</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>()<sp/>><sp/>y.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>())<sp/>{</highlight></codeline>
|
|
<codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>(y.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>());<sp/>strict=</highlight><highlight class="keyword">true</highlight><highlight class="normal">;</highlight></codeline>
|
|
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="245"><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="246"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>strict<sp/>?<sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a839b40c2e7ccebb2e61e92e274833089" kindref="member">ES_FAILED</ref><sp/>:<sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a01d6fb1ec70479e8e413d5ecfd63e303" kindref="member">ES_OK</ref>;</highlight></codeline>
|
|
<codeline lineno="247"><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/>1)<sp/>{</highlight></codeline>
|
|
<codeline lineno="248"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(strict)</highlight></codeline>
|
|
<codeline lineno="249"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1Le_1ab6f6873781d1476793a75883f4e28f8f" kindref="member">Le<View>::post</ref>(home,x[0],y[0]);</highlight></codeline>
|
|
<codeline lineno="250"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1Lq_1aeae37183a92b8cb76f8a09eacf29fe76" kindref="member">Lq<View>::post</ref>(home,x[0],y[0]);</highlight></codeline>
|
|
<codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/>(void)<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/>(home)<sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexLqLe" kindref="compound">LexLqLe<View></ref>(home,x,y,strict);</highlight></codeline>
|
|
<codeline lineno="254"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a01d6fb1ec70479e8e413d5ecfd63e303" kindref="member">ES_OK</ref>;</highlight></codeline>
|
|
<codeline lineno="255"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="256"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="257"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="258"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
|
<codeline lineno="259"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Lexical<sp/>disequality<sp/>propagator</highlight></codeline>
|
|
<codeline lineno="260"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="261"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="262"><highlight class="normal"><sp/><sp/>forceinline</highlight></codeline>
|
|
<codeline lineno="263" refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1a4318775ea5a202b99b0daccb69426c48" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1a4318775ea5a202b99b0daccb69426c48" kindref="member">LexNq<View>::LexNq</ref>(<ref refid="classGecode_1_1Home" kindref="compound">Home</ref><sp/>home,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View></ref>&<sp/>xv,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View></ref>&<sp/>yv)</highlight></codeline>
|
|
<codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/><ref refid="classGecode_1_1Propagator" kindref="compound">Propagator</ref>(home),<sp/></highlight></codeline>
|
|
<codeline lineno="265"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>x0(xv[xv.<ref refid="group__FuncIterRangesOp_1ga9f9ab6d72452ad86b95cd65abf463161" kindref="member">size</ref>()-2]),<sp/>y0(yv[xv.<ref refid="group__FuncIterRangesOp_1ga9f9ab6d72452ad86b95cd65abf463161" kindref="member">size</ref>()-2]),</highlight></codeline>
|
|
<codeline lineno="266"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>x1(xv[xv.<ref refid="group__FuncIterRangesOp_1ga9f9ab6d72452ad86b95cd65abf463161" kindref="member">size</ref>()-1]),<sp/>y1(yv[xv.<ref refid="group__FuncIterRangesOp_1ga9f9ab6d72452ad86b95cd65abf463161" kindref="member">size</ref>()-1]),</highlight></codeline>
|
|
<codeline lineno="267"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>x(xv),<sp/>y(yv)<sp/>{</highlight></codeline>
|
|
<codeline lineno="268"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>n<sp/>=<sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1a477e4cdf7ad295d377a6fe8b0e1d1992" kindref="member">x</ref>.size();</highlight></codeline>
|
|
<codeline lineno="269"><highlight class="normal"><sp/><sp/><sp/><sp/>assert(n<sp/>><sp/>1);</highlight></codeline>
|
|
<codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/>assert(n<sp/>==<sp/>y.size());</highlight></codeline>
|
|
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1a477e4cdf7ad295d377a6fe8b0e1d1992" kindref="member">x</ref>.size(n-2);<sp/>y.size(n-2);</highlight></codeline>
|
|
<codeline lineno="272"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1afe39b587e8fe964c180eaddf5f304472" kindref="member">x0</ref>.subscribe(home,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,PC_INT_VAL);<sp/>y0.subscribe(home,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,PC_INT_VAL);</highlight></codeline>
|
|
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/>x1.subscribe(home,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,PC_INT_VAL);<sp/>y1.subscribe(home,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,PC_INT_VAL);</highlight></codeline>
|
|
<codeline lineno="274"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="275"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="276"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="277"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1PropCost" kindref="compound">PropCost</ref></highlight></codeline>
|
|
<codeline lineno="278" refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1ac91d6c911ad7bead2c201f5dd03585e7" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1ac91d6c911ad7bead2c201f5dd03585e7" kindref="member">LexNq<View>::cost</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1a129e41c1d037528010d7b6706495a560" kindref="member">ModEventDelta</ref>&)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
|
|
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1PropCost_1ab1f645eea8eaf90e3bee56c6cdb3ab74" kindref="member">PropCost::binary</ref>(<ref refid="classGecode_1_1PropCost_1ad1bebae59ea373495c5bf51ffc249dcdada52d4d3b08e9888c5063df5140e12e2" kindref="member">PropCost::HI</ref>);</highlight></codeline>
|
|
<codeline lineno="280"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="281"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="282"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="283"><highlight class="normal"><sp/><sp/>forceinline</highlight></codeline>
|
|
<codeline lineno="284" refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1af2aa11b87ed894c89fef4b4d9e6c2d39" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1a4318775ea5a202b99b0daccb69426c48" kindref="member">LexNq<View>::LexNq</ref>(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>share,<sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq" kindref="compound">LexNq<View></ref>&<sp/>p)</highlight></codeline>
|
|
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/><ref refid="classGecode_1_1Propagator" kindref="compound">Propagator</ref>(home,share,p)<sp/>{</highlight></codeline>
|
|
<codeline lineno="286"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1afe39b587e8fe964c180eaddf5f304472" kindref="member">x0</ref>.update(home,share,p.<ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1afe39b587e8fe964c180eaddf5f304472" kindref="member">x0</ref>);<sp/>y0.update(home,share,p.y0);</highlight></codeline>
|
|
<codeline lineno="287"><highlight class="normal"><sp/><sp/><sp/><sp/>x1.update(home,share,p.x1);<sp/>y1.update(home,share,p.y1);</highlight></codeline>
|
|
<codeline lineno="288"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1a477e4cdf7ad295d377a6fe8b0e1d1992" kindref="member">x</ref>.update(home,share,p.<ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1a477e4cdf7ad295d377a6fe8b0e1d1992" kindref="member">x</ref>);<sp/>y.update(home,share,p.y);</highlight></codeline>
|
|
<codeline lineno="289"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="290"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="291"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="292"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Actor" kindref="compound">Actor</ref>*</highlight></codeline>
|
|
<codeline lineno="293" refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1a381a327329b97ff3253d0c748f6bafae" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1a381a327329b97ff3253d0c748f6bafae" kindref="member">LexNq<View>::copy</ref>(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>share)<sp/>{</highlight></codeline>
|
|
<codeline lineno="294"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
|
<codeline lineno="295"><highlight class="comment"><sp/><sp/><sp/><sp/>int<sp/>n<sp/>=<sp/>x.size();</highlight></codeline>
|
|
<codeline lineno="296"><highlight class="comment"><sp/><sp/><sp/><sp/>if<sp/>(n<sp/>><sp/>0)<sp/>{</highlight></codeline>
|
|
<codeline lineno="297"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>Eliminate<sp/>all<sp/>equal<sp/>views<sp/>and<sp/>keep<sp/>one<sp/>disequal<sp/>pair</highlight></codeline>
|
|
<codeline lineno="298"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>for<sp/>(int<sp/>i=n;<sp/>i--;<sp/>)</highlight></codeline>
|
|
<codeline lineno="299"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>switch<sp/>(rtest_eq_bnd(x[i],y[i]))<sp/>{</highlight></codeline>
|
|
<codeline lineno="300"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>case<sp/>RT_TRUE:</highlight></codeline>
|
|
<codeline lineno="301"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>Eliminate<sp/>equal<sp/>pair</highlight></codeline>
|
|
<codeline lineno="302"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n--;<sp/>x[i]=x[n];<sp/>y[i]=y[n];</highlight></codeline>
|
|
<codeline lineno="303"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>break;</highlight></codeline>
|
|
<codeline lineno="304"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>case<sp/>RT_FALSE:</highlight></codeline>
|
|
<codeline lineno="305"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>//<sp/>Just<sp/>keep<sp/>a<sp/>single<sp/>disequal<sp/>pair</highlight></codeline>
|
|
<codeline lineno="306"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n=1;<sp/>x[0]=x[i];<sp/>y[0]=y[i];</highlight></codeline>
|
|
<codeline lineno="307"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>goto<sp/>done;</highlight></codeline>
|
|
<codeline lineno="308"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>case<sp/>RT_MAYBE:</highlight></codeline>
|
|
<codeline lineno="309"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>break;</highlight></codeline>
|
|
<codeline lineno="310"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>default:</highlight></codeline>
|
|
<codeline lineno="311"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_NEVER;</highlight></codeline>
|
|
<codeline lineno="312"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="313"><highlight class="comment"><sp/><sp/><sp/><sp/>done:</highlight></codeline>
|
|
<codeline lineno="314"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>x.size(n);<sp/>y.size(n);</highlight></codeline>
|
|
<codeline lineno="315"><highlight class="comment"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="316"><highlight class="comment"><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="317"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/>(home)<sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq" kindref="compound">LexNq<View></ref>(home,share,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="318"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="319"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="320"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="321"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5" kindref="member">ExecStatus</ref></highlight></codeline>
|
|
<codeline lineno="322" refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1a127a9802d160335fce97e32fc901823b" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1a127a9802d160335fce97e32fc901823b" kindref="member">LexNq<View>::post</ref>(<ref refid="classGecode_1_1Home" kindref="compound">Home</ref><sp/>home,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View></ref>&<sp/>x,<sp/><ref refid="classGecode_1_1ViewArray" kindref="compound">ViewArray<View></ref>&<sp/>y)<sp/>{</highlight></codeline>
|
|
<codeline lineno="323"><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/>y.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>())</highlight></codeline>
|
|
<codeline lineno="324"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a01d6fb1ec70479e8e413d5ecfd63e303" kindref="member">ES_OK</ref>;</highlight></codeline>
|
|
<codeline lineno="325"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>n<sp/>=<sp/>x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>();</highlight></codeline>
|
|
<codeline lineno="326"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(n<sp/>><sp/>0)<sp/>{</highlight></codeline>
|
|
<codeline lineno="327"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Eliminate<sp/>all<sp/>equal<sp/>views</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="328"><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=n;<sp/>i--;<sp/>)</highlight></codeline>
|
|
<codeline lineno="329"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(<ref refid="group__TaskActorIntTest_1gaffb2b23427580eb3d0122654fcf0584d" kindref="member">rtest_eq_bnd</ref>(x[i],y[i]))<sp/>{</highlight></codeline>
|
|
<codeline lineno="330"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__TaskActorIntTest_1ggadbb359c782e2957e831fc208fcc7ad39a015e2de83949268ed5be94c519fac6ad" kindref="member">RT_TRUE</ref>:</highlight></codeline>
|
|
<codeline lineno="331"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Eliminate<sp/>equal<sp/>pair</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="332"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n--;<sp/>x[i]=x[n];<sp/>y[i]=y[n];</highlight></codeline>
|
|
<codeline lineno="333"><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="334"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__TaskActorIntTest_1ggadbb359c782e2957e831fc208fcc7ad39ad5822c144faacceb19e0a0f124d2d164" kindref="member">RT_FALSE</ref>:</highlight></codeline>
|
|
<codeline lineno="335"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a01d6fb1ec70479e8e413d5ecfd63e303" kindref="member">ES_OK</ref>;</highlight></codeline>
|
|
<codeline lineno="336"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__TaskActorIntTest_1ggadbb359c782e2957e831fc208fcc7ad39acc5a498c510aebe7754cde9b1cc5c492" kindref="member">RT_MAYBE</ref>:</highlight></codeline>
|
|
<codeline lineno="337"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(same(x[i],y[i]))<sp/>{</highlight></codeline>
|
|
<codeline lineno="338"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Eliminate<sp/>equal<sp/>pair</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="339"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n--;<sp/>x[i]=x[n];<sp/>y[i]=y[n];</highlight></codeline>
|
|
<codeline lineno="340"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="341"><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="342"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="343"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_NEVER;</highlight></codeline>
|
|
<codeline lineno="344"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="345"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>x.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>(n);<sp/>y.<ref refid="classGecode_1_1ViewArray_1a65940b23e2457e97607475f8bd8f4ac6" kindref="member">size</ref>(n);</highlight></codeline>
|
|
<codeline lineno="346"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="347"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(n<sp/>==<sp/>0)</highlight></codeline>
|
|
<codeline lineno="348"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a839b40c2e7ccebb2e61e92e274833089" kindref="member">ES_FAILED</ref>;</highlight></codeline>
|
|
<codeline lineno="349"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(n<sp/>==<sp/>1)</highlight></codeline>
|
|
<codeline lineno="350"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1Nq_1a79b4d9f22c73cf87138bfe351ceda03e" kindref="member">Nq<View>::post</ref>(home,x[0],y[0]);</highlight></codeline>
|
|
<codeline lineno="351"><highlight class="normal"><sp/><sp/><sp/><sp/>(void)<sp/></highlight><highlight class="keyword">new</highlight><highlight class="normal"><sp/>(home)<sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq" kindref="compound">LexNq</ref>(home,x,y);</highlight></codeline>
|
|
<codeline lineno="352"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5a01d6fb1ec70479e8e413d5ecfd63e303" kindref="member">ES_OK</ref>;</highlight></codeline>
|
|
<codeline lineno="353"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="354"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="355"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="356"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">size_t</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="357" refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1ab8e6c6e9c20a3a7ca4f29dfe554abc58" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1ab8e6c6e9c20a3a7ca4f29dfe554abc58" kindref="member">LexNq<View>::dispose</ref>(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home)<sp/>{</highlight></codeline>
|
|
<codeline lineno="358"><highlight class="normal"><sp/><sp/><sp/><sp/>x0.cancel(home,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,PC_INT_VAL);<sp/>y0.cancel(home,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,PC_INT_VAL);</highlight></codeline>
|
|
<codeline lineno="359"><highlight class="normal"><sp/><sp/><sp/><sp/>x1.cancel(home,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,PC_INT_VAL);<sp/>y1.cancel(home,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,PC_INT_VAL);</highlight></codeline>
|
|
<codeline lineno="360"><highlight class="normal"><sp/><sp/><sp/><sp/>(void)<sp/><ref refid="classGecode_1_1Actor_1a143253b3eceda40f36834e38c8ac05d9" kindref="member">Propagator::dispose</ref>(home);</highlight></codeline>
|
|
<codeline lineno="361"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">sizeof</highlight><highlight class="normal">(*this);</highlight></codeline>
|
|
<codeline lineno="362"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="363"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="364"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="365"><highlight class="normal"><sp/><sp/>forceinline<sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5" kindref="member">ExecStatus</ref></highlight></codeline>
|
|
<codeline lineno="366" refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1abeeea37b65ed095477c9b09735307c78" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1abeeea37b65ed095477c9b09735307c78" kindref="member">LexNq<View>::resubscribe</ref>(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,<sp/></highlight></codeline>
|
|
<codeline lineno="367"><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/><ref refid="group__TaskActorIntTest_1gadbb359c782e2957e831fc208fcc7ad39" kindref="member">RelTest</ref><sp/>rt,<sp/>View&<sp/>x0,<sp/>View&<sp/>y0,<sp/>View<sp/>x1,<sp/>View<sp/>y1)<sp/>{</highlight></codeline>
|
|
<codeline lineno="368"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rt<sp/>==<sp/><ref refid="group__TaskActorIntTest_1ggadbb359c782e2957e831fc208fcc7ad39a015e2de83949268ed5be94c519fac6ad" kindref="member">RT_TRUE</ref>)<sp/>{</highlight></codeline>
|
|
<codeline lineno="369"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>assert(x0.assigned()<sp/>&&<sp/>y0.assigned());</highlight></codeline>
|
|
<codeline lineno="370"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>assert(x0.val()<sp/>==<sp/>y0.val());</highlight></codeline>
|
|
<codeline lineno="371"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>n<sp/>=<sp/>x.size();</highlight></codeline>
|
|
<codeline lineno="372"><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=n;<sp/>i--;<sp/>)</highlight></codeline>
|
|
<codeline lineno="373"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(<ref refid="group__TaskActorIntTest_1gaffb2b23427580eb3d0122654fcf0584d" kindref="member">rtest_eq_bnd</ref>(x[i],y[i]))<sp/>{</highlight></codeline>
|
|
<codeline lineno="374"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__TaskActorIntTest_1ggadbb359c782e2957e831fc208fcc7ad39a015e2de83949268ed5be94c519fac6ad" kindref="member">RT_TRUE</ref>:</highlight></codeline>
|
|
<codeline lineno="375"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Eliminate<sp/>equal<sp/>pair</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="376"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n--;<sp/>x[i]=x[n];<sp/>y[i]=y[n];</highlight></codeline>
|
|
<codeline lineno="377"><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="378"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__TaskActorIntTest_1ggadbb359c782e2957e831fc208fcc7ad39ad5822c144faacceb19e0a0f124d2d164" kindref="member">RT_FALSE</ref>:</highlight></codeline>
|
|
<codeline lineno="379"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>home.<ref refid="group__TaskActorStatus_1gafc19cbf71ed90a9e0b414b875103f4c7" kindref="member">ES_SUBSUMED</ref>(*</highlight><highlight class="keyword">this</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="380"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="group__TaskActorIntTest_1ggadbb359c782e2957e831fc208fcc7ad39acc5a498c510aebe7754cde9b1cc5c492" kindref="member">RT_MAYBE</ref>:</highlight></codeline>
|
|
<codeline lineno="381"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Move<sp/>to<sp/>x0,<sp/>y0<sp/>and<sp/>subscribe</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="382"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x0=x[i];<sp/>y0=y[i];</highlight></codeline>
|
|
<codeline lineno="383"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n--;<sp/>x[i]=x[n];<sp/>y[i]=y[n];</highlight></codeline>
|
|
<codeline lineno="384"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x.size(n);<sp/>y.size(n);</highlight></codeline>
|
|
<codeline lineno="385"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x0.subscribe(home,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,PC_INT_VAL,</highlight><highlight class="keyword">false</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="386"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>y0.subscribe(home,*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,PC_INT_VAL,</highlight><highlight class="keyword">false</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="387"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><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="388"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:</highlight></codeline>
|
|
<codeline lineno="389"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_NEVER;</highlight></codeline>
|
|
<codeline lineno="390"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="391"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>No<sp/>more<sp/>views<sp/>to<sp/>subscribe<sp/>to<sp/>left</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="392"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>GECODE_REWRITE(*</highlight><highlight class="keyword">this</highlight><highlight class="normal">,<ref refid="classGecode_1_1Int_1_1Rel_1_1Nq" kindref="compound">Nq<View>::post</ref>(home,x1,y1));</highlight></codeline>
|
|
<codeline lineno="393"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="394"><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="395"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="396"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="397"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>View></highlight></codeline>
|
|
<codeline lineno="398"><highlight class="normal"><sp/><sp/><ref refid="namespaceGecode_1ab278aee34126d2f13c5429ee3c4ed3b5" kindref="member">ExecStatus</ref></highlight></codeline>
|
|
<codeline lineno="399" refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1a03180d4cfd6f8d441e077d5661f18310" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Rel_1_1LexNq_1a03180d4cfd6f8d441e077d5661f18310" kindref="member">LexNq<View>::propagate</ref>(<ref refid="classGecode_1_1Space" kindref="compound">Space</ref>&<sp/>home,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1a129e41c1d037528010d7b6706495a560" kindref="member">ModEventDelta</ref>&)<sp/>{</highlight></codeline>
|
|
<codeline lineno="400"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="group__TaskActorIntTest_1gadbb359c782e2957e831fc208fcc7ad39" kindref="member">RelTest</ref><sp/>rt0<sp/>=<sp/><ref refid="group__TaskActorIntTest_1gaffb2b23427580eb3d0122654fcf0584d" kindref="member">rtest_eq_bnd</ref>(x0,y0);</highlight></codeline>
|
|
<codeline lineno="401"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rt0<sp/>==<sp/><ref refid="group__TaskActorIntTest_1ggadbb359c782e2957e831fc208fcc7ad39ad5822c144faacceb19e0a0f124d2d164" kindref="member">RT_FALSE</ref>)</highlight></codeline>
|
|
<codeline lineno="402"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>home.<ref refid="group__TaskActorStatus_1gafc19cbf71ed90a9e0b414b875103f4c7" kindref="member">ES_SUBSUMED</ref>(*</highlight><highlight class="keyword">this</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="403"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="group__TaskActorIntTest_1gadbb359c782e2957e831fc208fcc7ad39" kindref="member">RelTest</ref><sp/>rt1<sp/>=<sp/><ref refid="group__TaskActorIntTest_1gaffb2b23427580eb3d0122654fcf0584d" kindref="member">rtest_eq_bnd</ref>(x1,y1);</highlight></codeline>
|
|
<codeline lineno="404"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(rt1<sp/>==<sp/><ref refid="group__TaskActorIntTest_1ggadbb359c782e2957e831fc208fcc7ad39ad5822c144faacceb19e0a0f124d2d164" kindref="member">RT_FALSE</ref>)</highlight></codeline>
|
|
<codeline lineno="405"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>home.<ref refid="group__TaskActorStatus_1gafc19cbf71ed90a9e0b414b875103f4c7" kindref="member">ES_SUBSUMED</ref>(*</highlight><highlight class="keyword">this</highlight><highlight class="normal">);</highlight></codeline>
|
|
<codeline lineno="406"><highlight class="normal"><sp/><sp/><sp/><sp/>GECODE_ES_CHECK(resubscribe(home,rt0,x0,y0,x1,y1));</highlight></codeline>
|
|
<codeline lineno="407"><highlight class="normal"><sp/><sp/><sp/><sp/>GECODE_ES_CHECK(resubscribe(home,rt1,x1,y1,x0,y0));</highlight></codeline>
|
|
<codeline lineno="408"><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="409"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="410"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="411"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="412"><highlight class="normal">}}}</highlight></codeline>
|
|
<codeline lineno="413"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="414"><highlight class="normal"></highlight><highlight class="comment">//<sp/>STATISTICS:<sp/>int-prop</highlight><highlight class="normal"></highlight></codeline>
|
|
</programlisting>
|
|
<location file="/usr/include/gecode/int/rel/lex.hpp"/>
|
|
</compounddef>
|
|
</doxygen>
|