summaryrefslogtreecommitdiffhomepage
path: root/ir/lpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2011-07-15 14:01:30 +0200
committerMatthias Braun <matze@braunis.de>2011-08-12 19:49:54 +0200
commit321855ff2c234518e0ac8d794903eb78d23fc1fa (patch)
treefb4d4d9f7712f5a4784d07b1faaad86df546702b /ir/lpp
parente2136f1e06e8ddc66609d7a0c53e0edda7f5cca2 (diff)
lpp: call the constraint types lpp_{less|greater}_equal because they are a {less|greater} equal operation
Diffstat (limited to 'ir/lpp')
-rw-r--r--ir/lpp/lpp.c12
-rw-r--r--ir/lpp/lpp.h4
2 files changed, 8 insertions, 8 deletions
diff --git a/ir/lpp/lpp.c b/ir/lpp/lpp.c
index 9ec8158..cfb7cc8 100644
--- a/ir/lpp/lpp.c
+++ b/ir/lpp/lpp.c
@@ -363,14 +363,14 @@ void lpp_check_startvals(lpp_t *lpp)
fprintf(stderr, "constraint %s unsatisfied: %g != %g\n", cst->name, sum, cst_val);
}
break;
- case lpp_less:
+ case lpp_less_equal:
if(sum > cst_val) {
- fprintf(stderr, "constraint %s unsatisfied: %g > %g\n", cst->name, sum, cst_val);
+ fprintf(stderr, "constraint %s unsatisfied: %g >= %g\n", cst->name, sum, cst_val);
}
break;
- case lpp_greater:
+ case lpp_greater_equal:
if(sum < cst_val) {
- fprintf(stderr, "constraint %s unsatisfied: %g < %g\n", cst->name, sum, cst_val);
+ fprintf(stderr, "constraint %s unsatisfied: %g <= %g\n", cst->name, sum, cst_val);
}
break;
default:
@@ -398,9 +398,9 @@ static const char *lpp_cst_op_to_str(lpp_cst_t cst)
switch(cst) {
case lpp_equal:
return "=";
- case lpp_less:
+ case lpp_less_equal:
return "<=";
- case lpp_greater:
+ case lpp_greater_equal:
return ">=";
default:
return "";
diff --git a/ir/lpp/lpp.h b/ir/lpp/lpp.h
index 29f9022..71e30d7 100644
--- a/ir/lpp/lpp.h
+++ b/ir/lpp/lpp.h
@@ -41,8 +41,8 @@ typedef enum _lpp_opt_t {
typedef enum _lpp_cst_t {
lpp_objective,
lpp_equal,
- lpp_less,
- lpp_greater
+ lpp_less_equal,
+ lpp_greater_equal
} lpp_cst_t;
typedef enum _lpp_var_t {