aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/algorithms/searching/MultibinarySearch.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/algorithms/searching/MultibinarySearch.java b/src/algorithms/searching/MultibinarySearch.java
index 98ce3ff..2b473a1 100644
--- a/src/algorithms/searching/MultibinarySearch.java
+++ b/src/algorithms/searching/MultibinarySearch.java
@@ -197,11 +197,13 @@ public class MultibinarySearch
lastimax = imax;
lastamax = amax;
rc[0][rc_i] = imax = imin + ((imax - imin) >>> 1);
- rc[1][rc_i++] = amax = (int)(£{bin_search});
+ amax = (int)(rc[1][rc_i++] = £{bin_search});
if (amax < 0)
amax = ~amax;
+ /* This is possible to do, but you will probably lose performance:
else if (mode == SearchMode.FIND_FIRST_AND_LAST)
- amax >>= 32L;
+ amax = (int)(rc[1][rc_i - 1] >> 32L);
+ */
minomax[0][mm_i] = imax + 1;
minomax[1][mm_i] = lastimax;