diff --git a/edo/src/utils/edoFileSnapshot.cpp b/edo/src/utils/edoFileSnapshot.cpp index 32107b409..7628f934c 100644 --- a/edo/src/utils/edoFileSnapshot.cpp +++ b/edo/src/utils/edoFileSnapshot.cpp @@ -76,8 +76,7 @@ edoFileSnapshot::edoFileSnapshot(std::string dirname, s = " "; } - int dummy; - dummy = system(s.c_str()); + (void)/*ignore returned*/ system(s.c_str()); // all done _descOfFiles = new std::ofstream( std::string(dirname + "/list_of_files.txt").c_str() ); diff --git a/eo/src/eoPartiallyMappedXover.h b/eo/src/eoPartiallyMappedXover.h index 992fbcf77..b10a03ca3 100644 --- a/eo/src/eoPartiallyMappedXover.h +++ b/eo/src/eoPartiallyMappedXover.h @@ -82,9 +82,9 @@ public: // replace if necessary for(i = 0; i < i1; i++) { - while (p1[ _solution1[i] ] != -1) + while (p1[ _solution1[i] ] != -1) // FIXME as an unsigned int, p1 cannot hold negative values! _solution1[i] = p1[_solution1[i]]; - while (p2[ _solution2[i] ] != -1) + while (p2[ _solution2[i] ] != -1) // FIXME as an unsigned int, p2 cannot hold negative values! _solution2[i] = p2[_solution2[i]]; } @@ -96,9 +96,9 @@ public: // replace if necessary for(i = i2 + 1; i < _solution1.size(); i++) { - while (p1[ _solution1[i] ] != -1) + while (p1[ _solution1[i] ] != -1) // FIXME as an unsigned int, p1 cannot hold negative values! _solution1[i] = p1[_solution1[i]]; - while (p2[ _solution2[i] ] != -1) + while (p2[ _solution2[i] ] != -1) // FIXME as an unsigned int, p2 cannot hold negative values! _solution2[i] = p2[_solution2[i]]; } diff --git a/eo/src/gp/eoParseTreeDepthInit.h b/eo/src/gp/eoParseTreeDepthInit.h index ba1cf1f5a..8eaa8c3a9 100644 --- a/eo/src/gp/eoParseTreeDepthInit.h +++ b/eo/src/gp/eoParseTreeDepthInit.h @@ -50,7 +50,11 @@ class eoParseTreeDepthInit : public eoInit< eoParseTree > protected: // a binary predicate for sorting // hopefully this will work with M$VC++ 6.0 +#if __cplusplus >= 201103L + struct lt_arity:public std::function +#else struct lt_arity:public std::binary_function +#endif { bool operator()(const Node &_node1, const Node &_node2) { return (_node1.arity() < _node2.arity());}; }; diff --git a/eo/test/t-eoCheckpointing.cpp b/eo/test/t-eoCheckpointing.cpp index 134b05cc4..84c8e7fd9 100644 --- a/eo/test/t-eoCheckpointing.cpp +++ b/eo/test/t-eoCheckpointing.cpp @@ -31,8 +31,6 @@ public : int the_main(int argc, char **argv) { // ok, we have a command line parser and a state - typedef eoBit Chrom; - eoParser parser(argc, argv); // Define Parameters diff --git a/eo/test/t-eoSelect.cpp b/eo/test/t-eoSelect.cpp index cab2f89e3..1e37f785c 100644 --- a/eo/test/t-eoSelect.cpp +++ b/eo/test/t-eoSelect.cpp @@ -126,7 +126,7 @@ eoValueParam tournamentSizeParam = parser.createParam(unsigned(2), "to } // hard-coded directory name ... - const int ignored = system("mkdir ResSelect"); + (void) system("mkdir ResSelect"); std::cout << "Testing the Selections\nParents size = " << pSize << ", offspring rate = " << oRate; std::cout << " and putting rsulting files in dir ResSelect" << std::endl; diff --git a/eo/test/t-eoSharing.cpp b/eo/test/t-eoSharing.cpp index 8f3155fc9..f074e1031 100644 --- a/eo/test/t-eoSharing.cpp +++ b/eo/test/t-eoSharing.cpp @@ -193,7 +193,7 @@ int the_main(int argc, char **argv) std::cout << "The resulting file (in dir ResSelect), contains \n"; std::cout << " the empirical proba. for each indi to be selected." << std::endl; - const int ignored = system("mkdir ResSelect"); + (void) system("mkdir ResSelect"); // initialize parent population parentsOrg.resize(pSize); diff --git a/eo/test/t-eoStateAndParser.cpp b/eo/test/t-eoStateAndParser.cpp index a851cb595..09bd3cbda 100644 --- a/eo/test/t-eoStateAndParser.cpp +++ b/eo/test/t-eoStateAndParser.cpp @@ -37,8 +37,6 @@ struct Dummy : public EO int the_main(int argc, char **argv) { // ok, we have a command line parser and a state - typedef eoBit Chrom; - eoParser parser(argc, argv); // Define Parameters diff --git a/mo/src/continuator/moFullEvalContinuator.h b/mo/src/continuator/moFullEvalContinuator.h index bf9a9ea96..168eb5bc1 100644 --- a/mo/src/continuator/moFullEvalContinuator.h +++ b/mo/src/continuator/moFullEvalContinuator.h @@ -54,7 +54,11 @@ public: * @param _maxFullEval number maximum of iterations * @param _restartCounter if true the counter of number of evaluations restarts to "zero" at initialization, if false, the number is cumulative */ - moFullEvalContinuator(eoEvalFuncCounter & _eval, unsigned int _maxFullEval, bool _restartCounter = true): eval(_eval), maxFullEval(_maxFullEval), restartCounter(_restartCounter) { + moFullEvalContinuator(eoEvalFuncCounter & _eval, unsigned int _maxFullEval, bool _restartCounter = true): + eval(_eval), + restartCounter(_restartCounter), + maxFullEval(_maxFullEval) + { nbEval_start = eval.value(); } diff --git a/mo/src/continuator/moNeighborhoodStat.h b/mo/src/continuator/moNeighborhoodStat.h index 3ce7d3757..6a6e506cc 100644 --- a/mo/src/continuator/moNeighborhoodStat.h +++ b/mo/src/continuator/moNeighborhoodStat.h @@ -167,7 +167,7 @@ public : if (nb > 1) { sd = 0; - for(int i = 0; i < nb; i++) + for(unsigned i = 0; i < nb; i++) sd += (neighborFitness[i] - mean) * (neighborFitness[i] - mean) ; sd = sqrt( sd / (nb - 1.0) ); // becareful: could be infinite when large values //sd = sqrt( (sd - nb * mean * mean) / (nb - 1.0) ); // becareful: could be negative due to approximation of large values diff --git a/mo/src/continuator/moQuartilesNeighborStat.h b/mo/src/continuator/moQuartilesNeighborStat.h index 69f6af68a..77ba3e3b7 100644 --- a/mo/src/continuator/moQuartilesNeighborStat.h +++ b/mo/src/continuator/moQuartilesNeighborStat.h @@ -62,7 +62,7 @@ public : * Set the first and the third quartile of fitness in the neighborhood * @param _sol the first solution */ - virtual void init(EOT & _sol) { + virtual void init(EOT & /*_sol*/) { value().first = nhStat.getQ1(); value().second = nhStat.getQ3(); } @@ -71,7 +71,7 @@ public : * Set the first and the third quartile fitness in the neighborhood * @param _sol the corresponding solution */ - virtual void operator()(EOT & _sol) { + virtual void operator()(EOT & /*_sol*/) { value().first = nhStat.getQ1(); value().second = nhStat.getQ3(); } diff --git a/mo/src/neighborhood/moNeighbor.h b/mo/src/neighborhood/moNeighbor.h index 8186c2435..707a6a126 100644 --- a/mo/src/neighborhood/moNeighbor.h +++ b/mo/src/neighborhood/moNeighbor.h @@ -72,7 +72,7 @@ public: * @param _neighbor the neighbor to assign * @return a neighbor equal to the other */ - virtual moNeighbor& operator=( + moNeighbor& operator=( const moNeighbor& _neighbor) { if (!(_neighbor.invalid())) fitness(_neighbor.fitness()); @@ -93,7 +93,7 @@ public: * @param _neighbor a neighbor * @return if _neighbor and this one are equals */ - virtual bool equals(moNeighbor & /*_neighbor*/) { + bool equals(moNeighbor & /*_neighbor*/) { return false; } diff --git a/mo/src/problems/eval/moNKlandscapesIncrEval.h b/mo/src/problems/eval/moNKlandscapesIncrEval.h index 6635c0de0..a253c7c14 100644 --- a/mo/src/problems/eval/moNKlandscapesIncrEval.h +++ b/mo/src/problems/eval/moNKlandscapesIncrEval.h @@ -112,7 +112,7 @@ private: nonSig = 0; unsigned int n = 1; - for(int j = 0; j < nk.K + 1; j++) { + for(unsigned j = 0; j < nk.K + 1; j++) { if (_solution[ nk.links[i][j] ] == 1) sig = sig | n; diff --git a/mo/src/sampling/moAdaptiveWalkSampling.h b/mo/src/sampling/moAdaptiveWalkSampling.h index 04dafe876..b87b36f49 100644 --- a/mo/src/sampling/moAdaptiveWalkSampling.h +++ b/mo/src/sampling/moAdaptiveWalkSampling.h @@ -84,10 +84,10 @@ public: moEval& _eval, unsigned int _nbAdaptWalk) : moSampling(initHC, * new moRandomSearch(initHC, _fullEval, _nbAdaptWalk), copyStat), - neighborEvalCount(_eval), - nEvalStat(neighborEvalCount, true), - copyStat(lengthStat), // copy is used to report the statistic of the first walk + neighborEvalCount(_eval), + nEvalStat(neighborEvalCount, true), copyEvalStat(nEvalStat), + copyStat(lengthStat), // copy is used to report the statistic of the first walk checkpoint(trueCont), hc(_neighborhood, _fullEval, neighborEvalCount, checkpoint), initHC(_init, hc) @@ -95,15 +95,15 @@ public: // to count the number of step in the HC checkpoint.add(lengthStat); - // set the long name of this statistic which is the length of the walk - copyStat.setLongName("length"); + // set the long name of this statistic which is the length of the walk + copyStat.setLongName("length"); - // to count the number of evaluations + // to count the number of evaluations checkpoint.add(nEvalStat); - // set the long name of this statistic which is the number of neighbor evaluation - copyEvalStat.setLongName("ngheval"); - + // set the long name of this statistic which is the number of neighbor evaluation + copyEvalStat.setLongName("ngheval"); + // add the solution into statistics this->add(copyEvalStat); this->add(solStat); @@ -118,10 +118,10 @@ public: } protected: - /* count the number of evaluations */ - moEvalCounter neighborEvalCount; - moValueStat nEvalStat; - moStatFromStat copyEvalStat; + /* count the number of evaluations */ + moEvalCounter neighborEvalCount; + moValueStat nEvalStat; + moStatFromStat copyEvalStat; moSolutionStat solStat; moMinusOneCounterStat lengthStat; diff --git a/mo/src/sampling/moNeutralWalkSampling.h b/mo/src/sampling/moNeutralWalkSampling.h index 0db5f6c06..73eddbb9c 100644 --- a/mo/src/sampling/moNeutralWalkSampling.h +++ b/mo/src/sampling/moNeutralWalkSampling.h @@ -192,9 +192,9 @@ protected: moSolutionStat solutionStat; moDistanceStat distStat; moNeighborhoodStat< Neighbor > neighborhoodStat; - moMinNeighborStat< Neighbor > minStat; moAverageFitnessNeighborStat< Neighbor > averageStat; moStdFitnessNeighborStat< Neighbor > stdStat; + moMinNeighborStat< Neighbor > minStat; moMaxNeighborStat< Neighbor > maxStat; moNbSupNeighborStat< Neighbor > nbSupStat; moNbInfNeighborStat< Neighbor > nbInfStat; diff --git a/mo/test/moTestClass.h b/mo/test/moTestClass.h index a04a42272..8e79f174f 100644 --- a/mo/test/moTestClass.h +++ b/mo/test/moTestClass.h @@ -71,15 +71,15 @@ typedef EO Solution; class moDummyNeighborTest: public moNeighbor { public: - virtual void move(Solution & _solution) { + virtual void move(Solution & /*_solution*/) { } }; class moDummyBackableNeighbor: public moBackableNeighbor { public: - virtual void move(Solution & _solution) { + virtual void move(Solution & /*_solution*/) { } - virtual void moveBack(Solution & _solution) { + virtual void moveBack(Solution & /*_solution*/) { } }; @@ -91,7 +91,7 @@ public: i(0), j(0) { } - virtual bool hasNeighbor(EOT & _solution) { + virtual bool hasNeighbor(EOT & /*_solution*/) { bool res; if (i % 3 == 0 || i == 1) res = false; @@ -100,11 +100,11 @@ public: i++; return res; } - virtual void init(EOT & _solution, Neighbor & _current) { + virtual void init(EOT & /*_solution*/, Neighbor & /*_current*/) { } - virtual void next(EOT & _solution, Neighbor & _current) { + virtual void next(EOT & /*_solution*/, Neighbor & /*_current*/) { } - virtual bool cont(EOT & _solution) { + virtual bool cont(EOT & /*_solution*/) { j++; return (j % 10 != 0); } @@ -227,7 +227,7 @@ private: class dummyInit: public eoInit { public: - void operator()(bitVector& sol) { + void operator()(bitVector& /*sol*/) { } }; diff --git a/moeo/src/archive/moeoEpsilonHyperboxArchive.h b/moeo/src/archive/moeoEpsilonHyperboxArchive.h index 7a773e0c8..7ea2e1f42 100644 --- a/moeo/src/archive/moeoEpsilonHyperboxArchive.h +++ b/moeo/src/archive/moeoEpsilonHyperboxArchive.h @@ -258,9 +258,9 @@ public: void filtre(){ eoPop pop; - for(int i=0; i= 201103L + std::transform(bits.begin(), bits.end(), begin(), std::bind(std::equal_to(), std::placeholders::_1, '1')); +#else std::transform(bits.begin(), bits.end(), begin(), std::bind2nd(std::equal_to(), '1')); +#endif } } diff --git a/moeo/src/distance/moeoDistance.h b/moeo/src/distance/moeoDistance.h index d5cf75c75..a78593c64 100644 --- a/moeo/src/distance/moeoDistance.h +++ b/moeo/src/distance/moeoDistance.h @@ -52,7 +52,7 @@ class moeoDistance : public eoBF < const MOEOT &, const MOEOT &, const Type > * Nothing to do * @param _pop the population */ - virtual void setup(const eoPop < MOEOT > & _pop) + virtual void setup(const eoPop < MOEOT > & /*_pop*/) {} @@ -62,7 +62,7 @@ class moeoDistance : public eoBF < const MOEOT &, const MOEOT &, const Type > * @param _max upper bound * @param _obj the objective index */ - virtual void setup(double _min, double _max, unsigned int _obj) + virtual void setup(double /*_min*/, double /*_max*/, unsigned int /*_obj*/) {} @@ -71,7 +71,7 @@ class moeoDistance : public eoBF < const MOEOT &, const MOEOT &, const Type > * @param _realInterval the eoRealInterval object * @param _obj the objective index */ - virtual void setup(eoRealInterval _realInterval, unsigned int _obj) + virtual void setup(eoRealInterval /*_realInterval*/, unsigned int /*_obj*/) {} }; diff --git a/moeo/src/diversity/moeoCrowdingDiversityAssignment.h b/moeo/src/diversity/moeoCrowdingDiversityAssignment.h index 3a37f2db9..8f9b55417 100644 --- a/moeo/src/diversity/moeoCrowdingDiversityAssignment.h +++ b/moeo/src/diversity/moeoCrowdingDiversityAssignment.h @@ -100,7 +100,7 @@ class moeoCrowdingDiversityAssignment : public moeoDiversityAssignment < MOEOT > * @param _objVec the objective vector * @warning NOT IMPLEMENTED, DO NOTHING ! */ - void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec) + void updateByDeleting(eoPop < MOEOT > & /*_pop*/, ObjectiveVector & /*_objVec*/) { std::cout << "WARNING : updateByDeleting not implemented in moeoCrowdingDiversityAssignment" << std::endl; } diff --git a/moeo/src/diversity/moeoFrontByFrontCrowdingDiversityAssignment.h b/moeo/src/diversity/moeoFrontByFrontCrowdingDiversityAssignment.h index c90a7ac91..7f85876cc 100644 --- a/moeo/src/diversity/moeoFrontByFrontCrowdingDiversityAssignment.h +++ b/moeo/src/diversity/moeoFrontByFrontCrowdingDiversityAssignment.h @@ -66,7 +66,7 @@ public: * @param _objVec the objective vector * @warning NOT IMPLEMENTED, DO NOTHING ! */ - void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec) + void updateByDeleting(eoPop < MOEOT > & /*_pop*/, ObjectiveVector & /*_objVec*/) { std::cout << "WARNING : updateByDeleting not implemented in moeoFrontByFrontCrowdingDistanceDiversityAssignment" << std::endl; } diff --git a/moeo/src/diversity/moeoFrontByFrontSharingDiversityAssignment.h b/moeo/src/diversity/moeoFrontByFrontSharingDiversityAssignment.h index 56b4cedca..62e3b65c8 100644 --- a/moeo/src/diversity/moeoFrontByFrontSharingDiversityAssignment.h +++ b/moeo/src/diversity/moeoFrontByFrontSharingDiversityAssignment.h @@ -78,7 +78,7 @@ class moeoFrontByFrontSharingDiversityAssignment : public moeoSharingDiversityAs * @param _objVec the objective vector * @warning NOT IMPLEMENTED, DO NOTHING ! */ - void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec) + void updateByDeleting(eoPop < MOEOT > & /*_pop*/, ObjectiveVector & /*_objVec*/) { std::cout << "WARNING : updateByDeleting not implemented in moeoSharingDiversityAssignment" << std::endl; } diff --git a/moeo/src/diversity/moeoNearestNeighborDiversityAssignment.h b/moeo/src/diversity/moeoNearestNeighborDiversityAssignment.h index 5b5680eef..434bb0b15 100644 --- a/moeo/src/diversity/moeoNearestNeighborDiversityAssignment.h +++ b/moeo/src/diversity/moeoNearestNeighborDiversityAssignment.h @@ -143,7 +143,7 @@ public: * @param _objVec the objective vector * @warning NOT IMPLEMENTED, DOES NOTHING ! */ - void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec) + void updateByDeleting(eoPop < MOEOT > & /*_pop*/, ObjectiveVector & /*_objVec*/) { std::cout << "WARNING : updateByDeleting not implemented in moeoNearestNeighborDiversityAssignment" << std::endl; } diff --git a/moeo/src/diversity/moeoSharingDiversityAssignment.h b/moeo/src/diversity/moeoSharingDiversityAssignment.h index 6fa66193a..4a0142e70 100644 --- a/moeo/src/diversity/moeoSharingDiversityAssignment.h +++ b/moeo/src/diversity/moeoSharingDiversityAssignment.h @@ -102,7 +102,7 @@ class moeoSharingDiversityAssignment : public moeoDiversityAssignment < MOEOT > * @param _objVec the objective vector * @warning NOT IMPLEMENTED, DO NOTHING ! */ - void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec) + void updateByDeleting(eoPop < MOEOT > & /*_pop*/, ObjectiveVector & /*_objVec*/) { std::cout << "WARNING : updateByDeleting not implemented in moeoSharingDiversityAssignment" << std::endl; } diff --git a/moeo/src/fitness/moeoAggregationFitnessAssignment.h b/moeo/src/fitness/moeoAggregationFitnessAssignment.h index 7b9c809e4..deb5d9043 100644 --- a/moeo/src/fitness/moeoAggregationFitnessAssignment.h +++ b/moeo/src/fitness/moeoAggregationFitnessAssignment.h @@ -113,12 +113,12 @@ class moeoAggregationFitnessAssignment : public moeoSingleObjectivization < MOEO * @param _pop the population * @param _objVec the objective vector */ - void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec){} + void updateByDeleting(eoPop < MOEOT > & /*_pop*/, ObjectiveVector & /*_objVec*/){} private: class DummyEval: public eoEvalFunc{ - void operator()(MOEOT &moeo){} + void operator()(MOEOT &/*moeo*/){} }defaultEval; //the vector of weight diff --git a/moeo/src/fitness/moeoConstraintFitnessAssignment.h b/moeo/src/fitness/moeoConstraintFitnessAssignment.h index c87ee3514..daaada5e9 100644 --- a/moeo/src/fitness/moeoConstraintFitnessAssignment.h +++ b/moeo/src/fitness/moeoConstraintFitnessAssignment.h @@ -135,7 +135,7 @@ class moeoConstraintFitnessAssignment : public moeoSingleObjectivization < MOEOT * @param _pop the population * @param _objVec the objective vector */ - void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec) + void updateByDeleting(eoPop < MOEOT > & /*_pop*/, ObjectiveVector & /*_objVec*/) { //std::cout << "WARNING : updateByDeleting not implemented in moeoAssignmentFitnessAssignment" << std::endl; } @@ -144,7 +144,7 @@ class moeoConstraintFitnessAssignment : public moeoSingleObjectivization < MOEOT //dummy evaluation function class DummyEval: public eoEvalFunc{ - void operator()(MOEOT &moeo){ + void operator()(MOEOT &/*moeo*/){ } } defaultEval; diff --git a/moeo/src/fitness/moeoDominanceCountFitnessAssignment.h b/moeo/src/fitness/moeoDominanceCountFitnessAssignment.h index 2de727d7e..a991d34d9 100644 --- a/moeo/src/fitness/moeoDominanceCountFitnessAssignment.h +++ b/moeo/src/fitness/moeoDominanceCountFitnessAssignment.h @@ -119,7 +119,7 @@ public: * @param _pop the population * @param _objVec the objective vector */ - void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec) + void updateByDeleting(eoPop < MOEOT > & /*_pop*/, ObjectiveVector & /*_objVec*/) { std::cout << "WARNING : updateByDeleting not implemented in moeoDominanceCountFitnessAssignment" << std::endl; } diff --git a/moeo/src/fitness/moeoDominanceCountRankingFitnessAssignment.h b/moeo/src/fitness/moeoDominanceCountRankingFitnessAssignment.h index 562823703..1129f2c1c 100644 --- a/moeo/src/fitness/moeoDominanceCountRankingFitnessAssignment.h +++ b/moeo/src/fitness/moeoDominanceCountRankingFitnessAssignment.h @@ -123,7 +123,7 @@ public: * @param _pop the population * @param _objVec the objective vector */ - void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec) + void updateByDeleting(eoPop < MOEOT > & /*_pop*/, ObjectiveVector & /*_objVec*/) { std::cout << "WARNING : updateByDeleting not implemented in moeoDominanceCountRankingFitnessAssignment" << std::endl; } diff --git a/moeo/src/fitness/moeoDominanceRankFitnessAssignment.h b/moeo/src/fitness/moeoDominanceRankFitnessAssignment.h index e265b94c1..de3272411 100644 --- a/moeo/src/fitness/moeoDominanceRankFitnessAssignment.h +++ b/moeo/src/fitness/moeoDominanceRankFitnessAssignment.h @@ -123,7 +123,7 @@ public: * @param _pop the population * @param _objVec the objective vector */ - void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec) + void updateByDeleting(eoPop < MOEOT > & /*_pop*/, ObjectiveVector & /*_objVec*/) { std::cout << "WARNING : updateByDeleting not implemented in moeoDominanceRankFitnessAssignment" << std::endl; } diff --git a/moeo/src/fitness/moeoDummyFitnessAssignment.h b/moeo/src/fitness/moeoDummyFitnessAssignment.h index be80edb57..fbe506740 100644 --- a/moeo/src/fitness/moeoDummyFitnessAssignment.h +++ b/moeo/src/fitness/moeoDummyFitnessAssignment.h @@ -74,7 +74,7 @@ class moeoDummyFitnessAssignment : public moeoFitnessAssignment < MOEOT > * @param _pop the population * @param _objVec the objective vector */ - void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec) + void updateByDeleting(eoPop < MOEOT > & /*_pop*/, ObjectiveVector & /*_objVec*/) { // nothing to do... ;-) } diff --git a/moeo/src/hybridization/moeoDMLSMonOp.h b/moeo/src/hybridization/moeoDMLSMonOp.h index a9c52d4c8..7840e8a8c 100644 --- a/moeo/src/hybridization/moeoDMLSMonOp.h +++ b/moeo/src/hybridization/moeoDMLSMonOp.h @@ -108,8 +108,8 @@ class moeoDMLSMonOp : public eoMonOp < typename Neighbor::EOT > tmp = rng.random(dmlsArchive.size()); _moeo = dmlsArchive[tmp]; defaultContinuator.totalGenerations(defaultContinuator.totalGenerations()); - if(verbose) - std::cout << "moeoDMLSMonOp: dmls stop" << std::endl << std::endl; + if(verbose) { + std::cout << "moeoDMLSMonOp: dmls stop" << std::endl << std::endl; } return false; } diff --git a/moeo/src/metric/moeoHyperVolumeMetric.h b/moeo/src/metric/moeoHyperVolumeMetric.h index b79dbc558..dc65ac4c9 100644 --- a/moeo/src/metric/moeoHyperVolumeMetric.h +++ b/moeo/src/metric/moeoHyperVolumeMetric.h @@ -318,8 +318,8 @@ class moeoHyperVolumeMetric : public moeoVectorUnaryMetric < ObjectiveVector , d //if there are less than 3 objectifs take the fisrt objectif of the first point of front to begin computation of hypervolume if(_no_objectives < 3){ - if(_no_objectives < 1) - throw("Error in moeoHyperVolumeUnaryMetric::calc_hypervolume -> argument3: _no_objectives must be greater than 0"); + if(_no_objectives < 1) { + throw("Error in moeoHyperVolumeUnaryMetric::calc_hypervolume -> argument3: _no_objectives must be greater than 0"); } temp_vol=_front[0][0]; } //else if there at least 3 objectives, a recursive computation of hypervolume starts with _no_objectives -1 on the filter_nondominated_set calculating previously. diff --git a/moeo/src/scalarStuffs/archive/moeoQuickUnboundedArchiveIndex.h b/moeo/src/scalarStuffs/archive/moeoQuickUnboundedArchiveIndex.h index a40add6ae..22694d2af 100644 --- a/moeo/src/scalarStuffs/archive/moeoQuickUnboundedArchiveIndex.h +++ b/moeo/src/scalarStuffs/archive/moeoQuickUnboundedArchiveIndex.h @@ -54,7 +54,11 @@ class moeoQuickUnboundedArchiveIndex : public moeoArchiveIndex < MOEOT > * equivalent to "number one element should be on top of number two element" in the list by looking to the first obj */ struct CompareByFirst +#if __cplusplus >= 201103L + : std::function< bool(entree, entree) > { +#else : std::binary_function< bool, entree, entree > { +#endif bool operator ()( const entree& elem1, const entree& elem2 @@ -71,7 +75,11 @@ class moeoQuickUnboundedArchiveIndex : public moeoArchiveIndex < MOEOT > * equivalent to "number one element should be on top of number two element" in the list by looking to the 2nd obj */ struct CompareByLast +#if __cplusplus >= 201103L + : std::function< bool(entree, entree) > { +#else : std::binary_function< bool, entree, entree > { +#endif bool operator ()( const entree& elem1, const entree& elem2 @@ -87,7 +95,11 @@ class moeoQuickUnboundedArchiveIndex : public moeoArchiveIndex < MOEOT > struct CompareByLast2 +#if __cplusplus >= 201103L + : std::function< bool(MOEOT, MOEOT) > { +#else : std::binary_function< bool, MOEOT, MOEOT > { +#endif bool operator ()( const MOEOT& elem1, const MOEOT& elem2 diff --git a/moeo/src/scalarStuffs/fitness/moeoAchievementFitnessAssignment.h b/moeo/src/scalarStuffs/fitness/moeoAchievementFitnessAssignment.h index b77355bb1..2c8b873fb 100644 --- a/moeo/src/scalarStuffs/fitness/moeoAchievementFitnessAssignment.h +++ b/moeo/src/scalarStuffs/fitness/moeoAchievementFitnessAssignment.h @@ -111,7 +111,7 @@ class moeoAchievementFitnessAssignment : public moeoScalarFitnessAssignment < MO * @param _pop the population * @param _objVec the objective vector */ - void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec) + void updateByDeleting(eoPop < MOEOT > & /*_pop*/, ObjectiveVector & /*_objVec*/) { // nothing to do ;-) } diff --git a/moeo/src/scalarStuffs/fitness/moeoAchievementScalarizingFunctionMetricFitnessAssignment.h b/moeo/src/scalarStuffs/fitness/moeoAchievementScalarizingFunctionMetricFitnessAssignment.h index e396a798b..7546092a7 100644 --- a/moeo/src/scalarStuffs/fitness/moeoAchievementScalarizingFunctionMetricFitnessAssignment.h +++ b/moeo/src/scalarStuffs/fitness/moeoAchievementScalarizingFunctionMetricFitnessAssignment.h @@ -127,12 +127,12 @@ class moeoAchievementScalarizingFunctionMetricFitnessAssignment : public moeoSin * @param _pop the populing * @param _objVec the objective vector */ - void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec){} + void updateByDeleting(eoPop < MOEOT > & /*_pop*/, ObjectiveVector & /*_objVec*/){} private: class DummyEval: public eoEvalFunc{ - void operator()(MOEOT &moeo){ + void operator()(MOEOT &/*moeo*/){ } } defaultEval; diff --git a/moeo/src/scalarStuffs/fitness/moeoAugmentedAchievementScalarizingFunctionMetricFitnessAssignment.h b/moeo/src/scalarStuffs/fitness/moeoAugmentedAchievementScalarizingFunctionMetricFitnessAssignment.h index b0a1499bd..02a1c8293 100644 --- a/moeo/src/scalarStuffs/fitness/moeoAugmentedAchievementScalarizingFunctionMetricFitnessAssignment.h +++ b/moeo/src/scalarStuffs/fitness/moeoAugmentedAchievementScalarizingFunctionMetricFitnessAssignment.h @@ -138,7 +138,7 @@ class moeoAugmentedAchievementScalarizingFunctionMetricFitnessAssignment : publi * @param _pop the populing * @param _objVec the objective vector */ - void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec) + void updateByDeleting(eoPop < MOEOT > & /*_pop*/, ObjectiveVector & /*_objVec*/) { } @@ -146,7 +146,7 @@ class moeoAugmentedAchievementScalarizingFunctionMetricFitnessAssignment : publi private: class DummyEval: public eoEvalFunc{ - void operator()(MOEOT &moeo){ + void operator()(MOEOT &/*moeo*/){ } } defaultEval; diff --git a/moeo/src/scalarStuffs/fitness/moeoAugmentedWeightedChebychevMetricFitnessAssignment.h b/moeo/src/scalarStuffs/fitness/moeoAugmentedWeightedChebychevMetricFitnessAssignment.h index 356ac2144..4f6a27fb6 100644 --- a/moeo/src/scalarStuffs/fitness/moeoAugmentedWeightedChebychevMetricFitnessAssignment.h +++ b/moeo/src/scalarStuffs/fitness/moeoAugmentedWeightedChebychevMetricFitnessAssignment.h @@ -124,12 +124,12 @@ class moeoAugmentedWeightedChebychevMetricFitnessAssignment : public moeoSingleO * @param _pop the population * @param _objVec the objective vector */ - void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec){} + void updateByDeleting(eoPop < MOEOT > & /*_pop*/, ObjectiveVector & /*_objVec*/){} private: class DummyEval: public eoEvalFunc{ - void operator()(MOEOT &moeo){ + void operator()(MOEOT &/*moeo*/){ } } defaultEval; diff --git a/moeo/src/scalarStuffs/fitness/moeoWeightedChebychevMetricFitnessAssignment.h b/moeo/src/scalarStuffs/fitness/moeoWeightedChebychevMetricFitnessAssignment.h index 382d4e2ef..da7b3e56a 100644 --- a/moeo/src/scalarStuffs/fitness/moeoWeightedChebychevMetricFitnessAssignment.h +++ b/moeo/src/scalarStuffs/fitness/moeoWeightedChebychevMetricFitnessAssignment.h @@ -129,12 +129,12 @@ class moeoWeightedChebychevMetricFitnessAssignment : public moeoSingleObjectiviz * @param _pop the population * @param _objVec the objective vector */ - void updateByDeleting(eoPop < MOEOT > & _pop, ObjectiveVector & _objVec){} + void updateByDeleting(eoPop < MOEOT > & /*_pop*/, ObjectiveVector & /*_objVec*/){} private: class DummyEval: public eoEvalFunc{ - void operator()(MOEOT &moeo){ + void operator()(MOEOT &/*moeo*/){ } } defaultEval; diff --git a/moeo/src/selection/moeoDetArchiveSelect.h b/moeo/src/selection/moeoDetArchiveSelect.h index 78b69a06e..c3f94d018 100644 --- a/moeo/src/selection/moeoDetArchiveSelect.h +++ b/moeo/src/selection/moeoDetArchiveSelect.h @@ -57,7 +57,7 @@ class moeoDetArchiveSelect : public eoSelect * @param _source compatibility parameter, not used * @param _dest destination population, selected from archive */ - void operator()(const eoPop < MOEOT > & _source, eoPop < MOEOT > & _dest) + void operator()(const eoPop < MOEOT > & /*_source*/, eoPop < MOEOT > & _dest) { if(max < min){ std::cout << "Warning! moeoDetArchiveSelect: min value > max value!!! Nothing is done." << std::endl; @@ -74,8 +74,11 @@ class moeoDetArchiveSelect : public eoSelect std::vector permutation; for(unsigned int i=0; i < archive_size; i++) permutation.push_back(i); - UF_random_generator rndGen(permutation.size()); - random_shuffle(permutation.begin(), permutation.end(), rndGen); + // UF_random_generator rndGen(permutation.size()); + // random_shuffle(permutation.begin(), permutation.end(), rndGen); + std::random_device rd; + std::mt19937 gen(rd()); + std::shuffle(permutation.begin(), permutation.end(), gen); for (unsigned int i=0; i ObjectiveVector; typedef MOEO < ObjectiveVector, double, double > Solution; class DummyEval: public eoEvalFunc{ - void operator()(Solution &moeo){ + void operator()(Solution &/*moeo*/){ } } eval; //----------------------------------------------------------------------------- diff --git a/moeo/test/t-moeoASFAOrMetric.cpp b/moeo/test/t-moeoASFAOrMetric.cpp index 9ca8d2e67..d0dca6dde 100644 --- a/moeo/test/t-moeoASFAOrMetric.cpp +++ b/moeo/test/t-moeoASFAOrMetric.cpp @@ -48,11 +48,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } @@ -67,7 +67,7 @@ typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; typedef MOEO < ObjectiveVector, double, double > Solution; class DummyEval: public eoEvalFunc{ - void operator()(Solution &moeo){ + void operator()(Solution &/*moeo*/){ } } eval; //----------------------------------------------------------------------------- diff --git a/moeo/test/t-moeoAchievementFitnessAssignment.cpp b/moeo/test/t-moeoAchievementFitnessAssignment.cpp index 2bf553350..c8a7c3060 100644 --- a/moeo/test/t-moeoAchievementFitnessAssignment.cpp +++ b/moeo/test/t-moeoAchievementFitnessAssignment.cpp @@ -45,11 +45,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoAggregationFitnessAssignment.cpp b/moeo/test/t-moeoAggregationFitnessAssignment.cpp index 93990e1c5..294397aed 100644 --- a/moeo/test/t-moeoAggregationFitnessAssignment.cpp +++ b/moeo/test/t-moeoAggregationFitnessAssignment.cpp @@ -48,11 +48,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return false; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return true; } diff --git a/moeo/test/t-moeoBitVector.cpp b/moeo/test/t-moeoBitVector.cpp index 5420efdb1..0673f68cc 100644 --- a/moeo/test/t-moeoBitVector.cpp +++ b/moeo/test/t-moeoBitVector.cpp @@ -45,11 +45,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoChebyshevMetric.cpp b/moeo/test/t-moeoChebyshevMetric.cpp index 5037847ea..583043bb6 100644 --- a/moeo/test/t-moeoChebyshevMetric.cpp +++ b/moeo/test/t-moeoChebyshevMetric.cpp @@ -47,11 +47,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return false; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return true; } @@ -66,7 +66,7 @@ typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; typedef MOEO < ObjectiveVector, double, double > Solution; class DummyEval: public eoEvalFunc{ - void operator()(Solution &moeo){ + void operator()(Solution &/*moeo*/){ } } eval; //----------------------------------------------------------------------------- diff --git a/moeo/test/t-moeoChebyshevOrientedMetric.cpp b/moeo/test/t-moeoChebyshevOrientedMetric.cpp index 9d82d18da..28f372619 100644 --- a/moeo/test/t-moeoChebyshevOrientedMetric.cpp +++ b/moeo/test/t-moeoChebyshevOrientedMetric.cpp @@ -47,11 +47,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } @@ -66,7 +66,7 @@ typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; typedef MOEO < ObjectiveVector, double, double > Solution; class DummyEval: public eoEvalFunc{ - void operator()(Solution &moeo){ + void operator()(Solution &/*moeo*/){ } } eval; //----------------------------------------------------------------------------- diff --git a/moeo/test/t-moeoConstraintFitnessAssignment.cpp b/moeo/test/t-moeoConstraintFitnessAssignment.cpp index 8a0e0a573..3df48532b 100644 --- a/moeo/test/t-moeoConstraintFitnessAssignment.cpp +++ b/moeo/test/t-moeoConstraintFitnessAssignment.cpp @@ -47,11 +47,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } @@ -66,7 +66,7 @@ typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; typedef MOEO < ObjectiveVector, double, double > Solution; class DummyEval: public eoEvalFunc{ - void operator()(Solution &moeo){ + void operator()(Solution &/*moeo*/){ } } defaultEval; //----------------------------------------------------------------------------- diff --git a/moeo/test/t-moeoCrowdingDiversityAssignment.cpp b/moeo/test/t-moeoCrowdingDiversityAssignment.cpp index 5aa17bcad..c126fe2ae 100644 --- a/moeo/test/t-moeoCrowdingDiversityAssignment.cpp +++ b/moeo/test/t-moeoCrowdingDiversityAssignment.cpp @@ -45,11 +45,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoDetArchiveSelect.cpp b/moeo/test/t-moeoDetArchiveSelect.cpp index b85085d58..4bbbf8fa4 100644 --- a/moeo/test/t-moeoDetArchiveSelect.cpp +++ b/moeo/test/t-moeoDetArchiveSelect.cpp @@ -46,11 +46,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoDominanceCountFitnessAssignment.cpp b/moeo/test/t-moeoDominanceCountFitnessAssignment.cpp index e71c70bf1..d4ff9d6d5 100644 --- a/moeo/test/t-moeoDominanceCountFitnessAssignment.cpp +++ b/moeo/test/t-moeoDominanceCountFitnessAssignment.cpp @@ -46,11 +46,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoDominanceCountRankingFitnessAssignment.cpp b/moeo/test/t-moeoDominanceCountRankingFitnessAssignment.cpp index 265aaf0dc..09bf7eef0 100644 --- a/moeo/test/t-moeoDominanceCountRankingFitnessAssignment.cpp +++ b/moeo/test/t-moeoDominanceCountRankingFitnessAssignment.cpp @@ -46,11 +46,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoDominanceDepthFitnessAssignment.cpp b/moeo/test/t-moeoDominanceDepthFitnessAssignment.cpp index 71fae12dc..1282bcdc8 100644 --- a/moeo/test/t-moeoDominanceDepthFitnessAssignment.cpp +++ b/moeo/test/t-moeoDominanceDepthFitnessAssignment.cpp @@ -45,11 +45,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoDominanceMatrix.cpp b/moeo/test/t-moeoDominanceMatrix.cpp index cf533d645..0c837fd97 100644 --- a/moeo/test/t-moeoDominanceMatrix.cpp +++ b/moeo/test/t-moeoDominanceMatrix.cpp @@ -48,11 +48,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoDominanceRankFitnessAssignment.cpp b/moeo/test/t-moeoDominanceRankFitnessAssignment.cpp index c59c9510c..f392f82ed 100644 --- a/moeo/test/t-moeoDominanceRankFitnessAssignment.cpp +++ b/moeo/test/t-moeoDominanceRankFitnessAssignment.cpp @@ -46,11 +46,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoEasyEA.cpp b/moeo/test/t-moeoEasyEA.cpp index b378f9f9a..0210cb5de 100644 --- a/moeo/test/t-moeoEasyEA.cpp +++ b/moeo/test/t-moeoEasyEA.cpp @@ -47,11 +47,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoEpsilonHyperboxArchive.cpp b/moeo/test/t-moeoEpsilonHyperboxArchive.cpp index 071f278a4..2106e76fc 100644 --- a/moeo/test/t-moeoEpsilonHyperboxArchive.cpp +++ b/moeo/test/t-moeoEpsilonHyperboxArchive.cpp @@ -46,11 +46,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } @@ -88,7 +88,7 @@ int main() - for(int i=0; i< pop.size()/2; i++){ + for(unsigned i=0; i< pop.size()/2; i++){ // tmp=rng.uniform()*100; obj[0]=o1; obj[1]=o2; @@ -132,10 +132,10 @@ int main() std::cout << "nadir: " << nadir << std::endl; std::cout << "ideal: " << ideal << std::endl; - for(int i=0; i ObjectiveVector; class ObjectiveVectorTraits2 : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoHyperVolumeMetric.cpp b/moeo/test/t-moeoHyperVolumeMetric.cpp index 1ff7cb9d5..455af0f6c 100644 --- a/moeo/test/t-moeoHyperVolumeMetric.cpp +++ b/moeo/test/t-moeoHyperVolumeMetric.cpp @@ -47,11 +47,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } @@ -66,11 +66,11 @@ typedef moeoRealObjectiveVector < ObjectiveVectorTraits > ObjectiveVector; class ObjectiveVectorTraits2 : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoHypervolumeBinaryMetric.cpp b/moeo/test/t-moeoHypervolumeBinaryMetric.cpp index 083804537..605affe6b 100644 --- a/moeo/test/t-moeoHypervolumeBinaryMetric.cpp +++ b/moeo/test/t-moeoHypervolumeBinaryMetric.cpp @@ -44,11 +44,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoIBEA.cpp b/moeo/test/t-moeoIBEA.cpp index 89b05fc4f..564157c5d 100644 --- a/moeo/test/t-moeoIBEA.cpp +++ b/moeo/test/t-moeoIBEA.cpp @@ -47,11 +47,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoImprOnlyBoundedArchive.cpp b/moeo/test/t-moeoImprOnlyBoundedArchive.cpp index 449166cac..483e3eaa3 100644 --- a/moeo/test/t-moeoImprOnlyBoundedArchive.cpp +++ b/moeo/test/t-moeoImprOnlyBoundedArchive.cpp @@ -46,11 +46,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoIntVector.cpp b/moeo/test/t-moeoIntVector.cpp index 70e580529..51f3f105a 100644 --- a/moeo/test/t-moeoIntVector.cpp +++ b/moeo/test/t-moeoIntVector.cpp @@ -46,11 +46,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoMax3Obj.cpp b/moeo/test/t-moeoMax3Obj.cpp index f0ff1471e..c638d0ed6 100644 --- a/moeo/test/t-moeoMax3Obj.cpp +++ b/moeo/test/t-moeoMax3Obj.cpp @@ -47,11 +47,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return false; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return true; } diff --git a/moeo/test/t-moeoNSGA.cpp b/moeo/test/t-moeoNSGA.cpp index 16b994712..779681e24 100644 --- a/moeo/test/t-moeoNSGA.cpp +++ b/moeo/test/t-moeoNSGA.cpp @@ -47,11 +47,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoNSGAII.cpp b/moeo/test/t-moeoNSGAII.cpp index d1139468e..3827e2800 100644 --- a/moeo/test/t-moeoNSGAII.cpp +++ b/moeo/test/t-moeoNSGAII.cpp @@ -47,11 +47,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoNearestNeighborDiversityAssignment.cpp b/moeo/test/t-moeoNearestNeighborDiversityAssignment.cpp index d4e0e5ed5..58969730b 100644 --- a/moeo/test/t-moeoNearestNeighborDiversityAssignment.cpp +++ b/moeo/test/t-moeoNearestNeighborDiversityAssignment.cpp @@ -46,11 +46,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoParetoObjectiveVectorComparator.cpp b/moeo/test/t-moeoParetoObjectiveVectorComparator.cpp index 143e3b70e..a37b3eb8c 100644 --- a/moeo/test/t-moeoParetoObjectiveVectorComparator.cpp +++ b/moeo/test/t-moeoParetoObjectiveVectorComparator.cpp @@ -45,11 +45,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoRealVector.cpp b/moeo/test/t-moeoRealVector.cpp index 1d17853f6..58d29a491 100644 --- a/moeo/test/t-moeoRealVector.cpp +++ b/moeo/test/t-moeoRealVector.cpp @@ -45,11 +45,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoSEEA.cpp b/moeo/test/t-moeoSEEA.cpp index 1e58ba972..648ca0585 100644 --- a/moeo/test/t-moeoSEEA.cpp +++ b/moeo/test/t-moeoSEEA.cpp @@ -47,11 +47,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoSPEA2.cpp b/moeo/test/t-moeoSPEA2.cpp index 3e2a27183..861977c55 100644 --- a/moeo/test/t-moeoSPEA2.cpp +++ b/moeo/test/t-moeoSPEA2.cpp @@ -48,11 +48,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoSPEA2Archive.cpp b/moeo/test/t-moeoSPEA2Archive.cpp index 8fb094510..df3af2d3a 100644 --- a/moeo/test/t-moeoSPEA2Archive.cpp +++ b/moeo/test/t-moeoSPEA2Archive.cpp @@ -46,11 +46,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoSharingDiversityAssignment.cpp b/moeo/test/t-moeoSharingDiversityAssignment.cpp index 1dd3973fa..81232617a 100644 --- a/moeo/test/t-moeoSharingDiversityAssignment.cpp +++ b/moeo/test/t-moeoSharingDiversityAssignment.cpp @@ -45,11 +45,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoStrictObjectiveVectorComparator.cpp b/moeo/test/t-moeoStrictObjectiveVectorComparator.cpp index b36302f80..f23ac84f2 100644 --- a/moeo/test/t-moeoStrictObjectiveVectorComparator.cpp +++ b/moeo/test/t-moeoStrictObjectiveVectorComparator.cpp @@ -45,11 +45,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoUnboundedArchive.cpp b/moeo/test/t-moeoUnboundedArchive.cpp index 5c4d8f180..1193b5f23 100644 --- a/moeo/test/t-moeoUnboundedArchive.cpp +++ b/moeo/test/t-moeoUnboundedArchive.cpp @@ -45,11 +45,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoVecVsVecAdditiveEpsilonBinaryMetric.cpp b/moeo/test/t-moeoVecVsVecAdditiveEpsilonBinaryMetric.cpp index db2500f97..99901beb2 100644 --- a/moeo/test/t-moeoVecVsVecAdditiveEpsilonBinaryMetric.cpp +++ b/moeo/test/t-moeoVecVsVecAdditiveEpsilonBinaryMetric.cpp @@ -47,11 +47,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoVecVsVecMultiplicativeEpsilonBinaryMetric.cpp b/moeo/test/t-moeoVecVsVecMultiplicativeEpsilonBinaryMetric.cpp index cd22abfcd..880794e01 100644 --- a/moeo/test/t-moeoVecVsVecMultiplicativeEpsilonBinaryMetric.cpp +++ b/moeo/test/t-moeoVecVsVecMultiplicativeEpsilonBinaryMetric.cpp @@ -47,11 +47,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/moeo/test/t-moeoWeakObjectiveVectorComparator.cpp b/moeo/test/t-moeoWeakObjectiveVectorComparator.cpp index 9ff0f89ab..f193b1ee7 100644 --- a/moeo/test/t-moeoWeakObjectiveVectorComparator.cpp +++ b/moeo/test/t-moeoWeakObjectiveVectorComparator.cpp @@ -45,11 +45,11 @@ class ObjectiveVectorTraits : public moeoObjectiveVectorTraits { public: - static bool minimizing (int i) + static bool minimizing (int /*i*/) { return true; } - static bool maximizing (int i) + static bool maximizing (int /*i*/) { return false; } diff --git a/problems/eval/nkLandscapesEval.h b/problems/eval/nkLandscapesEval.h index cfdaab60a..73d490876 100644 --- a/problems/eval/nkLandscapesEval.h +++ b/problems/eval/nkLandscapesEval.h @@ -114,7 +114,7 @@ public: void deleteTables() { if (links != NULL) { - for(int i = 0; i < N; i++) { + for(unsigned i = 0; i < N; i++) { delete [] (links[i]); } delete [] links; @@ -122,7 +122,7 @@ public: } if (tables != NULL) { - for(int i = 0; i < N; i++) { + for(unsigned i = 0; i < N; i++) { delete [] (tables[i]); } delete [] tables; @@ -210,8 +210,8 @@ public: * @param file the file to read */ void loadLinks(std::fstream & file) { - for(int j = 0; j < K+1; j++) - for(int i = 0; i < N; i++) { + for(unsigned j = 0; j < K+1; j++) + for(unsigned i = 0; i < N; i++) { file >> links[i][j]; } } @@ -222,8 +222,8 @@ public: * @param file the file to read */ void loadTables(std::fstream & file) { - for(int j = 0; j < (1<<(K+1)); j++) - for(int i = 0; i < N; i++) + for(unsigned j = 0; j < (1<<(K+1)); j++) + for(unsigned i = 0; i < N; i++) file >> tables[i][j]; } @@ -241,13 +241,13 @@ public: file << "p NK " << N << " " << K <