7 #ifndef HISTOGRAM_1D_HPP_ 8 #define HISTOGRAM_1D_HPP_ 20 void add(
const unsigned val) {
21 if(
v_.size() <= val )
v_.resize(val + 1, 0);
25 std::ostream&
print(std::ostream& os,
const char delim)
const {
26 for(std::size_t
n = 0;
n !=
v_.size(); ++
n) {
27 os <<
n << delim <<
v_[
n] <<
'\n';
33 std::vector<unsigned>
v_;
void add(const unsigned val)
Definition: histogram_1d.hpp:20
std::ostream & print(std::ostream &os, const char delim) const
Definition: histogram_1d.hpp:25
Main namespace of vdj_pipe library.
Definition: keywords_variable.hpp:11
std::vector< unsigned > v_
Definition: histogram_1d.hpp:33
const std::size_t n
Definition: vector_set_test.cpp:26
simple unsigned integer-based histogram
Definition: histogram_1d.hpp:17