#ifndef _SURF_MAXMIN_H
#define _SURF_MAXMIN_H
-#include <math.h>
#include "portable.h"
#include "xbt/misc.h"
#include "surf/datatypes.h"
+#include <math.h>
-#define MAXMIN_PRECISION 0.00001
+extern double sg_maxmin_precision;
+#define MAXMIN_PRECISION sg_maxmin_precision
static XBT_INLINE void double_update(double *variable, double value)
{
*variable -= value;
return (fabs(value1 - value2) < MAXMIN_PRECISION);
}
-XBT_PUBLIC(lmm_system_t) lmm_system_new(void);
+XBT_PUBLIC(lmm_system_t) lmm_system_new(int selective_update);
XBT_PUBLIC(void) lmm_system_free(lmm_system_t sys);
void lmm_variable_disable(lmm_system_t sys, lmm_variable_t var);
double weight_value,
double bound,
int number_of_constraints);
-void lmm_variable_free(lmm_system_t sys, lmm_variable_t var);
+XBT_PUBLIC(void) lmm_variable_free(lmm_system_t sys, lmm_variable_t var);
XBT_PUBLIC(double) lmm_variable_getvalue(lmm_variable_t var);
XBT_PUBLIC(double) lmm_variable_getbound(lmm_variable_t var);
lmm_constraint_t lmm_get_cnst_from_var(lmm_system_t sys,
lmm_variable_t var, int num);
+double lmm_get_cnst_weight_from_var(lmm_system_t sys, lmm_variable_t var,
+ int num);
int lmm_get_number_of_cnst_from_var(lmm_system_t sys, lmm_variable_t var);
lmm_variable_t lmm_get_var_from_cnst(lmm_system_t sys,
lmm_constraint_t cnst,