Alexandria
2.16
Please provide a description of the project.
SourceCatalog
SourceCatalog
SourceAttributes
Pdf.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2012-2020 Euclid Science Ground Segment
3
*
4
* This library is free software; you can redistribute it and/or modify it under
5
* the terms of the GNU Lesser General Public License as published by the Free
6
* Software Foundation; either version 3.0 of the License, or (at your option)
7
* any later version.
8
*
9
* This library is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12
* details.
13
*
14
* You should have received a copy of the GNU Lesser General Public License
15
* along with this library; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
*/
18
19
/*
20
* Copyright (C) 2012-2020 Euclid Science Ground Segment
21
*
22
* This library is free software; you can redistribute it and/or modify it under
23
* the terms of the GNU Lesser General Public License as published by the Free
24
* Software Foundation; either version 3.0 of the License, or (at your option)
25
* any later version.
26
*
27
* This library is distributed in the hope that it will be useful, but WITHOUT
28
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
29
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
30
* details.
31
*
32
* You should have received a copy of the GNU Lesser General Public License
33
* along with this library; if not, write to the Free Software Foundation, Inc.,
34
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
35
*/
36
37
/*
38
* @file Pdf.h
39
* @author nikoapos
40
*/
41
42
#ifndef SOURCE_CATALOG_PDF_H
43
#define SOURCE_CATALOG_PDF_H
44
45
#include <map>
46
#include <string>
47
#include <vector>
48
#include "
GridContainer/GridContainer.h
"
49
#include "
SourceCatalog/Attribute.h
"
50
51
namespace
Euclid
{
52
namespace
SourceCatalog {
53
54
template
<
typename
T>
55
class
Pdf
:
public
Attribute
{
56
57
public
:
58
59
using
PdfType
=
GridContainer::GridContainer<std::vector<double>
, T>;
60
61
explicit
Pdf
(
std::map<std::string, PdfType>
pdfs) :
m_pdfs
(
std
::move(pdfs)) { }
62
63
virtual
~Pdf
() =
default
;
64
65
const
PdfType
&
getPdf
(
const
std::string
& name) {
66
return
m_pdfs
.at(name);
67
}
68
69
private
:
70
71
std::map<std::string, PdfType>
m_pdfs
;
72
73
};
74
75
}
76
}
77
78
#endif
/* SOURCE_CATALOG_PDF_H */
79
std::string
STL class.
Euclid::GridContainer::GridContainer
Representation of a multi-dimensional grid which contains axis information.
Definition:
GridContainer.h:97
Euclid::SourceCatalog::Pdf::~Pdf
virtual ~Pdf()=default
Euclid::SourceCatalog::Pdf::getPdf
const PdfType & getPdf(const std::string &name)
Definition:
Pdf.h:65
Euclid::SourceCatalog::Attribute
Attribute interface extended by all source attributes.
Definition:
Attribute.h:41
GridContainer.h
Euclid::SourceCatalog::Pdf::Pdf
Pdf(std::map< std::string, PdfType > pdfs)
Definition:
Pdf.h:61
std::map
STL class.
std
STL namespace.
Euclid
Definition:
InstOrRefHolder.h:29
Attribute.h
Euclid::SourceCatalog::Pdf::m_pdfs
std::map< std::string, PdfType > m_pdfs
Definition:
Pdf.h:71
Euclid::SourceCatalog::Pdf
Definition:
Pdf.h:55
Generated by
1.8.18