def key

bend-visgraph@2.0.0.0 · visgraph.bend:221

import bend-visgraph@2.0.0.0/visgraph.bend as Visgraph
import Base

221# What a later point must beat to pop y. An equal point beats nothing, so an
222# interval's first highest point is its pivot. A NaN beats nothing either,
223# and ts2vg's argmax takes it only as an interval's first point, so a NaN at
224# i is the pivot of the right side of i - 1: it takes the key of the entry
225# below it and leaves the stack with that entry.
226def key(+y: F32, +below: F32) -> F32:
227  pick(is_nan(y), below, y)

Uses (3)

Used by (1)