Interval Index: Difference between revisions

Jump to navigation Jump to search
6 bytes added ,  05:51, 9 June 2020
m
Text replacement - " ⊢( *[^∘])" to " ⎕←$1"
m (Text replacement - " ⊢( *[^∘])" to " ⎕←$1")
Line 31: Line 31:
You can use Interval Index with [[Matrix|matrices]] and other high-[[rank]] arrays as well, in order to compare cells of those array. For example, if you took several pictures at a programming conference, and have the conference schedule as well as image timestamps, then you can find which talk each picture is of. Use the start time for each talk as the left argument, and the timestamp for each picture in the right argument.
You can use Interval Index with [[Matrix|matrices]] and other high-[[rank]] arrays as well, in order to compare cells of those array. For example, if you took several pictures at a programming conference, and have the conference schedule as well as image timestamps, then you can find which talk each picture is of. Use the start time for each talk as the left argument, and the timestamp for each picture in the right argument.
<source lang=apl>
<source lang=apl>
       ⊢schedule ← 4 2 ⍴ 1 00  1 45  2 15  2 30
       ⎕←schedule ← 4 2 ⍴ 1 00  1 45  2 15  2 30
1  0
1  0
1 45
1 45
2 15
2 15
2 30
2 30
       ⊢timestamps ← 3 2 ⍴ 1 16  2 02  1 50
       ⎕←timestamps ← 3 2 ⍴ 1 16  2 02  1 50
1 16
1 16
2  2
2  2

Navigation menu