~/bend-docscommunity

src/vg.bend checks

raw source on the hub · import bend-visgraph@1.0.0.0/src/vg.bend as Vg

bend-vg's library: ts2vg's options and a series in, the edges of its visibility graph out. build here relies on no @unsafe def; src/parallel.bend's build takes the same arguments and runs on every thread.

4 imports
import Base
import ./graph.bend as G
import ./penetrable.bend as P
import ./report.bend as Report

Types

type Options source · line 13 · raw

Data

The options of ts2vg's graph classes: the graph, how its edges point, their weight, the weights to keep (above min_weight and below max_weight), and how many points an edge may cross.

type Series source · line 23 · raw

Type

The n values ys of a time series, indexed from 0, and their x: the index, or G.At{xs} with the x of each value, increasing.

type Adjacency source · line 96 · raw

Type

The graph as compressed rows: the neighbors of node i are targets[offsets[i]] up to targets[offsets[i + 1]], increasing, and the weights of their edges sit at the same positions. An undirected graph's edge appears in the rows of both its ends, a directed one's in its source's row.

type Counts source · line 113 · raw

Type

type Halves source · line 146 · raw

Type

The half edges, by target: source, target and weight at each position.

type Rows source · line 170 · raw

Type

Definitions

def options source · line 18 · raw

@g:0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Graph -> Options

ts2vg's defaults for the graph g: undirected, unweighted, every weight kept, no point crossed.

def length source · line 26 · raw

@vs:List<&2, F32> -> @+n:U32 -> U32

def fill source · line 33 · raw

@vs:List<&2, F32> -> @+i:U32 -> @a:Array<F32> -> Array<F32>

def column source · line 40 · raw

@+n:U32 -> @vs:List<&2, F32> -> Array<F32>

def counted source · line 43 · raw

@+n:U32 -> @ys:List<&2, F32> -> Series

def series source · line 47 · raw

@+ys:List<&2, F32> -> Series

The series of the values ys, each at its index.

def counted_at source · line 50 · raw

@+n:U32 -> @xs:List<&2, F32> -> @ys:List<&2, F32> -> Series

def series_at source · line 55 · raw

@xs:List<&2, F32> -> @+ys:List<&2, F32> -> Series

The series of the values ys at xs, which must hold as many values, increasing.

def chosen source · line 58 · raw

@visibility:Bool -> @+g:0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Graph -> @+dir:0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Direction -> @+k:0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Weight -> @+lo:F32 -> @+hi:F32 -> @+limit:U32 -> @ys:Array<F32> -> @xs:0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Xs -> @+n:U32 -> 0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Edges

def build source · line 68 · raw

@o:Options -> @s:Series -> 0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Edges

The edges of the graph of s with the options o, as ts2vg's build makes them. The natural and horizontal graphs run on one thread, and the limited penetrable ones split their sweeps among every thread.

def degrees source · line 88 · raw

@es:0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Edges -> @+n:U32 -> Array<U32>

The degree of each of the n nodes of es, as ts2vg's degrees: the edges at the node, in either direction.

def is_undirected source · line 102 · raw

@d:0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Direction -> Bool

def bumped source · line 109 · raw

@r:Pair(Array<U32>, U32) -> @+i:U32 -> Array<U32>

def count_half source · line 116 · raw

@present:Bool -> @+u:U32 -> @+v:U32 -> @c:Counts -> Counts

def count_halves source · line 124 · raw

@es:0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Edges -> @+both:Bool -> @c:Counts -> Counts

def starts source · line 135 · raw

@count:Nat -> @+i:U32 -> @r:Pair(Array<U32>, U32) -> @+acc:U32 -> Array<U32>

The counts of n nodes, in place, as where each node's run starts; slot n gets the total.

def put_half source · line 149 · raw

@+u:U32 -> @+v:U32 -> @+w:F32 -> @r:Pair(Array<U32>, U32) -> @us:Array<U32> -> @vs:Array<U32> -> @ws:Array<F32> -> Halves

def place_half source · line 153 · raw

@present:Bool -> @+u:U32 -> @+v:U32 -> @+w:F32 -> @h:Halves -> Halves

def by_target source · line 161 · raw

@es:0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Edges -> @+both:Bool -> @h:Halves -> Halves

def put_row source · line 173 · raw

@+u:U32 -> @+v:U32 -> @+w:F32 -> @r:Pair(Array<U32>, U32) -> @targets:Array<U32> -> @weights:Array<F32> -> Rows

def by_source source · line 179 · raw

@count:Nat -> @+p:U32 -> @ur:Pair(Array<U32>, U32) -> @vr:Pair(Array<U32>, U32) -> @wr:Pair(Array<F32>, F32) -> @out:Rows -> Rows

The half edges from position p on, in target order, into their sources' rows.

def slots_for source · line 194 · raw

@+n:U32 -> Nat

def rows_done source · line 197 · raw

@offsets:Array<U32> -> @r:Rows -> Adjacency

def rows_from source · line 201 · raw

@+h:U32 -> @oc:Pair(Array<U32>, Array<U32>) -> @hv:Halves -> Adjacency

def with_starts source · line 206 · raw

@es:0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Edges -> @+both:Bool -> @+h:U32 -> @outs:Array<U32> -> @ins:Array<U32> -> Adjacency

def with_total source · line 209 · raw

@es:0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Edges -> @+both:Bool -> @r:Pair(Array<U32>, U32) -> @ins:Array<U32> -> Adjacency

def tallied source · line 213 · raw

@es:0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Edges -> @+both:Bool -> @+n:U32 -> @c:Counts -> Adjacency

def adjacency source · line 219 · raw

@+dir:0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Direction -> @+es:0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Edges -> @+n:U32 -> Adjacency

The rows of the n nodes of es, a graph whose edges point as dir says.

Templates

template fold source · line 77 · raw

@-A:Type -> @-f:(@_:A -> @_:U32 -> @_:U32 -> @_:F32 -> A) -> @es:0xe3f5cb14a0b4bd4d5826a0042d3c3d23/src/graph.Edges -> @acc:A -> A

f(acc, src, dst, w) over every edge of es, in the order the rope holds them, from acc.