Ajout des statistics, j'espère avoir fini ;)
git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1804 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
193e016083
commit
fb4a9f1df7
6 changed files with 268 additions and 0 deletions
|
|
@ -34,6 +34,10 @@ using namespace std;
|
|||
// the sampling class
|
||||
#include <sampling/moDensityOfStatesSampling.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// the statistics class
|
||||
#include <sampling/moStatistics.h>
|
||||
|
||||
// Declaration of types
|
||||
//-----------------------------------------------------------------------------
|
||||
// Indi is the typedef of the solution type like in paradisEO-eo
|
||||
|
|
@ -165,6 +169,14 @@ void main_function(int argc, char **argv)
|
|||
|
||||
std::cout << "Last values:" << std::endl;
|
||||
std::cout << "Fitness " << fitnessValues[fitnessValues.size() - 1] << std::endl;
|
||||
|
||||
// more basic statistics on the distribution:
|
||||
double min, max, avg, std;
|
||||
|
||||
moStatistics statistics;
|
||||
|
||||
statistics.basic(fitnessValues, min, max, avg, std);
|
||||
std::cout << "min=" << min << ", max=" << max << ", average=" << avg << ", std dev=" << std << std::endl;
|
||||
}
|
||||
|
||||
// A main that catches the exceptions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue