324 lines
68 KiB
XML
324 lines
68 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="cumulative_2tree_8hpp" kind="file">
|
|
<compoundname>tree.hpp</compoundname>
|
|
<includes local="no">algorithm</includes>
|
|
<includes local="no">cmath</includes>
|
|
<includedby refid="cumulative_8hh" local="no">/usr/include/gecode/int/cumulative.hh</includedby>
|
|
<incdepgraph>
|
|
<node id="12768">
|
|
<label>cmath</label>
|
|
</node>
|
|
<node id="12766">
|
|
<label>/usr/include/gecode/int/cumulative/tree.hpp</label>
|
|
<link refid="cumulative/tree.hpp"/>
|
|
<childnode refid="12767" relation="include">
|
|
</childnode>
|
|
<childnode refid="12768" relation="include">
|
|
</childnode>
|
|
</node>
|
|
<node id="12767">
|
|
<label>algorithm</label>
|
|
</node>
|
|
</incdepgraph>
|
|
<invincdepgraph>
|
|
<node id="12770">
|
|
<label>/usr/include/gecode/int/cumulative.hh</label>
|
|
<link refid="cumulative_8hh_source"/>
|
|
</node>
|
|
<node id="12769">
|
|
<label>/usr/include/gecode/int/cumulative/tree.hpp</label>
|
|
<link refid="cumulative/tree.hpp"/>
|
|
<childnode refid="12770" relation="include">
|
|
</childnode>
|
|
</node>
|
|
</invincdepgraph>
|
|
<innernamespace refid="namespaceGecode">Gecode</innernamespace>
|
|
<innernamespace refid="namespaceGecode_1_1Int">Gecode::Int</innernamespace>
|
|
<innernamespace refid="namespaceGecode_1_1Int_1_1Cumulative">Gecode::Int::Cumulative</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/>*<sp/><sp/><sp/><sp/><sp/>Guido<sp/>Tack<sp/><tack@gecode.org></highlight></codeline>
|
|
<codeline lineno="6"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="7"><highlight class="comment"><sp/>*<sp/><sp/>Copyright:</highlight></codeline>
|
|
<codeline lineno="8"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Christian<sp/>Schulte,<sp/>2009</highlight></codeline>
|
|
<codeline lineno="9"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>Guido<sp/>Tack,<sp/>2010</highlight></codeline>
|
|
<codeline lineno="10"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="11"><highlight class="comment"><sp/>*<sp/><sp/>Last<sp/>modified:</highlight></codeline>
|
|
<codeline lineno="12"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>$Date:<sp/>2013-03-11<sp/>06:26:07<sp/>+0100<sp/>(Mon,<sp/>11<sp/>Mar<sp/>2013)<sp/>$<sp/>by<sp/>$Author:<sp/>tack<sp/>$</highlight></codeline>
|
|
<codeline lineno="13"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>$Revision:<sp/>13487<sp/>$</highlight></codeline>
|
|
<codeline lineno="14"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="15"><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="16"><highlight class="comment"><sp/>*<sp/><sp/>development<sp/>environment:</highlight></codeline>
|
|
<codeline lineno="17"><highlight class="comment"><sp/>*<sp/><sp/><sp/><sp/><sp/>http://www.gecode.org</highlight></codeline>
|
|
<codeline lineno="18"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="19"><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="20"><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="21"><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="22"><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="23"><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="24"><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="25"><highlight class="comment"><sp/>*<sp/><sp/>the<sp/>following<sp/>conditions:</highlight></codeline>
|
|
<codeline lineno="26"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="27"><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="28"><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="29"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="30"><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="31"><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="32"><highlight class="comment"><sp/>*<sp/><sp/>MERCHANTABILITY,<sp/>FITNESS<sp/>FOR<sp/>A<sp/>PARTICULAR<sp/>PURPOSE<sp/>AND</highlight></codeline>
|
|
<codeline lineno="33"><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="34"><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="35"><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="36"><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="37"><highlight class="comment"><sp/>*</highlight></codeline>
|
|
<codeline lineno="38"><highlight class="comment"><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="39"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="40"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><algorithm></highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="41"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/><cmath></highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="42"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="43"><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">Cumulative<sp/>{</highlight></codeline>
|
|
<codeline lineno="44"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="45"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
|
<codeline lineno="46"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Omega<sp/>tree</highlight></codeline>
|
|
<codeline lineno="47"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="48"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="49"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="50" refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a70b67ec4d59d3978a6af4671ebf09378" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a70b67ec4d59d3978a6af4671ebf09378" kindref="member">OmegaNode::init</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode" kindref="compound">OmegaNode</ref>&,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode" kindref="compound">OmegaNode</ref>&)<sp/>{</highlight></codeline>
|
|
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a63d6000502dac0dbc0faeda16f7f40d9" kindref="member">e</ref><sp/>=<sp/>0;<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a76d23603df71918da98276ceaab86c51" kindref="member">env</ref><sp/>=<sp/>-<ref refid="namespaceGecode_1_1Int_1_1Limits_1ae5e93636b2a7b2defae6986b2eb85dab" kindref="member">Limits::llinfinity</ref>;</highlight></codeline>
|
|
<codeline lineno="52"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="53"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="54"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="55" refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1afafe54769331ebf3904287df3961bf84" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1afafe54769331ebf3904287df3961bf84" kindref="member">OmegaNode::update</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode" kindref="compound">OmegaNode</ref>&<sp/>l,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode" kindref="compound">OmegaNode</ref>&<sp/>r)<sp/>{</highlight></codeline>
|
|
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a63d6000502dac0dbc0faeda16f7f40d9" kindref="member">e</ref><sp/>=<sp/>l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a63d6000502dac0dbc0faeda16f7f40d9" kindref="member">e</ref><sp/>+<sp/>r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a63d6000502dac0dbc0faeda16f7f40d9" kindref="member">e</ref>;<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a76d23603df71918da98276ceaab86c51" kindref="member">env</ref><sp/>=<sp/><ref refid="group__TaskModelFloatArith_1ga958cb25ae9754d6cc35c7c6e34ebc1e3" kindref="member">std::max</ref>(<ref refid="namespaceGecode_1_1Int_1a6c8c36ec855e57c1638ce9e531a486bf" kindref="member">plus</ref>(l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a76d23603df71918da98276ceaab86c51" kindref="member">env</ref>,r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a63d6000502dac0dbc0faeda16f7f40d9" kindref="member">e</ref>),<sp/>r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a76d23603df71918da98276ceaab86c51" kindref="member">env</ref>);</highlight></codeline>
|
|
<codeline lineno="57"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="58"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="59"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>TaskView></highlight></codeline>
|
|
<codeline lineno="60" refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaTree_1a4f8d50d677de70dd4708e43f12d8716e" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaTree_1a4f8d50d677de70dd4708e43f12d8716e" kindref="member">OmegaTree<TaskView>::OmegaTree</ref>(<ref refid="classGecode_1_1Region" kindref="compound">Region</ref>&<sp/>r,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>c0,</highlight></codeline>
|
|
<codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1TaskViewArray" kindref="compound">TaskViewArray<TaskView></ref>&<sp/>t)</highlight></codeline>
|
|
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/><ref refid="classGecode_1_1Int_1_1TaskTree" kindref="compound">TaskTree</ref><TaskView,<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode" kindref="compound">OmegaNode</ref>>(r,t),<sp/>c(c0)<sp/>{</highlight></codeline>
|
|
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i=<ref refid="classGecode_1_1Int_1_1TaskTree_1a588d7ff506e04319c9730a20686c5736" kindref="member">tasks</ref>.size();<sp/>i--;<sp/>)<sp/>{</highlight></codeline>
|
|
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1TaskTree_1aab3d5439983995ce1a163f34acff2da4" kindref="member">leaf</ref>(i).e<sp/>=<sp/>0;<sp/><ref refid="classGecode_1_1Int_1_1TaskTree_1aab3d5439983995ce1a163f34acff2da4" kindref="member">leaf</ref>(i).env<sp/>=<sp/>-<ref refid="namespaceGecode_1_1Int_1_1Limits_1ae5e93636b2a7b2defae6986b2eb85dab" kindref="member">Limits::llinfinity</ref>;</highlight></codeline>
|
|
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1TaskTree_1ac3c4f8d8062e3f4184e0dc0f8e3f0780" kindref="member">init</ref>();</highlight></codeline>
|
|
<codeline lineno="67"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="68"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="69"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>TaskView></highlight></codeline>
|
|
<codeline lineno="70"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/></highlight></codeline>
|
|
<codeline lineno="71" refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaTree_1af06f51809c51e850f1edde2636833e84" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaTree_1af06f51809c51e850f1edde2636833e84" kindref="member">OmegaTree<TaskView>::insert</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i)<sp/>{</highlight></codeline>
|
|
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/>leaf(i).e<sp/>=<sp/>tasks[i].e();<sp/></highlight></codeline>
|
|
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/>leaf(i).env<sp/>=<sp/></highlight></codeline>
|
|
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="keyword">></highlight><highlight class="normal">(c)*tasks[i].est()+tasks[i].e();</highlight></codeline>
|
|
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/>update(i);</highlight></codeline>
|
|
<codeline lineno="76"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="77"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="78"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>TaskView></highlight></codeline>
|
|
<codeline lineno="79"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="80" refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaTree_1a3e5f9bcf83bbfbabe92fe8fa4b5e277c" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaTree_1a3e5f9bcf83bbfbabe92fe8fa4b5e277c" kindref="member">OmegaTree<TaskView>::remove</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i)<sp/>{</highlight></codeline>
|
|
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/>leaf(i).e<sp/>=<sp/>0;<sp/>leaf(i).env<sp/>=<sp/>-<ref refid="namespaceGecode_1_1Int_1_1Limits_1ae5e93636b2a7b2defae6986b2eb85dab" kindref="member">Limits::llinfinity</ref>;</highlight></codeline>
|
|
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/>update(i);</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"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>TaskView></highlight></codeline>
|
|
<codeline lineno="86"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="87" refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaTree_1a529ec5de2054a07ce010f0988adaa0be" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaTree_1a529ec5de2054a07ce010f0988adaa0be" kindref="member">OmegaTree<TaskView>::env</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
|
|
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>root().env;</highlight></codeline>
|
|
<codeline lineno="89"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="90"><highlight class="normal"><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="91"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
|
<codeline lineno="92"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Extended<sp/>Omega<sp/>tree</highlight></codeline>
|
|
<codeline lineno="93"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="94"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="95"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="96" refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaNode_1aef63a8f4d6eee0dfa16f02053fe15c30" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaNode_1aef63a8f4d6eee0dfa16f02053fe15c30" kindref="member">ExtOmegaNode::init</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaNode" kindref="compound">ExtOmegaNode</ref>&<sp/>l,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaNode" kindref="compound">ExtOmegaNode</ref>&<sp/>r)<sp/>{</highlight></codeline>
|
|
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a70b67ec4d59d3978a6af4671ebf09378" kindref="member">OmegaNode::init</ref>(l,r);</highlight></codeline>
|
|
<codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaNode_1ad2df18e573d8597c313474d2889a2f31" kindref="member">cenv</ref><sp/>=<sp/>-<ref refid="namespaceGecode_1_1Int_1_1Limits_1ae5e93636b2a7b2defae6986b2eb85dab" kindref="member">Limits::llinfinity</ref>;</highlight></codeline>
|
|
<codeline lineno="99"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="100"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="101"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="102" refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaNode_1a34b6e8134d86dd2287e6229b90e832fd" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaNode_1a34b6e8134d86dd2287e6229b90e832fd" kindref="member">ExtOmegaNode::update</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaNode" kindref="compound">ExtOmegaNode</ref>&<sp/>l,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaNode" kindref="compound">ExtOmegaNode</ref>&<sp/>r)<sp/>{</highlight></codeline>
|
|
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1afafe54769331ebf3904287df3961bf84" kindref="member">OmegaNode::update</ref>(l,r);</highlight></codeline>
|
|
<codeline lineno="104"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaNode_1ad2df18e573d8597c313474d2889a2f31" kindref="member">cenv</ref><sp/>=<sp/><ref refid="group__TaskModelFloatArith_1ga958cb25ae9754d6cc35c7c6e34ebc1e3" kindref="member">std::max</ref>(<ref refid="namespaceGecode_1_1Int_1a6c8c36ec855e57c1638ce9e531a486bf" kindref="member">plus</ref>(l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaNode_1ad2df18e573d8597c313474d2889a2f31" kindref="member">cenv</ref>,r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a63d6000502dac0dbc0faeda16f7f40d9" kindref="member">e</ref>),<sp/>r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaNode_1ad2df18e573d8597c313474d2889a2f31" kindref="member">cenv</ref>);</highlight></codeline>
|
|
<codeline lineno="105"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="106"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="107"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>TaskView><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="108" refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaTree_1a90a52c1c5af52e4e6a46500467a0075e" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1TaskTree_1ac3c4f8d8062e3f4184e0dc0f8e3f0780" kindref="member">ExtOmegaTree<TaskView>::init</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ci0)<sp/>{</highlight></codeline>
|
|
<codeline lineno="109"><highlight class="normal"><sp/><sp/><sp/><sp/>ci<sp/>=<sp/>ci0;</highlight></codeline>
|
|
<codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i=tasks.size();<sp/>i--;<sp/>)<sp/>{</highlight></codeline>
|
|
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>leaf(i).e<sp/>=<sp/>0;<sp/></highlight></codeline>
|
|
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>leaf(i).env<sp/>=<sp/>leaf(i).cenv<sp/>=<sp/>-<ref refid="namespaceGecode_1_1Int_1_1Limits_1ae5e93636b2a7b2defae6986b2eb85dab" kindref="member">Limits::llinfinity</ref>;</highlight></codeline>
|
|
<codeline lineno="113"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="114"><highlight class="normal"><sp/><sp/><sp/><sp/>init();</highlight></codeline>
|
|
<codeline lineno="115"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="116"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="117"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>TaskView><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>Node></highlight></codeline>
|
|
<codeline lineno="118" refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaTree_1a885c21cce4159088e1e32edea6204561" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaTree_1a885c21cce4159088e1e32edea6204561" kindref="member">ExtOmegaTree<TaskView>::ExtOmegaTree</ref>(<ref refid="classGecode_1_1Region" kindref="compound">Region</ref>&<sp/>r,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>c0,</highlight></codeline>
|
|
<codeline lineno="119"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1TaskTree" kindref="compound">TaskTree<TaskView,Node></ref>&<sp/>t)</highlight></codeline>
|
|
<codeline lineno="120"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/><ref refid="classGecode_1_1Int_1_1TaskTree" kindref="compound">TaskTree</ref><TaskView,<ref refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaNode" kindref="compound">ExtOmegaNode</ref>>(r,t),<sp/>c(c0)<sp/>{}</highlight></codeline>
|
|
<codeline lineno="121"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="122"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>TaskView></highlight></codeline>
|
|
<codeline lineno="123"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="124" refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaTree_1a254f11d30b5d46b4509415dc5d3efadb" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1ExtOmegaTree_1a254f11d30b5d46b4509415dc5d3efadb" kindref="member">ExtOmegaTree<TaskView>::env</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i)<sp/>{</highlight></codeline>
|
|
<codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Enter<sp/>task<sp/>i</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/>leaf(i).e<sp/>=<sp/>tasks[i].e();<sp/></highlight></codeline>
|
|
<codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/>leaf(i).env<sp/>=<sp/></highlight></codeline>
|
|
<codeline lineno="128"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="keyword">></highlight><highlight class="normal">(c)*tasks[i].est()+tasks[i].e();</highlight></codeline>
|
|
<codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/>leaf(i).cenv<sp/>=<sp/></highlight></codeline>
|
|
<codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="keyword">></highlight><highlight class="normal">(c-ci)*tasks[i].est()+tasks[i].e();</highlight></codeline>
|
|
<codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1TaskTree_1ae19f603654fbcfb07f639fc1b235872f" kindref="member">TaskTree<TaskView,ExtOmegaNode>::update</ref>(i);</highlight></codeline>
|
|
<codeline lineno="132"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Perform<sp/>computation<sp/>of<sp/>node<sp/>for<sp/>task<sp/>with<sp/>minest</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>met<sp/>=<sp/>0;</highlight></codeline>
|
|
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
|
|
<codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>e<sp/>=<sp/>0;</highlight></codeline>
|
|
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(!n_leaf(met))<sp/>{</highlight></codeline>
|
|
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="namespaceGecode_1_1Int_1a6c8c36ec855e57c1638ce9e531a486bf" kindref="member">plus</ref>(node[n_right(met)].cenv,e)<sp/>><sp/></highlight></codeline>
|
|
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>static_cast<long<sp/>long<sp/>int>(c-ci)<sp/>*<sp/>tasks[i].lct())<sp/>{</highlight></codeline>
|
|
<codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>met<sp/>=<sp/>n_right(met);</highlight></codeline>
|
|
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
|
<codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>e<sp/>+=<sp/>node[n_right(met)].e;<sp/>met<sp/>=<sp/>n_left(met);</highlight></codeline>
|
|
<codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="146"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="147"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
|
<codeline lineno="148"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>The<sp/>following<sp/>idea<sp/>to<sp/>compute<sp/>the<sp/>cut<sp/>in<sp/>one<sp/>go<sp/>is<sp/>taken<sp/>from:</highlight></codeline>
|
|
<codeline lineno="149"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>Joseph<sp/>Scott,<sp/>Filtering<sp/>Algorithms<sp/>for<sp/>Discrete<sp/>Resources,<sp/></highlight></codeline>
|
|
<codeline lineno="150"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*<sp/>Master<sp/>Thesis,<sp/>Uppsala<sp/>University,<sp/>2010<sp/>(in<sp/>preparation).</highlight></codeline>
|
|
<codeline lineno="151"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="152"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="153"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Now<sp/>perform<sp/>split<sp/>from<sp/>leaf<sp/>met<sp/>upwards</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="154"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>a_e<sp/>=<sp/>node[met].e;</highlight></codeline>
|
|
<codeline lineno="155"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>a_env<sp/>=<sp/>node[met].env;</highlight></codeline>
|
|
<codeline lineno="156"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>b_e<sp/>=<sp/>0;</highlight></codeline>
|
|
<codeline lineno="157"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">while</highlight><highlight class="normal"><sp/>(!n_root(met))<sp/>{</highlight></codeline>
|
|
<codeline lineno="159"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(left(met))<sp/>{</highlight></codeline>
|
|
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>b_e<sp/>+=<sp/>node[n_right(n_parent(met))].e;</highlight></codeline>
|
|
<codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
|
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>a_env<sp/>=<sp/><ref refid="group__TaskModelFloatArith_1ga958cb25ae9754d6cc35c7c6e34ebc1e3" kindref="member">std::max</ref>(a_env,<sp/><ref refid="namespaceGecode_1_1Int_1a6c8c36ec855e57c1638ce9e531a486bf" kindref="member">plus</ref>(node[n_left(n_parent(met))].env,a_e));</highlight></codeline>
|
|
<codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>a_e<sp/>+=<sp/>node[n_left(n_parent(met))].e;</highlight></codeline>
|
|
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>met<sp/>=<sp/>n_parent(met);</highlight></codeline>
|
|
<codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="167"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/><ref refid="namespaceGecode_1_1Int_1a6c8c36ec855e57c1638ce9e531a486bf" kindref="member">plus</ref>(a_env,b_e);</highlight></codeline>
|
|
<codeline lineno="169"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="170"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="171"><highlight class="normal"><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="172"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="173"><highlight class="normal"><sp/><sp/></highlight><highlight class="comment">/*</highlight></codeline>
|
|
<codeline lineno="174"><highlight class="comment"><sp/><sp/><sp/>*<sp/>Omega<sp/>lambda<sp/>tree</highlight></codeline>
|
|
<codeline lineno="175"><highlight class="comment"><sp/><sp/><sp/>*/</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="176"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="177"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="178" refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a76474fca1ae3830d7937e659d57e6932" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a76474fca1ae3830d7937e659d57e6932" kindref="member">OmegaLambdaNode::init</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode" kindref="compound">OmegaLambdaNode</ref>&<sp/>l,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode" kindref="compound">OmegaLambdaNode</ref>&<sp/>r)<sp/>{</highlight></codeline>
|
|
<codeline lineno="179"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a70b67ec4d59d3978a6af4671ebf09378" kindref="member">OmegaNode::init</ref>(l,r);</highlight></codeline>
|
|
<codeline lineno="180"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a125e43cd91aae486238767897be6dbfa" kindref="member">le</ref><sp/>=<sp/>0;<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a48ad246cf022531711283f152009bfe6" kindref="member">lenv</ref><sp/>=<sp/>-<ref refid="namespaceGecode_1_1Int_1_1Limits_1ae5e93636b2a7b2defae6986b2eb85dab" kindref="member">Limits::llinfinity</ref>;</highlight></codeline>
|
|
<codeline lineno="181"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a9c230ac835a3f324eb7aee91fd9e55c3" kindref="member">resLe</ref><sp/>=<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1ac7ff16c67a3898a38d6ce1d78e2c048a" kindref="member">undef</ref>;<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1acd6a29afd8d725e3d35575ccc5eed315" kindref="member">resLenv</ref><sp/>=<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1ac7ff16c67a3898a38d6ce1d78e2c048a" kindref="member">undef</ref>;</highlight></codeline>
|
|
<codeline lineno="182"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="183"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="184"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="185" refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a1dc05647480fe6742697281be5f595fe" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a1dc05647480fe6742697281be5f595fe" kindref="member">OmegaLambdaNode::update</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode" kindref="compound">OmegaLambdaNode</ref>&<sp/>l,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode" kindref="compound">OmegaLambdaNode</ref>&<sp/>r)<sp/>{</highlight></codeline>
|
|
<codeline lineno="186"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1afafe54769331ebf3904287df3961bf84" kindref="member">OmegaNode::update</ref>(l,r);</highlight></codeline>
|
|
<codeline lineno="187"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a125e43cd91aae486238767897be6dbfa" kindref="member">le</ref><sp/>+<sp/>r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a63d6000502dac0dbc0faeda16f7f40d9" kindref="member">e</ref><sp/>><sp/>l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a63d6000502dac0dbc0faeda16f7f40d9" kindref="member">e</ref><sp/>+<sp/>r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a125e43cd91aae486238767897be6dbfa" kindref="member">le</ref>)<sp/>{</highlight></codeline>
|
|
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a125e43cd91aae486238767897be6dbfa" kindref="member">le</ref><sp/>=<sp/>l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a125e43cd91aae486238767897be6dbfa" kindref="member">le</ref><sp/>+<sp/>r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a63d6000502dac0dbc0faeda16f7f40d9" kindref="member">e</ref>;</highlight></codeline>
|
|
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a9c230ac835a3f324eb7aee91fd9e55c3" kindref="member">resLe</ref><sp/>=<sp/>l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a9c230ac835a3f324eb7aee91fd9e55c3" kindref="member">resLe</ref>;</highlight></codeline>
|
|
<codeline lineno="190"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
|
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a125e43cd91aae486238767897be6dbfa" kindref="member">le</ref><sp/>=<sp/>l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a63d6000502dac0dbc0faeda16f7f40d9" kindref="member">e</ref><sp/>+<sp/>r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a125e43cd91aae486238767897be6dbfa" kindref="member">le</ref>;</highlight></codeline>
|
|
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a9c230ac835a3f324eb7aee91fd9e55c3" kindref="member">resLe</ref><sp/>=<sp/>r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a9c230ac835a3f324eb7aee91fd9e55c3" kindref="member">resLe</ref>;</highlight></codeline>
|
|
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="194"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>((r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a48ad246cf022531711283f152009bfe6" kindref="member">lenv</ref><sp/>>=<sp/><ref refid="namespaceGecode_1_1Int_1a6c8c36ec855e57c1638ce9e531a486bf" kindref="member">plus</ref>(l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a76d23603df71918da98276ceaab86c51" kindref="member">env</ref>,r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a125e43cd91aae486238767897be6dbfa" kindref="member">le</ref>))<sp/>&&<sp/>(r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a48ad246cf022531711283f152009bfe6" kindref="member">lenv</ref><sp/>>=<sp/><ref refid="namespaceGecode_1_1Int_1a6c8c36ec855e57c1638ce9e531a486bf" kindref="member">plus</ref>(l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a48ad246cf022531711283f152009bfe6" kindref="member">lenv</ref>,r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a63d6000502dac0dbc0faeda16f7f40d9" kindref="member">e</ref>)))<sp/>{</highlight></codeline>
|
|
<codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a48ad246cf022531711283f152009bfe6" kindref="member">lenv</ref><sp/>=<sp/>r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a48ad246cf022531711283f152009bfe6" kindref="member">lenv</ref>;<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1acd6a29afd8d725e3d35575ccc5eed315" kindref="member">resLenv</ref><sp/>=<sp/>r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1acd6a29afd8d725e3d35575ccc5eed315" kindref="member">resLenv</ref>;</highlight></codeline>
|
|
<codeline lineno="196"><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/>(<ref refid="namespaceGecode_1_1Int_1a6c8c36ec855e57c1638ce9e531a486bf" kindref="member">plus</ref>(l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a76d23603df71918da98276ceaab86c51" kindref="member">env</ref>,r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a125e43cd91aae486238767897be6dbfa" kindref="member">le</ref>)<sp/>>=<sp/><ref refid="namespaceGecode_1_1Int_1a6c8c36ec855e57c1638ce9e531a486bf" kindref="member">plus</ref>(l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a48ad246cf022531711283f152009bfe6" kindref="member">lenv</ref>,r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a63d6000502dac0dbc0faeda16f7f40d9" kindref="member">e</ref>))<sp/>{</highlight></codeline>
|
|
<codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>assert(<ref refid="namespaceGecode_1_1Int_1a6c8c36ec855e57c1638ce9e531a486bf" kindref="member">plus</ref>(l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a76d23603df71918da98276ceaab86c51" kindref="member">env</ref>,r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a125e43cd91aae486238767897be6dbfa" kindref="member">le</ref>)<sp/>><sp/>r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a48ad246cf022531711283f152009bfe6" kindref="member">lenv</ref>);</highlight></codeline>
|
|
<codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a48ad246cf022531711283f152009bfe6" kindref="member">lenv</ref><sp/>=<sp/><ref refid="namespaceGecode_1_1Int_1a6c8c36ec855e57c1638ce9e531a486bf" kindref="member">plus</ref>(l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a76d23603df71918da98276ceaab86c51" kindref="member">env</ref>,r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a125e43cd91aae486238767897be6dbfa" kindref="member">le</ref>);<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1acd6a29afd8d725e3d35575ccc5eed315" kindref="member">resLenv</ref><sp/>=<sp/>r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a9c230ac835a3f324eb7aee91fd9e55c3" kindref="member">resLe</ref>;</highlight></codeline>
|
|
<codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/>}<sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"><sp/>{</highlight></codeline>
|
|
<codeline lineno="200"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>assert((<ref refid="namespaceGecode_1_1Int_1a6c8c36ec855e57c1638ce9e531a486bf" kindref="member">plus</ref>(l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a48ad246cf022531711283f152009bfe6" kindref="member">lenv</ref>,r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a63d6000502dac0dbc0faeda16f7f40d9" kindref="member">e</ref>)<sp/>><sp/>r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a48ad246cf022531711283f152009bfe6" kindref="member">lenv</ref>)<sp/>&&</highlight></codeline>
|
|
<codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>(<ref refid="namespaceGecode_1_1Int_1a6c8c36ec855e57c1638ce9e531a486bf" kindref="member">plus</ref>(l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a48ad246cf022531711283f152009bfe6" kindref="member">lenv</ref>,r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a63d6000502dac0dbc0faeda16f7f40d9" kindref="member">e</ref>)<sp/>><sp/><ref refid="namespaceGecode_1_1Int_1a6c8c36ec855e57c1638ce9e531a486bf" kindref="member">plus</ref>(l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a76d23603df71918da98276ceaab86c51" kindref="member">env</ref>,r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a125e43cd91aae486238767897be6dbfa" kindref="member">le</ref>)));</highlight></codeline>
|
|
<codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a48ad246cf022531711283f152009bfe6" kindref="member">lenv</ref><sp/>=<sp/><ref refid="namespaceGecode_1_1Int_1a6c8c36ec855e57c1638ce9e531a486bf" kindref="member">plus</ref>(l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1a48ad246cf022531711283f152009bfe6" kindref="member">lenv</ref>,r.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaNode_1a63d6000502dac0dbc0faeda16f7f40d9" kindref="member">e</ref>);<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1acd6a29afd8d725e3d35575ccc5eed315" kindref="member">resLenv</ref><sp/>=<sp/>l.<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1acd6a29afd8d725e3d35575ccc5eed315" kindref="member">resLenv</ref>;</highlight></codeline>
|
|
<codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="204"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="205"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="206"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="207"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>TaskView></highlight></codeline>
|
|
<codeline lineno="208" refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaTree_1a378fdd1ef3677bdfb139ffd4587bab25" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaTree_1a378fdd1ef3677bdfb139ffd4587bab25" kindref="member">OmegaLambdaTree<TaskView>::OmegaLambdaTree</ref>(<ref refid="classGecode_1_1Region" kindref="compound">Region</ref>&<sp/>r,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>c0,</highlight></codeline>
|
|
<codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="classGecode_1_1Int_1_1TaskViewArray" kindref="compound">TaskViewArray<TaskView></ref>&<sp/>t)</highlight></codeline>
|
|
<codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/>:<sp/><ref refid="classGecode_1_1Int_1_1TaskTree" kindref="compound">TaskTree</ref><TaskView,<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode" kindref="compound">OmegaLambdaNode</ref>>(r,t),<sp/>c(c0)<sp/>{</highlight></codeline>
|
|
<codeline lineno="211"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Enter<sp/>all<sp/>tasks<sp/>into<sp/>tree<sp/>(omega<sp/>=<sp/>all<sp/>tasks,<sp/>lambda<sp/>=<sp/>empty)</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="212"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i=<ref refid="classGecode_1_1Int_1_1TaskTree_1a588d7ff506e04319c9730a20686c5736" kindref="member">tasks</ref>.size();<sp/>i--;<sp/>)<sp/>{</highlight></codeline>
|
|
<codeline lineno="213"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1TaskTree_1aab3d5439983995ce1a163f34acff2da4" kindref="member">leaf</ref>(i).e<sp/>=<sp/><ref refid="classGecode_1_1Int_1_1TaskTree_1a588d7ff506e04319c9730a20686c5736" kindref="member">tasks</ref>[i].e();</highlight></codeline>
|
|
<codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1TaskTree_1aab3d5439983995ce1a163f34acff2da4" kindref="member">leaf</ref>(i).le<sp/>=<sp/>0;</highlight></codeline>
|
|
<codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1TaskTree_1aab3d5439983995ce1a163f34acff2da4" kindref="member">leaf</ref>(i).env<sp/>=<sp/></highlight><highlight class="keyword">static_cast<</highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="keyword">></highlight><highlight class="normal">(<ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaTree_1a60af1440298bb972f4a854880a31a55b" kindref="member">c</ref>)*<ref refid="classGecode_1_1Int_1_1TaskTree_1a588d7ff506e04319c9730a20686c5736" kindref="member">tasks</ref>[i].est()+<ref refid="classGecode_1_1Int_1_1TaskTree_1a588d7ff506e04319c9730a20686c5736" kindref="member">tasks</ref>[i].e();</highlight></codeline>
|
|
<codeline lineno="216"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1TaskTree_1aab3d5439983995ce1a163f34acff2da4" kindref="member">leaf</ref>(i).lenv<sp/>=<sp/>-<ref refid="namespaceGecode_1_1Int_1_1Limits_1ae5e93636b2a7b2defae6986b2eb85dab" kindref="member">Limits::llinfinity</ref>;</highlight></codeline>
|
|
<codeline lineno="217"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1TaskTree_1aab3d5439983995ce1a163f34acff2da4" kindref="member">leaf</ref>(i).resLe<sp/>=<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1ac7ff16c67a3898a38d6ce1d78e2c048a" kindref="member">OmegaLambdaNode::undef</ref>;</highlight></codeline>
|
|
<codeline lineno="218"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1TaskTree_1aab3d5439983995ce1a163f34acff2da4" kindref="member">leaf</ref>(i).resLenv<sp/>=<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1ac7ff16c67a3898a38d6ce1d78e2c048a" kindref="member">OmegaLambdaNode::undef</ref>;</highlight></codeline>
|
|
<codeline lineno="219"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="220"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classGecode_1_1Int_1_1TaskTree_1ae19f603654fbcfb07f639fc1b235872f" kindref="member">update</ref>();</highlight></codeline>
|
|
<codeline lineno="221"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="222"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="223"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>TaskView></highlight></codeline>
|
|
<codeline lineno="224"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/></highlight></codeline>
|
|
<codeline lineno="225" refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaTree_1ad4b454579a7a1b43eb01795b57acd74c" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaTree_1ad4b454579a7a1b43eb01795b57acd74c" kindref="member">OmegaLambdaTree<TaskView>::shift</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i)<sp/>{</highlight></codeline>
|
|
<codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>i<sp/>is<sp/>in<sp/>omega</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/>assert(leaf(i).env<sp/>><sp/>-<ref refid="namespaceGecode_1_1Int_1_1Limits_1ae5e93636b2a7b2defae6986b2eb85dab" kindref="member">Limits::llinfinity</ref>);</highlight></codeline>
|
|
<codeline lineno="228"><highlight class="normal"><sp/><sp/><sp/><sp/>leaf(i).le<sp/>=<sp/>leaf(i).e;</highlight></codeline>
|
|
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/>leaf(i).e<sp/>=<sp/>0;</highlight></codeline>
|
|
<codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/>leaf(i).lenv<sp/>=<sp/>leaf(i).env;</highlight></codeline>
|
|
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/>leaf(i).env<sp/>=<sp/>-<ref refid="namespaceGecode_1_1Int_1_1Limits_1ae5e93636b2a7b2defae6986b2eb85dab" kindref="member">Limits::llinfinity</ref>;</highlight></codeline>
|
|
<codeline lineno="232"><highlight class="normal"><sp/><sp/><sp/><sp/>leaf(i).resLe<sp/>=<sp/>i;</highlight></codeline>
|
|
<codeline lineno="233"><highlight class="normal"><sp/><sp/><sp/><sp/>leaf(i).resLenv<sp/>=<sp/>i;</highlight></codeline>
|
|
<codeline lineno="234"><highlight class="normal"><sp/><sp/><sp/><sp/>update(i);</highlight></codeline>
|
|
<codeline lineno="235"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="236"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="237"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>TaskView></highlight></codeline>
|
|
<codeline lineno="238"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="239" refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaTree_1a08e8774615230bc358cf965540a90863" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaTree_1a08e8774615230bc358cf965540a90863" kindref="member">OmegaLambdaTree<TaskView>::lremove</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i)<sp/>{</highlight></codeline>
|
|
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>i<sp/>not<sp/>in<sp/>omega<sp/>but<sp/>in<sp/>lambda</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="241"><highlight class="normal"><sp/><sp/><sp/><sp/>assert(leaf(i).env<sp/>==<sp/>-<ref refid="namespaceGecode_1_1Int_1_1Limits_1ae5e93636b2a7b2defae6986b2eb85dab" kindref="member">Limits::llinfinity</ref>);</highlight></codeline>
|
|
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/>assert(leaf(i).lenv<sp/>><sp/>-<ref refid="namespaceGecode_1_1Int_1_1Limits_1ae5e93636b2a7b2defae6986b2eb85dab" kindref="member">Limits::llinfinity</ref>);</highlight></codeline>
|
|
<codeline lineno="243"><highlight class="normal"><sp/><sp/><sp/><sp/>leaf(i).le<sp/>=<sp/>0;<sp/></highlight></codeline>
|
|
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/>leaf(i).lenv<sp/>=<sp/>-<ref refid="namespaceGecode_1_1Int_1_1Limits_1ae5e93636b2a7b2defae6986b2eb85dab" kindref="member">Limits::llinfinity</ref>;</highlight></codeline>
|
|
<codeline lineno="245"><highlight class="normal"><sp/><sp/><sp/><sp/>leaf(i).resLe<sp/>=<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1ac7ff16c67a3898a38d6ce1d78e2c048a" kindref="member">OmegaLambdaNode::undef</ref>;</highlight></codeline>
|
|
<codeline lineno="246"><highlight class="normal"><sp/><sp/><sp/><sp/>leaf(i).resLenv<sp/>=<sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaNode_1ac7ff16c67a3898a38d6ce1d78e2c048a" kindref="member">OmegaLambdaNode::undef</ref>;</highlight></codeline>
|
|
<codeline lineno="247"><highlight class="normal"><sp/><sp/><sp/><sp/>update(i);</highlight></codeline>
|
|
<codeline lineno="248"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="249"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="250"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>TaskView></highlight></codeline>
|
|
<codeline lineno="251"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">bool</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="252" refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaTree_1a004c6ad00b7dfa5dab73421903f3b8b4" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaTree_1a004c6ad00b7dfa5dab73421903f3b8b4" kindref="member">OmegaLambdaTree<TaskView>::lempty</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
|
|
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>root().resLenv<sp/><<sp/>0;</highlight></codeline>
|
|
<codeline lineno="254"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="255"><highlight class="normal"><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="256"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>TaskView></highlight></codeline>
|
|
<codeline lineno="257"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/></highlight></codeline>
|
|
<codeline lineno="258" refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaTree_1a1cd2f79ed6ffb7bfbd93d5940b832c11" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaTree_1a1cd2f79ed6ffb7bfbd93d5940b832c11" kindref="member">OmegaLambdaTree<TaskView>::responsible</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
|
|
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>root().resLenv;</highlight></codeline>
|
|
<codeline lineno="260"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="261"><highlight class="normal"><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="262"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>TaskView></highlight></codeline>
|
|
<codeline lineno="263"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="264" refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaTree_1a1e01e7983caa47e73af119a62567e53f" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaTree_1a1e01e7983caa47e73af119a62567e53f" kindref="member">OmegaLambdaTree<TaskView>::env</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
|
|
<codeline lineno="265"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>root().env;</highlight></codeline>
|
|
<codeline lineno="266"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="267"><highlight class="normal"><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="268"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">template</highlight><highlight class="normal"><</highlight><highlight class="keyword">class</highlight><highlight class="normal"><sp/>TaskView></highlight></codeline>
|
|
<codeline lineno="269"><highlight class="normal"><sp/><sp/>forceinline<sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="270" refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaTree_1a927e4ed3f91c582fcb4afe50ed5395bf" refkind="member"><highlight class="normal"><sp/><sp/><ref refid="classGecode_1_1Int_1_1Cumulative_1_1OmegaLambdaTree_1a927e4ed3f91c582fcb4afe50ed5395bf" kindref="member">OmegaLambdaTree<TaskView>::lenv</ref>(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
|
|
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>root().lenv;</highlight></codeline>
|
|
<codeline lineno="272"><highlight class="normal"><sp/><sp/>}</highlight></codeline>
|
|
<codeline lineno="273"><highlight class="normal"><sp/><sp/></highlight></codeline>
|
|
<codeline lineno="274"><highlight class="normal">}}}</highlight></codeline>
|
|
<codeline lineno="275"><highlight class="normal"></highlight></codeline>
|
|
<codeline lineno="276"><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/cumulative/tree.hpp"/>
|
|
</compounddef>
|
|
</doxygen>
|