Skip to content

Commit b99ff25

Browse files
committed
Fix for last chars that are not takien as part of shinglet.
1 parent 0e115c8 commit b99ff25

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.gitignore

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ build/
66
!**/src/test/**/build/
77

88
### IntelliJ IDEA ###
9-
.idea/modules.xml
10-
.idea/jarRepositories.xml
11-
.idea/compiler.xml
12-
.idea/libraries/
9+
.idea/
1310
*.iws
1411
*.iml
1512
*.ipr
@@ -42,4 +39,4 @@ bin/
4239
### Mac OS ###
4340
.DS_Store
4441
# Cache of project
45-
.gradletasknamecache
42+
.gradletasknamecache

src/main/java/pl/edu/icm/heap/MainParallel.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ public static void main(String[] args) throws IOException {
7979
if (line == null) {
8080
break;
8181
}
82-
sb = new StringBuilder(PROCESSING_BUFFER_KB * 1024);//.delete(0, sb.length() - SHINGLETON_LENGTH + 1);
82+
String lastChars = sb.substring(sb.length() - SHINGLETON_LENGTH + 1);
83+
sb = new StringBuilder(PROCESSING_BUFFER_KB * 1024);
84+
sb.append(lastChars);
8385
}
8486
input.readLine(); // skip line
8587
input.readLine(); // skip line

0 commit comments

Comments
 (0)