Added the className methods everywhere
This commit is contained in:
parent
c0d5eec303
commit
e44cf2c446
4 changed files with 21 additions and 1 deletions
|
|
@ -21,7 +21,7 @@
|
|||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
Marc.Schoenauer@polytechnique.fr
|
||||
mak@dhi.dk
|
||||
CVS Info: $Date: 2003-02-27 19:21:18 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoMonitor.h,v 1.10 2003-02-27 19:21:18 okoenig Exp $ $Author: okoenig $
|
||||
CVS Info: $Date: 2004-06-15 07:09:57 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/utils/eoMonitor.h,v 1.11 2004-06-15 07:09:57 evomarc Exp $ $Author: evomarc $
|
||||
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -55,6 +55,7 @@ public :
|
|||
*/
|
||||
virtual void add(const eoParam& _param) { vec.push_back(&_param); }
|
||||
|
||||
virtual std::string className(void) const { return "eoMonitor"; }
|
||||
|
||||
protected :
|
||||
typedef std::vector<const eoParam*>::iterator iterator;
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ class eoStatBase : public eoUF<const eoPop<EOT>&, void>
|
|||
{
|
||||
public:
|
||||
virtual void lastCall(const eoPop<EOT>&) {}
|
||||
virtual std::string className(void) const { return "eoStatBase"; }
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -58,6 +59,7 @@ class eoStat : public eoValueParam<T>, public eoStatBase<EOT>
|
|||
{
|
||||
public :
|
||||
eoStat(T _value, std::string _description) : eoValueParam<T>(_value, _description) {}
|
||||
virtual std::string className(void) const { return "eoStat"; }
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -68,6 +70,7 @@ class eoSortedStatBase : public eoUF<const std::vector<const EOT*>&, void>
|
|||
{
|
||||
public:
|
||||
virtual void lastCall(const std::vector<const EOT*>&) {}
|
||||
virtual std::string className(void) const { return "eoSortedStatBase"; }
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -80,6 +83,7 @@ class eoSortedStat : public eoSortedStatBase<EOT>, public eoValueParam<ParamType
|
|||
{
|
||||
public :
|
||||
eoSortedStat(ParamType _value, std::string _desc) : eoValueParam<ParamType>(_value, _desc) {}
|
||||
virtual std::string className(void) const { return "eoSortedStat"; }
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -114,6 +118,8 @@ public :
|
|||
doit(_pop, Fitness()); // specializations for scalar and std::vector
|
||||
}
|
||||
|
||||
virtual std::string className(void) const { return "eoAverageStat"; }
|
||||
|
||||
private :
|
||||
|
||||
// Specialization for pareto fitness
|
||||
|
|
@ -174,6 +180,8 @@ public :
|
|||
value().first = result.first / n; // average
|
||||
value().second = sqrt( (result.second - n * value().first * value().first) / (n - 1.0)); // stdev
|
||||
}
|
||||
|
||||
virtual std::string className(void) const { return "eoSecondMomentStats"; }
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -201,6 +209,7 @@ public :
|
|||
doit(_pop, Fitness());
|
||||
}
|
||||
|
||||
virtual std::string className(void) const { return "eoNthElementFitnessStat"; }
|
||||
private :
|
||||
|
||||
struct CmpFitness
|
||||
|
|
@ -299,6 +308,7 @@ public :
|
|||
doit(_pop, Fitness() ); // specializations for scalar and std::vector
|
||||
}
|
||||
|
||||
virtual std::string className(void) const { return "eoBestFitnessStat"; }
|
||||
private :
|
||||
|
||||
struct CmpFitness
|
||||
|
|
@ -377,6 +387,8 @@ public :
|
|||
double sz = _pop.size();
|
||||
v /= sz * sz * _pop[0].size();
|
||||
}
|
||||
virtual std::string className(void) const { return "eoDistanceStat"; }
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ public :
|
|||
verbose(_verbose), delim(_delim), firsttime(true) {}
|
||||
eoMonitor& operator()(void);
|
||||
|
||||
virtual std::string className(void) const { return "eoStdoutMonitor"; }
|
||||
private :
|
||||
bool verbose;
|
||||
std::string delim;
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ class eoUpdater : public eoF<void>
|
|||
{
|
||||
public:
|
||||
virtual void lastCall() {}
|
||||
virtual std::string className(void) const { return "eoUpdater"; }
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -57,6 +58,7 @@ class eoIncrementor : public eoUpdater
|
|||
counter += stepsize;
|
||||
}
|
||||
|
||||
virtual std::string className(void) const { return "eoIncrementor"; }
|
||||
private:
|
||||
T& counter;
|
||||
T stepsize;
|
||||
|
|
@ -85,6 +87,8 @@ public :
|
|||
value() += stepsize;
|
||||
}
|
||||
|
||||
virtual std::string className(void) const { return "eoIncrementorParam"; }
|
||||
|
||||
private:
|
||||
T stepsize;
|
||||
};
|
||||
|
|
@ -103,6 +107,7 @@ public :
|
|||
|
||||
void operator()(void);
|
||||
|
||||
virtual std::string className(void) const { return "eoTimedStateSaver"; }
|
||||
private :
|
||||
const eoState& state;
|
||||
|
||||
|
|
@ -132,6 +137,7 @@ public :
|
|||
virtual void lastCall(void);
|
||||
void operator()(void);
|
||||
|
||||
virtual std::string className(void) const { return "eoCountedStateSaver"; }
|
||||
private :
|
||||
void doItNow(void);
|
||||
|
||||
|
|
|
|||
Reference in a new issue