1 /* Authors: Arnaud Legrand */
3 /* This program is free software; you can redistribute it and/or modify it
4 under the terms of the license (GNU LGPL) which comes with this package. */
6 typedef long double FLOAT;
8 typedef struct lmm_variable *lmm_variable_t;
9 typedef struct lmm_constraint *lmm_constraint_t;
10 typedef struct lmm_system *lmm_system_t;
12 lmm_system_t lmm_system_new(void);
13 void lmm_system_free(lmm_system_t sys);
15 lmm_constraint_t lmm_constraint_new(lmm_system_t sys, void *id,
17 void lmm_constraint_free(lmm_system_t sys, lmm_constraint_t cnst);
19 lmm_variable_t lmm_variable_new(lmm_system_t sys, void *id,
20 FLOAT weight_value, FLOAT bound,
21 int number_of_constraints);
22 void lmm_variable_free(lmm_system_t sys, lmm_variable_t var);
23 FLOAT lmm_variable_getvalue(lmm_variable_t var);
26 void lmm_expand(lmm_system_t sys, lmm_constraint_t cnst,
27 lmm_variable_t var, FLOAT value);
29 void lmm_update(lmm_system_t sys, lmm_constraint_t cnst,
30 lmm_variable_t var, FLOAT value);
31 void lmm_update_variable_bound(lmm_variable_t var, FLOAT bound);
32 void lmm_update_variable_weight(lmm_variable_t var, FLOAT weight);
33 void lmm_update_constraint_bound(lmm_constraint_t cnst, FLOAT bound);
35 void lmm_solve(lmm_system_t sys);