def visibility

bend-visgraph@2.0.0.0 · visgraph.bend:538

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

538# The graph of the `n` values `ys` at `xs`, on one thread, as one block.
539# `lo` and `hi` bound the weights, as ts2vg's min_weight and max_weight;
540# pass neg_inf() and inf() for no bound. The x of `Index{}` is the index as
541# an F32, exact for up to 2^24 values; the x of `At{xs}` must increase.
542# parallel.bend builds the same graph on every thread, and relies on
543# Base's @unsafe Array.fork.
544def visibility(+g: Visibility, +dir: Direction, +k: Weight, +lo: F32, +hi: F32, ys: Array<F32>, xs: Xs, +n: U32) -> Edges:
545  match xs:
546    case Index{}:
547      built(True{}, g, dir, k, lo, hi, ys, no_xs(), n)
548    case At{a}:
549      built(False{}, g, dir, k, lo, hi, ys, a, n)

Uses (11)

Used by (1)