typelevel/spire

Searching API needs better documentation

Open

#786 建立於 2019年4月3日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)Scala (1,775 star) (238 fork)batch import
good first issue

描述

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.

貢獻者指南

Searching API needs better documentation · typelevel/spire#786 | Good First Issue