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. */
9 typedef long double xbt_maxmin_float_t;
10 #define XBT_MAXMIN_FLOAT_T "%Lg" /* for printing purposes */
12 typedef struct lmm_variable *lmm_variable_t;
13 typedef struct lmm_constraint *lmm_constraint_t;
14 typedef struct lmm_system *lmm_system_t;
16 lmm_system_t lmm_system_new(void);
17 void lmm_system_free(lmm_system_t sys);
19 lmm_constraint_t lmm_constraint_new(lmm_system_t sys, void *id,
20 xbt_maxmin_float_t bound_value);
21 void lmm_constraint_free(lmm_system_t sys, lmm_constraint_t cnst);
23 lmm_variable_t lmm_variable_new(lmm_system_t sys, void *id,
24 xbt_maxmin_float_t weight_value,
25 xbt_maxmin_float_t bound,
26 int number_of_constraints);
27 void lmm_variable_free(lmm_system_t sys, lmm_variable_t var);
28 xbt_maxmin_float_t lmm_variable_getvalue(lmm_variable_t var);
31 void lmm_expand(lmm_system_t sys, lmm_constraint_t cnst,
32 lmm_variable_t var, xbt_maxmin_float_t value);
34 void lmm_update(lmm_system_t sys, lmm_constraint_t cnst,
35 lmm_variable_t var, xbt_maxmin_float_t value);
36 void lmm_update_variable_bound(lmm_variable_t var,
37 xbt_maxmin_float_t bound);
38 void lmm_update_variable_weight(lmm_variable_t var,
39 xbt_maxmin_float_t weight);
40 void lmm_update_constraint_bound(lmm_constraint_t cnst,
41 xbt_maxmin_float_t bound);
43 void lmm_solve(lmm_system_t sys);
44 #endif /* _SURF_MAXMIN_H */