indent all

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@232 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
liefooga 2007-04-13 15:05:07 +00:00
commit c8049ca6cd
51 changed files with 3899 additions and 3898 deletions

View file

@ -29,41 +29,41 @@ class moeoArchiveFitnessSavingUpdater : public eoUpdater
{
public:
/**
* Ctor
* @param _arch local archive
* @param _filename target filename
* @param _id own ID
*/
moeoArchiveFitnessSavingUpdater (moeoArchive<EOT> & _arch, const std::string & _filename = "Res/Arch", int _id = -1) : arch(_arch), filename(_filename), id(_id), counter(0)
{}
/**
* Ctor
* @param _arch local archive
* @param _filename target filename
* @param _id own ID
*/
moeoArchiveFitnessSavingUpdater (moeoArchive<EOT> & _arch, const std::string & _filename = "Res/Arch", int _id = -1) : arch(_arch), filename(_filename), id(_id), counter(0)
{}
/**
* Saves the fitness of the archive's members into the file
*/
void operator()() {
char buff[MAX_BUFFER_SIZE];
if (id == -1)
sprintf (buff, "%s.%u", filename.c_str(), counter ++);
else
sprintf (buff, "%s.%u.%u", filename.c_str(), id, counter ++);
std::ofstream f(buff);
for (unsigned i = 0; i < arch.size (); i++)
f << arch[i].objectiveVector() << std::endl;
f.close ();
}
/**
* Saves the fitness of the archive's members into the file
*/
void operator()() {
char buff[MAX_BUFFER_SIZE];
if (id == -1)
sprintf (buff, "%s.%u", filename.c_str(), counter ++);
else
sprintf (buff, "%s.%u.%u", filename.c_str(), id, counter ++);
std::ofstream f(buff);
for (unsigned i = 0; i < arch.size (); i++)
f << arch[i].objectiveVector() << std::endl;
f.close ();
}
private:
/** local archive */
moeoArchive<EOT> & arch;
/** target filename */
std::string filename;
/** own ID */
int id;
/** counter */
unsigned counter;
/** local archive */
moeoArchive<EOT> & arch;
/** target filename */
std::string filename;
/** own ID */
int id;
/** counter */
unsigned counter;
};