13.2.9. Macro “dataserverGeyserStat.C

13.2.9.1. Objective

This part shows the complete code used to produce the console display in Computing the elementary statistic.

13.2.9.2. Macro Uranie

    TDataServer *tdsGeyser =new TDataServer("geyser","poet");
    tdsGeyser->fileDataRead("geyser.dat");
    tdsGeyser->computeStatistic("x1");

    cout<<"min(x1)= "<<tdsGeyser->getAttribute("x1")->getMinimum()<<";  max(x1)= "
        <<tdsGeyser->getAttribute("x1")->getMaximum()
        <<";  mean(x1)= "<<tdsGeyser->getAttribute("x1")->getMean()<<";  std(x1)= "
        <<tdsGeyser->getAttribute("x1")->getStd()<<endl;

13.2.9.3. Console

This macro should result in this output in console:

min(x1)= 1.6;  max(x1)= 5.1;  mean(x1)= 3.48778;  std(x1)= 1.14137