Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Env Functions

count

env core.count(vars: '& [bool]')

Arguments

  • vars: '& [bool]' =>

Count the number of true values in the array

type_name

env core.type_name(value: 'Attribute', recursive: 'bool' = false)

Arguments

  • value: 'Attribute' => Argument to get type
  • recursive: 'bool' = false => Recursively check types for array and table

Type name of the arguments

isna

env core.isna(val: 'f64')

Arguments

  • val: 'f64' =>

check if a float is nan

isinf

env core.isinf(val: 'f64')

Arguments

  • val: 'f64' =>

check if a float is +/- infinity

float

env core.float(value: 'Attribute', parse: 'bool' = true)

Arguments

  • value: 'Attribute' => Argument to convert to float
  • parse: 'bool' = true => parse string to float

make a float from value

str

env core.str(value: 'Attribute', quote: 'bool' = false)

Arguments

  • value: 'Attribute' => Argument to convert to float
  • quote: 'bool' = false => quote it if it’s literal string

make a string from value

int

env core.int(
    value: 'Attribute',
    parse: 'bool' = true,
    round: 'bool' = true,
    strfloat: 'bool' = false
)

Arguments

  • value: 'Attribute' => Argument to convert to int
  • parse: 'bool' = true => parse string to int
  • round: 'bool' = true => round float into integer
  • strfloat: 'bool' = false => parse string first as float before converting to int

make an int from the value

array

env core.array(*attributes)

Arguments

  • *attributes => List of attributes

make an array from the arguments

attrmap

env core.attrmap(**attributes)

Arguments

  • **attributes => name and values of attributes

make an array from the arguments

append

env core.append(array: 'Vec < Attribute >', value: 'Attribute')

Arguments

  • array: 'Vec < Attribute >' => List of attributes
  • value: 'Attribute' =>

append a value to an array

length

env core.length(value: '& Attribute')

Arguments

  • value: '& Attribute' => Array or a HashMap

length of an array or hashmap

year

env core.year(value: 'Attribute')

Arguments

  • value: 'Attribute' => Date or DateTime

year from date/datetime

month

env core.month(value: 'Attribute')

Arguments

  • value: 'Attribute' => Date or DateTime

month from date/datetime

day

env core.day(value: 'Attribute')

Arguments

  • value: 'Attribute' => Date or DateTime

day from date/datetime

min_num

env core.min_num(vars: 'Vec < Attribute >', start: 'Attribute' = Integer(9223372036854775807))

Arguments

  • vars: 'Vec < Attribute >' =>
  • start: 'Attribute' = Integer(9223372036854775807) =>

Minimum of the variables

Starts with integer for type purpose, MAX float is larger than max int, so it’ll be incorrect for large numbers

max_num

env core.max_num(vars: 'Vec < Attribute >', start: 'Attribute' = Integer(-9223372036854775808))

Arguments

  • vars: 'Vec < Attribute >' =>
  • start: 'Attribute' = Integer(-9223372036854775808) =>

Minimum of the variables

Starts with integer for type purpose, MAX float is larger than max int, so it’ll be incorrect for large numbers

min

env core.min(vars: 'Vec < Attribute >', start: 'Attribute')

Arguments

  • vars: 'Vec < Attribute >' =>
  • start: 'Attribute' =>

Minimum of the variables

max

env core.max(vars: 'Vec < Attribute >', start: 'Attribute')

Arguments

  • vars: 'Vec < Attribute >' =>
  • start: 'Attribute' =>

Minimum of the variables

sum

env core.sum(vars: 'Vec < Attribute >', start: 'Attribute' = Integer(0))

Arguments

  • vars: 'Vec < Attribute >' =>
  • start: 'Attribute' = Integer(0) =>

Sum of the variables

prod

env core.prod(vars: 'Vec < Attribute >', start: 'Attribute' = Integer(1))

Arguments

  • vars: 'Vec < Attribute >' =>
  • start: 'Attribute' = Integer(1) =>

Product of the variables

unique_str

env core.unique_str(vars: 'Vec < String >')

Arguments

  • vars: 'Vec < String >' =>

Get a list of unique string values

count_str

env core.count_str(vars: 'Vec < String >')

Arguments

  • vars: 'Vec < String >' =>

Get a count of unique string values

concat

env core.concat(*vars, join: '& str' = "")

Arguments

  • *vars =>
  • join: '& str' = "" =>

Concat the strings

Node Functions

inputs_count

node core.inputs_count()

Arguments

Count the number of input nodes in the node

inputs_attr

node core.inputs_attr(attr: 'String' = "NAME")

Arguments

  • attr: 'String' = "NAME" => Attribute to get from inputs

Get attributes of the input nodes

has_outlet

node core.has_outlet()

Arguments

Node has an outlet or not

output_attr

node core.output_attr(attr: 'String' = "NAME")

Arguments

  • attr: 'String' = "NAME" => Attribute to get from inputs

Get attributes of the output node

Network Functions

count

network core.count(vars: 'Option < Vec < bool > >')

Arguments

  • vars: 'Option < Vec < bool > >' =>

Count the number of nodes in the network