Changeset 12967 for trunk/Mars
- Timestamp:
- 02/29/12 10:30:19 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/DrsCalib.h
r12946 r12967 573 573 for (auto it=beg; it!=end-512; it++, n++) 574 574 { 575 const double v = it->first;576 const double w = it->second;575 const double valv = it->first; 576 const double valw = it->second; 577 577 578 578 it->first = sumv>0 ? n*(1-s*sumw/sumv) :0; 579 579 580 sum w += w;581 sum v += v;580 sumv += valv; 581 sumw += valw; 582 582 } 583 583 … … 588 588 for (auto it=end-1; it!=beg-1+512; it--, n++) 589 589 { 590 const double v = it->first;591 const double w = it->second;592 593 sum w += w;594 sum v += v;590 const double valv = it->first; 591 const double valw = it->second; 592 593 sumv += valv; 594 sumw += valw; 595 595 596 596 it->first = sumv>0 ? n*(s*sumw/sumv-1) : 0;
Note:
See TracChangeset
for help on using the changeset viewer.