~/bend-docscommunity

bend_visgraph.bend relies on unsafe/foreign

raw source on the hub · import bend-visgraph@2.0.0.0/bend_visgraph.bend as Bend_visgraph

ts2vg's visibility graphs of time series, in Bend2, on every CPU thread. Docs, tests and benchmark: https://github.com/aaaxn/bend-visgraph

bend-visgraph's command line takes ts2vg's options with the input first: bend_visgraph INPUT [-o OUTPUT] [-x XS] [-t TYPE] [-d DIRECTED] [-w WEIGHTED] [-p LIMIT] [-m MODE] where XS, which ts2vg's command line lacks, holds the x of each value.

5 imports
import Base
import ./visgraph.bend as VG
import ./parallel.bend as Par
import ./src/series.bend as Series
import ./src/report.bend as Report

Types

type Mode source · line 13 · raw

Data

type Flag source · line 19 · raw

Data

type Entry source · line 28 · raw

@-A:Data -> Data

type Config source · line 31 · raw

Data

type Outcome source · line 35 · raw

Data

type XSource source · line 179 · raw

Data

Where x comes from: the index, or the values of the -x file, last first.

type XsIn source · line 213 · raw

Data

The x coordinates of the -x file, if one was given.

Definitions

def usage source · line 39 · raw

String

def flags source · line 44 · raw

List<&2, Entry<Flag>>

def graphs source · line 49 · raw

List<&2, Entry<0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Visibility>>

def directions source · line 52 · raw

List<&2, Entry<0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Direction>>

def weights source · line 55 · raw

List<&2, Entry<0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Weight>>

def modes source · line 61 · raw

List<&2, Entry<Mode>>

def lookup.hit source · line 64 · raw

@-A:Data -> @hit:Bool -> @v:A -> @rest:Maybe<&2, A> -> Maybe<&2, A>

def lookup.entry source · line 71 · raw

@-A:Data -> @+s:String -> @e:Entry<A> -> @rest:Maybe<&2, A> -> Maybe<&2, A>

def lookup source · line 75 · raw

@-A:Data -> @+s:String -> @table:List<&2, Entry<A>> -> Maybe<&2, A>

def defaults source · line 84 · raw

Config

def bad source · line 87 · raw

@name:String -> @value:String -> Config

def with_graph source · line 90 · raw

@found:Maybe<&2, 0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Visibility> -> @name:String -> @value:String -> @o:String -> @x:String -> @d:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Direction -> @k:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Weight -> @l:U32 -> @m:Mode -> Config

def with_direction source · line 97 · raw

@found:Maybe<&2, 0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Direction> -> @name:String -> @value:String -> @o:String -> @x:String -> @g:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Visibility -> @k:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Weight -> @l:U32 -> @m:Mode -> Config

def with_weight source · line 104 · raw

@found:Maybe<&2, 0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Weight> -> @name:String -> @value:String -> @o:String -> @x:String -> @g:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Visibility -> @d:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Direction -> @l:U32 -> @m:Mode -> Config

def with_limit source · line 111 · raw

@found:Maybe<&2, U32> -> @name:String -> @value:String -> @o:String -> @x:String -> @g:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Visibility -> @d:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Direction -> @k:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Weight -> @m:Mode -> Config

def with_mode source · line 118 · raw

@found:Maybe<&2, Mode> -> @name:String -> @value:String -> @o:String -> @x:String -> @g:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Visibility -> @d:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Direction -> @k:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Weight -> @l:U32 -> Config

def set source · line 125 · raw

@cfg:Config -> @flag:Maybe<&2, Flag> -> @+name:String -> @+value:String -> Config

def parse source · line 146 · raw

@opts:List<&1, String> -> @cfg:Config -> Config

def output source · line 157 · raw

@mode:Mode -> @+k:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Weight -> @g:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Graph -> @+n:U32 -> String

def only_degrees source · line 168 · raw

@mode:Mode -> Bool

def graph_of source · line 175 · raw

@+g:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Visibility -> @+dir:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Direction -> @+k:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Weight -> @+limit:U32 -> @ys:Array<F32> -> @xs:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Xs -> @+n:U32 -> 0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Graph

def xs_of source · line 183 · raw

@x:XSource -> @+n:U32 -> 0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Xs

def report.built source · line 190 · raw

@weighted_degrees:Bool -> @+g:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Visibility -> @+dir:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Direction -> @+k:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Weight -> @+limit:U32 -> @mode:Mode -> @rev:List<&2, F32> -> @x:XSource -> @+n:U32 -> Outcome

def report.sized source · line 198 · raw

@too_long:Bool -> @+g:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Visibility -> @+dir:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Direction -> @+k:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Weight -> @+limit:U32 -> @+mode:Mode -> @rev:List<&2, F32> -> @+n:U32 -> Outcome

x as the index is an F32, which holds every index below 2^24 exactly.

def report.xs source · line 205 · raw

@x:0xe3a7f78ee5245da17fe27e3556f94e74/src/series.XsCheck -> @+g:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Visibility -> @+dir:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Direction -> @+k:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Weight -> @+limit:U32 -> @+mode:Mode -> @rev:List<&2, F32> -> @+n:U32 -> Outcome

def report source · line 217 · raw

@p:0xe3a7f78ee5245da17fe27e3556f94e74/src/series.Parsed -> @x:XsIn -> @+g:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Visibility -> @+dir:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Direction -> @+k:0xe3a7f78ee5245da17fe27e3556f94e74/visgraph.Weight -> @+limit:U32 -> @+mode:Mode -> Outcome

def write_text.done source · line 228 · raw

@m:Pair(File, Result<&1, &1, Pair(U32, String), Unit>) -> IO(Unit)

def write_text source · line 234 · raw

@path:String -> @text:String -> IO(Unit)

def emit.to source · line 240 · raw

@stdout:Bool -> @path:String -> @text:String -> IO(Unit)

def emit source · line 247 · raw

@+path:String -> @outcome:Outcome -> IO(Unit)

def read_xs source · line 254 · raw

@none:Bool -> @path:String -> IO(XsIn)

def run source · line 263 · raw

@input:String -> @cfg:Config -> IO(Unit)

def start source · line 273 · raw

@args:List<&1, String> -> IO(Unit)

def main source · line 280 · raw

IO(Unit)