Moved the static variables of class eoVariableParetoTraits
into a separate .cpp file (eoParetoFitness.cpp) - and modified Makefile.am
This commit is contained in:
parent
76ff13b2e3
commit
daed31c088
3 changed files with 39 additions and 6 deletions
|
|
@ -8,7 +8,7 @@ SUBDIRS = es ga gp utils other
|
|||
CPPFLAGS = -O2
|
||||
|
||||
lib_LIBRARIES = libeo.a
|
||||
libeo_a_SOURCES = eoFunctorStore.cpp eoPersistent.cpp eoPrintable.cpp eoCtrlCContinue.cpp
|
||||
libeo_a_SOURCES = eoFunctorStore.cpp eoPersistent.cpp eoPrintable.cpp eoCtrlCContinue.cpp eoParetoFitness.cpp
|
||||
|
||||
libeoincdir = $(includedir)/eo
|
||||
libeoinc_HEADERS = *.h eo
|
||||
|
|
|
|||
38
eo/src/eoParetoFitness.cpp
Normal file
38
eo/src/eoParetoFitness.cpp
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// eoPareto.cpp
|
||||
// (c) EEAAX,1996-GeNeura Team,1998-Maarten Keijzer,2000-Marc Schoenauer 2002
|
||||
/*
|
||||
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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
Marc.Schoenauer@inria.fr
|
||||
mak@dhi.dk
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
#ifdef _MSC_VER
|
||||
// to avoid long name warnings
|
||||
#pragma warning(disable:4786)
|
||||
#endif
|
||||
|
||||
#include "eoParetoFitness.h"
|
||||
|
||||
|
||||
// need to allocate the static variables of class eoVariableParetoTraits
|
||||
unsigned eoVariableParetoTraits::nObj;
|
||||
vector<bool> eoVariableParetoTraits::bObj;
|
||||
|
||||
|
||||
|
|
@ -85,11 +85,6 @@ private:
|
|||
static vector<bool> bObj;
|
||||
};
|
||||
|
||||
// need to allocate these -> should probably be done in some cpp file!
|
||||
unsigned eoVariableParetoTraits::nObj;
|
||||
vector<bool> eoVariableParetoTraits::bObj;
|
||||
|
||||
|
||||
/**
|
||||
eoParetoFitness class: vector of doubles with overloaded comparison operators. Comparison is done
|
||||
on pareto dominance. The template argument FitnessTraits defaults to eoParetoFitnessTraits, which
|
||||
|
|
|
|||
Reference in a new issue