This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/gecode/dev/extractor/xml/float-rel_8hpp.xml
Vitor Santos Costa a8eda03305 4.2.1 support
2014-01-22 09:41:47 +00:00

140 lines
17 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="float-rel_8hpp" kind="file">
<compoundname>float-rel.hpp</compoundname>
<includedby refid="minimodel_8hh" local="no">/usr/include/gecode/minimodel.hh</includedby>
<invincdepgraph>
<node id="28639">
<label>/usr/include/gecode/flatzinc.hh</label>
<link refid="flatzinc_8hh_source"/>
<childnode refid="28640" relation="include">
</childnode>
<childnode refid="28641" relation="include">
</childnode>
</node>
<node id="28637">
<label>/usr/include/gecode/minimodel.hh</label>
<link refid="minimodel_8hh_source"/>
<childnode refid="28638" relation="include">
</childnode>
</node>
<node id="28638">
<label>/usr/include/gecode/driver.hh</label>
<link refid="driver_8hh_source"/>
<childnode refid="28639" relation="include">
</childnode>
</node>
<node id="28640">
<label>/usr/include/gecode/flatzinc/parser.hh</label>
<link refid="parser_8hh_source"/>
</node>
<node id="28641">
<label>/usr/include/gecode/flatzinc/registry.hh</label>
<link refid="registry_8hh_source"/>
</node>
<node id="28636">
<label>/usr/include/gecode/minimodel/float-rel.hpp</label>
<link refid="float-rel.hpp"/>
<childnode refid="28637" relation="include">
</childnode>
</node>
</invincdepgraph>
<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/>Vincent<sp/>Barichard<sp/>&lt;Vincent.Barichard@univ-angers.fr&gt;</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/>Vincent<sp/>Barichard,<sp/>2012</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/>2013-01-22<sp/>13:48:12<sp/>+0100<sp/>(Tue,<sp/>22<sp/>Jan<sp/>2013)<sp/>$<sp/>by<sp/>$Author:<sp/>schulte<sp/>$</highlight></codeline>
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>$Revision:<sp/>13227<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/>&quot;Software&quot;),<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/>&quot;AS<sp/>IS&quot;,<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="preprocessor">#ifdef<sp/>GECODE_HAS_FLOAT_VARS</highlight></codeline>
<codeline lineno="39"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">Gecode<sp/>{</highlight></codeline>
<codeline lineno="41"><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="43"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Operations<sp/>for<sp/>linear<sp/>float<sp/>relations</highlight></codeline>
<codeline lineno="44"><highlight class="comment"><sp/><sp/><sp/>*</highlight></codeline>
<codeline lineno="45"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/>forceinline</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/>LinFloatRel::LinFloatRel(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)<sp/>{}</highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/>forceinline</highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/>LinFloatRel::LinFloatRel(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>LinFloatExpr&amp;<sp/>l,<sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84ec" kindref="member">FloatRelType</ref><sp/>frt0,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>LinFloatExpr&amp;<sp/>r)</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/>e(l-r),<sp/>frt(frt0)<sp/>{}</highlight></codeline>
<codeline lineno="52"><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/>forceinline</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/>LinFloatRel::LinFloatRel(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>LinFloatExpr&amp;<sp/>l,<sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84ec" kindref="member">FloatRelType</ref><sp/>frt0,<sp/>FloatVal<sp/>r)</highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/>e(l-r),<sp/>frt(frt0)<sp/>{}</highlight></codeline>
<codeline lineno="56"><highlight class="normal"></highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/>forceinline</highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/>LinFloatRel::LinFloatRel(FloatVal<sp/>l,<sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84ec" kindref="member">FloatRelType</ref><sp/>frt0,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>LinFloatExpr&amp;<sp/>r)</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/>e(l-r),<sp/>frt(frt0)<sp/>{}</highlight></codeline>
<codeline lineno="60"><highlight class="normal"></highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/>forceinline<sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84ec" kindref="member">FloatRelType</ref></highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/>LinFloatRel::neg(<ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84ec" kindref="member">FloatRelType</ref><sp/>frt)<sp/>{</highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">switch</highlight><highlight class="normal"><sp/>(frt)<sp/>{</highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84eca1a54d04ec151d50f5fceb80ad8f5baf7" kindref="member">FRT_EQ</ref>:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84eca50d9796137ce7e778f3a1749780a2ad0" kindref="member">FRT_NQ</ref>;</highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84eca50d9796137ce7e778f3a1749780a2ad0" kindref="member">FRT_NQ</ref>:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84eca1a54d04ec151d50f5fceb80ad8f5baf7" kindref="member">FRT_EQ</ref>;</highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84ecaa00b520e67b8495d0dfbfad063d7e414" kindref="member">FRT_LQ</ref>:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84eca4fb844ef980f48814df3c1ffb765e7c3" kindref="member">FRT_GR</ref>;</highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84eca6c3f2cbdff916b4bdd1aed3e02c43f57" kindref="member">FRT_LE</ref>:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84ecacedab3e26f8935187f5cf7c447f9eaa6" kindref="member">FRT_GQ</ref>;</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84ecacedab3e26f8935187f5cf7c447f9eaa6" kindref="member">FRT_GQ</ref>:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84eca6c3f2cbdff916b4bdd1aed3e02c43f57" kindref="member">FRT_LE</ref>;</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">case</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84eca4fb844ef980f48814df3c1ffb765e7c3" kindref="member">FRT_GR</ref>:<sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84ecaa00b520e67b8495d0dfbfad063d7e414" kindref="member">FRT_LQ</ref>;</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">default</highlight><highlight class="normal">:<sp/>GECODE_NEVER;</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1aa318be5bdad369c66855beb9b07e84ecaa00b520e67b8495d0dfbfad063d7e414" kindref="member">FRT_LQ</ref>;</highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="74"><highlight class="normal"></highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/>LinFloatRel::post(Home<sp/>home,<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>t)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/>e.post(home,t<sp/>?<sp/>frt<sp/>:<sp/><ref refid="namespaceGecode_1_1Float_1_1Arithmetic_1a85018c9abe3b9ffeed0191b73da2988f" kindref="member">neg</ref>(frt));</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="79"><highlight class="normal"></highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/>LinFloatRel::post(Home<sp/>home,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>BoolVar&amp;<sp/>b,<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"><sp/>t)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/>e.post(home,t<sp/>?<sp/>frt<sp/>:<sp/><ref refid="namespaceGecode_1_1Float_1_1Arithmetic_1a85018c9abe3b9ffeed0191b73da2988f" kindref="member">neg</ref>(frt),b);</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
<codeline lineno="84"><highlight class="normal"></highlight></codeline>
<codeline lineno="85"><highlight class="normal">}</highlight></codeline>
<codeline lineno="86"><highlight class="normal"></highlight></codeline>
<codeline lineno="87"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
<codeline lineno="88"><highlight class="preprocessor"></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="89"><highlight class="normal"></highlight><highlight class="comment">//<sp/>STATISTICS:<sp/>minimodel-any</highlight><highlight class="normal"></highlight></codeline>
</programlisting>
<location file="/usr/include/gecode/minimodel/float-rel.hpp"/>
</compounddef>
</doxygen>