8.5.8. MDOPsdVar¶
-
class MDOPsdVar¶
在MindOpt应用程序中表示PSD变量
方法
通过其名称检索PSD变量拥有的int属性值
按其名称检索PSD变量拥有的字符串属性值
通过其名称检索PSD变量拥有的矩阵属性值
检索该PSD变量的索引
测试该PSD变量是否与另一个相同
设置PSD变量拥有的int属性的值
设置PSD变量拥有的字符串属性的值
设置PSD变量拥有的矩阵属性的值
-
int get(MDO_IntAttr attr)¶
通过其名称检索PSD变量拥有的int属性值
- 参数
MDO_IntAttr attr – 属性名称
- 返回
属性值
-
std::string get(MDO_StringAttr attr)¶
按其名称检索PSD变量拥有的字符串属性值
- 参数
MDO_StringAttr attr – 属性名称
- 返回
属性值
-
int index()¶
检索该PSD变量的索引
- 返回
该PSD变量的索引
-
void set(MDO_IntAttr attr, int value)¶
设置PSD变量拥有的int属性的值
- 参数
MDO_IntAttr attr – 属性名称
int value – 要设置的新值
-
void set(MDO_StringAttr attr, const std::string &value)¶
设置PSD变量拥有的字符串属性的值
- 参数
MDO_StringAttr attr – 属性名称
const std::string& value – 要设置的新值
-
int get(MDO_IntAttr attr)¶