typelevel/spire

Searching API needs better documentation

オープン

#786 opened on 2019/04/03

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Scala (238 件のフォーク)batch import
good first issue

Repository metrics

Stars
 (1,775 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

We state

  /** Performs a binary search, returns an index using the same convention as java.util.Arrays.binarySearch. */
final def search[@sp A: Order](as: Array[A], item: A, lower: Int, upper: Int): Int = {

However, our convention is to search the interval [lower, upper] inclusive, whereas java.util.Arrays.binarySearch excludes the upper bound.

コントリビューターガイド