Loading...
Searching...
No Matches
idol::SOSCtr Class Reference

Description

Definition at line 28 of file SOSCtr.h.

Public Methods

 SOSCtr (Env &t_env, bool t_is_sos1, std::vector< Var > t_vars, std::vector< double > t_weights, std::string t_name="")
unsigned int index (const Model &t_index) const
const std::string & name () const
unsigned int id () const
bool is_in (const Model &t_model) const
const ValueT & get (const Annotation< ValueT > &t_annotation) const
void set (const Annotation< ValueT > &t_annotation, ArgsT &&...t_args) const

Public Static Methods

static SOSCtr SOS1 (Env &t_env, std::vector< Var > t_vars, std::vector< double > t_weights, std::string t_name="")
static SOSCtr SOS2 (Env &t_env, std::vector< Var > t_vars, std::vector< double > t_weights, std::string t_name="")

Protected Methods

auto & versions ()
void create_version (const Model &t_model, unsigned int t_index, ArgsT &&...t_args) const
void remove_version (const Model &t_model) const

Friends

class impl::Env

Methods Documentation

◆ create_version()

void idol::Object< SOSCtrVersion, SOSCtr >::create_version ( const Model & t_model,
unsigned int t_index,
ArgsT &&... t_args ) const
inlineprotectedinherited

Definition at line 34 of file Object.h.

◆ get()

const ValueT & idol::Object< SOSCtrVersion, SOSCtr >::get ( const Annotation< ValueT > & t_annotation) const
inlineinherited

Returns the value of the given annotation t_annotation associated to the object.

If no value is found, the default value of the annotation is returned. If no default value was set, an exception is thrown.

Template Parameters
ValueTThe value type of the annotation.
Parameters
t_annotationThe annotation.
Returns
The value of the annotation.

Definition at line 78 of file Object.h.

◆ id()

unsigned int idol::Object< SOSCtrVersion, SOSCtr >::id ( ) const
inlinenodiscardinherited

Returns the id of the optimization object.

Returns
The id of the optimization object.

Definition at line 60 of file Object.h.

◆ is_in()

bool idol::Object< SOSCtrVersion, SOSCtr >::is_in ( const Model & t_model) const
inlinenodiscardinherited

Returns true if the optimization object is part of the model t_model, false otherwise.

Parameters
t_modelThe model.
Returns
True if the optimization object is part of the model t_model, false otherwise.

Definition at line 67 of file Object.h.

◆ name()

const std::string & idol::Object< SOSCtrVersion, SOSCtr >::name ( ) const
inlinenodiscardinherited

Returns the name of the optimization object.

Returns
The name of the optimization object.

Definition at line 54 of file Object.h.

◆ remove_version()

void idol::Object< SOSCtrVersion, SOSCtr >::remove_version ( const Model & t_model) const
inlineprotectedinherited

Definition at line 38 of file Object.h.

◆ set()

void idol::Object< SOSCtrVersion, SOSCtr >::set ( const Annotation< ValueT > & t_annotation,
ArgsT &&... t_args ) const
inlineinherited

Sets the value of the given annotation t_annotation associated to the object.

Template Parameters
ValueTThe value type of the annotation.
ArgsTThe parameter pack types for constructing the value of the annotation.
Parameters
t_annotationThe annotation.
t_argsThe parameter pack arguments used to construct "in place" the value of the annotation.

Definition at line 96 of file Object.h.

◆ SOS1()

SOSCtr idol::SOSCtr::SOS1 ( Env & t_env,
std::vector< Var > t_vars,
std::vector< double > t_weights,
std::string t_name = "" )
inlinestatic

Definition at line 33 of file SOSCtr.h.

◆ SOS2()

SOSCtr idol::SOSCtr::SOS2 ( Env & t_env,
std::vector< Var > t_vars,
std::vector< double > t_weights,
std::string t_name = "" )
inlinestatic

Definition at line 37 of file SOSCtr.h.

◆ versions()

auto & idol::Object< SOSCtrVersion, SOSCtr >::versions ( )
inlinenodiscardprotectedinherited

Definition at line 29 of file Object.h.

◆ impl::Env

friend class impl::Env
friend

Definition at line 29 of file SOSCtr.h.