typelevel/spire

Searching API needs better documentation

开放

#786 创建于 2019年4月3日

 (0 条评论) (0 个反应) (0 位负责人)Scala (238 个派生)batch import
good first issue

仓库指标

星标
 (1,775 个星标)
PR 合并指标
 (30 天内没有已合并 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.

贡献者指南