Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
Candidate.cpp
1 /*
2  * The MIT License (MIT)
3  *
4  * Copyright (c) 2016 The SKA organisation
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 namespace ska {
25 namespace cheetah {
26 namespace data {
27 
28 
29 template <typename Arch, typename T>
31 {
32 }
33 
34 
35 template <typename Arch, typename T>
36 Candidate<Arch,T>::Candidate(Candidate<Arch, T>::MsecTimeType period, SecPerSecType pdot, Candidate<Arch,T>::Dm dm, std::size_t ident)
37  : _pulse_period(period)
38  , _pulse_pdot(pdot)
39  , _dm(dm)
40  , _ident(ident)
41 {
42 }
43 
44 
45 template <typename Arch, typename T>
46 Candidate<Arch,T>::Candidate(Candidate<Arch, T>::MsecTimeType period, SecPerSecType pdot, Candidate<Arch, T>::Dm dm, Candidate<Arch, T>::MsecTimeType width, T sigma, std::size_t ident)
47  : _pulse_period(period)
48  , _pulse_pdot(pdot)
49  , _dm(dm)
50  , _pulse_width(width)
51  , _sigma(sigma)
52  , _ident(ident)
53 {
54 }
55 
56 template <typename Arch, typename T>
58 
59 
60 template <typename Arch, typename T>
61 typename Candidate<Arch,T>::MsecTimeType const& Candidate<Arch,T>::period() const
62 {
63  return this->_pulse_period;
64 }
65 
66 template <typename Arch, typename T>
67 void Candidate<Arch,T>::period(Candidate<Arch,T>::MsecTimeType c_pulse_period)
68 {
69  this->_pulse_period = c_pulse_period;
70 }
71 
72 template <typename Arch, typename T>
73 typename Candidate<Arch,T>::SecPerSecType const& Candidate<Arch,T>::pdot() const
74 {
75  return this->_pulse_pdot;
76 }
77 
78 template <typename Arch, typename T>
79 void Candidate<Arch,T>::pdot(SecPerSecType c_pulse_pdot)
80 {
81  this->_pulse_pdot = c_pulse_pdot;
82 }
83 
84 template <typename Arch, typename T>
85 typename Candidate<Arch,T>::Dm const & Candidate<Arch,T>::dm() const
86 {
87  return this->_dm;
88 }
89 
90 template <typename Arch, typename T>
91 void Candidate<Arch,T>::dm(Dm c_dm)
92 {
93  this->_dm = c_dm;
94 }
95 
96 
97 template <typename Arch, typename T>
98 typename Candidate<Arch,T>::MsecTimeType const& Candidate<Arch,T>::width() const
99 {
100  return this->_pulse_width;
101 }
102 
103 template <typename Arch, typename T>
104 void Candidate<Arch,T>::width(Candidate<Arch,T>::MsecTimeType c_pulse_width)
105 {
106  this->_pulse_width = c_pulse_width;
107 }
108 
109 
110 template <typename Arch, typename T>
111 T const& Candidate<Arch,T>::sigma() const
112 {
113  return this->_sigma;
114 }
115 
116 template <typename Arch, typename T>
118 {
119  this->_sigma = c_sigma;
120 }
121 
122 template <typename Arch, typename T>
123 std::size_t const& Candidate<Arch,T>::ident() const
124 {
125  return (this->_ident);
126 }
127 
128 template <typename Arch, typename T>
129 void Candidate<Arch,T>::ident(std::size_t c_ident)
130 {
131  this->_ident = c_ident;
132 }
133 
134 } // namespace data
135 } // namespace cheetah
136 } // namespace ska
137 
138 
139 
SecPerSecType const & pdot() const
access a reference to pulse_pdot.
Definition: Candidate.cpp:73
Candidate()
Create a zero-sized Candidate.
Definition: Candidate.cpp:30
T const & sigma() const
access a reference to _sigma.
Definition: Candidate.cpp:111
Some limits and constants for FLDO.
Definition: Brdz.h:35
MsecTimeType const & width() const
access a reference to width.
Definition: Candidate.cpp:98
~Candidate()
destroy a Candidate
Definition: Candidate.cpp:57
std::size_t const & ident() const
access a reference to ident.
Definition: Candidate.cpp:123
Dm const & dm() const
access a reference to dm.
Definition: Candidate.cpp:85
MsecTimeType const & period() const
access a reference to pulsar period.
Definition: Candidate.cpp:61