Permalink
Browse files

Parameters files refactoring and code cleanup.

  • Loading branch information...
pascalhorton committed Jul 19, 2017
1 parent 251a6fa commit 16ebc6f2845c207bf7a360550540849c56475c67
Showing with 1,013 additions and 959 deletions.
  1. +1 −1 src/app_forecaster/core/AtmoswingAppForecaster.cpp
  2. +4 −8 src/app_forecaster/core/asMethodForecasting.cpp
  3. +2 −2 src/app_forecaster/core/asMethodForecasting.h
  4. +3 −4 src/app_forecaster/gui/asFramePredictandDB.cpp
  5. +3 −3 src/app_optimizer/core/AtmoswingAppOptimizer.cpp
  6. +11 −12 src/app_optimizer/core/asMethodCalibrator.cpp
  7. +13 −16 src/app_optimizer/core/asMethodCalibrator.h
  8. +1 −2 src/app_optimizer/core/asMethodCalibratorClassic.cpp
  9. +9 −6 src/app_optimizer/core/asMethodOptimizerGeneticAlgorithms.cpp
  10. +6 −9 src/app_optimizer/core/asMethodOptimizerRandomSet.cpp
  11. +4 −20 src/app_optimizer/core/asParametersCalibration.cpp
  12. +0 −2 src/app_optimizer/core/asParametersCalibration.h
  13. +5 −22 src/app_optimizer/core/asParametersOptimization.cpp
  14. +0 −2 src/app_optimizer/core/asParametersOptimization.h
  15. +4 −11 src/app_optimizer/core/asParametersScoring.cpp
  16. +6 −9 src/app_optimizer/core/asProcessorScore.cpp
  17. +2 −2 src/app_optimizer/core/asProcessorScore.h
  18. +1 −2 src/app_optimizer/core/asResultsScores.cpp
  19. +1 −2 src/app_optimizer/core/asResultsTotalScore.cpp
  20. +2 −2 src/app_optimizer/core/asScore.cpp
  21. +1 −1 src/app_optimizer/core/asScoreBS.cpp
  22. +1 −2 src/app_optimizer/core/asScoreBSS.cpp
  23. +1 −2 src/app_optimizer/core/asScoreCRPSS.cpp
  24. +1 −1 src/app_optimizer/core/asScoreDF0.cpp
  25. +1 −1 src/app_optimizer/core/asScoreSEEPS.cpp
  26. +3 −3 src/app_optimizer/core/asThreadGeneticAlgorithms.cpp
  27. +2 −3 src/app_optimizer/core/asThreadGeneticAlgorithms.h
  28. +2 −3 src/app_optimizer/core/asThreadRandomSet.cpp
  29. +2 −2 src/app_optimizer/core/asThreadRandomSet.h
  30. +1 −2 src/app_optimizer/core/asTotalScore.cpp
  31. +1 −2 src/app_optimizer/core/asTotalScoreCRPSpotential.cpp
  32. +1 −2 src/app_optimizer/core/asTotalScoreCRPSreliability.cpp
  33. +1 −1 src/app_optimizer/core/asTotalScoreMean.cpp
  34. +1 −1 src/app_optimizer/core/asTotalScoreRMSE.cpp
  35. +2 −3 src/app_optimizer/core/asTotalScoreRankHistogram.cpp
  36. +2 −3 src/app_optimizer/core/asTotalScoreRankHistogramReliability.cpp
  37. +4 −3 src/app_viewer/gui/asFrameForecast.cpp
  38. +5 −6 src/app_viewer/gui/asFramePlotTimeSeries.cpp
  39. +1 −1 src/app_viewer/libs/wxmathplot/mathplot.cpp
  40. +1 −1 src/app_viewer/libs/wxplotctrl/src/fourier.c
  41. +1 −1 src/app_viewer/libs/wxplotctrl/src/fparser.cpp
  42. +10 −7 src/app_viewer/libs/wxplotctrl/src/fpoptimizer.cpp
  43. +3 −1 src/app_viewer/libs/wxplotctrl/src/fptypes.hh
  44. +1 −2 src/shared_base/core/asFileNetcdf.cpp
  45. +3 −3 src/shared_base/core/asFileParameters.cpp
  46. +1 −1 src/shared_base/core/asGeoAreaComposite.h
  47. +10 −8 src/shared_base/core/asGeoAreaCompositeGrid.cpp
  48. +3 −3 src/shared_base/core/asGeoAreaCompositeGrid.h
  49. +2 −2 src/shared_base/core/asGeoAreaGaussianGrid.h
  50. +6 −0 src/shared_base/core/asIncludes.h
  51. +32 −33 src/shared_base/core/asParameters.cpp
  52. +17 −29 src/shared_base/core/asParametersForecast.cpp
  53. +8 −12 src/shared_base/core/asPredictand.cpp
  54. +1 −1 src/shared_base/core/asPredictand.h
  55. +4 −5 src/shared_base/core/asPredictandLightnings.cpp
  56. +1 −1 src/shared_base/core/asPredictandLightnings.h
  57. +6 −7 src/shared_base/core/asPredictandPrecipitation.cpp
  58. +1 −1 src/shared_base/core/asPredictandPrecipitation.h
  59. +4 −5 src/shared_base/core/asPredictandTemperature.cpp
  60. +1 −1 src/shared_base/core/asPredictandTemperature.h
  61. +32 −29 src/shared_base/core/asPredictor.cpp
  62. +3 −5 src/shared_base/core/asPredictor.h
  63. +10 −12 src/shared_base/core/asPredictorArch.cpp
  64. +1 −2 src/shared_base/core/asPredictorArch.h
  65. +1 −1 src/shared_base/core/asPredictorArchEcmwfCera20C.cpp
  66. +1 −1 src/shared_base/core/asPredictorArchEcmwfEra20C.cpp
  67. +1 −1 src/shared_base/core/asPredictorArchEcmwfEraInterim.cpp
  68. +1 −1 src/shared_base/core/asPredictorArchJmaJra55Subset.cpp
  69. +4 −4 src/shared_base/core/asPredictorArchNasaMerra2.cpp
  70. +3 −3 src/shared_base/core/asPredictorArchNcepCfsr.cpp
  71. +3 −3 src/shared_base/core/asPredictorArchNcepCfsrSubset.cpp
  72. +5 −4 src/shared_base/core/asPredictorArchNcepReanalysis1.cpp
  73. +3 −3 src/shared_base/core/asPredictorArchNcepReanalysis1Lthe.cpp
  74. +3 −3 src/shared_base/core/asPredictorArchNcepReanalysis1Subset.cpp
  75. +2 −2 src/shared_base/core/asPredictorArchNcepReanalysis2.cpp
  76. +1 −1 src/shared_base/core/asPredictorArchNoaa20Cr2c.cpp
  77. +1 −1 src/shared_base/core/asPredictorArchNoaa20Cr2cEnsemble.cpp
  78. +1 −1 src/shared_base/core/asPredictorArchNoaaOisst2.cpp
  79. +3 −3 src/shared_base/core/asPredictorArchNoaaOisst2Subset.cpp
  80. +8 −11 src/shared_base/core/asPredictorOper.cpp
  81. +2 −4 src/shared_base/core/asPredictorOper.h
  82. +3 −3 src/shared_base/core/asPredictorOperGfsForecast.cpp
  83. +1 −1 src/shared_base/core/asResultsForecast.cpp
  84. +5 −8 src/shared_base/core/asResultsForecastAggregator.cpp
  85. +3 −3 src/shared_base/core/asThreadInternetDownload.h
  86. +1 −1 src/shared_base/core/asTime.h
  87. +5 −6 src/shared_base/core/asTools.h
  88. +12 −6 src/shared_base/gui/img/img_logo.cpp
  89. +4 −1 src/shared_base/gui/img/img_logo.h
  90. +6 −1 src/shared_base/gui/img/img_misc.h
  91. +59 −37 src/shared_base/gui/img/img_misc_l.cpp
  92. +59 −37 src/shared_base/gui/img/img_misc_m.cpp
  93. +68 −46 src/shared_base/gui/img/img_misc_s.cpp
  94. +6 −1 src/shared_base/gui/img/img_toolbar.h
  95. +71 −45 src/shared_base/gui/img/img_toolbar_l.cpp
  96. +71 −45 src/shared_base/gui/img/img_toolbar_m.cpp
  97. +82 −56 src/shared_base/gui/img/img_toolbar_s.cpp
  98. +6 −1 src/shared_base/gui/img/img_treectrl.h
  99. +35 −21 src/shared_base/gui/img/img_treectrl_l.cpp
  100. +35 −21 src/shared_base/gui/img/img_treectrl_m.cpp
  101. +40 −26 src/shared_base/gui/img/img_treectrl_s.cpp
  102. +1 −2 src/shared_processing/core/asCriteriaMRDtoMax.cpp
  103. +2 −4 src/shared_processing/core/asCriteriaMRDtoMean.cpp
  104. +1 −2 src/shared_processing/core/asCriteriaNS1grads.cpp
  105. +1 −2 src/shared_processing/core/asCriteriaRMSEonMeanWithNaN.cpp
  106. +1 −2 src/shared_processing/core/asCriteriaRMSEwithNaN.cpp
  107. +6 −8 src/shared_processing/core/asCriteriaS1.cpp
  108. +1 −2 src/shared_processing/core/asCriteriaS1grads.cpp
  109. +8 −12 src/shared_processing/core/asPreprocessor.cpp
  110. +2 −4 src/shared_processing/core/asPreprocessor.h
  111. +36 −46 src/shared_processing/core/asProcessor.cpp
  112. +1 −1 src/shared_processing/core/asResultsDates.cpp
  113. +3 −3 src/shared_processing/core/asResultsValues.cpp
  114. +4 −4 src/shared_processing/core/asThreadGetAnalogsDates.cpp
  115. +6 −7 src/shared_processing/core/asThreadGetAnalogsDates.h
  116. +5 −5 src/shared_processing/core/asThreadGetAnalogsSubDates.cpp
  117. +2 −2 src/shared_processing/core/asThreadGetAnalogsSubDates.h
  118. +2 −3 src/shared_processing/core/asThreadPreprocessGradients.cpp
  119. +1 −2 src/shared_processing/core/asThreadPreprocessGradients.h
  120. +2 −4 tests/files/parameters_calibration_R1_calib_period.xml
  121. +2 −4 tests/files/parameters_calibration_R1_full.xml
  122. +2 −4 tests/files/parameters_calibration_R1_full_no_preproc.xml
  123. +2 −4 tests/files/parameters_calibration_R1_preload.xml
  124. +2 −4 tests/files/parameters_calibration_R2_calib_period.xml
  125. +2 −4 tests/files/parameters_calibration_R2_calib_period_merge_by_half.xml
  126. +2 −4 tests/files/parameters_calibration_R2_full.xml
  127. +2 −4 tests/files/parameters_calibration_R2_preload.xml
  128. +2 −4 tests/files/parameters_calibration_compare_no_preload.xml
  129. +2 −4 tests/files/parameters_calibration_compare_preload.xml
  130. +2 −4 tests/files/parameters_calibration_compare_preproc_no_preload.xml
  131. +2 −4 tests/files/parameters_calibration_compare_preproc_preload.xml
  132. +2 −4 tests/files/parameters_calibration_compare_smaller_no_preproc_no_preload.xml
  133. +2 −4 tests/files/parameters_calibration_compare_smaller_no_preproc_preload.xml
  134. +2 −4 tests/files/parameters_calibration_compare_smaller_preproc_no_preload.xml
  135. +2 −4 tests/files/parameters_calibration_compare_smaller_preproc_preload.xml
  136. +2 −4 tests/files/parameters_calibration_normalized_RMSE_criteria.xml
  137. +2 −4 tests/files/parameters_calibration_normalized_S1_criteria.xml
  138. +2 −4 tests/files/parameters_calibration_preload_multiple_variables.xml
  139. +2 −4 tests/files/parameters_calibration_read.xml
  140. +2 −4 tests/files/parameters_optimization.xml
