LProgramVariable— Variable of a LProgram.
struct LProgramVariable_ { //@args LProgramVariableType type, const char *name short_LProgramVariableType TYPE; // This LProgramVariable type. short_LProgramVariableFlags FLAGS; // This LProgramVariable flags. //@access hasLower ((LProgramVariable_FLAGS(this) & LProgramVariableFlag_Lower) != 0) //@access hasUpper ((LProgramVariable_FLAGS(this) & LProgramVariableFlag_Upper) != 0) //@access hasValue ((LProgramVariable_FLAGS(this) & LProgramVariableFlag_Value) != 0) const char *NAME; // User name for this LProgramVariable. LProgramValue LOWER; // Lower bound of this LProgramVariable. LProgramValue UPPER; // Upper bound of this LProgramVariable. LProgramValue VALUE; // Value of this LProgramVariable. LProgramValue WEIGHT; // Weight of this LProgramVariable in objective. int32_t INDEX; };
LProgramVariable_name— This LProgramVariable name.
static inline const char * LProgramVariable_name(const_LProgramVariable this) { return LProgramVariable_NAME(this); }
LProgramVariable_setType— lower (resp. upper) bound set to 0 (resp. 1) if type is LProgramVariableType_Binary
static inline void LProgramVariable_setType(LProgramVariable this, LProgramVariableType type) { *LProgramVariable__TYPE(this) = type; if (type == LProgramVariableType_Binary) { *LProgramVariable__LOWER(this) = (LProgramValue)0; *LProgramVariable__UPPER(this) = (LProgramValue)1; } }
LProgramVariable_setFlags --
static inline void LProgramVariable_setFlags(LProgramVariable this, LProgramVariableFlags flags) { *LProgramVariable__FLAGS(this) |= flags; }
LProgramVariable_lower— This LProgramVariable lower bound.
static inline LProgramValue LProgramVariable_lower(const_LProgramVariable this) { return LProgramVariable_LOWER(this); }
LProgramVariable_setLower— Set this LProgramVariable lower bound.
static inline void LProgramVariable_setLower(LProgramVariable this, LProgramValue lower) { *LProgramVariable__FLAGS(this) |= LProgramVariableFlag_Lower; *LProgramVariable__LOWER(this) = lower; }
LProgramVariable_upper— This LProgramVariable upper bound.
static inline LProgramValue LProgramVariable_upper(const_LProgramVariable this) { return LProgramVariable_UPPER(this); }
LProgramVariable_setUpper— Set this LProgramVariable upper bound.
static inline void LProgramVariable_setUpper(LProgramVariable this, LProgramValue upper) { *LProgramVariable__FLAGS(this) |= LProgramVariableFlag_Upper; *LProgramVariable__UPPER(this) = upper; }
LProgramVariable_value— This LProgramVariable value.
static inline LProgramValue LProgramVariable_value(const_LProgramVariable this) { return LProgramVariable_VALUE(this); }
LProgramVariable_setValue— Set this LProgramVariable value.
static inline void LProgramVariable_setValue(LProgramVariable this, LProgramValue value) { *LProgramVariable__FLAGS(this) |= LProgramVariableFlag_Value; *LProgramVariable__VALUE(this) = value; }
LProgramVariable_weight— This LProgramVariable weight.
static inline LProgramValue LProgramVariable_weight(const_LProgramVariable this) { return LProgramVariable_WEIGHT(this); }
LProgramVariable_setValue— Set this LProgramVariable weight.
static inline void LProgramVariable_setWeight(LProgramVariable this, LProgramValue weight) { *LProgramVariable__WEIGHT(this) = weight; }
LProgramTerm— Term of a LProgram.
struct LProgramTerm_ { //@args LProgramVariable variable, LProgramValue factor LProgramVariable VARIABLE; LProgramValue FACTOR; };
LProgramTerm_variable
static inline LProgramVariable LProgramTerm_variable(LProgramTerm this) { return LProgramTerm_VARIABLE(this); }
LProgramTerm_factor
static inline LProgramValue LProgramTerm_factor(LProgramTerm this) { return LProgramTerm_FACTOR(this); }
LProgramConstraint— Constraint of a LProgram.
struct LProgramConstraint_;
LProgramConstraint_terms— For use by LProgramConstraint_FOREACH_LProgramTerm.
const_IStack LProgramConstraint_terms(const_LProgramConstraint this);
LProgramConstraint_FOREACH_LProgramTerm— Iterate over this LProgramConstraint LProgramTerms.
#define LProgramConstraint_FOREACH_LProgramTerm(this, term) \ IStack_FOREACH(LProgramConstraint_terms(this), LProgramTerm_, term) #define LProgramConstraint_ENDEACH_LProgramTerm \ IStack_ENDEACH;
LProgramConstraint_name— This LProgramConstraint name.
const char * LProgramConstraint_name(const_LProgramConstraint this);
LProgramConstraint_setBound— Set this LProgramConstraint bound.
void LProgramConstraint_setBound(LProgramConstraint this, LProgramValue bound);
LProgramConstraint_accessTerm— Access a LProgramTerm of this LProgramConstraint from a LProgramVariable.
LProgramTerm LProgramConstraint_accessTerm(const_LProgramConstraint this, const_LProgramVariable variable);
LProgramConstraint_addTerm— Add a term to this LProgramConstraint.
void LProgramConstraint_addTerm(LProgramConstraint this, LProgramVariable variable, LProgramValue factor);
LProgram— LProgram representation.
struct LProgram_;
LProgram_type
LProgramType LProgram_type(const_LProgram this);
LProgram_variables— For use by LProgram_FOREACH_LProgramVariable.
const_IDList LProgram_variables(const_LProgram this);
LProgram_variablesCount— Number of variables in a LProgram
int32_t LProgram_variableCount(const_LProgram this);
LProgram_FOREACH_LProgramVariable— Iterate over this LProgram LProgramVariables.
#define LProgram_FOREACH_LProgramVariable(this, variable) \ IDList_FOREACH(LProgram_variables(this), LProgramVariable_, variable) #define LProgram_ENDEACH_LProgramVariable \ IDList_ENDEACH;
LProgram_constraints— For use by LProgram_FOREACH_LProgramConstraint.
const_IDList LProgram_constraints(const_LProgram this);
LProgram_FOREACH_LProgramConstraint— Iterate over this LProgram LProgramConstraints.
#define LProgram_FOREACH_LProgramConstraint(this, constraint) \ IDList_FOREACH(LProgram_constraints(this), LProgramConstraint_, constraint) #define LProgram_ENDEACH_LProgramConstraint \ IDList_ENDEACH;
LProgram_solution— LProgramValue LProgram_solution(const_LProgram this);
LProgram_makeVariable— Make a new LProgramVariable for this LProgram.
LProgramVariable LProgram_makeVariable(LProgram this, LProgramVariableType type, const char *name); #define LProgram_makeContinuousVariable(this, name) \ LProgram_makeVariable(this, LProgramVariableType_Continuous, name) #define LProgram_makeIntegerVariable(this, name) \ LProgram_makeVariable(this, LProgramVariableType_Integer, name) #define LProgram_makeBinaryVariable(this, name) \ LProgram_makeVariable(this, LProgramVariableType_Binary, name)
LProgram_makeConstraint— Make a new LProgramConstraint for this LProgram.
LProgramConstraint LProgram_makeConstraint(LProgram this, LProgramConstraintType type, LProgramValue bound, const char *name); #define LProgram_makeLEConstraint(this, bound, name) \ LProgram_makeConstraint(this, LProgramConstraintType_LE, bound, name) #define LProgram_makeGEConstraint(this, bound, name) \ LProgram_makeConstraint(this, LProgramConstraintType_GE, bound, name) #define LProgram_makeEQConstraint(this, bound, name) \ LProgram_makeConstraint(this, LProgramConstraintType_EQ, bound, name)
LProgram_killConstraint— Kill a LProgramConstraint of this LProgram.
void LProgram_killConstraint(LProgram this, LProgramConstraint constraint);
LProgram_enterVariable— Enter a LProgramVariable in this LProgram for keyed access.
LProgramVariable LProgram_enterVariable(LProgram this, LProgramVariable variable, const void *key);
LProgram_accessVariable— Access a LProgramVariable in this LProgram from its key.
LProgramVariable LProgram_accessVariable(LProgram this, const void *key);