summaryrefslogtreecommitdiff
path: root/read_helper.h
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2023-06-05 01:56:37 +0800
committerKunoiSayami <[email protected]>2023-06-05 01:56:37 +0800
commit5f38ca067108eea5a8c334bd8cbe5866300d585c (patch)
tree76e477e0030ffb585bd1cc8bf973017dc4b28885 /read_helper.h
parent155b3a832c590c55ea3d89dd0783713f1d0f19c1 (diff)
feat: Optimize output
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'read_helper.h')
-rw-r--r--read_helper.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/read_helper.h b/read_helper.h
index f4615d4..baf0781 100644
--- a/read_helper.h
+++ b/read_helper.h
@@ -49,9 +49,7 @@ public:
size_t population_length, size_t total_row = 0)
: filename(filename), sample_length(sample_length),
population_length(population_length),
- random_number(genRandomRow(total_row)) {
- // printf("%zu %zu\n", sample_length, needed_read_length);
- }
+ random_number(genRandomRow(total_row)) {}
key_type maxValue() const { return max_value; }
key_type minValue() const { return min_value; }
@@ -82,7 +80,6 @@ public:
if (random_number > 0) {
P_ERR("\rReading skip");
- // fprintf(stderr, "Skip %lu\n", read_number);
read_number = random_number;
for (key_type i; read_number > 0 && !fin.eof(); fin >> i)
read_number--;
@@ -96,6 +93,7 @@ public:
fin >> i;
read_number++;
}
+
fin.close();
P_ERR("\r");
return true;