#include <sos1_constraint.h>
|
using | IdType = Sos1ConstraintId |
| The typed integer used for ids.
|
|
A value type that references a SOS1 constraint from ModelStorage. Usually this type is passed by copy.
This type implements https://abseil.io/docs/cpp/guides/hash.
Definition at line 37 of file sos1_constraint.h.
◆ IdType
◆ Sos1Constraint()
operations_research::math_opt::Sos1Constraint::Sos1Constraint |
( |
const ModelStorage * | storage, |
|
|
Sos1ConstraintId | id ) |
|
inline |
◆ Expression()
LinearExpression operations_research::math_opt::Sos1Constraint::Expression |
( |
int | index | ) |
const |
◆ has_weights()
bool operations_research::math_opt::Sos1Constraint::has_weights |
( |
| ) |
const |
|
inline |
◆ id()
int64_t operations_research::math_opt::Sos1Constraint::id |
( |
| ) |
const |
|
inline |
◆ name()
absl::string_view operations_research::math_opt::Sos1Constraint::name |
( |
| ) |
const |
|
inline |
◆ NonzeroVariables()
std::vector< Variable > operations_research::math_opt::Sos1Constraint::NonzeroVariables |
( |
| ) |
const |
|
inline |
All variables that appear in the SOS1 constraint with a nonzero coefficient in any of the expressions. Order is not defined.
Definition at line 112 of file sos1_constraint.h.
◆ num_expressions()
int64_t operations_research::math_opt::Sos1Constraint::num_expressions |
( |
| ) |
const |
|
inline |
◆ storage()
const ModelStorage * operations_research::math_opt::Sos1Constraint::storage |
( |
| ) |
const |
|
inline |
◆ ToString()
std::string operations_research::math_opt::Sos1Constraint::ToString |
( |
| ) |
const |
|
inline |
Returns a detailed string description of the constraint.
Definition at line 140 of file sos1_constraint.h.
◆ typed_id()
Sos1ConstraintId operations_research::math_opt::Sos1Constraint::typed_id |
( |
| ) |
const |
|
inline |
◆ weight()
double operations_research::math_opt::Sos1Constraint::weight |
( |
int | index | ) |
const |
|
inline |
◆ AbslHashValue
◆ operator!=
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | ostr, |
|
|
const Sos1Constraint & | constraint ) |
|
friend |
Streams the name of the constraint, as registered upon constraint creation, or a short default if none was provided.
- Todo
- (b/170992529): handle quoting of invalid characters in the name.
Definition at line 129 of file sos1_constraint.h.
◆ operator==
The documentation for this class was generated from the following files: