File tree 1 file changed +6
-6
lines changed
src/com/jwetherell/algorithms/data_structures
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -184,14 +184,14 @@ private void reduce() {
184
184
}
185
185
186
186
/**
187
- * Increases the input ten-fold
187
+ * Increases the input ten-fold. e.g. 16->160
188
188
*/
189
189
private static final int getLargerSize (int input ) {
190
190
return input *10 ;
191
191
}
192
192
193
193
/**
194
- * Reduces the input to a fourth
194
+ * Returns one fourth of the input. e.g. 16->4
195
195
*/
196
196
private static final int getSmallerSize (int input ) {
197
197
return input /4 ;
@@ -544,7 +544,7 @@ private void increase() {
544
544
545
545
// Re-hash old data
546
546
for (Pair <K ,V > p : temp ) {
547
- if (p != null )
547
+ if (p != null )
548
548
this .put (p );
549
549
}
550
550
}
@@ -560,20 +560,20 @@ private void reduce() {
560
560
561
561
// Re-hash old data
562
562
for (Pair <K ,V > p : temp ) {
563
- if (p != null )
563
+ if (p != null )
564
564
this .put (p );
565
565
}
566
566
}
567
567
568
568
/**
569
- * Returns double of the input
569
+ * Doubles the input. e.g. 16->32
570
570
*/
571
571
private static final int getLargerSize (int input ) {
572
572
return input <<1 ;
573
573
}
574
574
575
575
/**
576
- * Returns one fourth of the input
576
+ * Returns one fourth of the input. e.g. 16->8->4
577
577
*/
578
578
private static final int getSmallerSize (int input ) {
579
579
return input >>1 >>1 ;
You can’t perform that action at this time.
0 commit comments