SamplingAlgorithmOptions_Impl::SamplingAlgorithmOptions_Impl() : DakotaAlgorithmOptions_Impl() { saveOption(Attribute("samples",5)); saveOption(Attribute("allVariables",false)); saveOption(Attribute("varianceBasedDecomp",false)); saveOption(Attribute("dropTolerance",false)); saveOption(Attribute("fixedSeed",false)); setSeed(std::max<int>(rand(),1)); }
void optionStateClass::setNewSizeWindow() { saveOption(); adaptSizeChar(); global::window.create(sf::VideoMode(global::sizeWindow.x, global::sizeWindow.y), global::windowName, sf::Style::Titlebar | sf::Style::Close | (global::isFullScreen ? sf::Style::Fullscreen : sf::Style::None)); global::gameStateStack.set(new optionStateClass); }
GameScene::~GameScene() { saveOption(); //临时的 saveSettings(); backPackBar->savePocketData(); world->autoSave(); delete blockTexture; delete blockVertexShader; delete blockFragmentShader; delete blockProgram; delete lineVertexShader; delete lineFragmentShader; delete lineProgram; delete camera; wThread->quit(); wThread->wait(); delete wThread; delete line; delete lineQua; delete dataPanel; delete backPackBar; delete messagePanel; delete opWidgetProxy; }
void ParameterStudyAlgorithmOptions_Impl::setListOfPoints(const std::vector<double>& value) { Attribute option = createAttributeFromVector("listOfPoints",value); if (OptionalAttribute currentOption = getOption("listOfPoints")) { currentOption->setValue(option.valueAsAttributeVector()); } else { saveOption(option); } }
void DDACEAlgorithmOptions_Impl::setSeed(int value){ OptionalAttribute option; if ((option = getOption("seed"))) { option->setValue(value); } else { option = Attribute("seed",value); saveOption(*option); } }
bool DDACEAlgorithmOptions_Impl::setSymbols(int value) { OptionalAttribute option; if ((option = getOption("symbols"))) { option->setValue(value); } else { option = Attribute("symbols",value); saveOption(*option); } return true; }
bool PSUADEDaceAlgorithmOptions_Impl::setSamples(int value) { if (value < 1) { LOG(Warn,"Cannot set PSUADEDaceAlgorithmOptions samples to a value less than one."); return false; } OptionalAttribute option; if ((option = getOption("samples"))) { option->setValue(value); } else { option = Attribute("samples",value); saveOption(*option); } return true; }
bool SamplingAlgorithmOptions_Impl::setSeed(int value) { if (value < 1) { LOG(Warn,"Cannot set SamplingAlgorithmOptions seed to a value less than one."); return false; } OptionalAttribute option; if (option = getOption("seed")) { option->setValue(value); } else { option = Attribute("seed",value); saveOption(*option); } return true; }
bool ParameterStudyAlgorithmOptions_Impl::setPartitions(const std::vector<int>& value) { int minValue = *std::min_element(value.begin(), value.end()); if (minValue < 0) { LOG(Warn,"Cannot set ParameterStudyAlgorithmOptions partitions to a value less than zero."); return false; } Attribute option = createAttributeFromVector("partitions",value); if (OptionalAttribute currentOption = getOption("partitions")) { currentOption->setValue(option.valueAsAttributeVector()); } else { saveOption(option); } return true; }
bool ParameterStudyAlgorithmOptions_Impl::setNumSteps(int value) { if (value < 1) { LOG(Warn,"Cannot set ParameterStudyAlgorithmOptions numSteps to a value less than one."); return false; } OptionalAttribute option; if ((option = getOption("numSteps"))) { option->setValue(value); } else { option = Attribute("numSteps",value); saveOption(*option); } return true; }
SequentialSearchOptions_Impl::SequentialSearchOptions_Impl(int objectiveToMinimizeFirst) : AlgorithmOptions_Impl() { saveOption(Attribute("objectiveToMinimizeFirst",objectiveToMinimizeFirst)); }