ionFinder/src/ms2Spectrum.cpp
void ms2::Spectrum::setLabelTop(size_t labelTop)
{
    typedef std::list<ms2::DataPoint*> listType;
    listType pointList;

    for(auto & ion : _dataPoints)
        pointList.push_back(&ion);

    if(pointList.size() > labelTop)
    {
        pointList.sort(ms2::DataPoint::IntComparison());
        pointList.resize(labelTop);
    }

    for(auto & it : pointList)
        it->setTopAbundant(true);
}
/**
 * Set the DataPoint::topAbundant value for the top n ion intensities.<br><br>
 *
 * The function iterates through the Spectrum and finds the top n most
 * intense ions.
 * \param labelTop Top n ion intensities to label.
 */
Set the DataPoint::topAbundant value for the top n ion intensities.
The function iterates through the Spectrum and finds the top n most
intense ions.
\param labelTop Top n ion intensities to label.
Set the DataPoint :: topAbundant value for the top n ion intensities . The function iterates through the Spectrum and finds the top n most intense ions . \ param labelTop Top n ion intensities to label .
void ms2::Spectrum::setLabelTop(size_t labelTop)
{
    typedef std::list<ms2::DataPoint*> listType;
    listType pointList;
    for(auto & ion : _dataPoints)
        pointList.push_back(&ion);
    if(pointList.size() > labelTop)
    {
        pointList.sort(ms2::DataPoint::IntComparison());
        pointList.resize(labelTop);
    }
    for(auto & it : pointList)
        it->setTopAbundant(true);
}
void ms2 :: Spectrum :: setLabelTop ( size_t labelTop ) { typedef std :: list < ms2 :: DataPoint * > listType ; listType pointList ; for ( auto & ion : _dataPoints ) pointList . push_back ( & ion ) ; if ( pointList . size ( ) > labelTop ) { pointList . sort ( ms2 :: DataPoint :: IntComparison ( ) ) ; pointList . resize ( labelTop ) ; } for ( auto & it : pointList ) it -> setTopAbundant ( true ) ; }
Set the DataPoint::topAbundant value for the top n ion intensities.<br><br>
 The function iterates through the Spectrum and finds the top n most
 intense ions.
Set the DataPoint :: topAbundant value for the top n ion intensities . <br > <br > The function iterates through the Spectrum and finds the top n most intense ions .