mirror of
https://github.com/boostorg/histogram.git
synced 2025-05-10 07:14:05 +00:00
18 lines
355 B
C++
18 lines
355 B
C++
//[ guide_make_static_histogram
|
|
|
|
#include <boost/histogram.hpp>
|
|
#include <cassert>
|
|
|
|
namespace bh = boost::histogram;
|
|
|
|
int main() {
|
|
/*
|
|
create a static 1d-histogram in default configuration
|
|
which covers the real line from -1 to 1 in 100 bins
|
|
*/
|
|
auto h = bh::make_histogram(bh::axis::regular<>(100, -1, 1));
|
|
assert(h.rank() == 1);
|
|
}
|
|
|
|
//]
|