#include <sos2_constraint.h>
|
using | IdType = Sos2ConstraintId |
| The typed integer used for ids.
|
|
A value type that references a SOS2 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 sos2_constraint.h.
◆ IdType
◆ Sos2Constraint()
operations_research::math_opt::Sos2Constraint::Sos2Constraint |
( |
const ModelStorage * | storage, |
|
|
Sos2ConstraintId | id ) |
|
inline |
◆ Expression()
LinearExpression operations_research::math_opt::Sos2Constraint::Expression |
( |
int | index | ) |
const |
◆ has_weights()
bool operations_research::math_opt::Sos2Constraint::has_weights |
( |
| ) |
const |
|
inline |
◆ id()
int64_t operations_research::math_opt::Sos2Constraint::id |
( |
| ) |
const |
|
inline |
◆ name()
absl::string_view operations_research::math_opt::Sos2Constraint::name |
( |
| ) |
const |
|
inline |
◆ NonzeroVariables()
std::vector< Variable > operations_research::math_opt::Sos2Constraint::NonzeroVariables |
( |
| ) |
const |
|
inline |
All variables that appear in the SOS2 constraint with a nonzero coefficient in any of the expressions. Order is not defined.
Definition at line 113 of file sos2_constraint.h.
◆ num_expressions()
int64_t operations_research::math_opt::Sos2Constraint::num_expressions |
( |
| ) |
const |
|
inline |
◆ storage()
const ModelStorage * operations_research::math_opt::Sos2Constraint::storage |
( |
| ) |
const |
|
inline |
◆ ToString()
std::string operations_research::math_opt::Sos2Constraint::ToString |
( |
| ) |
const |
|
inline |
Returns a detailed string description of the contents of the constraint (not its name, use <<
for that instead).
Definition at line 141 of file sos2_constraint.h.
◆ typed_id()
Sos2ConstraintId operations_research::math_opt::Sos2Constraint::typed_id |
( |
| ) |
const |
|
inline |
◆ weight()
double operations_research::math_opt::Sos2Constraint::weight |
( |
int | index | ) |
const |
|
inline |
◆ AbslHashValue
◆ operator!=
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | ostr, |
|
|
const Sos2Constraint & | 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 130 of file sos2_constraint.h.
◆ operator==
The documentation for this class was generated from the following files: