Changeset 2b8b1a2 in sasview for sansmodels/src/sans


Ignore:
Timestamp:
Apr 20, 2009 4:04:25 PM (16 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
513115c
Parents:
2872035
Message:

minor change

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/c_models/parameters.cpp

    r836fe6e r2b8b1a2  
    155155        double value = (*par)(); 
    156156 
    157         if (npts<2) { 
    158                 weights.insert(weights.end(), WeightPoint(value, 1.0)); 
    159         } else { 
    160157                for(int i=0; i<npts; i++) { 
    161                         if ( ((*par).has_min==false || _values[i]>(*par).min) 
    162                           && ((*par).has_max==false || _values[i]<(*par).max)  ) 
    163                                 weights.insert(weights.end(), WeightPoint(_values[i], _weights[i])); 
     158                        double val = value + _values[i]; 
     159                        if ( ((*par).has_min==false || val>(*par).min) 
     160                          && ((*par).has_max==false || val<(*par).max)  ) 
     161                                weights.insert(weights.end(), WeightPoint(val, _weights[i])); 
    164162                } 
    165         } 
     163 
    166164} 
    167165 
Note: See TracChangeset for help on using the changeset viewer.