]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/histogram/fwd.hpp
buildsys: switch source download to quincy
[ceph.git] / ceph / src / boost / boost / histogram / fwd.hpp
1 // Copyright 2015-2019 Hans Dembinski
2 //
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt
5 // or copy at http://www.boost.org/LICENSE_1_0.txt)
6
7 #ifndef BOOST_HISTOGRAM_FWD_HPP
8 #define BOOST_HISTOGRAM_FWD_HPP
9
10 /**
11 \file boost/histogram/fwd.hpp
12 Forward declarations, tag types and type aliases.
13 */
14
15 #include <boost/config.hpp> // BOOST_ATTRIBUTE_NODISCARD
16 #include <boost/core/use_default.hpp>
17 #include <vector>
18
19 namespace boost {
20 namespace histogram {
21
22 /// Tag type to indicate use of a default type
23 using boost::use_default;
24
25 namespace axis {
26
27 /// Integral type for axis indices
28 using index_type = int;
29
30 /// Real type for axis indices
31 using real_index_type = double;
32
33 /// Empty metadata type
34 struct null_type {
35 template <class Archive>
36 void serialize(Archive&, unsigned /* version */) {}
37 };
38
39 /// Another alias for an empty metadata type
40 using empty_type = null_type;
41
42 // some forward declarations must be hidden from doxygen to fix the reference docu :(
43 #ifndef BOOST_HISTOGRAM_DOXYGEN_INVOKED
44
45 namespace transform {
46
47 struct id;
48
49 struct log;
50
51 struct sqrt;
52
53 struct pow;
54
55 } // namespace transform
56
57 template <class Value = double, class Transform = use_default,
58 class MetaData = use_default, class Options = use_default>
59 class regular;
60
61 template <class Value = int, class MetaData = use_default, class Options = use_default>
62 class integer;
63
64 template <class Value = double, class MetaData = use_default, class Options = use_default,
65 class Allocator = std::allocator<Value>>
66 class variable;
67
68 template <class Value = int, class MetaData = use_default, class Options = use_default,
69 class Allocator = std::allocator<Value>>
70 class category;
71
72 template <class... Ts>
73 class variant;
74
75 #endif // BOOST_HISTOGRAM_DOXYGEN_INVOKED
76
77 } // namespace axis
78
79 #ifndef BOOST_HISTOGRAM_DOXYGEN_INVOKED
80
81 template <class T>
82 struct weight_type;
83
84 template <class T>
85 struct sample_type;
86
87 namespace accumulators {
88
89 template <class ValueType = double>
90 class count;
91
92 template <class ValueType = double>
93 class sum;
94
95 template <class ValueType = double>
96 class weighted_sum;
97
98 template <class ValueType = double>
99 class mean;
100
101 template <class ValueType = double>
102 class weighted_mean;
103
104 template <class T>
105 class thread_safe;
106
107 template <class T>
108 struct is_thread_safe : std::false_type {};
109 template <class T>
110 struct is_thread_safe<thread_safe<T>> : std::true_type {};
111
112 } // namespace accumulators
113
114 struct unsafe_access;
115
116 template <class Allocator = std::allocator<char>>
117 class unlimited_storage;
118
119 template <class T>
120 class storage_adaptor;
121
122 #endif // BOOST_HISTOGRAM_DOXYGEN_INVOKED
123
124 /// Vector-like storage for fast zero-overhead access to cells.
125 template <class T, class A = std::allocator<T>>
126 using dense_storage = storage_adaptor<std::vector<T, A>>;
127
128 /// Default storage, optimized for unweighted histograms
129 using default_storage = unlimited_storage<>;
130
131 /// Dense storage which tracks sums of weights and a variance estimate.
132 using weight_storage = dense_storage<accumulators::weighted_sum<>>;
133
134 /// Dense storage which tracks means of samples in each cell.
135 using profile_storage = dense_storage<accumulators::mean<>>;
136
137 /// Dense storage which tracks means of weighted samples in each cell.
138 using weighted_profile_storage = dense_storage<accumulators::weighted_mean<>>;
139
140 // some forward declarations must be hidden from doxygen to fix the reference docu :(
141 #ifndef BOOST_HISTOGRAM_DOXYGEN_INVOKED
142
143 template <class Axes, class Storage = default_storage>
144 class BOOST_ATTRIBUTE_NODISCARD histogram;
145
146 #endif // BOOST_HISTOGRAM_DOXYGEN_INVOKED
147
148 } // namespace histogram
149 } // namespace boost
150
151 #endif