ProteoWizard
pwiz
analysis
frequency
TruncatedLorentzianTest.cpp
Go to the documentation of this file.
1
//
2
// $Id: TruncatedLorentzianTest.cpp 4129 2012-11-20 00:05:37Z chambm $
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
#include "
TruncatedLorentzian.hpp
"
25
#include "
DerivativeTest.hpp
"
26
27
28
#include <boost/numeric/ublas/vector.hpp>
29
#include <boost/numeric/ublas/matrix.hpp>
30
#include <boost/numeric/ublas/io.hpp>
31
namespace
ublas
=
boost::numeric::ublas
;
32
33
#include "
pwiz/utility/misc/Std.hpp
"
34
#include <cstring>
35
36
37
using namespace
pwiz::util
;
38
using namespace
pwiz::frequency
;
39
40
41
ostream*
os_
= 0;
42
43
44
int
main
(
int
argc,
char
* argv[])
45
{
46
if
(argc>1 && !strcmp(argv[1],
"-v"
))
os_
= &cout;
47
if
(
os_
) *
os_
<<
"TruncatedLorentzianTest\n"
;
48
49
if
(
os_
) *
os_
<< setprecision(8);
50
51
ublas::vector<double> p(4);
52
53
p(
TruncatedLorentzian::AlphaR
) = 1;
54
p(
TruncatedLorentzian::AlphaI
) = 5;
55
p(
TruncatedLorentzian::Tau
) = 2;
56
p(TruncatedLorentzian::F0) = 0;
57
double
T = 1;
58
59
/*
60
p(TruncatedLorentzian::AlphaR) = 5e6;
61
p(TruncatedLorentzian::AlphaI) = 0;
62
p(TruncatedLorentzian::Tau) = 1;
63
p(TruncatedLorentzian::F0) = 159455;
64
double T = .384;
65
*/
66
67
TruncatedLorentzian
L(T);
68
69
// L.outputSamples(cout, p);
70
71
/*
72
for (int i=0; i<10; i++)
73
DerivativeTest::testDerivatives(L, i, p, 1e-5, 1e-3);
74
*/
75
76
if
(
os_
) *
os_
<<
"L(0): "
<< L(0,p) << endl;
77
78
return
0;
79
}
AlphaR
AlphaR
Definition:
TruncatedLorentzian.hpp:43
main
int main(int argc, char *argv[])
Definition:
TruncatedLorentzianTest.cpp:44
AlphaI
AlphaI
Definition:
TruncatedLorentzian.hpp:43
Std.hpp
pwiz::frequency
Definition:
DerivativeTest.hpp:37
pwiz::util
Definition:
almost_equal.hpp:33
Tau
Tau
Definition:
TruncatedLorentzian.hpp:43
DerivativeTest.hpp
ublas
pwiz::frequency::TruncatedLorentzian
Definition:
TruncatedLorentzian.hpp:39
os_
ostream * os_
Definition:
TruncatedLorentzianTest.cpp:41
TruncatedLorentzian.hpp
Generated by
1.8.12