binsrch#

swordfish.function.binsrch()#

binsrch means binary search. For each element in Y, binsrch locates its position in X. If nothing is found, it returns -1(s).

参数:
  • X (Constant) -- A vector sorted in ascending order.

  • Y (Constant) -- A scalar/vector/tuple/matrix/array vector/dictionary/table.