Skip to content

Commit fc8a518

Browse files
author
terencewtli
committed
added check to exclude histogram counts of 0
1 parent c807f62 commit fc8a518

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/load_data_for_complexity.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,10 @@ load_histogram(const string &filename, vector<double> &counts_hist) {
641641
"(line " + toa(line_count) + ")");
642642
counts_hist.resize(read_count + 1, 0.0);
643643
counts_hist[read_count] = frequency;
644+
if (read_count == 0ul) {
645+
throw runtime_error("counts histograms may not "
646+
"include an entry for zero");
647+
}
644648
prev_read_count = read_count;
645649
n_reads += static_cast<size_t>(read_count*frequency);
646650
}

0 commit comments

Comments
 (0)