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