Skip to content

Commit

Permalink
Fix #44: --num-iter option ignored
Browse files Browse the repository at this point in the history
The input stream was not set back to beginning after end iterator was
reached, so that the second iteration was immediately at the end.
  • Loading branch information
BerndDoser committed Dec 9, 2019
1 parent d0b3b46 commit a1f8460
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/SelfOrganizingMapLib/DataIterator.h
Expand Up @@ -114,6 +114,7 @@ class DataIterator
static_cast<std::streamsize>(layout.size() * sizeof(T)));
++count;
} else {
is.seekg(0, is.beg);
end_flag = true;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/SelfOrganizingMapLib/DataIteratorShuffled.h
Expand Up @@ -125,6 +125,7 @@ class DataIteratorShuffled
static_cast<std::streamsize>(layout.size() * sizeof(T)));
++cur_random_list;
} else {
is.seekg(0, is.beg);
end_flag = true;
}
}
Expand Down

0 comments on commit a1f8460

Please sign in to comment.