mirror of
https://github.com/boostorg/histogram.git
synced 2025-05-09 23:04:07 +00:00
19 lines
404 B
C++
19 lines
404 B
C++
//[ guide_make_static_histogram
|
|
|
|
#include <boost/histogram.hpp>
|
|
|
|
namespace bh = boost::histogram;
|
|
|
|
int main() {
|
|
/*
|
|
create a 1d-histogram in default configuration which
|
|
covers the real line from -1 to 1 in 100 bins, the same
|
|
call with `make_dynamic_histogram` would also work
|
|
*/
|
|
auto h = bh::make_static_histogram(bh::axis::regular<>(100, -1, 1));
|
|
|
|
// do something with h
|
|
}
|
|
|
|
//]
|