#include <vector>
namespace simgrid {
-namespace surf {
+namespace kernel {
+namespace lmm {
/** @addtogroup SURF_lmm
* @details
* Then, it is used to list all variables involved in constraint through constraint's xxx_element_set lists, or
* vice-versa list all constraints for a given variable.
*/
-XBT_PUBLIC_CLASS s_lmm_element_t {
+XBT_PUBLIC_CLASS s_lmm_element_t
+{
public:
int get_concurrency() const;
void decrease_concurrency();
* \li Active elements which variable's weight is non-zero (i.e. it is enabled) AND its element value is non-zero.
* LMM_solve iterates over active elements during resolution, dynamically making them active or unactive.
*/
-XBT_PUBLIC_CLASS s_lmm_constraint_t {
+XBT_PUBLIC_CLASS s_lmm_constraint_t
+{
public:
s_lmm_constraint_t() = default;
s_lmm_constraint_t(void* id_value, double bound_value);
* @param elem A element of constraint of the constraint or NULL
* @return A variable associated to a constraint
*/
- lmm_variable_t get_variable(lmm_element_t* elem) const;
+ lmm_variable_t get_variable(lmm_element_t * elem) const;
/**
* @brief Get a var associated to a constraint
* @param numelem parameter representing the number of elements to go
* @return A variable associated to a constraint
*/
- lmm_variable_t get_variable_safe(lmm_element_t* elem, lmm_element_t* nextelem, int* numelem) const;
+ lmm_variable_t get_variable_safe(lmm_element_t * elem, lmm_element_t * nextelem, int* numelem) const;
/**
* @brief Get the data associated to a constraint
* When something prevents us from enabling a variable, we "stage" the weight that we would have like to set, so that as
* soon as possible we enable the variable with desired weight
*/
-XBT_PUBLIC_CLASS s_lmm_variable_t {
+XBT_PUBLIC_CLASS s_lmm_variable_t
+{
public:
- void initialize(simgrid::surf::Action* id_value, double sharing_weight_value, double bound_value,
+ void initialize(simgrid::surf::Action * id_value, double sharing_weight_value, double bound_value,
int number_of_constraints, unsigned visited_value);
/**
/* \begin{For Lagrange only} */
double mu;
double new_mu;
- double (*func_f)(s_lmm_variable_t* var, double x); /* (f) */
- double (*func_fp)(s_lmm_variable_t* var, double x); /* (f') */
- double (*func_fpi)(s_lmm_variable_t* var, double x); /* (f')^{-1} */
+ double (*func_f)(s_lmm_variable_t * var, double x); /* (f) */
+ double (*func_fp)(s_lmm_variable_t * var, double x); /* (f') */
+ double (*func_fpi)(s_lmm_variable_t * var, double x); /* (f')^{-1} */
/* \end{For Lagrange only} */
private:
/**
* @brief LMM system
*/
-XBT_PUBLIC_CLASS s_lmm_system_t {
+XBT_PUBLIC_CLASS s_lmm_system_t
+{
public:
/**
* @brief Create a new Linear MaxMim system
* @param bound The maximum value of the variable (-1.0 if no maximum value)
* @param number_of_constraints The maximum number of constraint to associate to the variable
*/
- lmm_variable_t variable_new(simgrid::surf::Action* id, double weight_value, double bound, int number_of_constraints);
+ lmm_variable_t variable_new(simgrid::surf::Action * id, double weight_value, double bound, int number_of_constraints);
/**
* @brief Free a variable
/** @} */
}
}
+}
#endif