We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 077920c commit a23bdceCopy full SHA for a23bdce
src/IsoSpec++/marginalTrek++.cpp
@@ -280,15 +280,8 @@ size_t Marginal::getMonoisotopicAtomIndex() const
280
281
double Marginal::getMonoisotopicConfMass() const
282
{
283
- double found_prob = -std::numeric_limits<double>::infinity();
284
- double found_mass = 0.0; // to avoid uninitialized var warning
285
- for(unsigned int ii = 0; ii < isotopeNo; ii++)
286
- if( found_prob < atom_lProbs[ii] )
287
- {
288
- found_prob = atom_lProbs[ii];
289
- found_mass = atom_masses[ii];
290
- }
291
- return found_mass*atomCnt;
+ size_t idx = getMonoisotopicAtomIndex();
+ return atom_masses[idx]*atomCnt;
292
}
293
294
double Marginal::getAtomAverageMass() const
0 commit comments