@@ -53,20 +53,6 @@ using std::vector;
53
53
54
54
namespace fs = std::filesystem;
55
55
56
- template <typename H>
57
- static void
58
- report_histogram (const string &outfile, const H &h) {
59
- std::ofstream of;
60
- if (!outfile.empty ())
61
- of.open (outfile);
62
- std::ostream o (outfile.empty () ? std::cerr.rdbuf () : of.rdbuf ());
63
- o << " OBSERVED COUNTS (" << std::size (h) << " )" << std::endl;
64
- for (auto i = 0u ; i < std::size (h); ++i)
65
- if (h[i] > 0 )
66
- o << i << ' \t ' << static_cast <uint32_t >(h[i]) << std::endl;
67
- o << std::endl;
68
- }
69
-
70
56
int
71
57
lc_extrap_main (const int argc, const char **argv) {
72
58
try {
@@ -100,7 +86,7 @@ lc_extrap_main(const int argc, const char **argv) {
100
86
uint32_t n_threads{1 };
101
87
#endif
102
88
103
- string description =
89
+ const string description =
104
90
R"(
105
91
Extrapolate the complexity of a library. This is the approach
106
92
described in Daley & Smith (2013). The method applies rational
@@ -145,7 +131,8 @@ method has been used for many different purposes since then.
145
131
opt_parse.add_opt (" hist" , ' H' ,
146
132
" input is a text file containing the observed histogram" ,
147
133
false , HIST_INPUT);
148
- opt_parse.add_opt (" hist-out" , ' \0 ' , " output counts histogram to this file" ,
134
+ opt_parse.add_opt (" hist-out" , ' \0 ' ,
135
+ " output histogram to this file (for non-hist input)" ,
149
136
false , histogram_outfile);
150
137
opt_parse.add_opt (" quick" , ' Q' ,
151
138
" quick mode (no bootstraps) for confidence intervals" ,
@@ -156,7 +143,6 @@ method has been used for many different purposes since then.
156
143
seed);
157
144
opt_parse.set_show_defaults ();
158
145
vector<string> leftover_args;
159
- // ADS: suspect bug below; "-about" isn't working.
160
146
opt_parse.parse (argc - 1 , argv + 1 , leftover_args);
161
147
if (argc == 2 || opt_parse.help_requested ()) {
162
148
cerr << opt_parse.help_message () << endl;
@@ -308,7 +294,7 @@ method has been used for many different purposes since then.
308
294
yield_upper_ci_lognorm);
309
295
}
310
296
}
311
- catch (std::exception &e) {
297
+ catch (const std::exception &e) {
312
298
cerr << e.what () << endl;
313
299
return EXIT_FAILURE;
314
300
}
0 commit comments