Changeset 07da749 in sasview for sansmodels/src/sans
- Timestamp:
- Apr 21, 2009 12:26:33 PM (16 years ago)
- 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:
- f6160a2
- Parents:
- 2501cf7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_models/parameters.cpp
r2b8b1a2 r07da749 155 155 double value = (*par)(); 156 156 157 if (npts<2) { 158 weights.insert(weights.end(), WeightPoint(value, 1.0)); 159 } else { 157 160 for(int i=0; i<npts; 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])); 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])); 162 164 } 163 164 } 165 166 165 } 166 } 167 167 /** 168 168 * Method to set the weights
Note: See TracChangeset
for help on using the changeset viewer.