ProteoWizard
TruncatedLorentzian.hpp
Go to the documentation of this file.
1//
2// $Id$
3//
4//
5// Original author: Darren Kessner <darren@proteowizard.org>
6//
7// Copyright 2006 Louis Warschaw Prostate Cancer Center
8// Cedars Sinai Medical Center, Los Angeles, California 90048
9//
10// Licensed under the Apache License, Version 2.0 (the "License");
11// you may not use this file except in compliance with the License.
12// You may obtain a copy of the License at
13//
14// http://www.apache.org/licenses/LICENSE-2.0
15//
16// Unless required by applicable law or agreed to in writing, software
17// distributed under the License is distributed on an "AS IS" BASIS,
18// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19// See the License for the specific language governing permissions and
20// limitations under the License.
21//
22
23
24#ifndef _TRUNCATEDLORENTZIAN_HPP_
25#define _TRUNCATEDLORENTZIAN_HPP_
26
27
30#include <complex>
31#include <memory>
32#include "boost/shared_ptr.hpp"
33
34
35namespace pwiz {
36namespace frequency {
37
38
39class PWIZ_API_DECL TruncatedLorentzian : public ParametrizedFunction< std::complex<double> >
40{
41 public:
42
43 enum PWIZ_API_DECL ParameterIndex {AlphaR, AlphaI, Tau, F0};
44
45 TruncatedLorentzian(double T); // cutoff value T
47
48 virtual unsigned int parameterCount() const {return 4;}
49 virtual std::complex<double> operator()(double f, const ublas::vector<double>& p) const;
50 virtual ublas::vector< std::complex<double> > dp(double f, const ublas::vector<double>& p) const;
51 virtual ublas::matrix< std::complex<double> > dp2(double f, const ublas::vector<double>& p) const;
52
53 void outputSamples(const std::string& filename, const ublas::vector<double>& p,
54 double shift = 0, double scale = 1) const;
55
56 private:
57 struct Impl;
58 boost::shared_ptr<Impl> impl_;
59};
60
61
62} // namespace frequency
63} // namespace pwiz
64
65
66#endif // _TRUNCATEDLORENZIAN_HPP_
67
#define PWIZ_API_DECL
Definition Export.hpp:32
virtual std::complex< double > operator()(double f, const ublas::vector< double > &p) const
void outputSamples(const std::string &filename, const ublas::vector< double > &p, double shift=0, double scale=1) const
virtual ublas::vector< std::complex< double > > dp(double f, const ublas::vector< double > &p) const
virtual unsigned int parameterCount() const
virtual ublas::matrix< std::complex< double > > dp2(double f, const ublas::vector< double > &p) const