Remove unnecessary tests.

This commit is contained in:
kuepper 2006-12-02 11:02:13 +00:00
commit 3eba6b962c
4 changed files with 62 additions and 64 deletions

View file

@ -1,3 +1,7 @@
2006-12-02 Jochen Küpper <jochen@fhi-berlin.mpg.de>
* configure.in: Remove unnecessary tests.
2006-11-16 Jochen Küpper <jochen@fhi-berlin.mpg.de> 2006-11-16 Jochen Küpper <jochen@fhi-berlin.mpg.de>
* configure.in (AC_DEBUG): add test * configure.in (AC_DEBUG): add test

View file

@ -30,18 +30,12 @@ AC_CHECK_PROGS([DOXYGEN], [doxygen], [true])
dnl Checks for header files. dnl Checks for header files.
AC_LANG(C++) AC_LANG(C++)
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS(limits, [], AC_MSG_ERROR([Need limits C++ include.]))
AC_CHECK_HEADERS(sstream, [], AC_MSG_ERROR([Need sstream C++ include.]))
AC_CHECK_HEADERS(stdint.h, [], AC_MSG_WARN([Need C99 standard header.]))
dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_SIZEOF(unsigned long)
AC_CHECK_TYPES(uint32_t, [], AC_MSG_WARN([Need uint32_t from C99 standard.])) AC_CHECK_TYPES(uint32_t, [], AC_MSG_WARN([Need uint32_t from C99 standard.]))
AC_TYPE_SIZE_T AC_TYPE_SIZE_T
dnl Checks for libraries. dnl Checks for libraries and library functions.
dnl Checks for library functions.
AC_CHECK_LIB(m, cos) AC_CHECK_LIB(m, cos)
dnl user-switches dnl user-switches

View file

@ -16,9 +16,9 @@
License along with this library; if not, write to the Free Software License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: todos@geneura.ugr.es, http://geneura.ugr.es Contact: eodev-main@lists.sourceforge.net
old contact: todos@geneura.ugr.es, http://geneura.ugr.es
Marc.Schoenauer@polytechnique.fr Marc.Schoenauer@polytechnique.fr
CVS Info: $Date: 2003-02-27 19:26:43 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/contrib/MGE/VirusOp.h,v 1.3 2003-02-27 19:26:43 okoenig Exp $ $Author: okoenig $
*/ */
#ifndef VirusOp_h #ifndef VirusOp_h
@ -31,7 +31,7 @@ CVS Info: $Date: 2003-02-27 19:26:43 $ $Header: /home/nojhan/dev/eodev/eodev_cvs
#include <string> // std::string #include <string> // std::string
#include <utils/eoRNG.h> #include <utils/eoRNG.h>
#include "../contrib/MGE/eoVirus.h" #include "eoVirus.h"
/** VirusBitFlip --> changes 1 bit /** VirusBitFlip --> changes 1 bit
*/ */
@ -42,9 +42,9 @@ class VirusBitFlip: public eoMonOp<eoVirus<FitT> > {
/// The class name. /// The class name.
virtual std::string className() const { return "VirusBitFlip"; }; virtual std::string className() const { return "VirusBitFlip"; };
/** /** Change one bit.
* Change one bit.
* @param chrom The cromosome which one bit is going to be changed. @param chrom The cromosome which one bit is going to be changed.
*/ */
bool operator()(eoVirus<FitT>& _chrom) { bool operator()(eoVirus<FitT>& _chrom) {
unsigned i = eo::rng.random(_chrom.size()); unsigned i = eo::rng.random(_chrom.size());
@ -53,15 +53,16 @@ class VirusBitFlip: public eoMonOp<eoVirus<FitT> > {
} }
}; };
template<class FitT> template<class FitT>
class VirusMutation: public eoMonOp<eoVirus<FitT> > { class VirusMutation: public eoMonOp<eoVirus<FitT> > {
public: public:
/// The class name. /// The class name.
virtual std::string className() const { return "VirusMutation"; }; virtual std::string className() const { return "VirusMutation"; };
/** /** Change one bit.
* Change one bit.
* @param chrom The cromosome which one bit is going to be changed. @param chrom The cromosome which one bit is going to be changed.
*/ */
bool operator()(eoVirus<FitT>& _chrom) { bool operator()(eoVirus<FitT>& _chrom) {
// Search for virus bits // Search for virus bits
@ -81,9 +82,11 @@ class VirusMutation: public eoMonOp<eoVirus<FitT> > {
} }
}; };
/// Works for 1-bit virus; shifts the one to the right or left /// Works for 1-bit virus; shifts the one to the right or left
template<class FitT> template<class FitT>
class VirusShiftMutation: public eoMonOp<eoVirus<FitT> > { class VirusShiftMutation: public eoMonOp<eoVirus<FitT> >
{
public: public:
/// Ctor /// Ctor
@ -92,9 +95,9 @@ class VirusShiftMutation: public eoMonOp<eoVirus<FitT> > {
/// The class name. /// The class name.
virtual std::string className() const { return "VirusShiftMutation"; }; virtual std::string className() const { return "VirusShiftMutation"; };
/** /** Change one bit.
* Change one bit.
* @param chrom The cromosome which one bit is going to be changed. @param chrom The cromosome which one bit is going to be changed.
*/ */
bool operator()(eoVirus<FitT>& _chrom) { bool operator()(eoVirus<FitT>& _chrom) {
// Search for virus bits // Search for virus bits
@ -116,8 +119,6 @@ class VirusShiftMutation: public eoMonOp<eoVirus<FitT> > {
} }
return true; return true;
} }
private:
}; };

View file

@ -6,7 +6,6 @@
# #
CXX = g++ CXX = g++
CXXFLAGS = -DHAVE_SSTREAM
CPPFLAGS = -Wall -O2 #-g #-O2 CPPFLAGS = -Wall -O2 #-g #-O2
LDFLAGS = LDFLAGS =
COMPILE = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c COMPILE = $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c