diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-01-21 17:35:28 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-01-21 17:35:28 +0100 |
commit | 4b5f0da589633ab0d3f27a6efdb765633fafcbcb (patch) | |
tree | 0d5ae3658527b11c9e0aeb6e372accfc7b964ccc /src/algorithms | |
parent | m (diff) | |
download | algorithms-and-data-structures-4b5f0da589633ab0d3f27a6efdb765633fafcbcb.tar.gz algorithms-and-data-structures-4b5f0da589633ab0d3f27a6efdb765633fafcbcb.tar.bz2 algorithms-and-data-structures-4b5f0da589633ab0d3f27a6efdb765633fafcbcb.tar.xz |
sort order support in multibinary search
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/algorithms')
-rw-r--r-- | src/algorithms/searching/MultibinarySearch.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/algorithms/searching/MultibinarySearch.java b/src/algorithms/searching/MultibinarySearch.java index cf105b0..663de7c 100644 --- a/src/algorithms/searching/MultibinarySearch.java +++ b/src/algorithms/searching/MultibinarySearch.java @@ -136,7 +136,7 @@ public class MultibinarySearch * of elements is named ‘m’ in the complexity analysis * @param array Sorted list in which to search, the number of elements * is named ‘n’ in the complexity analysis - * @param order The lists' element order + * @param order The lists' (both) element order * @param mode The search mode * @param start The index of the first position to search in the array * @param end The index after the last position to search in the array @@ -152,8 +152,6 @@ public class MultibinarySearch { if (mode != SearchMode.FIND_ANY) throw new Error("Mode not implemented"); /* TODO */ - if (order != SortOrder.ASCENDING) - throw new Error("Order not implemented"); /* TODO */ BinarySearch.SearchMode mode_ = mode == SearchMode.FIND_ANY ? BinarySearch.SearchMode.FIND_ANY |