diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-05-25 22:27:19 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-05-25 22:27:19 -0700 |
commit | c5ffb6e1cc9c5ff880d037c53b8ebc8562be0008 (patch) | |
tree | 2d05d987ec3c81bfbb0c1f598966d9d1b16e9b1f /html/024compare.cc.html | |
parent | b2757892d553352feb59d70b1e7241ccdafa6905 (diff) | |
download | mu-c5ffb6e1cc9c5ff880d037c53b8ebc8562be0008.tar.gz |
1459
Diffstat (limited to 'html/024compare.cc.html')
-rw-r--r-- | html/024compare.cc.html | 96 |
1 files changed, 14 insertions, 82 deletions
diff --git a/html/024compare.cc.html b/html/024compare.cc.html index 56449547..a5063846 100644 --- a/html/024compare.cc.html +++ b/html/024compare.cc.html @@ -2,7 +2,7 @@ <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> -<title>~/Desktop/s/mu/024compare.cc</title> +<title>024compare.cc</title> <meta name="Generator" content="Vim/7.4"> <meta name="plugin-version" content="vim7.4_v1"> <meta name="syntax" content="cpp"> @@ -40,7 +40,7 @@ Recipe_number[<span class="Constant">"equal"</span>] = EQUAL<span clas case EQUAL: <span class="Delimiter">{</span> vector<double>& exemplar = ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">);</span> bool result = <span class="Constant">true</span><span class="Delimiter">;</span> - for <span class="Delimiter">(</span>index_t i = <span class="Constant">1</span><span class="Delimiter">;</span> i < ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> + for <span class="Delimiter">(</span>long long int i = <span class="Constant">1</span><span class="Delimiter">;</span> i < SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> if <span class="Delimiter">(</span>!equal<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>begin<span class="Delimiter">(),</span> ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>end<span class="Delimiter">(),</span> exemplar<span class="Delimiter">.</span>begin<span class="Delimiter">()))</span> <span class="Delimiter">{</span> result = <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Identifier">break</span><span class="Delimiter">;</span> @@ -57,12 +57,8 @@ recipe main [ <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">33</span>:literal <span class="Constant">3</span>:number<span class="Special"> <- </span>equal <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number ] -<span class="traceContains">+run: instruction main/2</span> -<span class="traceContains">+run: ingredient 0 is 1</span> <span class="traceContains">+mem: location 1 is 34</span> -<span class="traceContains">+run: ingredient 1 is 2</span> <span class="traceContains">+mem: location 2 is 33</span> -<span class="traceContains">+run: product 0 is 3</span> <span class="traceContains">+mem: storing 0 in location 3</span> <span class="Delimiter">:(scenario equal2)</span> @@ -71,12 +67,8 @@ recipe main [ <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">34</span>:literal <span class="Constant">3</span>:number<span class="Special"> <- </span>equal <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number ] -<span class="traceContains">+run: instruction main/2</span> -<span class="traceContains">+run: ingredient 0 is 1</span> <span class="traceContains">+mem: location 1 is 34</span> -<span class="traceContains">+run: ingredient 1 is 2</span> <span class="traceContains">+mem: location 2 is 34</span> -<span class="traceContains">+run: product 0 is 3</span> <span class="traceContains">+mem: storing 1 in location 3</span> <span class="Delimiter">:(scenario equal_multiple)</span> @@ -98,10 +90,10 @@ Recipe_number[<span class="Constant">"greater-than"</span>] = GREATER_ <span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> case GREATER_THAN: <span class="Delimiter">{</span> bool result = <span class="Constant">true</span><span class="Delimiter">;</span> - for <span class="Delimiter">(</span>index_t i = <span class="Constant">0</span><span class="Delimiter">;</span> i < ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> - assert<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>size<span class="Delimiter">()</span> == <span class="Constant">1</span><span class="Delimiter">);</span> <span class="Comment">// scalar</span> + for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i < SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>scalar<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)));</span> <span class="Delimiter">}</span> - for <span class="Delimiter">(</span>index_t i = <span class="Comment">/**/</span><span class="Constant">1</span><span class="Delimiter">;</span> i < ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> + for <span class="Delimiter">(</span>long long int i = <span class="Comment">/**/</span><span class="Constant">1</span><span class="Delimiter">;</span> i < SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> if <span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i-<span class="Constant">1</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)</span> <= ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">))</span> <span class="Delimiter">{</span> result = <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> @@ -117,12 +109,6 @@ recipe main [ <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">33</span>:literal <span class="Constant">3</span>:boolean<span class="Special"> <- </span>greater-than <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number ] -<span class="traceContains">+run: instruction main/2</span> -<span class="traceContains">+run: ingredient 0 is 1</span> -<span class="traceContains">+mem: location 1 is 34</span> -<span class="traceContains">+run: ingredient 1 is 2</span> -<span class="traceContains">+mem: location 2 is 33</span> -<span class="traceContains">+run: product 0 is 3</span> <span class="traceContains">+mem: storing 1 in location 3</span> <span class="Delimiter">:(scenario greater_than2)</span> @@ -131,12 +117,6 @@ recipe main [ <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">34</span>:literal <span class="Constant">3</span>:boolean<span class="Special"> <- </span>greater-than <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number ] -<span class="traceContains">+run: instruction main/2</span> -<span class="traceContains">+run: ingredient 0 is 1</span> -<span class="traceContains">+mem: location 1 is 34</span> -<span class="traceContains">+run: ingredient 1 is 2</span> -<span class="traceContains">+mem: location 2 is 34</span> -<span class="traceContains">+run: product 0 is 3</span> <span class="traceContains">+mem: storing 0 in location 3</span> <span class="Delimiter">:(scenario greater_than_multiple)</span> @@ -158,10 +138,10 @@ Recipe_number[<span class="Constant">"lesser-than"</span>] = LESSER_TH <span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> case LESSER_THAN: <span class="Delimiter">{</span> bool result = <span class="Constant">true</span><span class="Delimiter">;</span> - for <span class="Delimiter">(</span>index_t i = <span class="Constant">0</span><span class="Delimiter">;</span> i < ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> - assert<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>size<span class="Delimiter">()</span> == <span class="Constant">1</span><span class="Delimiter">);</span> <span class="Comment">// scalar</span> + for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i < SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>scalar<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)));</span> <span class="Delimiter">}</span> - for <span class="Delimiter">(</span>index_t i = <span class="Comment">/**/</span><span class="Constant">1</span><span class="Delimiter">;</span> i < ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> + for <span class="Delimiter">(</span>long long int i = <span class="Comment">/**/</span><span class="Constant">1</span><span class="Delimiter">;</span> i < SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> if <span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i-<span class="Constant">1</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)</span> >= ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">))</span> <span class="Delimiter">{</span> result = <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> @@ -177,12 +157,6 @@ recipe main [ <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">33</span>:literal <span class="Constant">3</span>:boolean<span class="Special"> <- </span>lesser-than <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number ] -<span class="traceContains">+run: instruction main/2</span> -<span class="traceContains">+run: ingredient 0 is 1</span> -<span class="traceContains">+mem: location 1 is 32</span> -<span class="traceContains">+run: ingredient 1 is 2</span> -<span class="traceContains">+mem: location 2 is 33</span> -<span class="traceContains">+run: product 0 is 3</span> <span class="traceContains">+mem: storing 1 in location 3</span> <span class="Delimiter">:(scenario lesser_than2)</span> @@ -191,12 +165,6 @@ recipe main [ <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">33</span>:literal <span class="Constant">3</span>:boolean<span class="Special"> <- </span>lesser-than <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number ] -<span class="traceContains">+run: instruction main/2</span> -<span class="traceContains">+run: ingredient 0 is 1</span> -<span class="traceContains">+mem: location 1 is 34</span> -<span class="traceContains">+run: ingredient 1 is 2</span> -<span class="traceContains">+mem: location 2 is 33</span> -<span class="traceContains">+run: product 0 is 3</span> <span class="traceContains">+mem: storing 0 in location 3</span> <span class="Delimiter">:(scenario lesser_than_multiple)</span> @@ -218,10 +186,10 @@ Recipe_number[<span class="Constant">"greater-or-equal"</span>] = GREA <span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> case GREATER_OR_EQUAL: <span class="Delimiter">{</span> bool result = <span class="Constant">true</span><span class="Delimiter">;</span> - for <span class="Delimiter">(</span>index_t i = <span class="Constant">0</span><span class="Delimiter">;</span> i < ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> - assert<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>size<span class="Delimiter">()</span> == <span class="Constant">1</span><span class="Delimiter">);</span> <span class="Comment">// scalar</span> + for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i < SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>scalar<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)));</span> <span class="Delimiter">}</span> - for <span class="Delimiter">(</span>index_t i = <span class="Comment">/**/</span><span class="Constant">1</span><span class="Delimiter">;</span> i < ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> + for <span class="Delimiter">(</span>long long int i = <span class="Comment">/**/</span><span class="Constant">1</span><span class="Delimiter">;</span> i < SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> if <span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i-<span class="Constant">1</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)</span> < ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">))</span> <span class="Delimiter">{</span> result = <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> @@ -237,12 +205,6 @@ recipe main [ <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">33</span>:literal <span class="Constant">3</span>:boolean<span class="Special"> <- </span>greater-or-equal <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number ] -<span class="traceContains">+run: instruction main/2</span> -<span class="traceContains">+run: ingredient 0 is 1</span> -<span class="traceContains">+mem: location 1 is 34</span> -<span class="traceContains">+run: ingredient 1 is 2</span> -<span class="traceContains">+mem: location 2 is 33</span> -<span class="traceContains">+run: product 0 is 3</span> <span class="traceContains">+mem: storing 1 in location 3</span> <span class="Delimiter">:(scenario greater_or_equal2)</span> @@ -251,12 +213,6 @@ recipe main [ <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">34</span>:literal <span class="Constant">3</span>:boolean<span class="Special"> <- </span>greater-or-equal <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number ] -<span class="traceContains">+run: instruction main/2</span> -<span class="traceContains">+run: ingredient 0 is 1</span> -<span class="traceContains">+mem: location 1 is 34</span> -<span class="traceContains">+run: ingredient 1 is 2</span> -<span class="traceContains">+mem: location 2 is 34</span> -<span class="traceContains">+run: product 0 is 3</span> <span class="traceContains">+mem: storing 1 in location 3</span> <span class="Delimiter">:(scenario greater_or_equal3)</span> @@ -265,12 +221,6 @@ recipe main [ <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">35</span>:literal <span class="Constant">3</span>:boolean<span class="Special"> <- </span>greater-or-equal <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number ] -<span class="traceContains">+run: instruction main/2</span> -<span class="traceContains">+run: ingredient 0 is 1</span> -<span class="traceContains">+mem: location 1 is 34</span> -<span class="traceContains">+run: ingredient 1 is 2</span> -<span class="traceContains">+mem: location 2 is 35</span> -<span class="traceContains">+run: product 0 is 3</span> <span class="traceContains">+mem: storing 0 in location 3</span> <span class="Delimiter">:(scenario greater_or_equal_multiple)</span> @@ -292,10 +242,10 @@ Recipe_number[<span class="Constant">"lesser-or-equal"</span>] = LESSE <span class="Delimiter">:(before "End Primitive Recipe Implementations")</span> case LESSER_OR_EQUAL: <span class="Delimiter">{</span> bool result = <span class="Constant">true</span><span class="Delimiter">;</span> - for <span class="Delimiter">(</span>index_t i = <span class="Constant">0</span><span class="Delimiter">;</span> i < ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> - assert<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>size<span class="Delimiter">()</span> == <span class="Constant">1</span><span class="Delimiter">);</span> <span class="Comment">// scalar</span> + for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i < SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> + assert<span class="Delimiter">(</span>scalar<span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)));</span> <span class="Delimiter">}</span> - for <span class="Delimiter">(</span>index_t i = <span class="Comment">/**/</span><span class="Constant">1</span><span class="Delimiter">;</span> i < ingredients<span class="Delimiter">.</span>size<span class="Delimiter">();</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> + for <span class="Delimiter">(</span>long long int i = <span class="Comment">/**/</span><span class="Constant">1</span><span class="Delimiter">;</span> i < SIZE<span class="Delimiter">(</span>ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span> if <span class="Delimiter">(</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i-<span class="Constant">1</span><span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">)</span> > ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">).</span>at<span class="Delimiter">(</span><span class="Constant">0</span><span class="Delimiter">))</span> <span class="Delimiter">{</span> result = <span class="Constant">false</span><span class="Delimiter">;</span> <span class="Delimiter">}</span> @@ -311,12 +261,6 @@ recipe main [ <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">33</span>:literal <span class="Constant">3</span>:boolean<span class="Special"> <- </span>lesser-or-equal <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number ] -<span class="traceContains">+run: instruction main/2</span> -<span class="traceContains">+run: ingredient 0 is 1</span> -<span class="traceContains">+mem: location 1 is 32</span> -<span class="traceContains">+run: ingredient 1 is 2</span> -<span class="traceContains">+mem: location 2 is 33</span> -<span class="traceContains">+run: product 0 is 3</span> <span class="traceContains">+mem: storing 1 in location 3</span> <span class="Delimiter">:(scenario lesser_or_equal2)</span> @@ -325,12 +269,6 @@ recipe main [ <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">33</span>:literal <span class="Constant">3</span>:boolean<span class="Special"> <- </span>lesser-or-equal <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number ] -<span class="traceContains">+run: instruction main/2</span> -<span class="traceContains">+run: ingredient 0 is 1</span> -<span class="traceContains">+mem: location 1 is 33</span> -<span class="traceContains">+run: ingredient 1 is 2</span> -<span class="traceContains">+mem: location 2 is 33</span> -<span class="traceContains">+run: product 0 is 3</span> <span class="traceContains">+mem: storing 1 in location 3</span> <span class="Delimiter">:(scenario lesser_or_equal3)</span> @@ -339,12 +277,6 @@ recipe main [ <span class="Constant">2</span>:number<span class="Special"> <- </span>copy <span class="Constant">33</span>:literal <span class="Constant">3</span>:boolean<span class="Special"> <- </span>lesser-or-equal <span class="Constant">1</span>:number<span class="Delimiter">,</span> <span class="Constant">2</span>:number ] -<span class="traceContains">+run: instruction main/2</span> -<span class="traceContains">+run: ingredient 0 is 1</span> -<span class="traceContains">+mem: location 1 is 34</span> -<span class="traceContains">+run: ingredient 1 is 2</span> -<span class="traceContains">+mem: location 2 is 33</span> -<span class="traceContains">+run: product 0 is 3</span> <span class="traceContains">+mem: storing 0 in location 3</span> <span class="Delimiter">:(scenario lesser_or_equal_multiple)</span> |