1-2 Array Search 数组查找相关

215 阅读1分钟

Search

Methods for searching arrays for a specific element.对象数组查找用的方法

  • d3.least - returns the least element of an iterable.返回对象数组最小值
  • d3.leastIndex - returns the index of the least element of an iterable.返回对象数组最小值的索引
  • d3.greatest - returns the greatest element of an iterable.返回对象数组最大值
  • d3.greatestIndex - returns the index of the greatest element of an iterable.返回对象数组最大值的索引
  • d3.bisectCenter - binary search for a value in a sorted array.二叉树的中序查找
  • d3.bisectLeft - binary search for a value in a sorted array.二叉树的先序查找
  • d3.bisect - binary search for a value in a sorted array.二叉树查找(右序)
  • d3.bisectRight - binary search for a value in a sorted array.二叉树的后序排序
  • d3.bisector - bisect using an accessor or comparator.
  • bisector.center - binary search for a value in a sorted array.
  • bisector.left - bisectLeft, with the given comparator.
  • bisector.right - bisectRight, with the given comparator.
  • d3.quickselect - reorder an array of numbers.将数组进行重新排序
  • d3.ascending - compute the natural order of two values.比较两值是否升序
  • d3.descending - compute the natural order of two values.比较两值是否降序