* whitespace cleanup

This commit is contained in:
Caner Candan 2011-05-05 17:15:10 +02:00
commit 70e60a50d2
195 changed files with 1763 additions and 1873 deletions

View file

@ -10,23 +10,23 @@ INCLUDE_DIRECTORIES(${EO_SOURCE_DIR}/src/utils)
### 2) Specify where CMake can find the libraries
######################################################################################
IF(NOT WIN32 OR CYGWIN)
IF(NOT WIN32 OR CYGWIN)
LINK_DIRECTORIES(${EO_BINARY_DIR}/lib)
ENDIF(NOT WIN32 OR CYGWIN)
# especially for Visual Studio
IF(WIN32 AND NOT CYGWIN)
IF(WIN32 AND NOT CYGWIN)
LINK_DIRECTORIES(${EO_BINARY_DIR}\\lib\\${CMAKE_BUILD_TYPE})
ENDIF(WIN32 AND NOT CYGWIN)
ENDIF(WIN32 AND NOT CYGWIN)
######################################################################################
### 3) Define your targets
######################################################################################
# no matter what is the OS, hopefully
ADD_EXECUTABLE(FirstBitEA FirstBitEA.cpp)
ADD_EXECUTABLE(FirstRealEA FirstRealEA.cpp)
ADD_EXECUTABLE(exercise2.3 exercise2.3.cpp)
ADD_EXECUTABLE(FirstBitEA FirstBitEA.cpp)
ADD_EXECUTABLE(FirstRealEA FirstRealEA.cpp)
ADD_EXECUTABLE(exercise2.3 exercise2.3.cpp)
######################################################################################
### 4) Optionnal

View file

@ -182,11 +182,11 @@ int main(int argc, char **argv)
try
{
main_function(argc, argv);
main_function(argc, argv);
}
catch(exception& e)
{
cout << "Exception: " << e.what() << '\n';
cout << "Exception: " << e.what() << '\n';
}
return 1;

View file

@ -52,7 +52,7 @@ void main_function(int argc, char **argv)
const float P_MUT = 0.5; // mutation probability
const double EPSILON = 0.01; // range for real uniform mutation
double SIGMA = 0.3; // std dev. for normal mutation
double SIGMA = 0.3; // std dev. for normal mutation
// some parameters for chosing among different operators
const double hypercubeRate = 0.5; // relative weight for hypercube Xover
const double segmentRate = 0.5; // relative weight for segment Xover
@ -181,11 +181,11 @@ int main(int argc, char **argv)
{
try
{
main_function(argc, argv);
main_function(argc, argv);
}
catch(exception& e)
{
cout << "Exception: " << e.what() << '\n';
cout << "Exception: " << e.what() << '\n';
}
return 1;

View file

@ -1,5 +1,5 @@
### This Makefile is part of the tutorial of the EO library
# Unlike other Makefiles in EO, it is not using the automake/autoconf
# Unlike other Makefiles in EO, it is not using the automake/autoconf
# so that it stays easy to understant (you are in the tutorial, remember!)
# MS, Oct. 2002
@ -10,11 +10,11 @@ DIR_EO = ../../src
.SUFFIXES: .cpp
# Warning: $(CXX) in Linux (RedHat and Mandrake at least) is g++
# However, if you are using this Makefile within xemacs,
# However, if you are using this Makefile within xemacs,
# and have problems with the interpretation of the output (and its colors)
# then you should use c++ instead (make CXX=c++ will do)
.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a
.cpp: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -pg -o $@ $*.cpp $(DIR_EO)/utils/libeoutils.a $(DIR_EO)/libeo.a
.cpp.o: ; $(CXX) -DPACKAGE=\"eo\" -DVERSION=\"0.9.3\" -I. -I$(DIR_EO) -Wall -g -c -pg $*.cpp
@ -26,7 +26,7 @@ lesson2 : $(firstEA)
all : $(ALL)
clean :
clean :
@/bin/rm $(ALL) *.o *~
FirstRealEA : real_value.h

View file

@ -4,7 +4,7 @@
/** Just a simple function that takes binary value of a chromosome and sets
the fitnes.
@param _chrom A binary chromosome
@param _chrom A binary chromosome
*/
// INIT
double binary_value(const std::vector<bool>& _chrom)
@ -14,4 +14,3 @@ double binary_value(const std::vector<bool>& _chrom)
sum += _chrom[i];
return sum;
}

View file

@ -20,7 +20,7 @@
// REPRESENTATION
//-----------------------------------------------------------------------------
// Include the corresponding file
#include <ga.h> // bitstring representation & operators
#include <ga.h> // bitstring representation & operators
// define your individuals
typedef eoBit<double> Indi; // A bitstring with fitness double
@ -186,11 +186,11 @@ int main(int argc, char **argv)
{
try
{
main_function(argc, argv);
main_function(argc, argv);
}
catch(exception& e)
{
cout << "Exception: " << e.what() << '\n';
cout << "Exception: " << e.what() << '\n';
}
return 1;

View file

@ -1,8 +1,8 @@
#include <vector>
//-----------------------------------------------------------------------------
/** Just a simple function that takes an vector<double> and sets the fitnes
/** Just a simple function that takes an vector<double> and sets the fitnes
to the sphere function. Please use doubles not float!!!
@param _ind A floatingpoint vector
@param _ind A floatingpoint vector
*/
// INIT
@ -15,6 +15,3 @@ double real_value(const std::vector<double>& _ind)
}
return -sum;
}