Removed trailing string after #endif - it generates a lot of useless warning
on some versions of g++
This commit is contained in:
parent
ed9dac2dfe
commit
d0d14c3ff8
25 changed files with 155 additions and 165 deletions
|
|
@ -130,4 +130,4 @@ private:
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif EO_H
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -69,5 +69,5 @@ template <class EOT> class eoDetTournamentSelect: public eoSelectOne<EOT>
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif eoDetTournamentSelect_h
|
||||
#endif // eoDetTournamentSelect_h
|
||||
|
||||
|
|
|
|||
|
|
@ -206,5 +206,5 @@ template<class EOT> class eoEasyEA: public eoAlgo<EOT>
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif eoSelectTransformReduce_h
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// eoFactory.h
|
||||
// eoFactory.h
|
||||
// (c) GeNeura Team, 1998
|
||||
/*
|
||||
This library is free software; you can redistribute it and/or
|
||||
|
|
@ -24,49 +24,49 @@
|
|||
|
||||
#ifndef _EOFACTORY_H
|
||||
#define _EOFACTORY_H
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
#include <eoObject.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/** EO Factory. A factory is used to create other objects. In particular,
|
||||
it can be used so that objects of that kind can´t be created in any other
|
||||
way. It should be instantiated with anything that needs a factory, like selectors
|
||||
or whatever; but the instance class should be the parent class from which all the
|
||||
object that are going to be created descend. This class basically defines an interface,
|
||||
as usual. The base factory class for each hierarchy should be redefined every time a new
|
||||
object is added to the hierarchy, which is not too good, but in any case, some code would
|
||||
have to be modified*/
|
||||
template<class EOClass>
|
||||
class eoFactory: public eoObject {
|
||||
|
||||
public:
|
||||
|
||||
/// @name ctors and dtors
|
||||
//{@
|
||||
/// constructor
|
||||
eoFactory( ) {}
|
||||
|
||||
/// destructor
|
||||
virtual ~eoFactory() {}
|
||||
//@}
|
||||
|
||||
/** Another factory methods: creates an object from an istream, reading from
|
||||
it whatever is needed to create the object. Usually, the format for the istream will be\\
|
||||
objectType parameter1 parameter2 ... parametern\\
|
||||
*/
|
||||
virtual EOClass* make(istream& _is) = 0;
|
||||
|
||||
///@name eoObject methods
|
||||
//@{
|
||||
/** Return the class id */
|
||||
virtual string className() const { return "eoFactory"; }
|
||||
|
||||
/** Read and print are left without implementation */
|
||||
//@}
|
||||
|
||||
};
|
||||
|
||||
#include <eoObject.h>
|
||||
|
||||
#endif _EOFACTORY_H
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/** EO Factory. A factory is used to create other objects. In particular,
|
||||
it can be used so that objects of that kind can´t be created in any other
|
||||
way. It should be instantiated with anything that needs a factory, like selectors
|
||||
or whatever; but the instance class should be the parent class from which all the
|
||||
object that are going to be created descend. This class basically defines an interface,
|
||||
as usual. The base factory class for each hierarchy should be redefined every time a new
|
||||
object is added to the hierarchy, which is not too good, but in any case, some code would
|
||||
have to be modified*/
|
||||
template<class EOClass>
|
||||
class eoFactory: public eoObject {
|
||||
|
||||
public:
|
||||
|
||||
/// @name ctors and dtors
|
||||
//{@
|
||||
/// constructor
|
||||
eoFactory( ) {}
|
||||
|
||||
/// destructor
|
||||
virtual ~eoFactory() {}
|
||||
//@}
|
||||
|
||||
/** Another factory methods: creates an object from an istream, reading from
|
||||
it whatever is needed to create the object. Usually, the format for the istream will be\\
|
||||
objectType parameter1 parameter2 ... parametern\\
|
||||
*/
|
||||
virtual EOClass* make(istream& _is) = 0;
|
||||
|
||||
///@name eoObject methods
|
||||
//@{
|
||||
/** Return the class id */
|
||||
virtual string className() const { return "eoFactory"; }
|
||||
|
||||
/** Read and print are left without implementation */
|
||||
//@}
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -102,5 +102,5 @@ class eoGeneralBreeder: public eoBreed<EOT>
|
|||
eoHowMany howMany;
|
||||
};
|
||||
|
||||
#endif eoBreeder_h
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -73,5 +73,5 @@ class eoObject
|
|||
|
||||
};
|
||||
|
||||
#endif EOOBJECT_H
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// eoOpSelMason.h
|
||||
// eoOpSelMason.h
|
||||
// (c) GeNeura Team, 1999
|
||||
/*
|
||||
This library is free software; you can redistribute it and/or
|
||||
|
|
@ -24,86 +24,86 @@
|
|||
|
||||
#ifndef _EOOPSELMASON_H
|
||||
#define _EOOPSELMASON_H
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
#include <eoProportionalOpSel.h>
|
||||
#include <eoOpFactory.h> // for eoFactory and eoOpFactory
|
||||
|
||||
#include <map>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/** EO Mason, or builder, for operator selectors. A builder must allocate memory
|
||||
to the objects it builds, and then deallocate it when it gets out of scope*/
|
||||
template<class eoClass>
|
||||
class eoOpSelMason: public eoFactory<eoOpSelector<eoClass> > {
|
||||
|
||||
public:
|
||||
typedef vector<eoOp<eoClass>* > vOpP;
|
||||
typedef map<eoOpSelector<eoClass>*, vOpP > MEV;
|
||||
|
||||
/// @name ctors and dtors
|
||||
//{@
|
||||
/// constructor
|
||||
eoOpSelMason( eoOpFactory<eoClass>& _opFact): operatorFactory( _opFact ) {};
|
||||
|
||||
/// destructor
|
||||
virtual ~eoOpSelMason() {};
|
||||
//@}
|
||||
|
||||
/** Factory methods: creates an object from an istream, reading from
|
||||
it whatever is needed to create the object. The format is
|
||||
opSelClassName\\
|
||||
rate 1 operator1\\
|
||||
rate 2 operator2\\
|
||||
...\\
|
||||
Stores all operators built in a database (#allocMap#), so that somebody
|
||||
can destroy them later. The Mason is in charge or destroying the operators,
|
||||
since the built object can´t do it itself. The objects built must be destroyed
|
||||
from outside, using the #destroy# method
|
||||
*/
|
||||
virtual eoOpSelector<eoClass>* make(istream& _is) {
|
||||
|
||||
string opSelName;
|
||||
_is >> opSelName;
|
||||
eoOpSelector<eoClass>* opSelectorP;
|
||||
// Build the operator selector
|
||||
if ( opSelName == "eoProportionalOpSel" ) {
|
||||
opSelectorP = new eoProportionalOpSel<eoClass>();
|
||||
}
|
||||
|
||||
// Temp vector for storing pointers
|
||||
vOpP tmpPVec;
|
||||
// read operator rate and name
|
||||
while ( _is ) {
|
||||
float rate;
|
||||
_is >> rate;
|
||||
if ( _is ) {
|
||||
eoOp<eoClass>* op = operatorFactory.make( _is ); // This reads the rest of the line
|
||||
// Add the operators to the selector, don´t pay attention to the IDs
|
||||
opSelectorP->addOp( *op, rate );
|
||||
// Keep it in the store, to destroy later
|
||||
tmpPVec.push_back( op );
|
||||
} // if
|
||||
} // while
|
||||
|
||||
// Put it in the map
|
||||
allocMap.insert( MEV::value_type( opSelectorP, tmpPVec ) );
|
||||
|
||||
return opSelectorP;
|
||||
};
|
||||
|
||||
///@name eoObject methods
|
||||
//@{
|
||||
/** Return the class id */
|
||||
virtual string className() const { return "eoOpSelMason"; }
|
||||
|
||||
//@}
|
||||
|
||||
private:
|
||||
map<eoOpSelector<eoClass>*,vector<eoOp<eoClass>* > > allocMap;
|
||||
eoOpFactory<eoClass>& operatorFactory;
|
||||
};
|
||||
|
||||
#include <eoProportionalOpSel.h>
|
||||
#include <eoOpFactory.h> // for eoFactory and eoOpFactory
|
||||
|
||||
#endif _EOOPSELMASON_H
|
||||
#include <map>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/** EO Mason, or builder, for operator selectors. A builder must allocate memory
|
||||
to the objects it builds, and then deallocate it when it gets out of scope*/
|
||||
template<class eoClass>
|
||||
class eoOpSelMason: public eoFactory<eoOpSelector<eoClass> > {
|
||||
|
||||
public:
|
||||
typedef vector<eoOp<eoClass>* > vOpP;
|
||||
typedef map<eoOpSelector<eoClass>*, vOpP > MEV;
|
||||
|
||||
/// @name ctors and dtors
|
||||
//{@
|
||||
/// constructor
|
||||
eoOpSelMason( eoOpFactory<eoClass>& _opFact): operatorFactory( _opFact ) {};
|
||||
|
||||
/// destructor
|
||||
virtual ~eoOpSelMason() {};
|
||||
//@}
|
||||
|
||||
/** Factory methods: creates an object from an istream, reading from
|
||||
it whatever is needed to create the object. The format is
|
||||
opSelClassName\\
|
||||
rate 1 operator1\\
|
||||
rate 2 operator2\\
|
||||
...\\
|
||||
Stores all operators built in a database (#allocMap#), so that somebody
|
||||
can destroy them later. The Mason is in charge or destroying the operators,
|
||||
since the built object can´t do it itself. The objects built must be destroyed
|
||||
from outside, using the #destroy# method
|
||||
*/
|
||||
virtual eoOpSelector<eoClass>* make(istream& _is) {
|
||||
|
||||
string opSelName;
|
||||
_is >> opSelName;
|
||||
eoOpSelector<eoClass>* opSelectorP;
|
||||
// Build the operator selector
|
||||
if ( opSelName == "eoProportionalOpSel" ) {
|
||||
opSelectorP = new eoProportionalOpSel<eoClass>();
|
||||
}
|
||||
|
||||
// Temp vector for storing pointers
|
||||
vOpP tmpPVec;
|
||||
// read operator rate and name
|
||||
while ( _is ) {
|
||||
float rate;
|
||||
_is >> rate;
|
||||
if ( _is ) {
|
||||
eoOp<eoClass>* op = operatorFactory.make( _is ); // This reads the rest of the line
|
||||
// Add the operators to the selector, don´t pay attention to the IDs
|
||||
opSelectorP->addOp( *op, rate );
|
||||
// Keep it in the store, to destroy later
|
||||
tmpPVec.push_back( op );
|
||||
} // if
|
||||
} // while
|
||||
|
||||
// Put it in the map
|
||||
allocMap.insert( MEV::value_type( opSelectorP, tmpPVec ) );
|
||||
|
||||
return opSelectorP;
|
||||
};
|
||||
|
||||
///@name eoObject methods
|
||||
//@{
|
||||
/** Return the class id */
|
||||
virtual string className() const { return "eoOpSelMason"; }
|
||||
|
||||
//@}
|
||||
|
||||
private:
|
||||
map<eoOpSelector<eoClass>*,vector<eoOp<eoClass>* > > allocMap;
|
||||
eoOpFactory<eoClass>& operatorFactory;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -70,5 +70,5 @@ class eoPersistent: public eoPrintable
|
|||
///Standard input for all objects in the EO hierarchy
|
||||
istream & operator >> ( istream& _is, eoPersistent& _o );
|
||||
|
||||
#endif EOOBJECT_H
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -59,5 +59,5 @@ class eoPrintable
|
|||
///Standard output for all objects in the EO hierarchy
|
||||
ostream & operator << ( ostream& _os, const eoPrintable& _o );
|
||||
|
||||
#endif EOPRINTABLE_H
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -67,5 +67,4 @@ private :
|
|||
typename EOT::Fitness total;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -138,5 +138,5 @@ private:
|
|||
unsigned current;
|
||||
};
|
||||
|
||||
#endif eoRandomSelect_h
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -52,5 +52,4 @@ private :
|
|||
eoRanking<EOT> ranking; // derived from eoPerf2Worth
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -270,4 +270,4 @@ private:
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif //eoInsertion_h
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -86,4 +86,4 @@ public:
|
|||
};
|
||||
|
||||
|
||||
#endif _EOFACTORY_H
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -69,5 +69,5 @@ private:
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif eoStochTournamentSelect_h
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -55,8 +55,4 @@
|
|||
#include <es/eoEsMutationInit.h>
|
||||
#include <es/eoEsMutate.h>
|
||||
|
||||
#endif _es_h
|
||||
|
||||
// Local Variables:
|
||||
// mode: C++
|
||||
// End:
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -178,5 +178,5 @@ private:
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
//@}
|
||||
#endif eoRealOp_h
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -502,4 +502,4 @@ template<class EOT> class eoRealUXover: public eoQuadOp<EOT>
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
//@}
|
||||
#endif eoRealOp_h
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -39,8 +39,4 @@
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif _ga_h
|
||||
|
||||
// Local Variables:
|
||||
// mode: C++
|
||||
// End:
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
Marc.Schoenauer@polytechnique.fr
|
||||
mak@dhi.dk
|
||||
CVS Info: $Date: 2001-05-10 12:16:00 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/ga/eoBitOp.h,v 1.13 2001-05-10 12:16:00 jmerelo Exp $ $Author: jmerelo $
|
||||
CVS Info: $Date: 2001-09-08 05:59:17 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/ga/eoBitOp.h,v 1.14 2001-09-08 05:59:17 evomarc Exp $ $Author: evomarc $
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -440,5 +440,5 @@ template<class Chrom> class eoBitGxOver: public eoQuadOp<Chrom>
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
//@}
|
||||
#endif eoBitOp_h
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -166,5 +166,5 @@ public:
|
|||
};
|
||||
|
||||
|
||||
#endif _EOBITOPFACTORY_H
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -76,5 +76,5 @@ using namespace std;
|
|||
#define eo_is_a_rate true
|
||||
#define eo_is_an_integer false
|
||||
|
||||
#endif EODATA_H
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ inline void eoGnuplot::initGnuPlot(std::string _title, std::string _extra)
|
|||
* Created......: Mon Mar 13 13:50:11 1995
|
||||
* Description..: Communication par pipe bidirectionnel avec un autre process
|
||||
*
|
||||
* Ident........: $Id: eoGnuplot.h,v 1.3 2001-02-12 13:58:51 maartenkeijzer Exp $
|
||||
* Ident........: $Id: eoGnuplot.h,v 1.4 2001-09-08 05:59:17 evomarc Exp $
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
|
@ -282,4 +282,4 @@ inline int PipeComWaitFor( PCom *from, char *what )
|
|||
}
|
||||
|
||||
|
||||
#endif _eoGnuplot_H
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -119,4 +119,4 @@ inline void eoGnuplot1DMonitor::FirstPlot()
|
|||
PipeComSend( gpCom, buff );
|
||||
}
|
||||
|
||||
#endif _eoGnuplot1DMonitor_H
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -108,4 +108,4 @@ inline eoMonitor& eoGnuplot1DSnapshot::operator() (void)
|
|||
return (*this);
|
||||
}
|
||||
|
||||
#endif _eoGnuplot1DSnapshot_H
|
||||
#endif
|
||||
|
|
|
|||
Reference in a new issue