From a802f0cedc7b5580d746f46ae62fcf8074ae3c49 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 2 Mar 2017 04:41:24 -0800 Subject: 3749 --- html/025compare.cc.html | 68 ++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) (limited to 'html/025compare.cc.html') diff --git a/html/025compare.cc.html b/html/025compare.cc.html index fb4c6b37..1605a091 100644 --- a/html/025compare.cc.html +++ b/html/025compare.cc.html @@ -68,22 +68,22 @@ if ('onhashchange' in window) { 7 :(before "End Primitive Recipe Checks") 8 case EQUAL: { 9 if (SIZE(inst.ingredients) <= 1) { - 10 raise << maybe(get(Recipe, r).name) << "'equal' needs at least two ingredients to compare in '" << inst.original_string << "'\n" << end(); + 10 raise << maybe(get(Recipe, r).name) << "'equal' needs at least two ingredients to compare in '" << inst.original_string << "'\n" << end(); 11 break; 12 } 13 const reagent& exemplar = inst.ingredients.at(0); 14 for (int i = /*skip exemplar*/1; i < SIZE(inst.ingredients); ++i) { 15 if (!types_match(inst.ingredients.at(i), exemplar) && !types_match(exemplar, inst.ingredients.at(i))) { - 16 raise << maybe(get(Recipe, r).name) << "'equal' expects ingredients to be all of the same type, but got '" << inst.original_string << "'\n" << end(); + 16 raise << maybe(get(Recipe, r).name) << "'equal' expects ingredients to be all of the same type, but got '" << inst.original_string << "'\n" << end(); 17 goto finish_checking_instruction; 18 } 19 } 20 if (SIZE(inst.products) > 1) { - 21 raise << maybe(get(Recipe, r).name) << "'equal' yields exactly one product in '" << inst.original_string << "'\n" << end(); + 21 raise << maybe(get(Recipe, r).name) << "'equal' yields exactly one product in '" << inst.original_string << "'\n" << end(); 22 break; 23 } 24 if (!inst.products.empty() && !is_dummy(inst.products.at(0)) && !is_mu_boolean(inst.products.at(0))) { - 25 raise << maybe(get(Recipe, r).name) << "'equal' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end(); + 25 raise << maybe(get(Recipe, r).name) << "'equal' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end(); 26 break; 27 } 28 break; @@ -93,7 +93,7 @@ if ('onhashchange' in window) { 32 vector<double>& exemplar = ingredients.at(0); 33 bool result = true; 34 for (int i = /*skip exemplar*/1; i < SIZE(ingredients); ++i) { - 35 if (!equal(ingredients.at(i).begin(), ingredients.at(i).end(), exemplar.begin())) { + 35 if (!equal(ingredients.at(i).begin(), ingredients.at(i).end(), exemplar.begin())) { 36 result = false; 37 break; 38 } @@ -142,20 +142,20 @@ if ('onhashchange' in window) { 81 :(before "End Primitive Recipe Checks") 82 case NOT_EQUAL: { 83 if (SIZE(inst.ingredients) != 2) { - 84 raise << maybe(get(Recipe, r).name) << "'equal' needs two ingredients to compare in '" << inst.original_string << "'\n" << end(); + 84 raise << maybe(get(Recipe, r).name) << "'equal' needs two ingredients to compare in '" << inst.original_string << "'\n" << end(); 85 break; 86 } 87 const reagent& exemplar = inst.ingredients.at(0); 88 if (!types_match(inst.ingredients.at(1), exemplar) && !types_match(exemplar, inst.ingredients.at(1))) { - 89 raise << maybe(get(Recipe, r).name) << "'equal' expects ingredients to be all of the same type, but got '" << inst.original_string << "'\n" << end(); + 89 raise << maybe(get(Recipe, r).name) << "'equal' expects ingredients to be all of the same type, but got '" << inst.original_string << "'\n" << end(); 90 goto finish_checking_instruction; 91 } 92 if (SIZE(inst.products) > 1) { - 93 raise << maybe(get(Recipe, r).name) << "'equal' yields exactly one product in '" << inst.original_string << "'\n" << end(); + 93 raise << maybe(get(Recipe, r).name) << "'equal' yields exactly one product in '" << inst.original_string << "'\n" << end(); 94 break; 95 } 96 if (!inst.products.empty() && !is_dummy(inst.products.at(0)) && !is_mu_boolean(inst.products.at(0))) { - 97 raise << maybe(get(Recipe, r).name) << "'equal' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end(); + 97 raise << maybe(get(Recipe, r).name) << "'equal' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end(); 98 break; 99 } 100 break; @@ -164,7 +164,7 @@ if ('onhashchange' in window) { 103 case NOT_EQUAL: { 104 vector<double>& exemplar = ingredients.at(0); 105 products.resize(1); -106 bool equal_ingredients = equal(ingredients.at(1).begin(), ingredients.at(1).end(), exemplar.begin()); +106 bool equal_ingredients = equal(ingredients.at(1).begin(), ingredients.at(1).end(), exemplar.begin()); 107 products.at(0).push_back(!equal_ingredients); 108 break; 109 } @@ -196,21 +196,21 @@ if ('onhashchange' in window) { 135 :(before "End Primitive Recipe Checks") 136 case GREATER_THAN: { 137 if (SIZE(inst.ingredients) <= 1) { -138 raise << maybe(get(Recipe, r).name) << "'greater-than' needs at least two ingredients to compare in '" << inst.original_string << "'\n" << end(); +138 raise << maybe(get(Recipe, r).name) << "'greater-than' needs at least two ingredients to compare in '" << inst.original_string << "'\n" << end(); 139 break; 140 } 141 for (int i = 0; i < SIZE(inst.ingredients); ++i) { 142 if (!is_mu_number(inst.ingredients.at(i))) { -143 raise << maybe(get(Recipe, r).name) << "'greater-than' can only compare numbers; got '" << inst.ingredients.at(i).original_string << "'\n" << end(); +143 raise << maybe(get(Recipe, r).name) << "'greater-than' can only compare numbers; got '" << inst.ingredients.at(i).original_string << "'\n" << end(); 144 goto finish_checking_instruction; 145 } 146 } 147 if (SIZE(inst.products) > 1) { -148 raise << maybe(get(Recipe, r).name) << "'greater-than' yields exactly one product in '" << inst.original_string << "'\n" << end(); +148 raise << maybe(get(Recipe, r).name) << "'greater-than' yields exactly one product in '" << inst.original_string << "'\n" << end(); 149 break; 150 } 151 if (!inst.products.empty() && !is_dummy(inst.products.at(0)) && !is_mu_boolean(inst.products.at(0))) { -152 raise << maybe(get(Recipe, r).name) << "'greater-than' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end(); +152 raise << maybe(get(Recipe, r).name) << "'greater-than' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end(); 153 break; 154 } 155 break; @@ -263,21 +263,21 @@ if ('onhashchange' in window) { 202 :(before "End Primitive Recipe Checks") 203 case LESSER_THAN: { 204 if (SIZE(inst.ingredients) <= 1) { -205 raise << maybe(get(Recipe, r).name) << "'lesser-than' needs at least two ingredients to compare in '" << inst.original_string << "'\n" << end(); +205 raise << maybe(get(Recipe, r).name) << "'lesser-than' needs at least two ingredients to compare in '" << inst.original_string << "'\n" << end(); 206 break; 207 } 208 for (int i = 0; i < SIZE(inst.ingredients); ++i) { 209 if (!is_mu_number(inst.ingredients.at(i))) { -210 raise << maybe(get(Recipe, r).name) << "'lesser-than' can only compare numbers; got '" << inst.ingredients.at(i).original_string << "'\n" << end(); +210 raise << maybe(get(Recipe, r).name) << "'lesser-than' can only compare numbers; got '" << inst.ingredients.at(i).original_string << "'\n" << end(); 211 goto finish_checking_instruction; 212 } 213 } 214 if (SIZE(inst.products) > 1) { -215 raise << maybe(get(Recipe, r).name) << "'lesser-than' yields exactly one product in '" << inst.original_string << "'\n" << end(); +215 raise << maybe(get(Recipe, r).name) << "'lesser-than' yields exactly one product in '" << inst.original_string << "'\n" << end(); 216 break; 217 } 218 if (!inst.products.empty() && !is_dummy(inst.products.at(0)) && !is_mu_boolean(inst.products.at(0))) { -219 raise << maybe(get(Recipe, r).name) << "'lesser-than' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end(); +219 raise << maybe(get(Recipe, r).name) << "'lesser-than' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end(); 220 break; 221 } 222 break; @@ -330,21 +330,21 @@ if ('onhashchange' in window) { 269 :(before "End Primitive Recipe Checks") 270 case GREATER_OR_EQUAL: { 271 if (SIZE(inst.ingredients) <= 1) { -272 raise << maybe(get(Recipe, r).name) << "'greater-or-equal' needs at least two ingredients to compare in '" << inst.original_string << "'\n" << end(); +272 raise << maybe(get(Recipe, r).name) << "'greater-or-equal' needs at least two ingredients to compare in '" << inst.original_string << "'\n" << end(); 273 break; 274 } 275 for (int i = 0; i < SIZE(inst.ingredients); ++i) { 276 if (!is_mu_number(inst.ingredients.at(i))) { -277 raise << maybe(get(Recipe, r).name) << "'greater-or-equal' can only compare numbers; got '" << inst.ingredients.at(i).original_string << "'\n" << end(); +277 raise << maybe(get(Recipe, r).name) << "'greater-or-equal' can only compare numbers; got '" << inst.ingredients.at(i).original_string << "'\n" << end(); 278 goto finish_checking_instruction; 279 } 280 } 281 if (SIZE(inst.products) > 1) { -282 raise << maybe(get(Recipe, r).name) << "'greater-or-equal' yields exactly one product in '" << inst.original_string << "'\n" << end(); +282 raise << maybe(get(Recipe, r).name) << "'greater-or-equal' yields exactly one product in '" << inst.original_string << "'\n" << end(); 283 break; 284 } 285 if (!inst.products.empty() && !is_dummy(inst.products.at(0)) && !is_mu_boolean(inst.products.at(0))) { -286 raise << maybe(get(Recipe, r).name) << "'greater-or-equal' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end(); +286 raise << maybe(get(Recipe, r).name) << "'greater-or-equal' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end(); 287 break; 288 } 289 break; @@ -405,21 +405,21 @@ if ('onhashchange' in window) { 344 :(before "End Primitive Recipe Checks") 345 case LESSER_OR_EQUAL: { 346 if (SIZE(inst.ingredients) <= 1) { -347 raise << maybe(get(Recipe, r).name) << "'lesser-or-equal' needs at least two ingredients to compare in '" << inst.original_string << "'\n" << end(); +347 raise << maybe(get(Recipe, r).name) << "'lesser-or-equal' needs at least two ingredients to compare in '" << inst.original_string << "'\n" << end(); 348 break; 349 } 350 for (int i = 0; i < SIZE(inst.ingredients); ++i) { 351 if (!is_mu_number(inst.ingredients.at(i))) { -352 raise << maybe(get(Recipe, r).name) << "'lesser-or-equal' can only compare numbers; got '" << inst.ingredients.at(i).original_string << "'\n" << end(); +352 raise << maybe(get(Recipe, r).name) << "'lesser-or-equal' can only compare numbers; got '" << inst.ingredients.at(i).original_string << "'\n" << end(); 353 goto finish_checking_instruction; 354 } 355 } 356 if (SIZE(inst.products) > 1) { -357 raise << maybe(get(Recipe, r).name) << "'greater-or-equal' yields exactly one product in '" << inst.original_string << "'\n" << end(); +357 raise << maybe(get(Recipe, r).name) << "'greater-or-equal' yields exactly one product in '" << inst.original_string << "'\n" << end(); 358 break; 359 } 360 if (!inst.products.empty() && !is_dummy(inst.products.at(0)) && !is_mu_boolean(inst.products.at(0))) { -361 raise << maybe(get(Recipe, r).name) << "'greater-or-equal' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end(); +361 raise << maybe(get(Recipe, r).name) << "'greater-or-equal' should yield a boolean, but got '" << inst.products.at(0).original_string << "'\n" << end(); 362 break; 363 } 364 break; @@ -480,21 +480,21 @@ if ('onhashchange' in window) { 419 :(before "End Primitive Recipe Checks") 420 case MAX: { 421 if (SIZE(inst.ingredients) <= 1) { -422 raise << maybe(get(Recipe, r).name) << "'max' needs at least two ingredients to compare in '" << inst.original_string << "'\n" << end(); +422 raise << maybe(get(Recipe, r).name) << "'max' needs at least two ingredients to compare in '" << inst.original_string << "'\n" << end(); 423 break; 424 } 425 for (int i = 0; i < SIZE(inst.ingredients); ++i) { 426 if (!is_mu_number(inst.ingredients.at(i))) { -427 raise << maybe(get(Recipe, r).name) << "'max' can only compare numbers; got '" << inst.ingredients.at(i).original_string << "'\n" << end(); +427 raise << maybe(get(Recipe, r).name) << "'max' can only compare numbers; got '" << inst.ingredients.at(i).original_string << "'\n" << end(); 428 goto finish_checking_instruction; 429 } 430 } 431 if (SIZE(inst.products) > 1) { -432 raise << maybe(get(Recipe, r).name) << "'max' yields exactly one product in '" << inst.original_string << "'\n" << end(); +432 raise << maybe(get(Recipe, r).name) << "'max' yields exactly one product in '" << inst.original_string << "'\n" << end(); 433 break; 434 } 435 if (!inst.products.empty() && !is_dummy(inst.products.at(0)) && !is_mu_number(inst.products.at(0))) { -436 raise << maybe(get(Recipe, r).name) << "'max' should yield a number, but got '" << inst.products.at(0).original_string << "'\n" << end(); +436 raise << maybe(get(Recipe, r).name) << "'max' should yield a number, but got '" << inst.products.at(0).original_string << "'\n" << end(); 437 break; 438 } 439 break; @@ -519,21 +519,21 @@ if ('onhashchange' in window) { 458 :(before "End Primitive Recipe Checks") 459 case MIN: { 460 if (SIZE(inst.ingredients) <= 1) { -461 raise << maybe(get(Recipe, r).name) << "'min' needs at least two ingredients to compare in '" << inst.original_string << "'\n" << end(); +461 raise << maybe(get(Recipe, r).name) << "'min' needs at least two ingredients to compare in '" << inst.original_string << "'\n" << end(); 462 break; 463 } 464 for (int i = 0; i < SIZE(inst.ingredients); ++i) { 465 if (!is_mu_number(inst.ingredients.at(i))) { -466 raise << maybe(get(Recipe, r).name) << "'min' can only compare numbers; got '" << inst.ingredients.at(i).original_string << "'\n" << end(); +466 raise << maybe(get(Recipe, r).name) << "'min' can only compare numbers; got '" << inst.ingredients.at(i).original_string << "'\n" << end(); 467 goto finish_checking_instruction; 468 } 469 } 470 if (SIZE(inst.products) > 1) { -471 raise << maybe(get(Recipe, r).name) << "'min' yields exactly one product in '" << inst.original_string << "'\n" << end(); +471 raise << maybe(get(Recipe, r).name) << "'min' yields exactly one product in '" << inst.original_string << "'\n" << end(); 472 break; 473 } 474 if (!inst.products.empty() && !is_dummy(inst.products.at(0)) && !is_mu_number(inst.products.at(0))) { -475 raise << maybe(get(Recipe, r).name) << "'min' should yield a number, but got '" << inst.products.at(0).original_string << "'\n" << end(); +475 raise << maybe(get(Recipe, r).name) << "'min' should yield a number, but got '" << inst.products.at(0).original_string << "'\n" << end(); 476 break; 477 } 478 break; -- cgit 1.4.1-2-gfad0