本文整理汇总了C++中OutputVariable::isLockingValidOutput方法的典型用法代码示例。如果您正苦于以下问题:C++ OutputVariable::isLockingValidOutput方法的具体用法?C++ OutputVariable::isLockingValidOutput怎么用?C++ OutputVariable::isLockingValidOutput使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OutputVariable
的用法示例。
在下文中一共展示了OutputVariable::isLockingValidOutput方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: reloadModel
void Variable::reloadModel() {
if (ui->btn_sort_centroid->isChecked()) {
variable->sort();
}
ui->lvw_terms->clear();
for (int i = 0; i < variable->numberOfTerms(); ++i) {
fl::Term* term = variable->getTerm(i);
std::string text = term->getName() + " " + term->className()
+ " " + term->parameters();
QListWidgetItem* item = new QListWidgetItem;
item->setText(QString::fromStdString(text));
item->setToolTip(QString::fromStdString(text));
ui->lvw_terms->addItem(item);
}
OutputVariable* outputVariable = dynamic_cast<OutputVariable*> (variable);
if (outputVariable) {
ui->led_default->setText(QString::number(outputVariable->getDefaultValue()));
ui->chx_lock_range->setChecked(outputVariable->isLockingOutputRange());
ui->chx_lock_valid->setChecked(outputVariable->isLockingValidOutput());
if (outputVariable->fuzzyOutput()->getAccumulation()) {
ui->cbx_accumulation->setCurrentIndex(
ui->cbx_accumulation->findText(
QString::fromStdString(
outputVariable->fuzzyOutput()->getAccumulation()->className())));
} else {
ui->cbx_accumulation->setCurrentIndex(-1);
}
if (outputVariable->getDefuzzifier()) {
ui->cbx_defuzzifier->setCurrentIndex(
ui->cbx_defuzzifier->findText(
QString::fromStdString(
outputVariable->getDefuzzifier()->className())));
IntegralDefuzzifier* integralDefuzzifier =
dynamic_cast<IntegralDefuzzifier*> (outputVariable->getDefuzzifier());
if (integralDefuzzifier) {
ui->sbx_accuracy->setValue(integralDefuzzifier->getResolution());
}
} else {
ui->cbx_defuzzifier->setCurrentIndex(-1);
}
}
scalar minimum = variable->getMinimum();
scalar maximum = variable->getMaximum();
ui->sbx_min->setValue(minimum);
ui->sbx_max->setValue(maximum);
ui->btn_term_down->setEnabled(not ui->btn_sort_centroid->isChecked()
and ui->lvw_terms->selectedItems().size() > 0);
ui->btn_term_up->setEnabled(not ui->btn_sort_centroid->isChecked()
and ui->lvw_terms->selectedItems().size() > 0);
redraw();
}