Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fixed licence and copyright. No more reference to da GRAS possee or the
[simgrid.git] / src / include / surf / maxmin.h
index e0b0723..b75ded8 100644 (file)
@@ -1,20 +1,21 @@
-/* Authors: Arnaud Legrand                                                  */
+/*     $Id$     */
+
+/* Copyright (c) 2004 Arnaud Legrand. All rights reserved.                  */
 
 /* This program is free software; you can redistribute it and/or modify it
  under the terms of the license (GNU LGPL) which comes with this package. */
* under the terms of the license (GNU LGPL) which comes with this package. */
 
 #ifndef _SURF_MAXMIN_H
 #define _SURF_MAXMIN_H
 
-typedef long double xbt_maxmin_float_t;
-#define XBT_MAXMIN_FLOAT_T "%Lg"       /* for printing purposes */
-
+#include "xbt/misc.h"
 typedef struct lmm_variable *lmm_variable_t;
 typedef struct lmm_constraint *lmm_constraint_t;
 typedef struct lmm_system *lmm_system_t;
 
 lmm_system_t lmm_system_new(void);
 void lmm_system_free(lmm_system_t sys);
+void lmm_variable_disable(lmm_system_t sys, lmm_variable_t var);
 
 lmm_constraint_t lmm_constraint_new(lmm_system_t sys, void *id,
                                    xbt_maxmin_float_t bound_value);
@@ -31,13 +32,21 @@ xbt_maxmin_float_t lmm_variable_getvalue(lmm_variable_t var);
 void lmm_expand(lmm_system_t sys, lmm_constraint_t cnst,
                lmm_variable_t var, xbt_maxmin_float_t value);
 
+lmm_constraint_t lmm_get_cnst_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, 
+                                    lmm_variable_t *var);
+
+void *lmm_constraint_id(lmm_constraint_t cnst);
+void *lmm_variable_id(lmm_variable_t var);
+
 void lmm_update(lmm_system_t sys, lmm_constraint_t cnst,
                lmm_variable_t var, xbt_maxmin_float_t value);
-void lmm_update_variable_bound(lmm_variable_t var,
+void lmm_update_variable_bound(lmm_system_t sys, lmm_variable_t var,
                               xbt_maxmin_float_t bound);
-void lmm_update_variable_weight(lmm_variable_t var,
+void lmm_update_variable_weight(lmm_system_t sys, lmm_variable_t var,
                                xbt_maxmin_float_t weight);
-void lmm_update_constraint_bound(lmm_constraint_t cnst,
+void lmm_update_constraint_bound(lmm_system_t sys, lmm_constraint_t cnst,
                                 xbt_maxmin_float_t bound);
 
 int lmm_constraint_used(lmm_system_t sys, lmm_constraint_t cnst);