~/bend-docscommunity

bend_visgraph.bend relies on unsafe/foreign

raw source on the hub · import bend-visgraph@1.0.1.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.

6 imports
import Base
import ./src/graph.bend as G
import ./src/parallel.bend as Par
import ./src/series.bend as Series
import ./src/report.bend as Report
import ./src/vg.bend as VG

Types

type Mode source · line 14 · raw

Data

type Flag source · line 20 · raw

Data

type Entry source · line 29 · raw

@-A:Data -> Data

type Config source · line 32 · raw

Data

type Outcome source · line 36 · raw

Data

type XSource source · line 180 · raw

Data

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

type XsIn source · line 214 · raw

Data

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

Definitions

def usage source · line 40 · raw

String

def flags source · line 45 · raw

List<&2, Entry<Flag>>

def graphs source · line 50 · raw

List<&2, Entry<0xa7606adc225be7b0e88389ca594e0d14/src/graph.Graph>>

def directions source · line 53 · raw

List<&2, Entry<0xa7606adc225be7b0e88389ca594e0d14/src/graph.Direction>>

def weights source · line 56 · raw

List<&2, Entry<0xa7606adc225be7b0e88389ca594e0d14/src/graph.Weight>>

def modes source · line 62 · raw

List<&2, Entry<Mode>>

def lookup.hit source · line 65 · raw

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

def lookup.entry source · line 72 · raw

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

def lookup source · line 76 · raw

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

def defaults source · line 85 · raw

Config

def bad source · line 88 · raw

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

def with_graph source · line 91 · raw

@found:Maybe<&2, 0xa7606adc225be7b0e88389ca594e0d14/src/graph.Graph> -> @name:String -> @value:String -> @o:String -> @x:String -> @d:0xa7606adc225be7b0e88389ca594e0d14/src/graph.Direction -> @k:0xa7606adc225be7b0e88389ca594e0d14/src/graph.Weight -> @l:U32 -> @m:Mode -> Config

def with_direction source · line 98 · raw

@found:Maybe<&2, 0xa7606adc225be7b0e88389ca594e0d14/src/graph.Direction> -> @name:String -> @value:String -> @o:String -> @x:String -> @g:0xa7606adc225be7b0e88389ca594e0d14/src/graph.Graph -> @k:0xa7606adc225be7b0e88389ca594e0d14/src/graph.Weight -> @l:U32 -> @m:Mode -> Config

def with_weight source · line 105 · raw

@found:Maybe<&2, 0xa7606adc225be7b0e88389ca594e0d14/src/graph.Weight> -> @name:String -> @value:String -> @o:String -> @x:String -> @g:0xa7606adc225be7b0e88389ca594e0d14/src/graph.Graph -> @d:0xa7606adc225be7b0e88389ca594e0d14/src/graph.Direction -> @l:U32 -> @m:Mode -> Config

def with_limit source · line 112 · raw

@found:Maybe<&2, U32> -> @name:String -> @value:String -> @o:String -> @x:String -> @g:0xa7606adc225be7b0e88389ca594e0d14/src/graph.Graph -> @d:0xa7606adc225be7b0e88389ca594e0d14/src/graph.Direction -> @k:0xa7606adc225be7b0e88389ca594e0d14/src/graph.Weight -> @m:Mode -> Config

def with_mode source · line 119 · raw

@found:Maybe<&2, Mode> -> @name:String -> @value:String -> @o:String -> @x:String -> @g:0xa7606adc225be7b0e88389ca594e0d14/src/graph.Graph -> @d:0xa7606adc225be7b0e88389ca594e0d14/src/graph.Direction -> @k:0xa7606adc225be7b0e88389ca594e0d14/src/graph.Weight -> @l:U32 -> Config

def set source · line 126 · raw

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

def parse source · line 147 · raw

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

def output source · line 158 · raw

@mode:Mode -> @+k:0xa7606adc225be7b0e88389ca594e0d14/src/graph.Weight -> @es:0xa7606adc225be7b0e88389ca594e0d14/src/graph.Edges -> @+n:U32 -> String

def only_degrees source · line 169 · raw

@mode:Mode -> Bool

def graph_of source · line 176 · raw

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

def xs_of source · line 184 · raw

@x:XSource -> @+n:U32 -> 0xa7606adc225be7b0e88389ca594e0d14/src/graph.Xs

def report.built source · line 191 · raw

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

def report.sized source · line 199 · raw

@too_long:Bool -> @+g:0xa7606adc225be7b0e88389ca594e0d14/src/graph.Graph -> @+dir:0xa7606adc225be7b0e88389ca594e0d14/src/graph.Direction -> @+k:0xa7606adc225be7b0e88389ca594e0d14/src/graph.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 206 · raw

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

def report source · line 218 · raw

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

def write_text.done source · line 229 · raw

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

def write_text source · line 235 · raw

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

def emit.to source · line 241 · raw

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

def emit source · line 248 · raw

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

def read_xs source · line 255 · raw

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

def run source · line 264 · raw

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

def start source · line 274 · raw

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

def main source · line 281 · raw

IO(Unit)