Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef CARTOGRAPHER_METRICS_HISTOGRAM_H_
00018 #define CARTOGRAPHER_METRICS_HISTOGRAM_H_
00019
00020 #include <map>
00021 #include <vector>
00022
00023 namespace cartographer {
00024 namespace metrics {
00025
00026 class Histogram {
00027 public:
00028 using BucketBoundaries = std::vector<double>;
00029
00030
00031 static Histogram* Null();
00032
00033 static BucketBoundaries FixedWidth(double width, int num_finite_buckets);
00034 static BucketBoundaries ScaledPowersOf(double base, double scale_factor,
00035 double max_value);
00036
00037 virtual ~Histogram() = default;
00038 virtual void Observe(double value) = 0;
00039 };
00040
00041 }
00042 }
00043
00044 #endif // CARTOGRAPHER_METRICS_HISTOGRAM_H_