indented file
This commit is contained in:
parent
7ffea6f818
commit
ffb683368f
1 changed files with 39 additions and 39 deletions
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
Contact: clive.canape@inria.fr
|
Contact: clive.canape@inria.fr
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -38,11 +38,11 @@
|
||||||
*/
|
*/
|
||||||
template <class POT> class eoInitializerBase : public eoFunctorBase
|
template <class POT> class eoInitializerBase : public eoFunctorBase
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
|
|
||||||
virtual ~eoInitializerBase() {}
|
virtual ~eoInitializerBase() {}
|
||||||
|
|
||||||
virtual void operator()(){};
|
virtual void operator()(){};
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -52,45 +52,45 @@ template <class POT> class eoInitializerBase : public eoFunctorBase
|
||||||
*/
|
*/
|
||||||
template <class POT> class eoInitializer : public eoInitializerBase <POT>
|
template <class POT> class eoInitializer : public eoInitializerBase <POT>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Constructor
|
//! Constructor
|
||||||
//! @param _proc Evaluation function
|
//! @param _proc Evaluation function
|
||||||
//! @param _initVelo Initialization of the velocity
|
//! @param _initVelo Initialization of the velocity
|
||||||
//! @param _initBest Initialization of the best
|
//! @param _initBest Initialization of the best
|
||||||
//! @param _pop Population
|
//! @param _pop Population
|
||||||
eoInitializer(
|
eoInitializer(
|
||||||
eoUF<POT&, void>& _proc,
|
eoUF<POT&, void>& _proc,
|
||||||
eoVelocityInit < POT > &_initVelo,
|
eoVelocityInit < POT > &_initVelo,
|
||||||
eoParticleBestInit <POT> &_initBest,
|
eoParticleBestInit <POT> &_initBest,
|
||||||
eoPop < POT > &_pop
|
eoPop < POT > &_pop
|
||||||
) : proc(_proc), initVelo(_initVelo), initBest(_initBest)
|
) : proc(_proc), initVelo(_initVelo), initBest(_initBest)
|
||||||
{
|
{
|
||||||
apply(proc, _pop);
|
apply(proc, _pop);
|
||||||
apply < POT > (initVelo, _pop);
|
apply < POT > (initVelo, _pop);
|
||||||
apply < POT > (initBest, _pop);
|
apply < POT > (initBest, _pop);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Give the name of the class
|
//! Give the name of the class
|
||||||
//! @return The name of the class
|
//! @return The name of the class
|
||||||
virtual std::string className (void) const
|
virtual std::string className (void) const
|
||||||
{
|
{
|
||||||
return "eoInitializer";
|
return "eoInitializer";
|
||||||
}
|
}
|
||||||
|
|
||||||
private :
|
private :
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@param proc First evaluation
|
@param proc First evaluation
|
||||||
@param initVelo Initialization of the velocity
|
@param initVelo Initialization of the velocity
|
||||||
@param initBest Initialization of the best
|
@param initBest Initialization of the best
|
||||||
|
|
||||||
*/
|
*/
|
||||||
eoUF<POT&, void>& proc;
|
eoUF<POT&, void>& proc;
|
||||||
eoVelocityInit < POT > & initVelo;
|
eoVelocityInit < POT > & initVelo;
|
||||||
eoParticleBestInit <POT> & initBest;
|
eoParticleBestInit <POT> & initBest;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue