A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add new callbacks to the Workstation's models, and define new lua methods to extend...
[simgrid.git]
/
src
/
include
/
surf
/
maxmin.h
diff --git
a/src/include/surf/maxmin.h
b/src/include/surf/maxmin.h
index
d41ef1f
..
5fb85ba
100644
(file)
--- a/
src/include/surf/maxmin.h
+++ b/
src/include/surf/maxmin.h
@@
-1,6
+1,5
@@
-/* $Id$ */
-
-/* Copyright (c) 2004 Arnaud Legrand. All rights reserved. */
+/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+ * 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. */
/* 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. */
@@
-8,8
+7,10
@@
#ifndef _SURF_MAXMIN_H
#define _SURF_MAXMIN_H
#ifndef _SURF_MAXMIN_H
#define _SURF_MAXMIN_H
+#include <math.h>
#include "portable.h"
#include "xbt/misc.h"
#include "portable.h"
#include "xbt/misc.h"
+#include "surf/datatypes.h"
#define MAXMIN_PRECISION 0.00001
static XBT_INLINE void double_update(double *variable, double value)
#define MAXMIN_PRECISION 0.00001
static XBT_INLINE void double_update(double *variable, double value)
@@
-24,10
+25,10
@@
static XBT_INLINE int double_positive(double value)
return (value > MAXMIN_PRECISION);
}
return (value > MAXMIN_PRECISION);
}
-typedef struct lmm_element *lmm_element_t;
-typedef struct lmm_variable *lmm_variable_t;
-
typedef struct lmm_constraint *lmm_constraint_t
;
-typedef struct lmm_system *lmm_system_t;
+static XBT_INLINE int double_equals(double value1, double value2)
+{
+
return (fabs(value1 - value2) < MAXMIN_PRECISION)
;
+}
XBT_PUBLIC(lmm_system_t) lmm_system_new(void);
XBT_PUBLIC(void) lmm_system_free(lmm_system_t sys);
XBT_PUBLIC(lmm_system_t) lmm_system_new(void);
XBT_PUBLIC(void) lmm_system_free(lmm_system_t sys);
@@
-90,10
+91,6
@@
XBT_PUBLIC(void) lmm_update_constraint_bound(lmm_system_t sys,
XBT_PUBLIC(void) lmm_solve(lmm_system_t sys);
XBT_PUBLIC(void) lmm_solve(lmm_system_t sys);
-#ifdef HAVE_SDP
-XBT_PUBLIC(void) sdp_solve(lmm_system_t sys);
-#endif /* HAVE_SDP */
-
XBT_PUBLIC(void) lagrange_solve(lmm_system_t sys);
XBT_PUBLIC(void) bottleneck_solve(lmm_system_t sys);
XBT_PUBLIC(void) lagrange_solve(lmm_system_t sys);
XBT_PUBLIC(void) bottleneck_solve(lmm_system_t sys);
@@
-103,30
+100,11
@@
XBT_PUBLIC(void) bottleneck_solve(lmm_system_t sys);
*/
XBT_PUBLIC(void) lmm_set_default_protocol_function(double (*func_f)
*/
XBT_PUBLIC(void) lmm_set_default_protocol_function(double (*func_f)
-
-
-
-
-
-
- (lmm_variable_t var,
- double x),
+ (lmm_variable_t var, double x),
double (*func_fp)
double (*func_fp)
-
-
-
-
-
- (lmm_variable_t var,
- double x),
+ (lmm_variable_t var, double x),
double (*func_fpi)
double (*func_fpi)
-
-
-
-
-
- (lmm_variable_t var,
- double x));
+ (lmm_variable_t var, double x));
XBT_PUBLIC(double func_reno_f) (lmm_variable_t var, double x);
XBT_PUBLIC(double func_reno_fp) (lmm_variable_t var, double x);
XBT_PUBLIC(double func_reno_f) (lmm_variable_t var, double x);
XBT_PUBLIC(double func_reno_fp) (lmm_variable_t var, double x);