* 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(SecondBitEA SecondBitEA.cpp)
ADD_EXECUTABLE(SecondRealEA SecondRealEA.cpp)
ADD_EXECUTABLE(exercise3.1 exercise3.1.cpp)
ADD_EXECUTABLE(SecondBitEA SecondBitEA.cpp)
ADD_EXECUTABLE(SecondRealEA SecondRealEA.cpp)
ADD_EXECUTABLE(exercise3.1 exercise3.1.cpp)
ADD_DEPENDENCIES(SecondBitEA ga eoutils eo)
ADD_DEPENDENCIES(SecondRealEA ga eoutils eo)
@ -62,4 +62,3 @@ INSTALL(TARGETS SecondRealEA RUNTIME DESTINATION share/eo/examples/Lesson3 COMPO
INSTALL(TARGETS exercise3.1 RUNTIME DESTINATION share/eo/examples/Lesson3 COMPONENT examples)
######################################################################################

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
@ -29,5 +29,5 @@ all : $(ALL)
SecondBitEA : binary_value.h
SecondRealEA : real_value.h
clean :
clean :
@/bin/rm $(ALL) *.o *.sav *.xg *.status *~

View file

@ -126,8 +126,8 @@ void main_function(int argc, char **argv)
// i.e. in case you need parameters somewhere else, postpone these
if (parser.userNeedsHelp())
{
parser.printHelp(cout);
exit(1);
parser.printHelp(cout);
exit(1);
}
if (statusParam.value() != "")
{
@ -337,11 +337,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

@ -104,8 +104,8 @@ void main_function(int argc, char **argv)
// i.e. in case you need parameters somewhere else, postpone these
if (parser.userNeedsHelp())
{
parser.printHelp(cout);
exit(1);
parser.printHelp(cout);
exit(1);
}
if (statusName != "")
{
@ -318,11 +318,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

@ -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

@ -24,7 +24,7 @@
// REPRESENTATION
//-----------------------------------------------------------------------------
// Include the corresponding file
#include <ga.h> // bitstring representation & operators
#include <ga.h> // bitstring representation & operators
// define your genotype and fitness types
typedef eoBit<eoMinimizingFitness> Indi;
@ -126,8 +126,8 @@ void main_function(int argc, char **argv)
// i.e. in case you need parameters somewhere else, postpone these
if (parser.userNeedsHelp())
{
parser.printHelp(cout);
exit(1);
parser.printHelp(cout);
exit(1);
}
if (statusParam.value() != "")
{
@ -393,11 +393,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;
}