Interval Index: Difference between revisions

Jump to navigation Jump to search
17 bytes removed ,  05:30, 19 October 2020
m
no edit summary
No edit summary
mNo edit summary
Line 1: Line 1:
:''This page is about the function that classifies data. See [[Indexing]], [[Indices]], [[Index Generator]], and [[Index of]] for other operations named after indices.''
:''This page is about classifying data. See [[Indexing]], [[Indices]], [[Index Generator]], and [[Index of]] for other operations named after indices.''


{{Built-in|Interval Index|⍸}}, or '''Bins''' (<source lang=apl inline>⍋</source>) in [[A+]] and [[BQN]], is a [[primitive function|primitive]] [[search function]] which locates [[cell]]s of its right [[argument]] relative to cells of a [[sorted]] left argument. Like searching for the right page for a word in a dictionary, knowing the first word on each page, Interval Index finds for each cell (word to search for) an [[index]] (page number) in the left argument (dictionary) so that the target cell is between the [[major cell]] at that index (first word on the page) and the major cell at the following index (first word on the next page). In general computer science, this problem is known as a '''predecessor search''' (see [[wikipedia:predecessor problem|predecessor problem]]), since it searches for the predecessor—entry immediately preceding—of an array, but may be referred to by the name of a common technique used to solve it, the [[wikipedia:binary search|binary search]]. Interval Index may also be considered a way to perform [[wikipedia:data binning|data binning]].
{{Built-in|Interval Index|⍸}}, or '''Bins''' (<source lang=apl inline>⍋</source>) in [[A+]] and [[BQN]], is a [[primitive function|primitive]] [[search function]] which locates [[cell]]s of its right [[argument]] relative to cells of a [[sorted]] left argument. Like searching for the right page for a word in a dictionary, knowing the first word on each page, Interval Index finds for each cell (word to search for) an [[index]] (page number) in the left argument (dictionary) so that the target cell is between the [[major cell]] at that index (first word on the page) and the major cell at the following index (first word on the next page). In general computer science, this problem is known as a '''predecessor search''' (see [[wikipedia:predecessor problem|predecessor problem]]), since it searches for the predecessor—entry immediately preceding—of an array, but may be referred to by the name of a common technique used to solve it, the [[wikipedia:binary search|binary search]]. Interval Index may also be considered a way to perform [[wikipedia:data binning|data binning]].

Navigation menu