Bayesian Analysis of Neutron Star Mass and Radius Observations
entry.h
Go to the documentation of this file.
1 /*
2  -------------------------------------------------------------------
3 
4  Copyright (C) 2012-2015, Andrew W. Steiner
5 
6  This file is part of Bamr.
7 
8  Bamr is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 3 of the License, or
11  (at your option) any later version.
12 
13  Bamr is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with Bamr. If not, see <http://www.gnu.org/licenses/>.
20 
21  -------------------------------------------------------------------
22 */
23 /** \file entry.h
24  \brief Definition of entry class
25 */
26 #ifndef ENTRY_H
27 #define ENTRY_H
28 
29 #include <iostream>
30 
31 #include "nstar_cold2.h"
32 
33 namespace bamr {
34 
35  /** \brief A data class which holds the EOS parameters,
36  the masses and the radii
37  */
38  class entry {
39 
40  public:
41 
42  /// Create empty entry object
43  entry();
44 
45  /// Create object for \c n sources
46  entry(size_t nps, size_t nso);
47 
48  /// Reallocate for \c n sources
49  int allocate(size_t nps, size_t nso);
50 
51  /// Copy constructor
52  entry &operator=(const entry &e);
53 
54  /// Copy constructor
55  entry(const entry &e);
56 
57  /** \brief Number of parameters
58 
59  This is automatically set in the constructor
60  to the template parameter
61  */
62  size_t np;
63 
64  /// Parameters
66 
67  /// Number of sources
68  size_t ns;
69 
70  /// Mass for each source
72 
73  /// Radius for each source
75  };
76 
77  /// Output an entry object (without trailing endline)
78  std::ostream &operator<<(std::ostream &os, entry &e);
79 
80 }
81 
82 #endif
A data class which holds the EOS parameters, the masses and the radii.
Definition: entry.h:38
Main namespace.
Definition: bamr.h:54
int allocate(size_t nps, size_t nso)
Reallocate for n sources.
entry & operator=(const entry &e)
Copy constructor.
ubvector mass
Mass for each source.
Definition: entry.h:71
ubvector params
Parameters.
Definition: entry.h:65
std::ostream & operator<<(std::ostream &os, entry &e)
Output an entry object (without trailing endline)
size_t ns
Number of sources.
Definition: entry.h:68
Definition of nstar_cold2.
ubvector rad
Radius for each source.
Definition: entry.h:74
entry()
Create empty entry object.
size_t np
Number of parameters.
Definition: entry.h:62

Documentation generated with Doxygen. Bamr documentation is under the GNU Free Documentation License.