Changeset 2922 in Sophya for trunk/SophyaPI/PIext/servnobjm.cc


Ignore:
Timestamp:
Mar 27, 2006, 6:57:19 PM (20 years ago)
Author:
ansari
Message:

Ajout commande expmeansig pour TD/TP SurvEnv - Reza 27/3/2006

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/servnobjm.cc

    r2833 r2922  
    2626#include "tmatrix.h"
    2727#include "tvector.h"
     28#include "matharr.h"
    2829#include "pitvmaad.h"
    2930#endif
     
    817818  }
    818819delete nt;
    819 MyObjMgr()->AddObj(vec, nomvec);
    820 MyObjMgr()->DisplayObj(nomvec, dopt);
     820if (nomvec.size() > 0) {
     821  MyObjMgr()->AddObj(vec, nomvec);
     822  MyObjMgr()->DisplayObj(nomvec, dopt);
     823}
     824else {
     825// On calcule et on affiche mean/sigma + min/max
     826  double min, max, mean, sigma;
     827  vec->MinMax(min, max);
     828  MathArray<r_8> ma;
     829  ma.MeanSigma(*vec, mean, sigma);
     830  cout << " Mean= " << mean << "  Sigma= " << sigma
     831       << "  Min= " << min << " Max= " << max << endl;
     832  delete vec;
     833}
    821834return; 
    822835}
Note: See TracChangeset for help on using the changeset viewer.