def add_known

bend-visgraph@2.0.0.0 · visgraph.bend:661

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

661# ts2vg's add_edge with a known weight: NaN means the weight function
662# computes it.
663def add_known(+k: Weight, +lo: F32, +hi: F32, i1: U32, i2: U32, +x1: F32, +x2: F32, +y1: F32, +y2: F32, +s: F32, +known: F32, es: Edges) -> Edges:
664  +w = pick(is_nan(known), weight(k, x1, x2, y1, y2, s), known)
665  put(F32.is_le(w, lo) || F32.is_ge(w, hi), i1, i2, w, es)

Uses (11)

Used by (1)