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