Loading...
Searching...
No Matches
pappso::FilterResampleKeepSmaller Class Reference

`#include <filterresample.h>`

Inheritance diagram for pappso::FilterResampleKeepSmaller:

## Public Member Functions

| FilterResampleKeepSmaller (double x_value)
| FilterResampleKeepSmaller (const FilterResampleKeepSmaller &other)
virtual | ~FilterResampleKeepSmaller ()
Trace & | filter (Trace &trace) const override
Public Member Functions inherited from pappso::FilterInterface
virtual | ~FilterInterface ()

## Private Attributes

double | m_value

## Detailed Description

Definition at line 41 of file filterresample.h.

## Constructor & Destructor Documentation

## FilterResampleKeepSmaller() [1/2]

pappso::FilterResampleKeepSmaller::FilterResampleKeepSmaller | ( | double | x_value | ) |

Definition at line 36 of file filterresample.cpp.

: m_value(x_value)
{
}
pappso::FilterResampleKeepSmaller::m_value
double m_value
Definition filterresample.h:44

References m_value.

Referenced by FilterResampleKeepSmaller().

## FilterResampleKeepSmaller() [2/2]

pappso::FilterResampleKeepSmaller::FilterResampleKeepSmaller | ( | const FilterResampleKeepSmaller & | other | ) |

Definition at line 40 of file filterresample.cpp.

: FilterResampleKeepSmaller(other.m_value)
{
}
pappso::FilterResampleKeepSmaller::FilterResampleKeepSmaller
FilterResampleKeepSmaller(double x_value)
Definition filterresample.cpp:36

References FilterResampleKeepSmaller(), and m_value.

## ~FilterResampleKeepSmaller()

virtual pappso::FilterResampleKeepSmaller::~FilterResampleKeepSmaller | ( |  | ) |

inline virtual

Definition at line 49 of file filterresample.h.

{};

## Member Function Documentation

## filter()

Trace & pappso::FilterResampleKeepSmaller::filter | ( | Trace & | trace | ) | const

override virtual

Implements pappso::FilterInterface.

Definition at line 47 of file filterresample.cpp.

{
auto begin_it = findFirstEqualOrGreaterX(spectrum.begin(), spectrum.end(), m_value);
spectrum.erase(begin_it, spectrum.end());
return spectrum;
}
pappso::findFirstEqualOrGreaterX
std::vector< DataPoint >::iterator findFirstEqualOrGreaterX(std::vector< DataPoint >::iterator begin, std::vector< DataPoint >::iterator end, const double &value)
find the first element in which X is equal or greater than the value searched important : it implies ...
Definition trace.cpp:65

References pappso::findFirstEqualOrGreaterX(), and m_value.

## Member Data Documentation

## m_value

double pappso::FilterResampleKeepSmaller::m_value

private

Definition at line 44 of file filterresample.h.

Referenced by FilterResampleKeepSmaller(), FilterResampleKeepSmaller(), and filter().

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

- pappsomspp/core/processing/filters/filterresample.h
- pappsomspp/core/processing/filters/filterresample.cpp