|
OpenMS
2.5.0
|
Go to the documentation of this file.
59 begin_right_padding_(0)
67 inline const std::vector<Peak1D> &
getSignal()
const
79 inline void setSignal(
const std::vector<Peak1D> & signal)
97 inline void setWavelet(
const std::vector<double> & wavelet)
141 return end_left_padding_;
147 return end_left_padding_;
153 end_left_padding_ = end_left_padding;
159 return begin_right_padding_;
165 return begin_right_padding_;
171 begin_right_padding_ = begin_right_padding;
177 return signal_length_;
183 return signal_length_;
189 signal_length_ = signal_length;
195 return (
int) signal_.size();
201 virtual void init(
double scale,
double spacing);
207 return signal_[i].getIntensity();
212 return signal_[i].getIntensity();
233 template <
typename InputPeakIterator>
237 double left_position = it_left->getMZ();
238 double right_position = (it_left + 1)->getMZ();
239 double d = (x - left_position) / (right_position - left_position);
241 return (it_left + 1)->getIntensity() * d + it_left->getIntensity() * (1 - d);
double scale_
Spacing and scale of the wavelet and length of the signal.
Definition: ContinuousWaveletTransform.h:223
std::vector< Peak1D > signal_
The transformed signal.
Definition: ContinuousWaveletTransform.h:217
double getInterpolatedValue_(double x, InputPeakIterator it_left)
Definition: ContinuousWaveletTransform.h:234
double getSpacing() const
Definition: ContinuousWaveletTransform.h:121
void setRightPaddingIndex(const SignedSize begin_right_padding)
Mutable access to position where the signal starts.
Definition: ContinuousWaveletTransform.h:169
double spacing_
Definition: ContinuousWaveletTransform.h:224
const std::vector< Peak1D > & getSignal() const
Non-mutable access to the wavelet transform of the signal.
Definition: ContinuousWaveletTransform.h:67
void setSignal(const std::vector< Peak1D > &signal)
Mutable access to the wavelet transform of the signal.
Definition: ContinuousWaveletTransform.h:79
SignedSize getRightPaddingIndex() const
Non-mutable access to the position where the signal ends (in the interval (begin_right_padding_,...
Definition: ContinuousWaveletTransform.h:157
SignedSize & getRightPaddingIndex()
Mutable access to the position where the signal starts.
Definition: ContinuousWaveletTransform.h:163
int getSize() const
Non-mutable access to signal length including padded zeros [0,end].
Definition: ContinuousWaveletTransform.h:193
void setWavelet(const std::vector< double > &wavelet)
Mutable access to the signal.
Definition: ContinuousWaveletTransform.h:97
double getScale() const
Definition: ContinuousWaveletTransform.h:103
This class is the base class of the continuous wavelet transformation.
Definition: ContinuousWaveletTransform.h:46
SignedSize getSignalLength() const
Non-mutable access to signal length [end_left_padding,begin_right_padding].
Definition: ContinuousWaveletTransform.h:175
double & getScale()
Mutable access to the spacing of raw data.
Definition: ContinuousWaveletTransform.h:109
void setSignalLength(const SignedSize signal_length)
Mutable access to signal length [end_left_padding,begin_right_padding].
Definition: ContinuousWaveletTransform.h:187
const std::vector< double > & getWavelet() const
Non-mutable access to the wavelet.
Definition: ContinuousWaveletTransform.h:85
std::vector< Peak1D > & getSignal()
Mutable access to the wavelet transform of the signal.
Definition: ContinuousWaveletTransform.h:73
double operator[](unsigned int i) const
Definition: ContinuousWaveletTransform.h:210
std::vector< double > & getWavelet()
Mutable access to the wavelet.
Definition: ContinuousWaveletTransform.h:91
void setSpacing(double spacing)
Mutable access to the spacing of raw data.
Definition: ContinuousWaveletTransform.h:133
SignedSize signal_length_
Definition: ContinuousWaveletTransform.h:225
double operator[](unsigned int i)
Yields the signal (intensity) at position i.
Definition: ContinuousWaveletTransform.h:205
SignedSize end_left_padding_
Definition: ContinuousWaveletTransform.h:230
std::vector< double > wavelet_
The pre-tabulated wavelet used for the transform.
Definition: ContinuousWaveletTransform.h:220
void setLeftPaddingIndex(const SignedSize end_left_padding)
Mutable access to position where the signal starts.
Definition: ContinuousWaveletTransform.h:151
virtual ~ContinuousWaveletTransform()
Destructor.
Definition: ContinuousWaveletTransform.h:63
void setScale(double scale)
Mutable access to the spacing of raw data.
Definition: ContinuousWaveletTransform.h:115
ptrdiff_t SignedSize
Signed Size type e.g. used as pointer difference.
Definition: Types.h:134
SignedSize & getSignalLength()
Mutable access to signal length [end_left_padding,begin_right_padding].
Definition: ContinuousWaveletTransform.h:181
SignedSize getLeftPaddingIndex() const
Non-mutable access to the position where the signal starts (in the interval [0,end_left_padding_) are...
Definition: ContinuousWaveletTransform.h:139
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
std::vector< Peak1D >::const_iterator PeakConstIterator
Raw data const iterator type.
Definition: ContinuousWaveletTransform.h:50
SignedSize begin_right_padding_
Definition: ContinuousWaveletTransform.h:231
double & getSpacing()
Mutable access to the spacing of raw data.
Definition: ContinuousWaveletTransform.h:127
SignedSize & getLeftPaddingIndex()
Mutable access to the position where the signal starts.
Definition: ContinuousWaveletTransform.h:145
ContinuousWaveletTransform()
Constructor.
Definition: ContinuousWaveletTransform.h:54