Operations catalog
The registry currently exposes 267 operations across the domains of dense linear algebra, tensor primitives, statistical transforms, elementary and transcendental scalar mathematics, curated physical and mathematical constants, financial-data retrieval and portfolio primitives, and tabular data ingest. Signatures below are generated directly from the operation registry; each argument is annotated with its type and, where applicable, a default value.
- §1Overview
- §2Matrix construction and shape
- §3Element-wise operations
- §4Aggregations and norms
- §5Structural manipulation
- §6Dense linear algebra
- §7Iterative and specialised solvers
- §8Neural-network primitives
- §9Statistical transforms
- §10Scalar mathematical functions
- §11Physical and mathematical constants
- §12Financial operations
- §13Data ingest
Overview
The catalog is organised thematically below, rather than by dotted path. Each operation adheres to a common contract: it accepts a typedargumentsobject, produces a single output bound to the caller's as placeholder, and incurs a fixed ECU cost proportional to arithmetic complexity and problem size. Argument validation occurs statically, before any dispatch to the compute backend.
Type labels used in the signatures below have their customary meanings: number and integer for numeric scalars; boolean, string; matrix denotes a two-dimensional numerical array (either an array of typed arrays or an array of arrays of numbers); enum denotes a value restricted to a fixed set of literals — the numeric parameter in parentheses indicates the size of the enumeration. Every operation also accepts an optional safe: boolean argument (defaulting to true) that toggles per-call input revalidation; setting it to false skips the redundant validation in performance-critical inner loops.
Matrix construction and shape
Constructors for standard matrices — zero, identity, random draws with optional uniqueness constraints, triangular random matrices — together with utilities for replication, reshaping, dimensional query, and copying. Predicate operations distinguish squares, symmetries, and matrix-typed values.
| Operation | Signature |
|---|---|
| math.matrix.zeros | rows: integer | number, columns: integer | number, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.identity | n: integer | number, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.identityLike | rows: integer | number, columns: integer | number, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.random | rows: integer | number, columns: integer | number, from?: number = 0, to?: number = 1, type?: enum(10) = "generic", seed?: number, safe?: boolean = true |
| math.matrix.uniqueRandom | rows: integer | number, columns: integer | number, from?: number = 0, to?: number = 1, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.randomLowerTriangular | rows: integer | number, columns: integer | number, from?: number = 0, to?: number = 1, type?: enum(10) = "generic", seed?: number, safe?: boolean = true |
| math.matrix.randomUpperTriangular | rows: integer | number, columns: integer | number, from?: number = 0, to?: number = 1, type?: enum(10) = "generic", seed?: number, safe?: boolean = true |
| math.matrix.uniqueRandomLowerTriangular | rows: integer | number, columns: integer | number, from?: number = 0, to?: number = 1, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.uniqueRandomUpperTriangular | rows: integer | number, columns: integer | number, from?: number = 0, to?: number = 1, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.replicate | value: number, rows: integer | number, columns: integer | number, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.reshape | x: matrix, rows: integer | number, columns: integer | number, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.copy | m: number[][], type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.flattenize | x: matrix, type?: enum(10) = "float64", safe?: boolean = true |
| math.matrix.dimensions | m: number[][], safe?: boolean = true |
| math.matrix.isMatrix | m: any, safe?: boolean = true |
| math.matrix.isSquare | m: number[][], safe?: boolean = true |
| math.matrix.isSymmetric | x: matrix, safe?: boolean = true |
| math.matrix.zero | n: integer | number, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.toDiagonalMatrix | x: matrix, type?: enum(10) = "generic", safe?: boolean = true |
Element-wise operations
Operations that act point-wise on matrix entries. Arithmetic includes the standard field operations together with the Hadamard product and specialised multiplications between triangular factors. Elementary mathematical functions and their inverses and hyperbolic variants are provided in element-wise form. Comparison and logical operations return matrices of Boolean or 0/1 entries suitable for masking.
| Operation | Signature |
|---|---|
| math.matrix.plus | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.minus | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.times | x: number | matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.divide | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.negate | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.power | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.modulus | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.Hadamard | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.multiplyLL | x: matrix, y: matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.multiplyLU | x: matrix, y: matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.multiplyUL | x: matrix, y: matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.multiplyUU | x: matrix, y: matrix, type?: enum(10) = "generic", safe?: boolean = true |
| Operation | Signature |
|---|---|
| math.matrix.abs | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.sqrt | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.exp | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.log | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.sin | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.cos | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.tan | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.cotan | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.sinh | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.cosh | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.tanh | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.cotanh | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.arcsin | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.arccos | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.arctan | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.arccotan | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.ceil | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.floor | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.round | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| Operation | Signature |
|---|---|
| math.matrix.eq | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.neq | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.gt | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.geq | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.lt | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.leq | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.isEqualTo | x: matrix, y: matrix, safe?: boolean = true |
| math.matrix.isNearlyEqualTo | x: matrix, y: matrix, threshold?: number, norm?: enum(7) = "Euclidean", safe?: boolean = true |
| math.matrix.isGreaterThan | x: matrix, y: matrix, safe?: boolean = true |
| math.matrix.isGreaterThanOrEqual | x: matrix, y: matrix, safe?: boolean = true |
| math.matrix.isLessThan | x: matrix, y: matrix, safe?: boolean = true |
| math.matrix.isLessThanOrEqual | x: matrix, y: matrix, safe?: boolean = true |
| math.matrix.and | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.or | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.xor | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.bitwiseAnd | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.bitwiseOr | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.bitwiseNegate | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.leftShiftBy | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.rightShiftBy | x: matrix, y: number | matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.step | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.superior | x: matrix, safe?: boolean = true |
| math.matrix.inferior | x: matrix, safe?: boolean = true |
Aggregations and norms
Reductions along rows, columns, or the entire matrix — sums, sums-of-squares, absolute sums, minima and maxima, together with diagonal-exclusion variants of the same. Induced and Frobenius norms are exposed as first-class operations.
| Operation | Signature |
|---|---|
| math.matrix.sumOfAllElements | x: matrix, safe?: boolean = true |
| math.matrix.sumOfSquaresOfAllElements | x: matrix, safe?: boolean = true |
| math.matrix.sumOfCubesOfAllElements | x: matrix, safe?: boolean = true |
| math.matrix.productOfAllElements | x: matrix, safe?: boolean = true |
| math.matrix.sumOfRowElements | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.sumOfColumnElements | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.sumOfRowElementsExceptDiagonal | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.sumOfColumnElementsExceptDiagonal | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.sumOfSquaresOfRowElements | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.sumOfSquaresOfColumnElements | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.sumOfSquaresOfRowElementsExceptDiagonal | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.sumOfSquaresOfColumnElementsExceptDiagonal | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.absoluteSumOfRowElements | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.absoluteSumOfColumnElements | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.absoluteSumOfRowElementsExceptDiagonal | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.absoluteSumOfColumnElementsExceptDiagonal | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.maxRowElements | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.maxColumnElements | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.maxRowElementsExceptDiagonal | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.maxColumnElementsExceptDiagonal | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.minRowElements | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.minColumnElements | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.minRowElementsExceptDiagonal | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.minColumnElementsExceptDiagonal | x: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.FrobeniusNorm | x: matrix, safe?: boolean = true |
| math.matrix.infinityNorm | x: matrix, safe?: boolean = true |
| math.matrix.maxNorm | x: matrix, safe?: boolean = true |
Structural manipulation
Operations that read or modify structural regions of a matrix — rows, columns, arbitrary rectangular blocks, and diagonals — together with the family of vector-broadcast operations that add, subtract, multiply or divide a vector across a chosen matrix axis.
| Operation | Signature |
|---|---|
| math.matrix.transpose | x: matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.inverse | x: matrix, method?: "Gauss" | "LU" = "Gauss", type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.inverted | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.getRow | x: matrix, rowIndex: integer, fromColumnIndex?: integer, toColumnIndex?: integer, safe?: boolean = true |
| math.matrix.setRow | x: matrix, row: matrix, rowIndex: integer, fromColumnIndex: integer, toColumnIndex: integer, safe?: boolean = true |
| math.matrix.getBlock | x: matrix, from: integer[], to: integer[], type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.setBlock | x: matrix, from: integer[], to: integer[], block: matrix, safe?: boolean = true |
| math.matrix.appendBlockRight | x: matrix, block: matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.appendBlockBottom | x: matrix, block: matrix, type?: enum(10) = "generic", safe?: boolean = true |
| math.matrix.exchangeRows | x: matrix, row1: integer, row2: integer, fromColumn?: integer, toColumn?: integer, safe?: boolean = true |
| math.matrix.exchangeColumns | x: matrix, col1: integer, col2: integer, fromRow?: integer, toRow?: integer, safe?: boolean = true |
| math.matrix.getDiagonal | x: matrix, row?: integer, type?: enum(10) = "generic", mode?: string, safe?: boolean = true |
| math.matrix.setDiagonalToNumber | x: matrix, y: number, safe?: boolean = true |
| math.matrix.setDiagonalToRowVector | x: matrix, y: matrix, safe?: boolean = true |
| math.matrix.setDiagonalToColumnVector | x: matrix, y: matrix, safe?: boolean = true |
| math.matrix.addNumberToDiagonal | x: matrix, y: number, safe?: boolean = true |
| math.matrix.addRowVectorToDiagonal | x: matrix, y: matrix, safe?: boolean = true |
| math.matrix.addColumnVectorToDiagonal | x: matrix, y: matrix, safe?: boolean = true |
| math.matrix.addVectorToMatrixByRowAxis | x: matrix, y: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.addVectorToMatrixByColumnAxis | x: matrix, y: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.subtractVectorFromMatrixByRowAxis | x: matrix, y: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.subtractVectorFromMatrixByColumnAxis | x: matrix, y: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.pointwiseMultiplyMatrixWithVectorByRowAxis | x: matrix, y: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.pointwiseMultiplyMatrixWithVectorByColumnAxis | x: matrix, y: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.pointwiseDivideMatrixWithVectorByRowAxis | x: matrix, y: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
| math.matrix.pointwiseDivideMatrixWithVectorByColumnAxis | x: matrix, y: matrix, type?: enum(10) = "generic", mode?: "row" | "column" = "row", safe?: boolean = true |
Dense linear algebra
The customary matrix decompositions and related reductions. Each operation returns a structured value carrying the factor matrices and, where applicable, permutation data.
| Operation | Signature and description |
|---|---|
| math.matrix.LUPC | x: matrix, safe?: boolean = true LU decomposition with partial column pivoting. |
| math.matrix.LDL | x: matrix, type?: enum(10) = "generic", safe?: boolean = true LDLᵀ decomposition of a symmetric matrix. |
| math.matrix.LL | x: matrix, secure?: boolean = true, safe?: boolean = true Cholesky (LLᵀ) decomposition of a symmetric positive-definite matrix. |
| math.matrix.QR | x: matrix, method?: enum(5) = "Householder", safe?: boolean = true QR decomposition; produces an orthonormal Q and upper-triangular R. |
| math.matrix.svd | x: matrix, copy?: boolean = true, sort?: boolean = true, type?: enum(10) = "generic", safe?: boolean = true Singular value decomposition; returns U, Σ, Vᵀ. |
| math.matrix.eigenproblem | x: matrix, method?: "HQR" | "HQR2" | "JacobiSymmetric" = "HQR", balance?: boolean = true, sort?: boolean = true, type?: enum(10) = "generic", safe?: boolean = true Eigenvalues and eigenvectors of a square matrix. |
| math.matrix.toUpperHessenberg | x: matrix, safe?: boolean = true Orthogonal reduction to upper-Hessenberg form; a standard pre-processing step for eigenvalue algorithms. |
| math.matrix.balance | x: matrix, safe?: boolean = true Similarity balancing of a matrix, reducing the condition number of the eigenvalue problem. |
| math.matrix.GershgorinCircles | x: matrix, type?: enum(10) = "generic", safe?: boolean = true Gershgorin discs, providing enclosure estimates for the spectrum. |
Iterative and specialised solvers
Building blocks for user-composed iterative procedures — a single step of the operation, exposed so that the caller can compose convergence tests, adaptive schedules, and stopping criteria within the DAG itself. Initial-approximation operations are supplied for the iterative inversion families.
| Operation | Signature and description |
|---|---|
| math.matrix.powerMethodIteration | x: matrix, y?: matrix, type?: enum(10) = "generic", safe?: boolean = true One step of the power method for dominant eigenpair estimation. |
| math.matrix.shiftedPowerMethodIteraton | x: matrix, y?: matrix, shift?: number = 1, type?: enum(10) = "generic", safe?: boolean = true Shifted power iteration for accelerated convergence. |
| math.matrix.numericalInverseStepSchulz | x: matrix, y: matrix, type?: enum(10) = "generic", safe?: boolean = true Schulz iteration for iterative matrix inversion. |
| math.matrix.numericalInverseStepLiAndLi | x: matrix, y: matrix, type?: enum(10) = "generic", safe?: boolean = true Li–Li iteration for matrix inversion. |
| math.matrix.numericalInverseStepLiEtAl | x: matrix, y: matrix, type?: enum(10) = "generic", safe?: boolean = true Li et al. iteration for matrix inversion. |
| math.matrix.numericalInverseStepSoleymaniAndToutounian | x: matrix, y: matrix, type?: enum(10) = "generic", safe?: boolean = true Soleymani–Toutounian iteration for matrix inversion. |
| math.matrix.initialInverseApproximationBenIsraelGreville | x: matrix, type?: enum(10) = "generic", safe?: boolean = true Ben-Israel–Greville initial approximation for iterative inversion. |
| math.matrix.initialInverseApproximationCodevico | x: matrix, type?: enum(10) = "generic", safe?: boolean = true Codevico initial approximation. |
| math.matrix.initialInverseApproximationGrosz | x: matrix, type?: enum(10) = "generic", safe?: boolean = true Grosz initial approximation. |
| math.matrix.initialInverseApproximationPanSchreiber | x: matrix, type?: enum(10) = "generic", safe?: boolean = true Pan–Schreiber initial approximation. |
Neural-network primitives
Discrete convolution, pooling, and the activation functions used in contemporary architectures, expressed at matrix scale so that they compose naturally with the linear-algebra operations above.
| Operation | Signature and description |
|---|---|
| math.matrix.Conv2D | x: matrix, kernel: matrix, bias?: number = 0, stride?: integer = 1, padding?: integer = 0, type?: enum(10) = "generic", safe?: boolean = true Two-dimensional discrete convolution over a matrix input. |
| math.matrix.Convolution2D | x: matrix, kernel: matrix, bias?: number = 0, stride?: integer = 1, padding?: integer = 0, type?: enum(10) = "generic", safe?: boolean = true Alternative 2-D convolution formulation. |
| math.matrix.pooling | x: matrix, width: integer, height: integer, method?: "max" | "average" = "max", type?: enum(10) = "generic", safe?: boolean = true Pooling reduction over a rectangular window. |
| math.matrix.poolingDerivative | x: matrix, width: integer, height: integer, type?: enum(10) = "generic", safe?: boolean = true Derivative of the pooling operator for back-propagation. |
| math.matrix.ReLU | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true Rectified linear activation applied element-wise. |
| math.matrix.LeakyReLU | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true Leaky rectified linear activation. |
| math.matrix.ELU | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true Exponential linear activation. |
| math.matrix.sigmoid | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true Logistic sigmoid, element-wise. |
| math.matrix.softmax | x: matrix, mode?: "row" | "column" = "row", type?: enum(10) = "generic", safe?: boolean = true Softmax normalisation along a chosen axis. |
| math.matrix.logit | x: matrix, weight?: number = 1, bias?: number = 0, type?: enum(10) = "generic", safe?: boolean = true Logit (inverse sigmoid), element-wise. |
Statistical transforms
Variance-stabilising and normality-inducing transformations applied element-wise to a matrix.
| Operation | Signature and description |
|---|---|
| math.matrix.BoxCox | x: matrix, weight?: number = 1, bias?: number = 0, lambda?: number = 0, type?: enum(10) = "generic", safe?: boolean = true Box–Cox power transform for variance-stabilising a positive-valued series. |
| math.matrix.YeoJohnson | x: matrix, weight?: number = 1, bias?: number = 0, lambda?: number = 0, type?: enum(10) = "generic", safe?: boolean = true Yeo–Johnson power transform, defined on the full real line. |
Scalar mathematical functions
The scalar counterparts of the element-wise matrix operations, exposed under the math.operations namespace. These are the primitives of choice inside guard expressions on edges, where a single-value predicate is required.
| Operation | Signature |
|---|---|
| math.operations.plus | x: number, y: number, safe?: boolean = true |
| math.operations.minus | x: number, y: number, safe?: boolean = true |
| math.operations.times | x: number, y: number, safe?: boolean = true |
| math.operations.divide | x: number, y: number, safe?: boolean = true |
| math.operations.mod | x: number, y: number, safe?: boolean = true |
| math.operations.power | base: number, exponent: number, safe?: boolean = true |
| math.operations.abs | x: number, safe?: boolean = true |
| math.operations.sign | x: number, safe?: boolean = true |
| math.operations.max | x: number, y: number, safe?: boolean = true |
| math.operations.min | x: number, y: number, safe?: boolean = true |
| math.operations.hypot | x: number, y: number, safe?: boolean = true |
| math.operations.clamp | x: number, min: number, max: number, safe?: boolean = true |
| math.operations.round | x: number, safe?: boolean = true |
| math.operations.floor | x: number, safe?: boolean = true |
| math.operations.ceil | x: number, safe?: boolean = true |
| math.operations.trunc | x: number, safe?: boolean = true |
| Operation | Signature |
|---|---|
| math.operations.sin | x: number, safe?: boolean = true |
| math.operations.cos | x: number, safe?: boolean = true |
| math.operations.tan | x: number, safe?: boolean = true |
| math.operations.asin | x: number, safe?: boolean = true |
| math.operations.acos | x: number, safe?: boolean = true |
| math.operations.atan | x: number, safe?: boolean = true |
| math.operations.atan2 | y: number, x: number, safe?: boolean = true |
| math.operations.sinh | x: number, safe?: boolean = true |
| math.operations.cosh | x: number, safe?: boolean = true |
| math.operations.tanh | x: number, safe?: boolean = true |
| Operation | Signature |
|---|---|
| math.operations.exp | x: number, safe?: boolean = true |
| math.operations.expm1 | x: number, safe?: boolean = true |
| math.operations.log | x: number, base?: number, safe?: boolean = true |
| math.operations.log2 | x: number, safe?: boolean = true |
| math.operations.log10 | x: number, safe?: boolean = true |
| math.operations.log1p | x: number, safe?: boolean = true |
| math.operations.sqrt | x: number, safe?: boolean = true |
| math.operations.cbrt | x: number, safe?: boolean = true |
| Operation | Signature |
|---|---|
| math.operations.and | x: boolean, y: boolean, safe?: boolean = true |
| math.operations.or | x: boolean, y: boolean, safe?: boolean = true |
| math.operations.xor | x: integer, y: integer, safe?: boolean = true |
| math.operations.not | x: boolean, safe?: boolean = true |
| math.operations.eq | x: any, y: any, safe?: boolean = true |
| math.operations.neq | x: any, y: any, safe?: boolean = true |
| math.operations.gt | x: number | string, y: number | string, safe?: boolean = true |
| math.operations.geq | x: number | string, y: number | string, safe?: boolean = true |
| math.operations.lt | x: number | string, y: number | string, safe?: boolean = true |
| math.operations.leq | x: number | string, y: number | string, safe?: boolean = true |
| math.operations.shift | x: integer, y: integer, safe?: boolean = true |
| math.operations.unshift | x: integer, y: integer, safe?: boolean = true |
| Operation | Signature |
|---|---|
| math.operations.relu | x: number, safe?: boolean = true |
| math.operations.leakyRelu | x: number, alpha?: number = 0.01, safe?: boolean = true |
| math.operations.elu | x: number, alpha?: number = 1, safe?: boolean = true |
| math.operations.selu | x: number, safe?: boolean = true |
| math.operations.gelu | x: number, safe?: boolean = true |
| math.operations.mish | x: number, safe?: boolean = true |
| math.operations.swish | x: number, beta?: number = 1, safe?: boolean = true |
| math.operations.softplus | x: number, safe?: boolean = true |
| math.operations.sigmoid | x: number, safe?: boolean = true |
| math.operations.hardSigmoid | x: number, safe?: boolean = true |
| math.operations.step | x: number, threshold?: number = 0, safe?: boolean = true |
Physical and mathematical constants
A curated collection of numerical constants. Each is a nullary operation returning a scalar value; SI base units are assumed throughout for the physical quantities.
| Operation | Signature |
|---|---|
| math.constants.pi | safe?: boolean = true |
| math.constants.tau | safe?: boolean = true |
| math.constants.e | safe?: boolean = true |
| math.constants.phi | safe?: boolean = true |
| math.constants.sqrt2 | safe?: boolean = true |
| math.constants.ln2 | safe?: boolean = true |
| math.constants.ln10 | safe?: boolean = true |
| math.constants.eulerMascheroni | safe?: boolean = true |
| math.constants.apery | safe?: boolean = true |
| math.constants.catalan | safe?: boolean = true |
| math.constants.epsilon | safe?: boolean = true |
| math.constants.infinity | safe?: boolean = true |
| math.constants.negativeInfinity | safe?: boolean = true |
| math.constants.nan | safe?: boolean = true |
| math.constants.maxSafeInteger | safe?: boolean = true |
| math.constants.minSafeInteger | safe?: boolean = true |
| Operation | Signature |
|---|---|
| math.constants.speedOfLight | safe?: boolean = true |
| math.constants.planck | safe?: boolean = true |
| math.constants.hbar | safe?: boolean = true |
| math.constants.boltzmann | safe?: boolean = true |
| math.constants.avogadro | safe?: boolean = true |
| math.constants.faraday | safe?: boolean = true |
| math.constants.gasConstant | safe?: boolean = true |
| math.constants.gravitational | safe?: boolean = true |
| math.constants.stefanBoltzmann | safe?: boolean = true |
| math.constants.rydberg | safe?: boolean = true |
| math.constants.fineStructure | safe?: boolean = true |
| math.constants.vacuumPermeability | safe?: boolean = true |
| math.constants.vacuumPermittivity | safe?: boolean = true |
| math.constants.electronMass | safe?: boolean = true |
| math.constants.protonMass | safe?: boolean = true |
| math.constants.neutronMass | safe?: boolean = true |
| math.constants.electronCharge | safe?: boolean = true |
| math.constants.atomicMassUnit | safe?: boolean = true |
| math.constants.bohrRadius | safe?: boolean = true |
| math.constants.standardGravity | safe?: boolean = true |
| Operation | Signature |
|---|---|
| math.constants.astronomicalUnit | safe?: boolean = true |
| math.constants.lightYear | safe?: boolean = true |
| math.constants.parsec | safe?: boolean = true |
| math.constants.earthMass | safe?: boolean = true |
| math.constants.earthRadius | safe?: boolean = true |
| math.constants.solarMass | safe?: boolean = true |
Financial operations
Market-data retrieval, return computation, index-constituent management, and mean–variance-style portfolio primitives. These operations are typically composed into multi-node graphs in which an initial retrieval node feeds a downstream optimisation node.
| Operation | Signature and description |
|---|---|
| finance.getSymbolsMatrixFromYahooFinance | symbols: string[], interval: enum(8), requiredValue: enum(5), from?: number, to?: number, fill?: "ffill" | "intersect" | "none" = "ffill", includeDate?: boolean = false Retrieves a matrix of historical prices or returns for a specified set of ticker symbols and a date range from Yahoo Finance. |
| finance.computeReturns | prices: any, method?: "simple" | "log" = "log" Computes arithmetic or logarithmic returns from a price matrix. |
| finance.getIndexConstituents | index: "SP500" | "NASDAQ100" | "DOW30" Returns the current constituent members of a market index. |
| finance.filterConstituents | constituents: any, from: number, to: number, interval: "1d" | "1wk" | "1mo", metric: "return" | "volatility", direction: "top" | "bottom", mode: "n" | "pct" | "per_sector_n" | "per_sector_pct", value: number Filters an index-constituent set by user-supplied criteria (e.g. sector, market capitalisation). |
| finance.sampleConstituents | constituents: any, mode: "random_n" | "random_pct" | "per_sector_n" | "per_sector_pct", value: number, seed?: number Draws a random subset from an index-constituent set. |
| finance.minimumVariancePortfolio | prices: any, interval?: "1d" | "1wk" | "1mo" = "1d", method?: "simple" | "log" = "log", riskFreeRate?: number = 0, longOnly?: boolean = true, symbols?: string[] Solves for the minimum-variance portfolio weights subject to standard constraints. |
| finance.maximumSharpePortfolio | prices: any, interval?: "1d" | "1wk" | "1mo" = "1d", method?: "simple" | "log" = "log", riskFreeRate?: number = 0, longOnly?: boolean = true, symbols?: string[] Solves for the portfolio weights that maximise the Sharpe ratio for a given risk-free rate. |
| finance.minimumCVaRPortfolio | prices: any, interval?: "1d" | "1wk" | "1mo" = "1d", method?: "simple" | "log" = "log", riskFreeRate?: number = 0, longOnly?: boolean = true, symbols?: string[], alpha?: number = 0.95 Solves for the portfolio weights that minimise the conditional value-at-risk at a given confidence level. |
| finance.efficientFrontier | prices: any, interval?: "1d" | "1wk" | "1mo" = "1d", method?: "simple" | "log" = "log", riskFreeRate?: number = 0, longOnly?: boolean = true, symbols?: string[], numPoints?: number = 20 Traces the efficient frontier in mean–variance space. |
Data ingest
Operations for the introduction of external data into a computation. File-consuming operations reference an entry-node input under the filePath argument; the mechanisms for supplying such a file — multipart form-data and pre-uploaded references — are documented on the DAG schema page.
| Operation | Signature and description |
|---|---|
| data.readExcel | filePath: string, sheet?: string, range?: string, operation?: string = "readFile" Reads a sheet (or a specified range) of an Excel workbook into a structured value. |
| data.writeExcel | data: string | number | boolean | null[][], name?: string, header?: string | number | boolean | null[], sheetName?: string Writes a structured value back to an Excel workbook. |