8.5.9. MDOPsdConstr¶
-
class MDOPsdConstr¶
Represent a PSD constraint in MindOpt application.
Methods
Retrieve a PSD constraint-owned double attribute value by its name
Retrieve a PSD constraint-owned string attribute value by its name
Retrieve the index of this PSD constraint
Test if this PSD constraint is the same as another
Set the value of a PSD constraint-owned double attribute
Set the value of a PSD constraint-owned string attribute
-
double get(MDO_DoubleAttr attr)¶
Retrieve a PSD constraint-owned double attribute value by its name.
- Parameters
MDO_DoubleAttr attr – The attribute name.
- Returns
The attribute value.
-
std::string get(MDO_StringAttr attr)¶
Retrieve a PSD constraint-owned string attribute value by its name.
- Parameters
MDO_StringAttr attr – The attribute name.
- Returns
The attribute value.
-
int index()¶
Retrieve the index of this PSD constraint.
- Returns
The index of this PSD constraint.
-
bool sameAs(MDOPsdConstr c2)¶
Test if this PSD constraint is the same as another.
- Parameters
MDOPsdConstr c2 – The PSD constraint to be compared.
- Returns
True if these two are the same
-
void set(MDO_DoubleAttr attr, double value)¶
Set the value of a PSD constraint-owned double attribute.
- Parameters
MDO_DoubleAttr attr – The attribute name.
double value – The new value to be set.
-
void set(MDO_StringAttr attr, const std::string &value)¶
Set the value of a PSD constraint-owned string attribute.
- Parameters
MDO_StringAttr attr – The attribute name.
const std::string& value – The new value to be set.
-
double get(MDO_DoubleAttr attr)¶