From 1d9332538db3c759b591f2bd0db43261dac03634 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 21 Jan 2014 16:35:39 +0100 Subject: partial array support in binary search + add multibinary search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/comparable | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/comparable') diff --git a/src/comparable b/src/comparable index 26feb1f..70cfb7b 100644 --- a/src/comparable +++ b/src/comparable @@ -4,6 +4,7 @@ Telement="${T}" Tarray="${Telement}[]" Tparam="" Targ="" +Targ_name="" function T-array { elems="" @@ -42,6 +43,7 @@ elif [[ "${T}" = @(T|T+|T++) ]]; then if [ "${T}" = T ]; then Tparam=" " Targ=", Comparator comparator" + Targ_name=", comparator" function cmp { echo "comparator.compare($1, $2)" } @@ -66,12 +68,10 @@ elif [[ "${T}" = @(T|T+|T++) ]]; then else if [ "${T}" = T++ ]; then Tparam=" " - Targ="" Telement="Comparable" Tarray="${Telement}[]" else Tparam="> " - Targ="" fi function cmp { echo "($1).compareTo($2)" -- cgit v1.2.3-70-g09d2