Lines Matching refs:summands

103  * objective function summands and variables.
199 SummandList* summands = constraint->LeftSide();
200 for (int j = 0; j < summands->CountItems(); j++) {
201 Summand* summand = summands->ItemAt(j);
344 // the summands have changed, update the var ref count
396 LinearSpec::AddConstraint(SummandList* summands, OperatorType op,
399 return _AddConstraint(summands, op, rightSide, penaltyNeg, penaltyPos);
417 SummandList* summands = new(std::nothrow) SummandList(1);
418 if (!summands)
420 summands->AddItem(new(std::nothrow) Summand(coeff1, var1));
421 if (!_CheckSummandList(summands))
423 return _AddConstraint(summands, op, rightSide, penaltyNeg, penaltyPos);
428 * Adds a new soft linear constraint to the specification with two summands.
444 SummandList* summands = new(std::nothrow) SummandList(2);
445 if (!summands)
447 summands->AddItem(new(std::nothrow) Summand(coeff1, var1));
448 summands->AddItem(new(std::nothrow) Summand(coeff2, var2));
449 if (!_CheckSummandList(summands))
451 return _AddConstraint(summands, op, rightSide, penaltyNeg, penaltyPos);
456 * Adds a new soft linear constraint to the specification with three summands.
474 SummandList* summands = new(std::nothrow) SummandList(2);
475 if (!summands)
477 summands->AddItem(new(std::nothrow) Summand(coeff1, var1));
478 summands->AddItem(new(std::nothrow) Summand(coeff2, var2));
479 summands->AddItem(new(std::nothrow) Summand(coeff3, var3));
480 if (!_CheckSummandList(summands))
482 return _AddConstraint(summands, op, rightSide, penaltyNeg, penaltyPos);
487 * Adds a new soft linear constraint to the specification with four summands.
508 SummandList* summands = new(std::nothrow) SummandList(2);
509 if (!summands)
511 summands->AddItem(new(std::nothrow) Summand(coeff1, var1));
512 summands->AddItem(new(std::nothrow) Summand(coeff2, var2));
513 summands->AddItem(new(std::nothrow) Summand(coeff3, var3));
514 summands->AddItem(new(std::nothrow) Summand(coeff4, var4));
515 if (!_CheckSummandList(summands))
517 return _AddConstraint(summands, op, rightSide, penaltyNeg, penaltyPos);