OR-Tools  9.6
SosConstraintData< ConstraintId >

Detailed Description

template<typename ConstraintId>
class operations_research::math_opt::internal::SosConstraintData< ConstraintId >

Definition at line 43 of file sos/storage.h.

Classes

struct  LinearExpression
 

Public Types

using IdType = ConstraintId
 
using ProtoType = SosConstraintProto
 
using UpdatesProtoType = SosConstraintUpdatesProto
 

Public Member Functions

 SosConstraintData (std::vector< LinearExpression > expressions, std::vector< double > weights, std::string name)
 
ProtoType Proto () const
 
std::vector< VariableId > RelatedVariables () const
 
void DeleteVariable (VariableId var)
 
bool has_weights () const
 
double weight (const int index) const
 
const LinearExpressionexpression (const int index) const
 
int64_t num_expressions () const
 
const std::string & name () const
 

Static Public Member Functions

static SosConstraintData FromProto (const ProtoType &in_proto)
 

Member Typedef Documentation

◆ IdType

using IdType = ConstraintId

Definition at line 45 of file sos/storage.h.

◆ ProtoType

using ProtoType = SosConstraintProto

Definition at line 46 of file sos/storage.h.

◆ UpdatesProtoType

using UpdatesProtoType = SosConstraintUpdatesProto

Definition at line 47 of file sos/storage.h.

Constructor & Destructor Documentation

◆ SosConstraintData()

SosConstraintData ( std::vector< LinearExpression expressions,
std::vector< double >  weights,
std::string  name 
)
inline

Definition at line 61 of file sos/storage.h.

Member Function Documentation

◆ DeleteVariable()

void DeleteVariable ( VariableId  var)

Definition at line 184 of file sos/storage.h.

◆ expression()

const LinearExpression& expression ( const int  index) const
inline

Definition at line 83 of file sos/storage.h.

◆ FromProto()

SosConstraintData< ConstraintId > FromProto ( const ProtoType in_proto)
static

Definition at line 125 of file sos/storage.h.

◆ has_weights()

bool has_weights ( ) const
inline

Definition at line 77 of file sos/storage.h.

◆ name()

const std::string& name ( ) const
inline

Definition at line 88 of file sos/storage.h.

◆ num_expressions()

int64_t num_expressions ( ) const
inline

Definition at line 87 of file sos/storage.h.

◆ Proto()

SosConstraintData< ConstraintId >::ProtoType Proto

Definition at line 151 of file sos/storage.h.

◆ RelatedVariables()

std::vector< VariableId > RelatedVariables

Definition at line 172 of file sos/storage.h.

◆ weight()

double weight ( const int  index) const
inline

Definition at line 79 of file sos/storage.h.


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