Changeset 3329 in Sophya for trunk/Cosmo/SimLSS/geneutils.cc


Ignore:
Timestamp:
Sep 27, 2007, 6:21:55 PM (18 years ago)
Author:
cmv
Message:

possibilite de ne pas faire poisson sur Ngal cmv 27/09/2007

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosmo/SimLSS/geneutils.cc

    r3325 r3329  
    6464  : _ymin(0.) , _ymax(0.) , _x(x) , _y(y)
    6565{
    66   int_4 ns = _x.size();
     66  uint_4 ns = _x.size();
    6767  if(ns<3 || _y.size()<=0 || ns!=_y.size())
    6868    throw ParmError("InverseFunc::InverseFunc_Error: bad array size");
    6969
    7070  // Check "x" strictement monotone croissant
    71   for(int_4 i=0;i<ns-1;i++)
     71  for(uint_4 i=0;i<ns-1;i++)
    7272    if(_x[i+1]<=_x[i]) {
    7373      cout<<"InverseFunc::InverseFunc_Error: _x array not stricly growing"<<endl;
     
    7676
    7777  // Check "y" monotone croissant
    78   for(int_4 i=0;i<ns-1;i++)
     78  for(uint_4 i=0;i<ns-1;i++)
    7979    if(_y[i+1]<_y[i]) {
    8080      cout<<"InverseFunc::InverseFunc_Error: _y array not growing"<<endl;
     
    134134    // Protection
    135135    if(i1<0) {i1++; i2++; i3++;}
    136     if(i3==_y.size()) {i1--; i2--; i3--;}
     136    if(i3==(long)_y.size()) {i1--; i2--; i3--;}
    137137    // Interpolation parabolique
    138138    double dy = _y[i3]-_y[i1];
     
    163163{
    164164 long n = X.size();
    165  if(Y.size()<n || n<2)
     165 if(n>(long)Y.size() || n<2)
    166166   throw ParmError("InterpTab_Error :  incompatible size between X and Y tables!");
    167167
Note: See TracChangeset for help on using the changeset viewer.