@@ -295,7 +295,7 @@ bool AtmoswingAppForecaster::OnCmdLineParsed(wxCmdLineParser &parser)
wxString numberOfDaysStr = wxEmptyString;
if (parser.Found("forecast-past", &numberOfDaysStr)) {
long numberOfDays;
if(!numberOfDaysStr.ToLong(&numberOfDays)) {
if (!numberOfDaysStr.ToLong(&numberOfDays)) {
wxPrintf(_("The value provided for 'forecast-past' could not be interpreted."));
return false;
}
@@ -954,8 +954,7 @@ bool asMethodForecasting::GetAnalogsDates(asResultsForecast &results, asParamete
}
// Instanciate an archive predictor object
asPredictorArch *predictorArchive = new asPredictorArch(
*m_storagePredictorsArchivePreprocess[0]);
asPredictorArch *predictorArchive = new asPredictorArch(*m_storagePredictorsArchivePreprocess[0]);
if (!predictorArchive) {
return false;
}
@@ -968,8 +967,7 @@ bool asMethodForecasting::GetAnalogsDates(asResultsForecast &results, asParamete
}
// Instanciate an realtime predictor object
asPredictorOper *predictorRealtime = new asPredictorOper(
*m_storagePredictorsRealtimePreprocess[0]);
asPredictorOper *predictorRealtime = new asPredictorOper(*m_storagePredictorsRealtimePreprocess[0]);
if (!predictorRealtime) {
wxDELETE(predictorArchive);
return false;
@@ -1439,8 +1437,7 @@ bool asMethodForecasting::GetAnalogsSubDates(asResultsForecast &results, asParam
}
// Instanciate an archive predictor object
asPredictorArch *predictorArchive = new asPredictorArch(
*m_storagePredictorsArchivePreprocess[0]);
asPredictorArch *predictorArchive = new asPredictorArch(*m_storagePredictorsArchivePreprocess[0]);
if (!predictorArchive) {
return false;
}
@@ -1453,8 +1450,7 @@ bool asMethodForecasting::GetAnalogsSubDates(asResultsForecast &results, asParam
}
// Instanciate an realtime predictor object
asPredictorOper *predictorRealtime = new asPredictorOper(
*m_storagePredictorsRealtimePreprocess[0]);
asPredictorOper *predictorRealtime = new asPredictorOper(*m_storagePredictorsRealtimePreprocess[0]);
if (!predictorRealtime) {
wxDELETE(predictorArchive);
return false;
@@ -76,8 +76,8 @@ class asMethodForecasting
bool GetAnalogsDates(asResultsForecast &results, asParametersForecast &params, int iStep);
bool GetAnalogsSubDates(asResultsForecast &results, asParametersForecast &params,
asResultsForecast &resultsPrev, int iStep);
bool GetAnalogsSubDates(asResultsForecast &results, asParametersForecast &params, asResultsForecast &resultsPrev,
int iStep);
bool GetAnalogsValues(asResultsForecast &results, asParametersForecast &params, int iStep);
@@ -246,7 +246,7 @@ void asFramePredictandDB::BuildDatabase(wxCommandEvent &event)
// Instantiate a predictand object
asPredictandPrecipitation predictand(asPredictand::Precipitation, temporalResolution,
spatialAggregation);
spatialAggregation);
predictand.SetHasReferenceValues(m_checkBoxReturnPeriod->GetValue());
predictand.SetIsSqrt(m_checkBoxSqrt->GetValue());
predictand.BuildPredictandDB(catalogFilePath, pathDataDir, pathPatternsDir, pathDestinationDir);
@@ -256,15 +256,14 @@ void asFramePredictandDB::BuildDatabase(wxCommandEvent &event)
{
// Instantiate a predictand object
asPredictandTemperature predictand(asPredictand::AirTemperature, temporalResolution,
spatialAggregation);
spatialAggregation);
predictand.BuildPredictandDB(catalogFilePath, pathDataDir, pathPatternsDir, pathDestinationDir);
break;
}
case 2: // Lightnings
{
// Instantiate a predictand object
asPredictandLightnings predictand(asPredictand::Lightnings, temporalResolution,
spatialAggregation);
asPredictandLightnings predictand(asPredictand::Lightnings, temporalResolution, spatialAggregation);
predictand.BuildPredictandDB(catalogFilePath, pathDataDir, pathPatternsDir, pathDestinationDir);
break;
}
@@ -433,7 +433,7 @@ bool AtmoswingAppOptimizer::OnCmdLineParsed(wxCmdLineParser &parser)
wxString logLevelStr = wxEmptyString;
if (parser.Found("log-level", &logLevelStr)) {
long logLevel = -1;
if(!logLevelStr.ToLong(&logLevel)) {
if (!logLevelStr.ToLong(&logLevel)) {
wxPrintf(_("The value provided for 'log-level' could not be interpreted."));
return false;
}
@@ -795,7 +795,7 @@ void AtmoswingAppOptimizer::CleanUp()
{
#if wxUSE_GUI
// Instance checker
wxDELETE(m_singleInstanceChecker);
wxDELETE(m_singleInstanceChecker);
#endif
// Config file (from wxWidgets samples)
@@ -807,7 +807,7 @@ void AtmoswingAppOptimizer::CleanUp()
#if wxUSE_GUI
// Delete images
cleanup_images();
cleanup_images();
#endif
// CleanUp
@@ -204,8 +204,7 @@ void asMethodCalibrator::SortScoresAndParametersTemp()
}
}
bool asMethodCalibrator::PushBackInTempIfBetter(asParametersCalibration &params,
asResultsTotalScore &scoreFinal)
bool asMethodCalibrator::PushBackInTempIfBetter(asParametersCalibration &params, asResultsTotalScore &scoreFinal)
{
float thisScore = scoreFinal.GetScore();
@@ -690,8 +689,8 @@ bool asMethodCalibrator::PreloadDataWithoutPreprocessing(asParametersScoring &pa
for (unsigned int iLevel = 0; iLevel < preloadLevels.size(); iLevel++) {
for (unsigned int iHour = 0; iHour < preloadTimeHours.size(); iHour++) {
// Loading the dataset information
asPredictorArch *predictor = asPredictorArch::GetInstance(
params.GetPredictorDatasetId(iStep, iPtor), preloadDataIds[iPre], m_predictorDataDir);
asPredictorArch *predictor = asPredictorArch::GetInstance(params.GetPredictorDatasetId(iStep, iPtor),
preloadDataIds[iPre], m_predictorDataDir);
if (!predictor) {
return false;
}
@@ -1153,8 +1152,7 @@ bool asMethodCalibrator::ExtractPreloadedData(std::vector<asPredictor *> &predic
// Copy the data
wxASSERT(m_preloadedArchive[iStep][iPtor][iPre][iLevel][iHour]);
asPredictorArch *desiredPredictor = new asPredictorArch(
*m_preloadedArchive[iStep][iPtor][iPre][iLevel][iHour]);
asPredictorArch *desiredPredictor = new asPredictorArch(*m_preloadedArchive[iStep][iPtor][iPre][iLevel][iHour]);
// Area object instantiation
asGeoAreaCompositeGrid *desiredArea = asGeoAreaCompositeGrid::GetInstance(params.GetPredictorGridType(iStep, iPtor),
@@ -1216,8 +1214,8 @@ bool asMethodCalibrator::ExtractDataWithoutPreprocessing(std::vector<asPredictor
// Loading the datasets information
asPredictorArch *predictor = asPredictorArch::GetInstance(params.GetPredictorDatasetId(iStep, iPtor),
params.GetPredictorDataId(iStep, iPtor),
m_predictorDataDir);
params.GetPredictorDataId(iStep, iPtor),
m_predictorDataDir);
if (!predictor) {
return false;
}
@@ -1374,7 +1372,8 @@ va1f asMethodCalibrator::GetClimatologyData(asParametersScoring &params)
// Check if data are effectively available for this period
int indexPredictandTimeStart = asTools::SortedArraySearchCeil(&predictandTime[0],
&predictandTime[predictandTime.size() - 1], timeStart);
&predictandTime[predictandTime.size() - 1],
timeStart);
int indexPredictandTimeEnd = asTools::SortedArraySearchFloor(&predictandTime[0],
&predictandTime[predictandTime.size() - 1], timeEnd);
@@ -1806,8 +1805,8 @@ bool asMethodCalibrator::GetAnalogsTotalScore(asResultsTotalScore &results, asPa
return true;
}
bool asMethodCalibrator::SubProcessAnalogsNumber(asParametersCalibration &params,
asResultsDates &anaDatesPrevious, int iStep)
bool asMethodCalibrator::SubProcessAnalogsNumber(asParametersCalibration &params, asResultsDates &anaDatesPrevious,
int iStep)
{
vi analogsNbVect = params.GetAnalogsNumberVector(iStep);
@@ -1824,7 +1823,7 @@ bool asMethodCalibrator::SubProcessAnalogsNumber(asParametersCalibration &params
asResultsDates anaDates;
asResultsValues anaValues;
if (rowEnd<0) {
if (rowEnd < 0) {
wxLogError(_("Error assessing the number of analogues."));
return false;
}
@@ -61,20 +61,17 @@ class asMethodCalibrator
bool GetAnalogsDates(asResultsDates &results, asParametersScoring &params, int iStep, bool &containsNaNs);
bool GetAnalogsSubDates(asResultsDates &results, asParametersScoring &params,
asResultsDates &anaDates, int iStep, bool &containsNaNs);
bool GetAnalogsSubDates(asResultsDates &results, asParametersScoring &params, asResultsDates &anaDates, int iStep,
bool &containsNaNs);
bool GetAnalogsValues(asResultsValues &results, asParametersScoring &params, asResultsDates &anaDates,
int iStep);
bool GetAnalogsValues(asResultsValues &results, asParametersScoring &params, asResultsDates &anaDates, int iStep);
bool GetAnalogsScores(asResultsScores &results, asParametersScoring &params,
asResultsValues &anaValues, int iStep);
bool GetAnalogsScores(asResultsScores &results, asParametersScoring &params, asResultsValues &anaValues, int iStep);
bool GetAnalogsTotalScore(asResultsTotalScore &results, asParametersScoring &params,
asResultsScores &anaScores, int iStep);
bool GetAnalogsTotalScore(asResultsTotalScore &results, asParametersScoring &params, asResultsScores &anaScores,
int iStep);
bool SubProcessAnalogsNumber(asParametersCalibration &params, asResultsDates &anaDatesPrevious,
int iStep = 0);
bool SubProcessAnalogsNumber(asParametersCalibration &params, asResultsDates &anaDatesPrevious, int iStep = 0);
bool PreloadDataWithoutPreprocessing(asParametersScoring &params, int iStep, int iPtor, int iPre);
@@ -180,8 +177,8 @@ class asMethodCalibrator
bool PreloadData(asParametersScoring &params);
bool LoadData(std::vector<asPredictor *> &predictors, asParametersScoring &params, int iStep,
double timeStartData, double timeEndData);
bool LoadData(std::vector<asPredictor *> &predictors, asParametersScoring &params, int iStep, double timeStartData,
double timeEndData);
va1f GetClimatologyData(asParametersScoring &params);
@@ -206,11 +203,11 @@ class asMethodCalibrator
bool ExtractPreloadedData(std::vector<asPredictor *> &predictors, asParametersScoring &params, int iStep,
int iPtor);
bool ExtractDataWithoutPreprocessing(std::vector<asPredictor *> &predictors, asParametersScoring &params,
int iStep, int iPtor, double timeStartData, double timeEndData);
bool ExtractDataWithoutPreprocessing(std::vector<asPredictor *> &predictors, asParametersScoring &params, int iStep,
int iPtor, double timeStartData, double timeEndData);
bool ExtractDataWithPreprocessing(std::vector<asPredictor *> &predictors, asParametersScoring &params,
int iStep, int iPtor, double timeStartData, double timeEndData);
bool ExtractDataWithPreprocessing(std::vector<asPredictor *> &predictors, asParametersScoring &params, int iStep,
int iPtor, double timeStartData, double timeEndData);
bool HasPreloadedData(int iStep, int iPtor) const;
@@ -432,8 +432,7 @@ bool asMethodCalibratorClassic::EvaluateRelevanceMap(const asParametersCalibrati
return true;
}
bool asMethodCalibratorClassic::AssessDomainResizing(asParametersCalibration &params,
asResultsDates &anaDatesPrevious,
bool asMethodCalibratorClassic::AssessDomainResizing(asParametersCalibration &params, asResultsDates &anaDatesPrevious,
asResultsParametersArray &resultsTested, int iStep,
const asMethodCalibrator::ParamExploration &explo)
{
@@ -319,8 +319,9 @@ bool asMethodOptimizerGeneticAlgorithms::ManageOneRun()
vf scoreClim = m_scoreClimatology;
// Push the first parameters set
asThreadGeneticAlgorithms *firstThread = new asThreadGeneticAlgorithms(
this, newParams, &m_scoresCalib[m_iterator], &m_scoreClimatology);
asThreadGeneticAlgorithms *firstThread = new asThreadGeneticAlgorithms(this, newParams,
&m_scoresCalib[m_iterator],
&m_scoreClimatology);
int threadType = firstThread->GetType();
ThreadsManager().AddThread(firstThread);
@@ -356,8 +357,9 @@ bool asMethodOptimizerGeneticAlgorithms::ManageOneRun()
}
// Add it to the threads
asThreadGeneticAlgorithms *thread = new asThreadGeneticAlgorithms(
this, nextParams, &m_scoresCalib[m_iterator], &m_scoreClimatology);
asThreadGeneticAlgorithms *thread = new asThreadGeneticAlgorithms(this, nextParams,
&m_scoresCalib[m_iterator],
&m_scoreClimatology);
ThreadsManager().AddThread(thread);
wxASSERT(m_scoresCalib.size() <= (unsigned) m_paramsNb);
@@ -393,8 +395,9 @@ bool asMethodOptimizerGeneticAlgorithms::ManageOneRun()
}
// Add it to the threads
asThreadGeneticAlgorithms *thread = new asThreadGeneticAlgorithms(
this, nextParams, &m_scoresCalib[m_iterator], &m_scoreClimatology);
asThreadGeneticAlgorithms *thread = new asThreadGeneticAlgorithms(this, nextParams,
&m_scoresCalib[m_iterator],
&m_scoreClimatology);
ThreadsManager().AddThread(thread);
wxASSERT(m_scoresCalib.size() <= (unsigned) m_paramsNb);
@@ -126,9 +126,8 @@ bool asMethodOptimizerRandomSet::Manager()
vf scoreClim = m_scoreClimatology;
// Push the first parameters set
asThreadRandomSet *firstThread = new asThreadRandomSet(this, nextParams,
&m_scoresCalib[m_iterator],
&m_scoreClimatology);
asThreadRandomSet *firstThread = new asThreadRandomSet(this, nextParams, &m_scoresCalib[m_iterator],
&m_scoreClimatology);
int threadType = firstThread->GetType();
ThreadsManager().AddThread(firstThread);
@@ -157,9 +156,8 @@ bool asMethodOptimizerRandomSet::Manager()
nextParams = GetNextParameters();
// Add it to the threads
asThreadRandomSet *thread = new asThreadRandomSet(this, nextParams,
&m_scoresCalib[m_iterator],
&m_scoreClimatology);
asThreadRandomSet *thread = new asThreadRandomSet(this, nextParams, &m_scoresCalib[m_iterator],
&m_scoreClimatology);
ThreadsManager().AddThread(thread);
wxASSERT(m_scoresCalib.size() <= (unsigned) m_paramsNb);
@@ -183,9 +181,8 @@ bool asMethodOptimizerRandomSet::Manager()
nextParams = GetNextParameters();
// Add it to the threads
asThreadRandomSet *thread = new asThreadRandomSet(this, nextParams,
&m_scoresCalib[m_iterator],
&m_scoreClimatology);
asThreadRandomSet *thread = new asThreadRandomSet(this, nextParams, &m_scoresCalib[m_iterator],
&m_scoreClimatology);
ThreadsManager().AddThread(thread);
wxASSERT(m_scoresCalib.size() <= (unsigned) m_paramsNb);
Oops, something went wrong.

0 comments on commit 16ebc6f

Please sign in to comment.