libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
pappso::FilterResampleKeepGreater Class Reference

#include <filterresample.h>

Inheritance diagram for pappso::FilterResampleKeepGreater:
pappso::FilterInterface

Public Member Functions

 FilterResampleKeepGreater (double x_value)
 FilterResampleKeepGreater (const FilterResampleKeepGreater &other)
virtual ~FilterResampleKeepGreater ()
FilterResampleKeepGreateroperator= (const FilterResampleKeepGreater &other)
Tracefilter (Trace &trace) const override
double getThresholdX () const
Public Member Functions inherited from pappso::FilterInterface
virtual ~FilterInterface ()

Private Attributes

double m_value

Detailed Description

Definition at line 54 of file filterresample.h.

Constructor & Destructor Documentation

◆ FilterResampleKeepGreater() [1/2]

pappso::FilterResampleKeepGreater::FilterResampleKeepGreater ( double x_value)

Definition at line 54 of file filterresample.cpp.

54 : m_value(x_value)
55{
56}

References m_value.

Referenced by FilterResampleKeepGreater(), and operator=().

◆ FilterResampleKeepGreater() [2/2]

pappso::FilterResampleKeepGreater::FilterResampleKeepGreater ( const FilterResampleKeepGreater & other)

Definition at line 58 of file filterresample.cpp.

59 : FilterResampleKeepGreater(other.m_value)
60{
61}

References FilterResampleKeepGreater(), and m_value.

◆ ~FilterResampleKeepGreater()

virtual pappso::FilterResampleKeepGreater::~FilterResampleKeepGreater ( )
inlinevirtual

Definition at line 62 of file filterresample.h.

62{};

Member Function Documentation

◆ filter()

Trace & pappso::FilterResampleKeepGreater::filter ( Trace & trace) const
overridevirtual

Implements pappso::FilterInterface.

Definition at line 79 of file filterresample.cpp.

80{
81 // qDebug() << " spectrum.size()=" << spectrum.size();
82
83 auto last_it = findFirstGreaterX(spectrum.begin(), spectrum.end(), m_value);
84 spectrum.erase(spectrum.begin(), last_it);
85
86 // qDebug() << " spectrum.size()=" << spectrum.size();
87
88 return spectrum;
89}
std::vector< DataPoint >::iterator findFirstGreaterX(std::vector< DataPoint >::iterator begin, std::vector< DataPoint >::iterator end, const double &value)
find the first element in which X is greater than the value searched important : it implies that Trac...
Definition trace.cpp:93

References pappso::findFirstGreaterX(), and m_value.

Referenced by pappso::cbor::psm::PsmSpecGlob::filterMassSpectrum(), and pappso::cbor::psm::PsmSpecPeptidOms::filterMassSpectrum().

◆ getThresholdX()

double pappso::FilterResampleKeepGreater::getThresholdX ( ) const

Definition at line 65 of file filterresample.cpp.

66{
67 return m_value;
68}

References m_value.

◆ operator=()

FilterResampleKeepGreater & pappso::FilterResampleKeepGreater::operator= ( const FilterResampleKeepGreater & other)

Definition at line 71 of file filterresample.cpp.

72{
73 m_value = other.m_value;
74
75 return *this;
76}

References FilterResampleKeepGreater(), and m_value.

Member Data Documentation

◆ m_value

double pappso::FilterResampleKeepGreater::m_value
private

The documentation for this class was generated from the following files: