OR-Tools  9.6
Sos1Constraint

Detailed Description

Definition at line 36 of file sos1_constraint.h.

Public Types

using IdType = Sos1ConstraintId
 

Public Member Functions

 Sos1Constraint (const ModelStorage *storage, Sos1ConstraintId id)
 
int64_t id () const
 
Sos1ConstraintId typed_id () const
 
const ModelStoragestorage () const
 
int64_t num_expressions () const
 
LinearExpression Expression (int index) const
 
bool has_weights () const
 
double weight (int index) const
 
absl::string_view name () const
 
std::vector< VariableNonzeroVariables () const
 
std::string ToString () const
 

Member Typedef Documentation

◆ IdType

using IdType = Sos1ConstraintId

Definition at line 39 of file sos1_constraint.h.

Constructor & Destructor Documentation

◆ Sos1Constraint()

Sos1Constraint ( const ModelStorage storage,
Sos1ConstraintId  id 
)
inline

Definition at line 149 of file sos1_constraint.h.

Member Function Documentation

◆ Expression()

LinearExpression Expression ( int  index) const

Definition at line 22 of file sos1_constraint.cc.

◆ has_weights()

bool has_weights ( ) const
inline

Definition at line 99 of file sos1_constraint.h.

◆ id()

int64_t id ( ) const
inline

Definition at line 89 of file sos1_constraint.h.

◆ name()

absl::string_view name ( ) const
inline

Definition at line 107 of file sos1_constraint.h.

◆ NonzeroVariables()

std::vector< Variable > NonzeroVariables ( ) const
inline

Definition at line 114 of file sos1_constraint.h.

◆ num_expressions()

int64_t num_expressions ( ) const
inline

Definition at line 95 of file sos1_constraint.h.

◆ storage()

const ModelStorage * storage ( ) const
inline

Definition at line 93 of file sos1_constraint.h.

◆ ToString()

std::string ToString ( ) const
inline

Definition at line 142 of file sos1_constraint.h.

◆ typed_id()

Sos1ConstraintId typed_id ( ) const
inline

Definition at line 91 of file sos1_constraint.h.

◆ weight()

double weight ( int  index) const
inline

Definition at line 103 of file sos1_constraint.h.


The documentation for this class was generated from the following files: