18#ifndef OR_TOOLS_MATH_OPT_CONSTRAINTS_QUADRATIC_QUADRATIC_CONSTRAINT_H_
19#define OR_TOOLS_MATH_OPT_CONSTRAINTS_QUADRATIC_QUADRATIC_CONSTRAINT_H_
25#include "absl/log/check.h"
26#include "absl/strings/string_view.h"
42 QuadraticConstraint> {
48 inline absl::string_view
name()
const;
118 .linear_terms.get(variable.typed_id());
129 .quadratic_terms.get(first_variable.
typed_id(),
141 std::stringstream str;
ModelStorageElement(ModelStorageCPtr storage, IdType id)
ModelStorageCPtr storage() const
bool is_quadratic_coefficient_nonzero(Variable first_variable, Variable second_variable) const
absl::string_view name() const
double quadratic_coefficient(Variable first_variable, Variable second_variable) const
double upper_bound() const
double linear_coefficient(Variable variable) const
std::string ToString() const
double lower_bound() const
std::vector< Variable > NonzeroVariables() const
ModelStorageElement(ModelStorageCPtr storage, IdType id)
bool is_linear_coefficient_nonzero(Variable variable) const
BoundedQuadraticExpression AsBoundedQuadraticExpression() const
constexpr absl::string_view kObjectsFromOtherModelStorage
An object oriented wrapper for quadratic constraints in ModelStorage.
constexpr absl::string_view kDeletedConstraintDefaultDescription
std::vector< Variable > AtomicConstraintNonzeroVariables(const ModelStorage &storage, const IdType id)
A QuadraticExpression with upper and lower bounds.