* eoLogger: last issues fixed
This commit is contained in:
parent
e8f6c5f21b
commit
25f675bac2
4 changed files with 28 additions and 37 deletions
41
eo/src/eo
41
eo/src/eo
|
|
@ -1,7 +1,7 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// eo
|
// eo
|
||||||
// (c) GeNeura Team 1998 - 2000
|
// (c) GeNeura Team 1998 - 2000
|
||||||
/*
|
/*
|
||||||
This library is free software; you can redistribute it and/or
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Lesser General Public
|
modify it under the terms of the GNU Lesser General Public
|
||||||
License as published by the Free Software Foundation; either
|
License as published by the Free Software Foundation; either
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
// to avoid long name warnings
|
// to avoid long name warnings
|
||||||
#pragma warning(disable:4786)
|
#pragma warning(disable:4786)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _eo_
|
#ifndef _eo_
|
||||||
#define _eo_
|
#define _eo_
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
// combinations of simple eoOps (eoMonOp and eoQuadOp)
|
// combinations of simple eoOps (eoMonOp and eoQuadOp)
|
||||||
#include <eoProportionalCombinedOp.h>
|
#include <eoProportionalCombinedOp.h>
|
||||||
// didactic (mimics SGA-like variation into an eoGenOp)
|
// didactic (mimics SGA-like variation into an eoGenOp)
|
||||||
// calls crossover and mutation sequentially,
|
// calls crossover and mutation sequentially,
|
||||||
// with their respective mutation rates
|
// with their respective mutation rates
|
||||||
#include <eoSGAGenOp.h>
|
#include <eoSGAGenOp.h>
|
||||||
// its dual: crossover, mutation (and copy) - proportional choice
|
// its dual: crossover, mutation (and copy) - proportional choice
|
||||||
|
|
@ -100,7 +100,7 @@
|
||||||
#include <eoRankingSelect.h>
|
#include <eoRankingSelect.h>
|
||||||
#include <eoStochTournamentSelect.h>
|
#include <eoStochTournamentSelect.h>
|
||||||
#include <eoSharingSelect.h>
|
#include <eoSharingSelect.h>
|
||||||
// Embedding truncation selection
|
// Embedding truncation selection
|
||||||
#include <eoTruncatedSelectOne.h>
|
#include <eoTruncatedSelectOne.h>
|
||||||
|
|
||||||
// the batch selection - from an eoSelectOne
|
// the batch selection - from an eoSelectOne
|
||||||
|
|
@ -165,45 +165,44 @@
|
||||||
// velocities
|
// velocities
|
||||||
#include <eoVelocity.h>
|
#include <eoVelocity.h>
|
||||||
#include <eoStandardVelocity.h>
|
#include <eoStandardVelocity.h>
|
||||||
#include <eoExtendedVelocity.h>
|
#include <eoExtendedVelocity.h>
|
||||||
#include <eoIntegerVelocity.h>
|
#include <eoIntegerVelocity.h>
|
||||||
#include <eoConstrictedVelocity.h>
|
#include <eoConstrictedVelocity.h>
|
||||||
#include <eoFixedInertiaWeightedVelocity.h>
|
#include <eoFixedInertiaWeightedVelocity.h>
|
||||||
#include <eoVariableInertiaWeightedVelocity.h>
|
#include <eoVariableInertiaWeightedVelocity.h>
|
||||||
#include <eoConstrictedVariableWeightVelocity.h>
|
#include <eoConstrictedVariableWeightVelocity.h>
|
||||||
|
|
||||||
// flights
|
// flights
|
||||||
#include <eoFlight.h>
|
#include <eoFlight.h>
|
||||||
#include <eoStandardFlight.h>
|
#include <eoStandardFlight.h>
|
||||||
#include <eoVelocityInit.h>
|
#include <eoVelocityInit.h>
|
||||||
#include <eoBinaryFlight.h>
|
#include <eoBinaryFlight.h>
|
||||||
#include <eoSigBinaryFlight.h>
|
#include <eoSigBinaryFlight.h>
|
||||||
|
|
||||||
// topologies
|
// topologies
|
||||||
#include <eoTopology.h>
|
#include <eoTopology.h>
|
||||||
#include <eoStarTopology.h>
|
#include <eoStarTopology.h>
|
||||||
#include <eoLinearTopology.h>
|
#include <eoLinearTopology.h>
|
||||||
#include <eoRingTopology.h>
|
#include <eoRingTopology.h>
|
||||||
#include <eoNeighborhood.h>
|
#include <eoNeighborhood.h>
|
||||||
#include <eoSocialNeighborhood.h>
|
#include <eoSocialNeighborhood.h>
|
||||||
|
|
||||||
// PS algorithms
|
// PS algorithms
|
||||||
#include <eoPSO.h>
|
#include <eoPSO.h>
|
||||||
#include <eoEasyPSO.h>
|
#include <eoEasyPSO.h>
|
||||||
#include <eoSyncEasyPSO.h>
|
#include <eoSyncEasyPSO.h>
|
||||||
|
|
||||||
// utils
|
// utils
|
||||||
#include <eoRealBoundModifier.h>
|
#include <eoRealBoundModifier.h>
|
||||||
#include <eoRandomRealWeightUp.h>
|
#include <eoRandomRealWeightUp.h>
|
||||||
#include <eoWeightUpdater.h>
|
#include <eoWeightUpdater.h>
|
||||||
#include <eoLinearDecreasingWeightUp.h>
|
#include <eoLinearDecreasingWeightUp.h>
|
||||||
#include <eoGaussRealWeightUp.h>
|
#include <eoGaussRealWeightUp.h>
|
||||||
|
|
||||||
#include <utils/eoParserLogger.h>
|
|
||||||
|
|
||||||
|
#include <utils/eoLogger.h>
|
||||||
#include <utils/eoParallel.h>
|
#include <utils/eoParallel.h>
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Local Variables:
|
// Local Variables:
|
||||||
// mode: C++
|
// mode: C++
|
||||||
|
|
|
||||||
|
|
@ -32,14 +32,11 @@ Caner Candan <caner.candan@thalesgroup.com>
|
||||||
|
|
||||||
Here's an example explaning how to use eoLogger:
|
Here's an example explaning how to use eoLogger:
|
||||||
\code
|
\code
|
||||||
#include <iostream>
|
#include <eo>
|
||||||
#include <utils/eoLogger.h>
|
|
||||||
#include <utils/eoParser.h>
|
|
||||||
|
|
||||||
int main(int ac, char** av)
|
int main(int ac, char** av)
|
||||||
{
|
{
|
||||||
// We are declaring first an overload of eoParser class using Logger
|
// We are declaring the usual eoParser class
|
||||||
// component.
|
|
||||||
eoParser parser(ac, av);
|
eoParser parser(ac, av);
|
||||||
|
|
||||||
// This call is important to allow -v parameter to change user level.
|
// This call is important to allow -v parameter to change user level.
|
||||||
|
|
@ -216,7 +213,7 @@ public:
|
||||||
friend eoLogger& operator<<(eoLogger&, std::ostream&);
|
friend eoLogger& operator<<(eoLogger&, std::ostream&);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend void make_verbose(eoParser&);
|
friend void make_verbose(eoParser&);
|
||||||
|
|
||||||
eoValueParam<std::string> _verbose;
|
eoValueParam<std::string> _verbose;
|
||||||
eoValueParam<bool> _printVerboseLevels;
|
eoValueParam<bool> _printVerboseLevels;
|
||||||
|
|
@ -257,6 +254,8 @@ private:
|
||||||
/** @example t-eoLogger.cpp
|
/** @example t-eoLogger.cpp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
void make_verbose(eoParser&);
|
||||||
|
|
||||||
namespace eo
|
namespace eo
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -2,17 +2,13 @@
|
||||||
// t-eoLogger.cpp
|
// t-eoLogger.cpp
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <utils/eoLogger.h>
|
|
||||||
#include <utils/eoParserLogger.h>
|
|
||||||
|
|
||||||
#include <eo>
|
#include <eo>
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
int main(int ac, char** av)
|
int main(int ac, char** av)
|
||||||
{
|
{
|
||||||
eoParserLogger parser(ac, av);
|
eoParser parser(ac, av);
|
||||||
|
|
||||||
if (parser.userNeedsHelp())
|
if (parser.userNeedsHelp())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -32,9 +32,6 @@ Caner Candan <caner.candan@thalesgroup.com>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <climits>
|
#include <climits>
|
||||||
|
|
||||||
#include <utils/eoLogger.h>
|
|
||||||
#include <utils/eoParserLogger.h>
|
|
||||||
|
|
||||||
#include <eo>
|
#include <eo>
|
||||||
#include <es/make_real.h>
|
#include <es/make_real.h>
|
||||||
|
|
||||||
|
|
@ -114,7 +111,7 @@ void measure( size_t p,
|
||||||
|
|
||||||
int main(int ac, char** av)
|
int main(int ac, char** av)
|
||||||
{
|
{
|
||||||
eoParserLogger parser(ac, av);
|
eoParser parser(ac, av);
|
||||||
|
|
||||||
unsigned int popMin = parser.getORcreateParam((unsigned int)1, "popMin", "Population Min", 'p', "Evolution Engine").value();
|
unsigned int popMin = parser.getORcreateParam((unsigned int)1, "popMin", "Population Min", 'p', "Evolution Engine").value();
|
||||||
unsigned int popStep = parser.getORcreateParam((unsigned int)1, "popStep", "Population Step", 0, "Evolution Engine").value();
|
unsigned int popStep = parser.getORcreateParam((unsigned int)1, "popStep", "Population Step", 0, "Evolution Engine").value();
|
||||||
|
|
|
||||||
Reference in a new issue