AddConstraint
bool AddConstraint(Constraint* constraint);
Constraint* AddConstraint(double coeff1, Variable* var1,
Constraint* AddConstraint(double coeff1, Variable* var1,
Constraint* AddConstraint(double coeff1, Variable* var1,
Constraint* AddConstraint(double coeff1, Variable* var1,
bool AddConstraint(Constraint* constraint);
Constraint* AddConstraint(SummandList* summands,
Constraint* AddConstraint(double coeff1, Variable* var1,
Constraint* AddConstraint(double coeff1, Variable* var1,
Constraint* AddConstraint(double coeff1, Variable* var1,
Constraint* AddConstraint(double coeff1, Variable* var1,
bool AddConstraint(Constraint* constraint,
bool AddConstraint(Constraint* constraint,
success = fOptimizer->AddConstraint(constraint->start - 1,
success |= fOptimizer->AddConstraint(
success |= fOptimizer->AddConstraint(constraint->end,
if (!AddConstraint(constraint->left, constraint->right,
if (!AddConstraint(-1, fVariableCount - 1, size, true))
bool AddConstraint(int32 left, int32 right,
return Solver()->AddConstraint(constraint);
Constraint* constraint = Solver()->AddConstraint(coeff1, var1, op,
Constraint* constraint = Solver()->AddConstraint(coeff1, var1, coeff2, var2,
Constraint* constraint = Solver()->AddConstraint(coeff1, var1, coeff2, var2,
Constraint* constraint = Solver()->AddConstraint(coeff1, var1, coeff2, var2,
fContentAspectRatioC = fLS->AddConstraint(-1.0, fLeft, 1.0, fRight,
return fLS->AddConstraint(-1.0, fLeft, 1.0, fRight, factor, area->Left(),
return fLS->AddConstraint(-1.0, fTop, 1.0, fBottom, factor, area->Top(),
fMinContentWidth = ls->AddConstraint(-1.0, fLeft, 1.0, fRight, kGE, 0);
fMinContentHeight = ls->AddConstraint(-1.0, fTop, 1.0, fBottom, kGE, 0);
fMaxContentHeight = fLS->AddConstraint(-1.0, fTop, 1.0, fBottom,
fMaxContentWidth = fLS->AddConstraint(-1.0, fLeft, 1.0, fRight, kLE,
row->fPrefSizeConstraint = fLinearSpec->AddConstraint(1,
column->fPrefSizeConstraint = fLinearSpec->AddConstraint(1,
if (fLinearSpec.AddConstraint(summandList, (OperatorType)op, rightSide,
return spec->AddConstraint(1, var, kEQ, 0, 5, 5);
return spec->AddConstraint(1, var, kEQ, kHugeValue, 5, 5);
Constraint* helperConst = fLinearSpec->AddConstraint(1, variable,
constraintGE = fLinearSpec->AddConstraint(1, variable, kGE, 0);
constraintLE = fLinearSpec->AddConstraint(1, variable, kLE, 20000);
if (AddConstraint(constraint, false) == false)
return AddConstraint(constraint, true);
return fLinearSpec->AddConstraint(constraint, notifyListener);
if (!AddConstraint(constraint)) {
return fLS->AddConstraint(1.0, this, -1.0, var, kEQ, 0.0);
return fLS->AddConstraint(1.0, this, -1.0, var, kLE, 0.0);
return fLS->AddConstraint(-1.0, var, 1.0, this, kGE, 0.0);
return fLS->AddConstraint(1.0, this, -1.0, var, kEQ, 0.0,
return fLS->AddConstraint(1.0, this, -1.0, var, kLE, 0.0, penaltyNeg,
return fLS->AddConstraint(-1.0, var, 1.0, this, kGE, 0.0, penaltyNeg,
Constraint* leftConstraint = linearSpec->AddConstraint(1.0, LeftVar(),
Constraint* topConstraint = linearSpec->AddConstraint(1.0, TopVar(), kEQ,
fMinWidthConstraint = linearSpec->AddConstraint(1.0, RightVar(), -1.0,
fMinHeightConstraint = linearSpec->AddConstraint(1.0, BottomVar(), -1.0,
fMaxWidthConstraint = linearSpec->AddConstraint(1.0, RightVar(), -1.0,
fMaxHeightConstraint = linearSpec->AddConstraint(1.0, BottomVar(), -1.0,
fWidthConstraint = linearSpec->AddConstraint(1.0, RightVar(), -1.0,
fHeightConstraint = linearSpec->AddConstraint(-1.0, TopVar(), 1.0,
fLayout2->Solver()->AddConstraint(-1.0f, layout1->Left(), 1.0f, xTabs[0],
layout->Solver()->AddConstraint(2, layout->TopOf(menu1), -1,
Constraint* c1 = ls.AddConstraint(1.0, x1, OperatorType(kLE), 108);
Constraint* c2 = ls.AddConstraint(1.0, x2, OperatorType(kGE), 113);
c2 = ls.AddConstraint(1.0, x2, OperatorType(kGE), 113);
Constraint* c1 = ls.AddConstraint(1, x1, kEQ, 0);
Constraint* c2 = ls.AddConstraint(1, x1, -1, x2, kLE, 0);
Constraint* c3 = ls.AddConstraint(1, x2, -1, x3, kLE, 0);
Constraint* c4 = ls.AddConstraint(1, x3, -1, x1, kEQ, 20);
Constraint* c5 = ls.AddConstraint(1, x2, -1, x1, kEQ, 10, 5, 5);
Constraint* c6 = ls.AddConstraint(1, x3, -1, x2, kEQ, 5, 5, 5);
Constraint* c1 = ls.AddConstraint(1, x1, kEQ, 0);
Constraint* c2 = ls.AddConstraint(1, x1, -1, x2, kLE, 0);
Constraint* c3 = ls.AddConstraint(1, x2, -1, x3, kLE, 0);
Constraint* c4 = ls.AddConstraint(1, x3, -1, x1, kEQ, 20);
Constraint* c5 = ls.AddConstraint(1, x2, -1, x1, kEQ, 15, 5, 5);
Constraint* c6 = ls.AddConstraint(1, x3, -1, x2, kGE, 10, 5000, 5);