ProteoWizard
Smoother.hpp
Go to the documentation of this file.
1//
2// $Id$
3//
4//
5// Original author: Matt Chambers <matt.chambers <a.t> vanderbilt.edu>
6//
7// Copyright 2008 Vanderbilt University - Nashville, TN 37232
8//
9// Licensed under the Apache License, Version 2.0 (the "License");
10// you may not use this file except in compliance with the License.
11// You may obtain a copy of the License at
12//
13// http://www.apache.org/licenses/LICENSE-2.0
14//
15// Unless required by applicable law or agreed to in writing, software
16// distributed under the License is distributed on an "AS IS" BASIS,
17// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18// See the License for the specific language governing permissions and
19// limitations under the License.
20//
21
22
23#ifndef _SMOOTHER_HPP_
24#define _SMOOTHER_HPP_
25
26
28#include "boost/shared_ptr.hpp"
29#include <vector>
30
31
32namespace pwiz {
33namespace analysis {
34
35
36/// interface for a one-dimensional smoothing algorithm
38{
39 /// smooth y values to existing vectors;
40 /// note: in the case of sparse vectors, smoothing may fill in samples not present
41 /// in the original data, so make sure to check the size of the output vectors
42 virtual void smooth(const std::vector<double>& x, const std::vector<double>& y,
43 std::vector<double>& xSmoothed, std::vector<double>& ySmoothed) = 0;
44
45 /// smooth y values and copy back to the input vectors;
46 /// note: in the case of sparse vectors, smoothing may fill in samples not present
47 /// in the original data, so make sure to check the size of the output vectors
48 virtual void smooth_copy(std::vector<double>& x, std::vector<double>& y) = 0;
49
50 virtual ~Smoother() {};
51};
52
53typedef boost::shared_ptr<Smoother> SmootherPtr;
54
55
56} // namespace analysis
57} // namespace pwiz
58
59
60#endif // _SMOOTHER_HPP_
#define PWIZ_API_DECL
Definition Export.hpp:32
KernelTraitsBase< Kernel >::space_type::abscissa_type x
KernelTraitsBase< Kernel >::space_type::ordinate_type y
boost::shared_ptr< Smoother > SmootherPtr
Definition Smoother.hpp:53
interface for a one-dimensional smoothing algorithm
Definition Smoother.hpp:38
virtual void smooth_copy(std::vector< double > &x, std::vector< double > &y)=0
smooth y values and copy back to the input vectors; note: in the case of sparse vectors,...
virtual void smooth(const std::vector< double > &x, const std::vector< double > &y, std::vector< double > &xSmoothed, std::vector< double > &ySmoothed)=0
smooth y values to existing vectors; note: in the case of sparse vectors, smoothing may fill in sampl...