Built-In Computation Functions
Cogynt Authoring has many built-in functions to help develop accurate, sophisticated computations. For more information about adding computation functions to models, see Adding Functions.
Function Terminology
This section provides definitions for the terms used throughout Cogynt's function documentation.
Scalars
A scalar is a single value.
The following are examples of scalars:
6.5
1000000
"blue"
False
Arrays
An array is a linear data structure of sequential elements that share the same datatype.
Arrays are denoted by square brackets ([]
) in example notation.
The following are examples of arrays:
[1,2,3]
[36.0,6.0,10.0]
["dog","cat","fish"]
[True,True,False]
Groups
A group is a collection of elements.
In principle, a group may contain multiple scalars or multiple arrays. However, support for groups of scalars or groups of arrays is determined on a per-function basis. For more information about a function's support for groups, refer to its documentation.
Groups are denoted by curly braces ({}
) in example notation.
The following are examples of groups:
{1,2,3}
: A group of scalars.{[1,2,3],[4,5,6],[7,8,9]}
: A group of arrays.
Standard Input/Output Behaviors
Cogynt's functions share a consistent logic for processing inputs and outputs. This means that, unless a function is designed to convert formats or datatypes, a given input format always results in a particular output format.
The following table shows the various input and output permutations:
Input | Output | Example |
---|---|---|
Scalar | Scalar | length("ABCDEFG") ==> 7 |
Array | Array | lower(["ABC","DEF","GHI"]) ==> ["abc","def","ghi"] |
Group of scalars | Group of scalars | plus({2,3,4},{5,6,7}) ==> {7,9,11} |
Group of arrays | Group of arrays | abs({[-1,-2,-3],[-2,3,4],[-3,-4,-5]}) ==> {[1,2,3],[2,3,4],[3,4,5]} |
Array and scalar | Array | min([1,2,3],2) ==> [1,2,2] |
Group of scalars and scalar | Group of scalars | max({1,2,3},2) ==> {2,2,3} |
For case-by-case examples of function inputs and outputs, refer to a specific function's documentation.
Available Functions
The following list provides links to detailed documentation about the available functions. The categories and functions within each category are presented in alphabetical order.