summaryrefslogtreecommitdiffhomepage
path: root/ir/lpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2011-07-15 13:38:03 +0200
committerMatthias Braun <matze@braunis.de>2011-08-12 19:49:53 +0200
commite2136f1e06e8ddc66609d7a0c53e0edda7f5cca2 (patch)
tree2fe8f8d02ec54a6cbca0c8dd99be26b64922f9b7 /ir/lpp
parent99d05747d6e000aa96e751fa0183a0bf90ce0a41 (diff)
consistently give all lpp functions an lpp_ prefix
Diffstat (limited to 'ir/lpp')
-rw-r--r--ir/lpp/lpp.c13
-rw-r--r--ir/lpp/lpp.h11
-rw-r--r--ir/lpp/lpp_cplex.c2
-rw-r--r--ir/lpp/lpp_gurobi.c2
4 files changed, 15 insertions, 13 deletions
diff --git a/ir/lpp/lpp.c b/ir/lpp/lpp.c
index 559b012..9ec8158 100644
--- a/ir/lpp/lpp.c
+++ b/ir/lpp/lpp.c
@@ -67,13 +67,14 @@ static void update_stats(lpp_t *lpp)
lpp->density = (double)lpp->n_elems / (double)(lpp->cst_next * lpp->var_next) * 100.0;
}
-lpp_t *new_lpp(const char *name, lpp_opt_t opt_type)
+lpp_t *lpp_new(const char *name, lpp_opt_t opt_type)
{
- return new_lpp_userdef(name, opt_type, 64, 64, 2.0);
+ return lpp_new_userdef(name, opt_type, 64, 64, 2.0);
}
-lpp_t *new_lpp_userdef(const char *name, lpp_opt_t opt_type,
- int estimated_vars, int estimated_csts, double grow_factor)
+lpp_t *lpp_new_userdef(const char *name, lpp_opt_t opt_type,
+ int estimated_vars, int estimated_csts,
+ double grow_factor)
{
lpp_t *lpp;
int idx;
@@ -101,13 +102,13 @@ lpp_t *new_lpp_userdef(const char *name, lpp_opt_t opt_type,
return lpp;
}
-void free_lpp_matrix(lpp_t *lpp)
+void lpp_free_matrix(lpp_t *lpp)
{
del_matrix(lpp->m);
lpp->m = NULL;
}
-void free_lpp(lpp_t *lpp)
+void lpp_free(lpp_t *lpp)
{
obstack_free(&lpp->obst, NULL);
diff --git a/ir/lpp/lpp.h b/ir/lpp/lpp.h
index 5cd0f1e..29f9022 100644
--- a/ir/lpp/lpp.h
+++ b/ir/lpp/lpp.h
@@ -136,7 +136,7 @@ typedef struct _lpp_t {
* Implicit row with name "obj" is inserted.
* Implicit col with name "rhs" is inserted.
*/
-lpp_t *new_lpp(const char *name, lpp_opt_t opt_type);
+lpp_t *lpp_new(const char *name, lpp_opt_t opt_type);
/**
* Creates a new problem. Optimization type is minimize or maximize.
@@ -147,18 +147,19 @@ lpp_t *new_lpp(const char *name, lpp_opt_t opt_type);
* @param grow_factor By which factor should the problem grow, if there are
* more variables or constraints than estimated.
*/
-lpp_t *new_lpp_userdef(const char *name, lpp_opt_t opt_type,
- int estimated_vars, int estimated_csts, double grow_factor);
+lpp_t *lpp_new_userdef(const char *name, lpp_opt_t opt_type,
+ int estimated_vars, int estimated_csts,
+ double grow_factor);
/**
* Frees the matrix embedded in the LPP.
*/
-void free_lpp_matrix(lpp_t *lpp);
+void lpp_free_matrix(lpp_t *lpp);
/**
* Frees all memory allocated for LPP data structure.
*/
-void free_lpp(lpp_t *lpp);
+void lpp_free(lpp_t *lpp);
/**
* @return The constant term in the objective function
diff --git a/ir/lpp/lpp_cplex.c b/ir/lpp/lpp_cplex.c
index 3efec27..2bcd7ff 100644
--- a/ir/lpp/lpp_cplex.c
+++ b/ir/lpp/lpp_cplex.c
@@ -169,7 +169,7 @@ static void cpx_construct(cpx_t *cpx)
chk_cpx_err(cpx);
obstack_free(&obst, NULL);
- free_lpp_matrix(lpp);
+ lpp_free_matrix(lpp);
}
static void cpx_solve(cpx_t *cpx)
diff --git a/ir/lpp/lpp_gurobi.c b/ir/lpp/lpp_gurobi.c
index 13c34c2..6c215db 100644
--- a/ir/lpp/lpp_gurobi.c
+++ b/ir/lpp/lpp_gurobi.c
@@ -159,7 +159,7 @@ static void gurobi_construct(gurobi_t *grb)
check_gurobi_error(grb, error);
obstack_free(&obst, NULL);
- free_lpp_matrix(lpp);
+ lpp_free_matrix(lpp);
}
static void gurobi_solve(gurobi_t *grb)