* indentations + whitespace cleanup

This commit is contained in:
Caner Candan 2011-05-05 16:54:00 +02:00
commit 56c6edab04
285 changed files with 6068 additions and 6223 deletions

View file

@ -3,7 +3,7 @@
//-----------------------------------------------------------------------------
// eoGenContinue.h
// (c) GeNeura Team, 1999
/*
/*
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
@ -29,7 +29,7 @@
#include <utils/eoParam.h>
#include <utils/eoLogger.h>
/**
/**
Generational continuator: continues until a number of generations is reached
@ingroup Continuators
@ -41,68 +41,68 @@ public:
/// Ctor for setting a
eoGenContinue( unsigned long _totalGens)
: eoValueParam<unsigned>(0, "Generations", "Generations"),
repTotalGenerations( _totalGens ),
thisGenerationPlaceHolder(0),
thisGeneration(thisGenerationPlaceHolder)
: eoValueParam<unsigned>(0, "Generations", "Generations"),
repTotalGenerations( _totalGens ),
thisGenerationPlaceHolder(0),
thisGeneration(thisGenerationPlaceHolder)
{};
/// Ctor for enabling the save/load the no. of generations counted
eoGenContinue( unsigned long _totalGens, unsigned long& _currentGen)
: eoValueParam<unsigned>(0, "Generations", "Generations"),
repTotalGenerations( _totalGens ),
thisGenerationPlaceHolder(0),
thisGeneration(_currentGen)
: eoValueParam<unsigned>(0, "Generations", "Generations"),
repTotalGenerations( _totalGens ),
thisGenerationPlaceHolder(0),
thisGeneration(_currentGen)
{};
/** Returns false when a certain number of generations is
* reached */
* reached */
virtual bool operator() ( const eoPop<EOT>& _vEO ) {
(void)_vEO;
thisGeneration++;
value() = thisGeneration;
if (thisGeneration >= repTotalGenerations)
if (thisGeneration >= repTotalGenerations)
{
eo::log << eo::logging << "STOP in eoGenContinue: Reached maximum number of generations [" << thisGeneration << "/" << repTotalGenerations << "]\n";
return false;
eo::log << eo::logging << "STOP in eoGenContinue: Reached maximum number of generations [" << thisGeneration << "/" << repTotalGenerations << "]\n";
return false;
}
return true;
}
/** Sets the number of generations to reach
and sets the current generation to 0 (the begin)
@todo replace this by an "init" method
/** Sets the number of generations to reach
and sets the current generation to 0 (the begin)
@todo replace this by an "init" method
*/
virtual void totalGenerations( unsigned long _tg ) {
repTotalGenerations = _tg;
thisGeneration = 0;
};
virtual void totalGenerations( unsigned long _tg ) {
repTotalGenerations = _tg;
thisGeneration = 0;
};
/** Returns the number of generations to reach*/
virtual unsigned long totalGenerations( )
{
return repTotalGenerations;
virtual unsigned long totalGenerations( )
{
return repTotalGenerations;
};
virtual std::string className(void) const { return "eoGenContinue"; }
/** Read from a stream
* @param __is the istream to read from
*/
void readFrom (std :: istream & __is) {
__is >> thisGeneration; /* Loading the number of generations counted */
}
/** Print on a stream
* @param __os the ostream to print on
*/
void printOn (std :: ostream & __os) const {
__os << thisGeneration << std :: endl; /* Saving the number of generations counted */
__os << thisGeneration << std :: endl; /* Saving the number of generations counted */
}
private:
@ -112,4 +112,3 @@ private:
};
#endif