I needed a short c++ program that calculates the histogram of a bunch of numbers on the command-line.
Aside from standard C++ (vectors, This program uses the really nice Boost::Accumulators and Boost::Program_Options so you'll need these.
So to compile this, please use:
g++ histogram.cpp -o histogram -lboost_program_options
Then to get help for the calling parameters etc, do
histogram --help
...and follow the instructions.
The first is to use it simply with a data file:
./histogram -i data.file --min 0.0 --max 100.0 --bins 101
Then it will write the histogram to the terminal.
=======
I needed a short c++ program that calculates the histogram of a bunch of numbers on the command-line.
Aside from standard C++ (vectors, This program uses the really nice Boost::Accumulators and Boost::Program_Options so you'll need these.
So to compile this, please use:
g++ histogram.cpp -o histogram -lboost_program_options
Then to get help for the calling parameters etc, do
histogram --help
...and follow the instructions.
The first is to use it simply with a data file:
./histogram -i data.file --min 0.0 --max 100.0 --bins 101
Then it will write the histogram to the terminal.
4ea4e0357d8324935ba165a66700896efef7250a