rename everything from 'do' to 'edo'

This commit is contained in:
Johann Dreo 2011-01-27 11:23:23 +01:00
commit d618ab07df
94 changed files with 2936 additions and 1534 deletions

View file

@ -33,7 +33,7 @@ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/application/common)
SET(SOURCES
t-doEstimatorNormalMulti
t-edoEstimatorNormalMulti
t-mean-distance
t-bounderno
t-uniform
@ -43,8 +43,8 @@ SET(SOURCES
FOREACH(current ${SOURCES})
ADD_EXECUTABLE(${current} ${current}.cpp)
ADD_TEST(${current} ${current})
TARGET_LINK_LIBRARIES(${current} do doutils ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES})
INSTALL(TARGETS ${current} RUNTIME DESTINATION share/do/test COMPONENT test)
TARGET_LINK_LIBRARIES(${current} edo edoutils ${EO_LIBRARIES} ${MO_LIBRARIES} ${Boost_LIBRARIES})
INSTALL(TARGETS ${current} RUNTIME DESTINATION share/edo/test COMPONENT test)
ENDFOREACH()
######################################################################################

View file

@ -1,5 +1,32 @@
/*
The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms.
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
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Copyright (C) 2010 Thales group
*/
/*
Authors:
Johann Dréo <johann.dreo@thalesgroup.com>
Caner Candan <caner.candan@thalesgroup.com>
*/
#include <eo>
#include <do>
#include <edo>
#include "Rosenbrock.h"
@ -7,7 +34,7 @@ typedef eoReal< eoMinimizingFitness > EOT;
int main(void)
{
doBounderNo< EOT > bounder;
edoBounderNo< EOT > bounder;
return 0;
}

View file

@ -1,16 +1,43 @@
/*
The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms.
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
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Copyright (C) 2010 Thales group
*/
/*
Authors:
Johann Dréo <johann.dreo@thalesgroup.com>
Caner Candan <caner.candan@thalesgroup.com>
*/
#include <eo>
#include <do>
#include <edo>
#include "Rosenbrock.h"
typedef eoReal< eoMinimizingFitness > EOT;
typedef doUniform< EOT > Distrib;
typedef edoUniform< EOT > Distrib;
int main(void)
{
eoState state;
doContinue< Distrib >* continuator = new doDummyContinue< Distrib >();
edoContinue< Distrib >* continuator = new edoDummyContinue< Distrib >();
state.storeFunctor(continuator);
return 0;

View file

@ -1,3 +1,30 @@
/*
The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms.
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
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Copyright (C) 2010 Thales group
*/
/*
Authors:
Johann Dréo <johann.dreo@thalesgroup.com>
Caner Candan <caner.candan@thalesgroup.com>
*/
#include <sstream>
#include <iomanip>
@ -7,13 +34,13 @@
#include <utils/eoLogger.h>
#include <utils/eoParserLogger.h>
#include <do>
#include <edo>
#include "Rosenbrock.h"
#include "Sphere.h"
typedef eoReal< eoMinimizingFitness > EOT;
typedef doNormalMulti< EOT > Distrib;
typedef edoNormalMulti< EOT > Distrib;
typedef EOT::AtomType AtomType;
int main(int ac, char** av)
@ -37,7 +64,7 @@ int main(int ac, char** av)
AtomType covar3_value = parser.createParam((AtomType)1.0, "covar3", "Covar value 3", '3', section).value();
std::ostringstream ss;
ss << p_size << "_" << fixed << setprecision(1)
ss << p_size << "_" << std::fixed << std::setprecision(1)
<< mean_value << "_" << covar1_value << "_" << covar2_value << "_"
<< covar3_value << "_gen";
std::string gen_filename = ss.str();
@ -101,18 +128,18 @@ int main(int ac, char** av)
// (3a) distribution output preparation
//-----------------------------------------------------------------------------
doDummyContinue< Distrib >* distrib_dummy_continue = new doDummyContinue< Distrib >();
edoDummyContinue< Distrib >* distrib_dummy_continue = new edoDummyContinue< Distrib >();
state.storeFunctor(distrib_dummy_continue);
doCheckPoint< Distrib >* distrib_continue = new doCheckPoint< Distrib >( *distrib_dummy_continue );
edoCheckPoint< Distrib >* distrib_continue = new edoCheckPoint< Distrib >( *distrib_dummy_continue );
state.storeFunctor(distrib_continue);
doDistribStat< Distrib >* distrib_stat = new doStatNormalMulti< EOT >();
edoDistribStat< Distrib >* distrib_stat = new edoStatNormalMulti< EOT >();
state.storeFunctor(distrib_stat);
distrib_continue->add( *distrib_stat );
doFileSnapshot* distrib_file_snapshot = new doFileSnapshot( "TestResDistrib", 1, gen_filename );
edoFileSnapshot* distrib_file_snapshot = new edoFileSnapshot( "TestResDistrib", 1, gen_filename );
state.storeFunctor(distrib_file_snapshot);
distrib_file_snapshot->add(*distrib_stat);
distrib_continue->add(*distrib_file_snapshot);
@ -131,10 +158,10 @@ int main(int ac, char** av)
//-----------------------------------------------------------------------------
// Prepare bounder class to set bounds of sampling.
// This is used by doSampler.
// This is used by edoSampler.
//-----------------------------------------------------------------------------
doBounder< EOT >* bounder = new doBounderRng< EOT >(EOT(pop[0].size(), -5),
edoBounder< EOT >* bounder = new edoBounderRng< EOT >(EOT(pop[0].size(), -5),
EOT(pop[0].size(), 5),
*gen);
state.storeFunctor(bounder);
@ -146,7 +173,7 @@ int main(int ac, char** av)
// Prepare sampler class with a specific distribution
//-----------------------------------------------------------------------------
doSampler< Distrib >* sampler = new doSamplerNormalMulti< EOT >( *bounder );
edoSampler< Distrib >* sampler = new edoSamplerNormalMulti< EOT >( *bounder );
state.storeFunctor(sampler);
//-----------------------------------------------------------------------------
@ -177,11 +204,11 @@ int main(int ac, char** av)
eoCheckPoint< EOT >* pop_continue = new eoCheckPoint< EOT >( *pop_cont );
state.storeFunctor(pop_continue);
doPopStat< EOT >* pop_stat = new doPopStat<EOT>;
edoPopStat< EOT >* pop_stat = new edoPopStat<EOT>;
state.storeFunctor(pop_stat);
pop_continue->add(*pop_stat);
doFileSnapshot* pop_file_snapshot = new doFileSnapshot( "TestResPop", 1, gen_filename );
edoFileSnapshot* pop_file_snapshot = new edoFileSnapshot( "TestResPop", 1, gen_filename );
state.storeFunctor(pop_file_snapshot);
pop_file_snapshot->add(*pop_stat);
pop_continue->add(*pop_file_snapshot);
@ -195,7 +222,7 @@ int main(int ac, char** av)
// (6) estimation phase
//-----------------------------------------------------------------------------
doEstimator< Distrib >* estimator = new doEstimatorNormalMulti< EOT >();
edoEstimator< Distrib >* estimator = new edoEstimatorNormalMulti< EOT >();
state.storeFunctor(estimator);
distrib = (*estimator)( pop );

View file

@ -1,3 +1,30 @@
/*
The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms.
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
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Copyright (C) 2010 Thales group
*/
/*
Authors:
Johann Dréo <johann.dreo@thalesgroup.com>
Caner Candan <caner.candan@thalesgroup.com>
*/
#include <sys/stat.h>
#include <sys/types.h>
@ -11,13 +38,16 @@
#include <utils/eoLogger.h>
#include <utils/eoParserLogger.h>
#include <do>
#include <edo>
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/symmetric_matrix.hpp>
#include "Rosenbrock.h"
#include "Sphere.h"
typedef eoReal< eoMinimizingFitness > EOT;
typedef doNormalMulti< EOT > Distrib;
typedef edoNormalMulti< EOT > Distrib;
typedef EOT::AtomType AtomType;
int main(int ac, char** av)
@ -121,10 +151,10 @@ int main(int ac, char** av)
//-----------------------------------------------------------------------------
// Prepare bounder class to set bounds of sampling.
// This is used by doSampler.
// This is used by edoSampler.
//-----------------------------------------------------------------------------
doBounder< EOT >* bounder = new doBounderRng< EOT >(EOT(pop[0].size(), -5),
edoBounder< EOT >* bounder = new edoBounderRng< EOT >(EOT(pop[0].size(), -5),
EOT(pop[0].size(), 5),
*gen);
state.storeFunctor(bounder);
@ -136,7 +166,7 @@ int main(int ac, char** av)
// Prepare sampler class with a specific distribution
//-----------------------------------------------------------------------------
doSampler< Distrib >* sampler = new doSamplerNormalMulti< EOT >( *bounder );
edoSampler< Distrib >* sampler = new edoSamplerNormalMulti< EOT >( *bounder );
state.storeFunctor(sampler);
//-----------------------------------------------------------------------------
@ -161,7 +191,7 @@ int main(int ac, char** av)
// (6) estimation phase
//-----------------------------------------------------------------------------
doEstimator< Distrib >* estimator = new doEstimatorNormalMulti< EOT >();
edoEstimator< Distrib >* estimator = new edoEstimatorNormalMulti< EOT >();
state.storeFunctor(estimator);
distrib = (*estimator)( pop );

View file

@ -1,5 +1,32 @@
/*
The Evolving Distribution Objects framework (EDO) is a template-based,
ANSI-C++ evolutionary computation library which helps you to write your
own estimation of distribution algorithms.
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
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Copyright (C) 2010 Thales group
*/
/*
Authors:
Johann Dréo <johann.dreo@thalesgroup.com>
Caner Candan <caner.candan@thalesgroup.com>
*/
#include <eo>
#include <do>
#include <edo>
#include "Rosenbrock.h"
@ -9,7 +36,7 @@ int main(void)
{
eoState state;
doUniform< EOT >* distrib = new doUniform< EOT >( EOT(3, -1), EOT(3, 1) );
edoUniform< EOT >* distrib = new edoUniform< EOT >( EOT(3, -1), EOT(3, 1) );
state.storeFunctor(distrib);
return 0;

View file

@ -2,7 +2,7 @@
PSIZE = 10000
MEAN = 0
CMD = "./test/t-doEstimatorNormalMulti -P=%s -m=%.1f -1=%.1f -2=%.1f -3=%.1f && ./gplot.py -r TestResPop -p -w 5 -u -g %s -G results_for_test_cov_parameters -f %s_gen1"
CMD = "./test/t-edoEstimatorNormalMulti -P=%s -m=%.1f -1=%.1f -2=%.1f -3=%.1f && ./gplot.py -r TestResPop -p -w 5 -u -g %s -G results_for_test_cov_parameters -f %s_gen1"
from os import system
from numpy import arange