OR-Tools  9.3
sat/linear_constraint.h File Reference

Go to the source code of this file.

Classes

struct  LinearConstraint
 
struct  LinearExpression
 
class  LinearConstraintBuilder
 

Namespaces

namespace  operations_research
 Collection of objects used to extend the Constraint Solver library.
 
namespace  operations_research::sat
 

Functions

std::ostream & operator<< (std::ostream &os, const LinearConstraint &ct)
 
LinearExpression CanonicalizeExpr (const LinearExpression &expr)
 
IntegerValue LinExprLowerBound (const LinearExpression &expr, const IntegerTrail &integer_trail)
 
IntegerValue LinExprUpperBound (const LinearExpression &expr, const IntegerTrail &integer_trail)
 
bool ValidateLinearConstraintForOverflow (const LinearConstraint &constraint, const IntegerTrail &integer_trail)
 
LinearExpression NegationOf (const LinearExpression &expr)
 
LinearExpression PositiveVarExpr (const LinearExpression &expr)
 
IntegerValue GetCoefficient (const IntegerVariable var, const LinearExpression &expr)
 
IntegerValue GetCoefficientOfPositiveVar (const IntegerVariable var, const LinearExpression &expr)
 
double ComputeActivity (const LinearConstraint &constraint, const absl::StrongVector< IntegerVariable, double > &values)
 
double ComputeL2Norm (const LinearConstraint &constraint)
 
IntegerValue ComputeInfinityNorm (const LinearConstraint &constraint)
 
double ScalarProduct (const LinearConstraint &constraint1, const LinearConstraint &constraint2)
 
void DivideByGCD (LinearConstraint *constraint)
 
void RemoveZeroTerms (LinearConstraint *constraint)
 
void MakeAllCoefficientsPositive (LinearConstraint *constraint)
 
void MakeAllVariablesPositive (LinearConstraint *constraint)
 
void CanonicalizeConstraint (LinearConstraint *ct)
 
bool NoDuplicateVariable (const LinearConstraint &ct)
 
template<class ClassWithVarsAndCoeffs >
void CleanTermsAndFillConstraint (std::vector< std::pair< IntegerVariable, IntegerValue > > *terms, ClassWithVarsAndCoeffs *output)