@mojir/lits 2.2.2-alpha.6 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1556 -107
- package/dist/cli/cli/src/cli.d.ts +1 -1
- package/dist/cli/cli/src/cliDocumentation/getCliType.d.ts +1 -1
- package/dist/cli/cli/src/colorizer.d.ts +36 -36
- package/dist/cli/cli/src/js-interop/Cli/Fs/index.d.ts +2 -0
- package/dist/cli/cli/src/js-interop/Cli/Proc/index.d.ts +3 -0
- package/dist/cli/cli/src/js-interop/Cli/index.d.ts +3 -0
- package/dist/cli/cli/src/js-interop/utils.d.ts +2 -0
- package/dist/cli/cli.js +30531 -12755
- package/dist/cli/reference/api.d.ts +53 -41
- package/dist/cli/reference/index.d.ts +150 -23
- package/dist/cli/src/AutoCompleter/AutoCompleter.d.ts +24 -0
- package/dist/cli/src/Lits/Cache.d.ts +1 -1
- package/dist/cli/src/Lits/Lits.d.ts +26 -22
- package/dist/cli/src/allModules.d.ts +2 -0
- package/dist/cli/src/builtin/bindingNode.d.ts +5 -0
- package/dist/cli/src/builtin/{normalExpressions/categories → core}/array.d.ts +1 -1
- package/dist/cli/src/builtin/{normalExpressions/categories → core}/bitwise.d.ts +1 -1
- package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/collection.d.ts +1 -1
- package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/functional.d.ts +1 -1
- package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/math.d.ts +1 -1
- package/dist/cli/src/builtin/core/meta.d.ts +3 -0
- package/dist/cli/src/builtin/{normalExpressions/categories → core}/misc.d.ts +1 -1
- package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/object.d.ts +1 -1
- package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/predicates.d.ts +1 -1
- package/dist/{src/builtin/normalExpressions/categories → cli/src/builtin/core}/regexp.d.ts +1 -1
- package/dist/cli/src/builtin/core/sequence.d.ts +2 -0
- package/dist/cli/src/builtin/{normalExpressions/categories → core}/string.d.ts +1 -1
- package/dist/cli/src/builtin/core/vector.d.ts +2 -0
- package/dist/cli/src/builtin/index.d.ts +10 -34
- package/dist/cli/src/builtin/interface.d.ts +92 -24
- package/dist/cli/src/builtin/modules/assert/docs.d.ts +2 -0
- package/dist/cli/src/builtin/modules/assert/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/bitwise/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/collection/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/functional/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/grid/docs.d.ts +2 -0
- package/dist/cli/src/builtin/modules/grid/fromArray.d.ts +8 -0
- package/dist/cli/src/builtin/modules/grid/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/grid/transpose.d.ts +2 -0
- package/dist/cli/src/builtin/modules/interface.d.ts +11 -0
- package/dist/cli/src/builtin/modules/linear-algebra/docs.d.ts +2 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/calcFractionalRanks.d.ts +1 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/collinear.d.ts +2 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/corrleation.d.ts +8 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/covariance.d.ts +4 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/dot.d.ts +1 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/gaussJordanElimination.d.ts +7 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/getUnit.d.ts +2 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/isZeroVector.d.ts +1 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/kendallTau.d.ts +10 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/length.d.ts +1 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/pearsonCorr.d.ts +1 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/scale.d.ts +1 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/solve.d.ts +8 -0
- package/dist/cli/src/builtin/modules/linear-algebra/helpers/subtract.d.ts +1 -0
- package/dist/cli/src/builtin/modules/linear-algebra/index.d.ts +4 -0
- package/dist/cli/src/builtin/modules/math/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/matrix/docs.d.ts +2 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/adjugate.d.ts +1 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/band.d.ts +9 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/cofactor.d.ts +1 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/determinant.d.ts +6 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/inverse.d.ts +6 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/isBanded.d.ts +11 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/isDiagonal.d.ts +10 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/isIdentity.d.ts +1 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/isOrthogonal.d.ts +1 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/isSquare.d.ts +1 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/isSymetric.d.ts +8 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/isTriangular.d.ts +13 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/matrixMultiply.d.ts +7 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/minor.d.ts +1 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/norm1.d.ts +1 -0
- package/dist/cli/src/builtin/modules/matrix/helpers/trace.d.ts +8 -0
- package/dist/cli/src/builtin/modules/matrix/index.d.ts +4 -0
- package/dist/cli/src/builtin/modules/number-theory/binomialCefficient.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/combinations.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/derangements.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/divisors.d.ts +4 -0
- package/dist/cli/src/builtin/modules/number-theory/docs.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/factorial.d.ts +3 -0
- package/dist/cli/src/builtin/modules/number-theory/index.d.ts +4 -0
- package/dist/cli/src/builtin/modules/number-theory/partitions.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/permutations.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/powerSet.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/primeFactors.d.ts +11 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/abundant.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/arithmetic.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/bell.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/bernoulli.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/catalan.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/collatz.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/composite.d.ts +3 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/deficient.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/factorial.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/fibonacci.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/geometric.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/golomb.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/happy.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/index.d.ts +26 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/juggler.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/lookAndSay.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/lucas.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/lucky.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/mersenne.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/padovan.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/partition.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/pell.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/perfect.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/perfectCube.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/perfectPower.d.ts +10 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/perfectSquare.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/poligonal.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/prime.d.ts +3 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/recaman.d.ts +9 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/sylvester.d.ts +1 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/thueMorse.d.ts +2 -0
- package/dist/cli/src/builtin/modules/number-theory/sequences/tribonacci.d.ts +1 -0
- package/dist/cli/src/builtin/modules/random/docs.d.ts +2 -0
- package/dist/cli/src/builtin/modules/random/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/sequence/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/string/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/bincount.d.ts +9 -0
- package/dist/cli/src/builtin/modules/vector/calcMad.d.ts +1 -0
- package/dist/cli/src/builtin/modules/vector/calcMean.d.ts +1 -0
- package/dist/cli/src/builtin/modules/vector/calcMedad.d.ts +1 -0
- package/dist/cli/src/builtin/modules/vector/calcMedian.d.ts +1 -0
- package/dist/cli/src/builtin/modules/vector/calcStdDev.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/calcVariance.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/docs.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/entropy.d.ts +8 -0
- package/dist/cli/src/builtin/modules/vector/histogram.d.ts +9 -0
- package/dist/cli/src/builtin/modules/vector/index.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/mode.d.ts +6 -0
- package/dist/cli/src/builtin/modules/vector/outliers.d.ts +7 -0
- package/dist/cli/src/builtin/modules/vector/percentile.d.ts +7 -0
- package/dist/cli/src/builtin/modules/vector/quartiles.d.ts +1 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/entropy.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/giniCoefficient.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/index.d.ts +13 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/iqr.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/kurtosis.d.ts +5 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/mad.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/mean.d.ts +4 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/medad.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/median.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/prod.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/rms.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/skewness.d.ts +3 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/span.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/standardDeviation.d.ts +3 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/sum.d.ts +2 -0
- package/dist/cli/src/builtin/modules/vector/reductionFunctions/variance.d.ts +3 -0
- package/dist/cli/src/builtin/normalExpressions/index.d.ts +7 -1
- package/dist/cli/src/builtin/specialExpressionTypes.d.ts +23 -0
- package/dist/cli/src/builtin/specialExpressions/and.d.ts +3 -3
- package/dist/cli/src/builtin/specialExpressions/array.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/block.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/cond.d.ts +3 -3
- package/dist/cli/src/builtin/specialExpressions/def.d.ts +5 -4
- package/dist/cli/src/builtin/specialExpressions/defined.d.ts +5 -0
- package/dist/cli/src/builtin/specialExpressions/functions.d.ts +5 -17
- package/dist/cli/src/builtin/specialExpressions/if.d.ts +3 -3
- package/dist/cli/src/builtin/specialExpressions/let.d.ts +3 -7
- package/dist/cli/src/builtin/specialExpressions/loop.d.ts +3 -4
- package/dist/cli/src/builtin/specialExpressions/loops.d.ts +5 -14
- package/dist/cli/src/builtin/specialExpressions/object.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/or.d.ts +3 -3
- package/dist/cli/src/builtin/specialExpressions/qq.d.ts +3 -3
- package/dist/cli/src/builtin/specialExpressions/recur.d.ts +3 -3
- package/dist/cli/src/builtin/specialExpressions/switch.d.ts +6 -0
- package/dist/cli/src/builtin/specialExpressions/throw.d.ts +3 -3
- package/dist/cli/src/builtin/specialExpressions/try.d.ts +3 -5
- package/dist/cli/src/builtin/specialExpressions/unless.d.ts +6 -0
- package/dist/cli/src/builtin/utils.d.ts +3 -15
- package/dist/cli/src/cli.d.ts +1 -1
- package/dist/cli/src/cliDocumentation/getCliType.d.ts +1 -1
- package/dist/cli/src/colorizer.d.ts +36 -36
- package/dist/cli/src/constants/constants.d.ts +18 -44
- package/dist/cli/src/errors.d.ts +2 -5
- package/dist/cli/src/evaluator/ContextStack.d.ts +16 -11
- package/dist/cli/src/evaluator/functionExecutors.d.ts +4 -4
- package/dist/cli/src/evaluator/index.d.ts +2 -2
- package/dist/cli/src/evaluator/interface.d.ts +5 -5
- package/dist/cli/src/getUndefinedSymbols/index.d.ts +7 -0
- package/dist/cli/src/index.d.ts +9 -12
- package/dist/cli/src/initReferenceData.d.ts +1 -0
- package/dist/cli/src/interface.d.ts +1 -2
- package/dist/cli/src/js-interop/Cli/Fs/index.d.ts +2 -0
- package/dist/cli/src/js-interop/Cli/Proc/index.d.ts +3 -0
- package/dist/cli/src/js-interop/Cli/index.d.ts +3 -0
- package/dist/cli/src/js-interop/utils.d.ts +2 -0
- package/dist/cli/src/parser/Parser.d.ts +58 -0
- package/dist/cli/src/parser/types.d.ts +133 -0
- package/dist/cli/src/symbolPatterns.d.ts +2 -0
- package/dist/cli/src/tokenizer/minifyTokenStream.d.ts +4 -0
- package/dist/cli/src/tokenizer/operators.d.ts +12 -0
- package/dist/cli/src/tokenizer/reservedNames.d.ts +66 -0
- package/dist/cli/src/tokenizer/token.d.ts +86 -0
- package/dist/cli/src/tokenizer/tokenize.d.ts +8 -0
- package/dist/cli/src/tokenizer/tokenizers.d.ts +14 -19
- package/dist/cli/src/transformer/index.d.ts +2 -2
- package/dist/cli/src/typeGuards/annotatedArrays.d.ts +16 -0
- package/dist/cli/src/typeGuards/array.d.ts +1 -1
- package/dist/cli/src/typeGuards/astNode.d.ts +20 -17
- package/dist/cli/src/typeGuards/index.d.ts +1 -10
- package/dist/cli/src/typeGuards/lits.d.ts +5 -2
- package/dist/cli/src/typeGuards/litsFunction.d.ts +3 -3
- package/dist/cli/src/typeGuards/number.d.ts +1 -1
- package/dist/cli/src/typeGuards/string.d.ts +1 -1
- package/dist/cli/src/untokenizer/index.d.ts +1 -1
- package/dist/cli/src/utils/arity.d.ts +10 -0
- package/dist/cli/src/utils/debug/debugTools.d.ts +0 -2
- package/dist/cli/src/utils/debug/getCodeMarker.d.ts +2 -0
- package/dist/cli/src/utils/debug/getSourceCodeInfo.d.ts +2 -2
- package/dist/cli/src/utils/docString/generateDocString.d.ts +2 -0
- package/dist/cli/src/utils/getAssertionError.d.ts +1 -1
- package/dist/cli/src/utils/index.d.ts +9 -6
- package/dist/full.esm.js +2 -0
- package/dist/full.esm.js.map +1 -0
- package/dist/full.js +2 -0
- package/dist/full.js.map +1 -0
- package/dist/index.esm.js +1 -15635
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -15663
- package/dist/index.js.map +1 -1
- package/dist/lits.iife.js +1 -15668
- package/dist/lits.iife.js.map +1 -1
- package/dist/modules/assert.esm.js +2 -0
- package/dist/modules/assert.esm.js.map +1 -0
- package/dist/modules/assert.js +2 -0
- package/dist/modules/assert.js.map +1 -0
- package/dist/modules/bitwise.esm.js +2 -0
- package/dist/modules/bitwise.esm.js.map +1 -0
- package/dist/modules/bitwise.js +2 -0
- package/dist/modules/bitwise.js.map +1 -0
- package/dist/modules/cli/src/cli.d.ts +2 -0
- package/dist/modules/cli/src/cliDocumentation/formatCliDescription.d.ts +3 -0
- package/dist/modules/cli/src/cliDocumentation/getCliArgumentInfo.d.ts +3 -0
- package/dist/modules/cli/src/cliDocumentation/getCliDocumentation.d.ts +2 -0
- package/dist/modules/cli/src/cliDocumentation/getCliFunctionExamples.d.ts +3 -0
- package/dist/modules/cli/src/cliDocumentation/getCliFunctionSignature.d.ts +3 -0
- package/dist/modules/cli/src/cliDocumentation/getCliTitle.d.ts +3 -0
- package/dist/modules/cli/src/cliDocumentation/getCliType.d.ts +3 -0
- package/dist/modules/cli/src/cliFormatterRules.d.ts +13 -0
- package/dist/modules/cli/src/colorizer.d.ts +939 -0
- package/dist/modules/cli/src/createReadlineInterface.d.ts +5 -0
- package/dist/modules/cli/src/js-interop/Cli/Fs/index.d.ts +2 -0
- package/dist/modules/cli/src/js-interop/Cli/Proc/index.d.ts +3 -0
- package/dist/modules/cli/src/js-interop/Cli/index.d.ts +3 -0
- package/dist/modules/cli/src/js-interop/utils.d.ts +2 -0
- package/dist/modules/collection.esm.js +2 -0
- package/dist/modules/collection.esm.js.map +1 -0
- package/dist/modules/collection.js +2 -0
- package/dist/modules/collection.js.map +1 -0
- package/dist/modules/common/createFormatter.d.ts +6 -0
- package/dist/modules/common/utils.d.ts +2 -0
- package/dist/modules/functional.esm.js +2 -0
- package/dist/modules/functional.esm.js.map +1 -0
- package/dist/modules/functional.js +2 -0
- package/dist/modules/functional.js.map +1 -0
- package/dist/modules/grid.esm.js +2 -0
- package/dist/modules/grid.esm.js.map +1 -0
- package/dist/modules/grid.js +2 -0
- package/dist/modules/grid.js.map +1 -0
- package/dist/modules/linear-algebra.esm.js +2 -0
- package/dist/modules/linear-algebra.esm.js.map +1 -0
- package/dist/modules/linear-algebra.js +2 -0
- package/dist/modules/linear-algebra.js.map +1 -0
- package/dist/modules/math.esm.js +2 -0
- package/dist/modules/math.esm.js.map +1 -0
- package/dist/modules/math.js +2 -0
- package/dist/modules/math.js.map +1 -0
- package/dist/modules/matrix.esm.js +2 -0
- package/dist/modules/matrix.esm.js.map +1 -0
- package/dist/modules/matrix.js +2 -0
- package/dist/modules/matrix.js.map +1 -0
- package/dist/modules/number-theory.esm.js +2 -0
- package/dist/modules/number-theory.esm.js.map +1 -0
- package/dist/modules/number-theory.js +2 -0
- package/dist/modules/number-theory.js.map +1 -0
- package/dist/modules/random.esm.js +2 -0
- package/dist/modules/random.esm.js.map +1 -0
- package/dist/modules/random.js +2 -0
- package/dist/modules/random.js.map +1 -0
- package/dist/modules/reference/api.d.ts +71 -0
- package/dist/modules/reference/datatype.d.ts +3 -0
- package/dist/modules/reference/index.d.ts +178 -0
- package/dist/modules/reference/shorthand.d.ts +3 -0
- package/dist/modules/sequence.esm.js +2 -0
- package/dist/modules/sequence.esm.js.map +1 -0
- package/dist/modules/sequence.js +2 -0
- package/dist/modules/sequence.js.map +1 -0
- package/dist/modules/src/AutoCompleter/AutoCompleter.d.ts +24 -0
- package/dist/modules/src/Lits/Cache.d.ts +16 -0
- package/dist/modules/src/Lits/Lits.d.ts +58 -0
- package/dist/modules/src/allModules.d.ts +2 -0
- package/dist/modules/src/builtin/bindingNode.d.ts +5 -0
- package/dist/{src/builtin/normalExpressions/categories → modules/src/builtin/core}/array.d.ts +1 -1
- package/dist/{src/builtin/normalExpressions/categories → modules/src/builtin/core}/bitwise.d.ts +1 -1
- package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/collection.d.ts +1 -1
- package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/functional.d.ts +1 -1
- package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/math.d.ts +1 -1
- package/dist/modules/src/builtin/core/meta.d.ts +3 -0
- package/dist/{src/builtin/normalExpressions/categories → modules/src/builtin/core}/misc.d.ts +1 -1
- package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/object.d.ts +1 -1
- package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/predicates.d.ts +1 -1
- package/dist/{cli/src/builtin/normalExpressions/categories → modules/src/builtin/core}/regexp.d.ts +1 -1
- package/dist/modules/src/builtin/core/sequence.d.ts +2 -0
- package/dist/{src/builtin/normalExpressions/categories → modules/src/builtin/core}/string.d.ts +1 -1
- package/dist/modules/src/builtin/core/vector.d.ts +2 -0
- package/dist/modules/src/builtin/index.d.ts +14 -0
- package/dist/modules/src/builtin/interface.d.ts +110 -0
- package/dist/modules/src/builtin/modules/assert/docs.d.ts +2 -0
- package/dist/modules/src/builtin/modules/assert/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/bitwise/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/collection/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/functional/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/grid/docs.d.ts +2 -0
- package/dist/modules/src/builtin/modules/grid/fromArray.d.ts +8 -0
- package/dist/modules/src/builtin/modules/grid/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/grid/transpose.d.ts +2 -0
- package/dist/modules/src/builtin/modules/interface.d.ts +11 -0
- package/dist/modules/src/builtin/modules/linear-algebra/docs.d.ts +2 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/calcFractionalRanks.d.ts +1 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/collinear.d.ts +2 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/corrleation.d.ts +8 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/covariance.d.ts +4 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/dot.d.ts +1 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/gaussJordanElimination.d.ts +7 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/getUnit.d.ts +2 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/isZeroVector.d.ts +1 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/kendallTau.d.ts +10 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/length.d.ts +1 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/pearsonCorr.d.ts +1 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/scale.d.ts +1 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/solve.d.ts +8 -0
- package/dist/modules/src/builtin/modules/linear-algebra/helpers/subtract.d.ts +1 -0
- package/dist/modules/src/builtin/modules/linear-algebra/index.d.ts +4 -0
- package/dist/modules/src/builtin/modules/math/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/matrix/docs.d.ts +2 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/adjugate.d.ts +1 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/band.d.ts +9 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/cofactor.d.ts +1 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/determinant.d.ts +6 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/diagonal.d.ts +1 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/inverse.d.ts +6 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/isBanded.d.ts +11 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/isDiagonal.d.ts +10 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/isIdentity.d.ts +1 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/isOrthogonal.d.ts +1 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/isSquare.d.ts +1 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/isSymetric.d.ts +8 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/isTriangular.d.ts +13 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/matrixMultiply.d.ts +7 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/minor.d.ts +1 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/norm1.d.ts +1 -0
- package/dist/modules/src/builtin/modules/matrix/helpers/trace.d.ts +8 -0
- package/dist/modules/src/builtin/modules/matrix/index.d.ts +4 -0
- package/dist/modules/src/builtin/modules/number-theory/binomialCefficient.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/combinations.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/derangements.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/divisors.d.ts +4 -0
- package/dist/modules/src/builtin/modules/number-theory/docs.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/factorial.d.ts +3 -0
- package/dist/modules/src/builtin/modules/number-theory/index.d.ts +4 -0
- package/dist/modules/src/builtin/modules/number-theory/partitions.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/permutations.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/powerSet.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/primeFactors.d.ts +11 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/abundant.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/arithmetic.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/bell.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/bernoulli.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/catalan.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/collatz.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/composite.d.ts +3 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/deficient.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/factorial.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/fibonacci.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/geometric.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/golomb.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/happy.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/index.d.ts +26 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/juggler.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/lookAndSay.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/lucas.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/lucky.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/mersenne.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/padovan.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/partition.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/pell.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/perfect.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/perfectCube.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/perfectPower.d.ts +10 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/perfectSquare.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/poligonal.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/prime.d.ts +3 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/recaman.d.ts +9 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/sylvester.d.ts +1 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/thueMorse.d.ts +2 -0
- package/dist/modules/src/builtin/modules/number-theory/sequences/tribonacci.d.ts +1 -0
- package/dist/modules/src/builtin/modules/random/docs.d.ts +2 -0
- package/dist/modules/src/builtin/modules/random/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/sequence/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/string/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/bincount.d.ts +9 -0
- package/dist/modules/src/builtin/modules/vector/calcMad.d.ts +1 -0
- package/dist/modules/src/builtin/modules/vector/calcMean.d.ts +1 -0
- package/dist/modules/src/builtin/modules/vector/calcMedad.d.ts +1 -0
- package/dist/modules/src/builtin/modules/vector/calcMedian.d.ts +1 -0
- package/dist/modules/src/builtin/modules/vector/calcStdDev.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/calcVariance.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/docs.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/entropy.d.ts +8 -0
- package/dist/modules/src/builtin/modules/vector/histogram.d.ts +9 -0
- package/dist/modules/src/builtin/modules/vector/index.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/mode.d.ts +6 -0
- package/dist/modules/src/builtin/modules/vector/outliers.d.ts +7 -0
- package/dist/modules/src/builtin/modules/vector/percentile.d.ts +7 -0
- package/dist/modules/src/builtin/modules/vector/quartiles.d.ts +1 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/entropy.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/giniCoefficient.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/index.d.ts +13 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/iqr.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/kurtosis.d.ts +5 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/mad.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/mean.d.ts +4 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/medad.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/median.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/prod.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/rms.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/skewness.d.ts +3 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/span.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/standardDeviation.d.ts +3 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/sum.d.ts +2 -0
- package/dist/modules/src/builtin/modules/vector/reductionFunctions/variance.d.ts +3 -0
- package/dist/modules/src/builtin/normalExpressions/index.d.ts +8 -0
- package/dist/modules/src/builtin/specialExpressionTypes.d.ts +23 -0
- package/dist/modules/src/builtin/specialExpressions/and.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/array.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/block.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/cond.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/def.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/defined.d.ts +5 -0
- package/dist/modules/src/builtin/specialExpressions/functions.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/if.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/let.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/loop.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/loops.d.ts +9 -0
- package/dist/modules/src/builtin/specialExpressions/object.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/or.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/qq.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/recur.d.ts +5 -0
- package/dist/modules/src/builtin/specialExpressions/switch.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/throw.d.ts +5 -0
- package/dist/modules/src/builtin/specialExpressions/try.d.ts +6 -0
- package/dist/modules/src/builtin/specialExpressions/unless.d.ts +6 -0
- package/dist/modules/src/builtin/utils.d.ts +6 -0
- package/dist/modules/src/constants/constants.d.ts +19 -0
- package/dist/modules/src/errors.d.ts +24 -0
- package/dist/modules/src/evaluator/ContextStack.d.ts +29 -0
- package/dist/modules/src/evaluator/functionExecutors.d.ts +11 -0
- package/dist/modules/src/evaluator/index.d.ts +5 -0
- package/dist/modules/src/evaluator/interface.d.ts +12 -0
- package/dist/modules/src/full.d.ts +17 -0
- package/dist/modules/src/getUndefinedSymbols/index.d.ts +7 -0
- package/dist/modules/src/index.d.ts +14 -0
- package/dist/modules/src/initReferenceData.d.ts +1 -0
- package/dist/modules/src/interface.d.ts +7 -0
- package/dist/modules/src/modules/assert.d.ts +2 -0
- package/dist/modules/src/modules/bitwise.d.ts +2 -0
- package/dist/modules/src/modules/collection.d.ts +2 -0
- package/dist/modules/src/modules/functional.d.ts +2 -0
- package/dist/modules/src/modules/grid.d.ts +2 -0
- package/dist/modules/src/modules/linear-algebra.d.ts +2 -0
- package/dist/modules/src/modules/math.d.ts +2 -0
- package/dist/modules/src/modules/matrix.d.ts +2 -0
- package/dist/modules/src/modules/number-theory.d.ts +2 -0
- package/dist/modules/src/modules/random.d.ts +2 -0
- package/dist/modules/src/modules/sequence.d.ts +2 -0
- package/dist/modules/src/modules/string.d.ts +2 -0
- package/dist/modules/src/modules/vector.d.ts +2 -0
- package/dist/modules/src/parser/Parser.d.ts +58 -0
- package/dist/modules/src/parser/types.d.ts +133 -0
- package/dist/modules/src/symbolPatterns.d.ts +2 -0
- package/dist/modules/src/testFramework/index.d.ts +14 -0
- package/dist/modules/src/tokenizer/minifyTokenStream.d.ts +4 -0
- package/dist/modules/src/tokenizer/operators.d.ts +12 -0
- package/dist/modules/src/tokenizer/reservedNames.d.ts +66 -0
- package/dist/modules/src/tokenizer/token.d.ts +86 -0
- package/dist/modules/src/tokenizer/tokenize.d.ts +8 -0
- package/dist/modules/src/tokenizer/tokenizers.d.ts +14 -0
- package/dist/modules/src/transformer/index.d.ts +2 -0
- package/dist/modules/src/typeGuards/annotatedArrays.d.ts +16 -0
- package/dist/modules/src/typeGuards/array.d.ts +9 -0
- package/dist/modules/src/typeGuards/astNode.d.ts +20 -0
- package/dist/modules/src/typeGuards/index.d.ts +8 -0
- package/dist/modules/src/typeGuards/lits.d.ts +24 -0
- package/dist/modules/src/typeGuards/litsFunction.d.ts +12 -0
- package/dist/modules/src/typeGuards/number.d.ts +66 -0
- package/dist/modules/src/typeGuards/string.d.ts +15 -0
- package/dist/modules/src/untokenizer/index.d.ts +2 -0
- package/dist/modules/src/utils/arity.d.ts +10 -0
- package/dist/modules/src/utils/debug/debugTools.d.ts +1 -0
- package/dist/modules/src/utils/debug/getCodeMarker.d.ts +2 -0
- package/dist/modules/src/utils/debug/getSourceCodeInfo.d.ts +2 -0
- package/dist/modules/src/utils/docString/generateDocString.d.ts +2 -0
- package/dist/modules/src/utils/getAssertionError.d.ts +3 -0
- package/dist/modules/src/utils/index.d.ts +14 -0
- package/dist/modules/src/utils/symbols.d.ts +2 -0
- package/dist/modules/string.esm.js +2 -0
- package/dist/modules/string.esm.js.map +1 -0
- package/dist/modules/string.js +2 -0
- package/dist/modules/string.js.map +1 -0
- package/dist/modules/vector.esm.js +2 -0
- package/dist/modules/vector.esm.js.map +1 -0
- package/dist/modules/vector.js +2 -0
- package/dist/modules/vector.js.map +1 -0
- package/dist/reference/api.d.ts +53 -41
- package/dist/reference/index.d.ts +150 -23
- package/dist/src/AutoCompleter/AutoCompleter.d.ts +24 -0
- package/dist/src/Lits/Cache.d.ts +1 -1
- package/dist/src/Lits/Lits.d.ts +26 -22
- package/dist/src/allModules.d.ts +2 -0
- package/dist/src/builtin/bindingNode.d.ts +5 -0
- package/dist/src/builtin/core/array.d.ts +2 -0
- package/dist/src/builtin/core/bitwise.d.ts +2 -0
- package/dist/src/builtin/core/collection.d.ts +2 -0
- package/dist/src/builtin/core/functional.d.ts +2 -0
- package/dist/src/builtin/core/math.d.ts +2 -0
- package/dist/src/builtin/core/meta.d.ts +3 -0
- package/dist/src/builtin/core/misc.d.ts +2 -0
- package/dist/src/builtin/core/object.d.ts +2 -0
- package/dist/src/builtin/core/predicates.d.ts +2 -0
- package/dist/src/builtin/core/regexp.d.ts +2 -0
- package/dist/src/builtin/core/sequence.d.ts +2 -0
- package/dist/src/builtin/core/string.d.ts +2 -0
- package/dist/src/builtin/core/vector.d.ts +2 -0
- package/dist/src/builtin/index.d.ts +10 -34
- package/dist/src/builtin/interface.d.ts +92 -24
- package/dist/src/builtin/modules/assert/docs.d.ts +2 -0
- package/dist/src/builtin/modules/assert/index.d.ts +2 -0
- package/dist/src/builtin/modules/bitwise/index.d.ts +2 -0
- package/dist/src/builtin/modules/collection/index.d.ts +2 -0
- package/dist/src/builtin/modules/functional/index.d.ts +2 -0
- package/dist/src/builtin/modules/grid/docs.d.ts +2 -0
- package/dist/src/builtin/modules/grid/fromArray.d.ts +8 -0
- package/dist/src/builtin/modules/grid/index.d.ts +2 -0
- package/dist/src/builtin/modules/grid/transpose.d.ts +2 -0
- package/dist/src/builtin/modules/interface.d.ts +11 -0
- package/dist/src/builtin/modules/linear-algebra/docs.d.ts +2 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/calcFractionalRanks.d.ts +1 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/collinear.d.ts +2 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/corrleation.d.ts +8 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/covariance.d.ts +4 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/dot.d.ts +1 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/gaussJordanElimination.d.ts +7 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/getUnit.d.ts +2 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/isZeroVector.d.ts +1 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/kendallTau.d.ts +10 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/length.d.ts +1 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/pearsonCorr.d.ts +1 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/scale.d.ts +1 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/solve.d.ts +8 -0
- package/dist/src/builtin/modules/linear-algebra/helpers/subtract.d.ts +1 -0
- package/dist/src/builtin/modules/linear-algebra/index.d.ts +4 -0
- package/dist/src/builtin/modules/math/index.d.ts +2 -0
- package/dist/src/builtin/modules/matrix/docs.d.ts +2 -0
- package/dist/src/builtin/modules/matrix/helpers/adjugate.d.ts +1 -0
- package/dist/src/builtin/modules/matrix/helpers/band.d.ts +9 -0
- package/dist/src/builtin/modules/matrix/helpers/cofactor.d.ts +1 -0
- package/dist/src/builtin/modules/matrix/helpers/determinant.d.ts +6 -0
- package/dist/src/builtin/modules/matrix/helpers/diagonal.d.ts +1 -0
- package/dist/src/builtin/modules/matrix/helpers/inverse.d.ts +6 -0
- package/dist/src/builtin/modules/matrix/helpers/isBanded.d.ts +11 -0
- package/dist/src/builtin/modules/matrix/helpers/isDiagonal.d.ts +10 -0
- package/dist/src/builtin/modules/matrix/helpers/isIdentity.d.ts +1 -0
- package/dist/src/builtin/modules/matrix/helpers/isOrthogonal.d.ts +1 -0
- package/dist/src/builtin/modules/matrix/helpers/isSquare.d.ts +1 -0
- package/dist/src/builtin/modules/matrix/helpers/isSymetric.d.ts +8 -0
- package/dist/src/builtin/modules/matrix/helpers/isTriangular.d.ts +13 -0
- package/dist/src/builtin/modules/matrix/helpers/matrixMultiply.d.ts +7 -0
- package/dist/src/builtin/modules/matrix/helpers/minor.d.ts +1 -0
- package/dist/src/builtin/modules/matrix/helpers/norm1.d.ts +1 -0
- package/dist/src/builtin/modules/matrix/helpers/trace.d.ts +8 -0
- package/dist/src/builtin/modules/matrix/index.d.ts +4 -0
- package/dist/src/builtin/modules/number-theory/binomialCefficient.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/combinations.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/derangements.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/divisors.d.ts +4 -0
- package/dist/src/builtin/modules/number-theory/docs.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/factorial.d.ts +3 -0
- package/dist/src/builtin/modules/number-theory/index.d.ts +4 -0
- package/dist/src/builtin/modules/number-theory/partitions.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/permutations.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/powerSet.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/primeFactors.d.ts +11 -0
- package/dist/src/builtin/modules/number-theory/sequences/abundant.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/arithmetic.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/bell.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/bernoulli.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/catalan.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/collatz.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/composite.d.ts +3 -0
- package/dist/src/builtin/modules/number-theory/sequences/deficient.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/factorial.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/fibonacci.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/geometric.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/golomb.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/happy.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/index.d.ts +26 -0
- package/dist/src/builtin/modules/number-theory/sequences/juggler.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/lookAndSay.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/lucas.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/lucky.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/mersenne.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/padovan.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/partition.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/pell.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/perfect.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/perfectCube.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/perfectPower.d.ts +10 -0
- package/dist/src/builtin/modules/number-theory/sequences/perfectSquare.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/poligonal.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/prime.d.ts +3 -0
- package/dist/src/builtin/modules/number-theory/sequences/recaman.d.ts +9 -0
- package/dist/src/builtin/modules/number-theory/sequences/sylvester.d.ts +1 -0
- package/dist/src/builtin/modules/number-theory/sequences/thueMorse.d.ts +2 -0
- package/dist/src/builtin/modules/number-theory/sequences/tribonacci.d.ts +1 -0
- package/dist/src/builtin/modules/random/docs.d.ts +2 -0
- package/dist/src/builtin/modules/random/index.d.ts +2 -0
- package/dist/src/builtin/modules/sequence/index.d.ts +2 -0
- package/dist/src/builtin/modules/string/index.d.ts +2 -0
- package/dist/src/builtin/modules/vector/bincount.d.ts +9 -0
- package/dist/src/builtin/modules/vector/calcMad.d.ts +1 -0
- package/dist/src/builtin/modules/vector/calcMean.d.ts +1 -0
- package/dist/src/builtin/modules/vector/calcMedad.d.ts +1 -0
- package/dist/src/builtin/modules/vector/calcMedian.d.ts +1 -0
- package/dist/src/builtin/modules/vector/calcStdDev.d.ts +2 -0
- package/dist/src/builtin/modules/vector/calcVariance.d.ts +2 -0
- package/dist/src/builtin/modules/vector/docs.d.ts +2 -0
- package/dist/src/builtin/modules/vector/entropy.d.ts +8 -0
- package/dist/src/builtin/modules/vector/histogram.d.ts +9 -0
- package/dist/src/builtin/modules/vector/index.d.ts +2 -0
- package/dist/src/builtin/modules/vector/mode.d.ts +6 -0
- package/dist/src/builtin/modules/vector/outliers.d.ts +7 -0
- package/dist/src/builtin/modules/vector/percentile.d.ts +7 -0
- package/dist/src/builtin/modules/vector/quartiles.d.ts +1 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/entropy.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/giniCoefficient.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/index.d.ts +13 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/iqr.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/kurtosis.d.ts +5 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/mad.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/mean.d.ts +4 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/medad.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/median.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/prod.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/rms.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/skewness.d.ts +3 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/span.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/standardDeviation.d.ts +3 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/sum.d.ts +2 -0
- package/dist/src/builtin/modules/vector/reductionFunctions/variance.d.ts +3 -0
- package/dist/src/builtin/normalExpressions/index.d.ts +7 -1
- package/dist/src/builtin/specialExpressionTypes.d.ts +23 -0
- package/dist/src/builtin/specialExpressions/and.d.ts +3 -3
- package/dist/src/builtin/specialExpressions/array.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/block.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/cond.d.ts +3 -3
- package/dist/src/builtin/specialExpressions/def.d.ts +5 -4
- package/dist/src/builtin/specialExpressions/defined.d.ts +5 -0
- package/dist/src/builtin/specialExpressions/functions.d.ts +5 -17
- package/dist/src/builtin/specialExpressions/if.d.ts +3 -3
- package/dist/src/builtin/specialExpressions/let.d.ts +3 -7
- package/dist/src/builtin/specialExpressions/loop.d.ts +3 -4
- package/dist/src/builtin/specialExpressions/loops.d.ts +5 -14
- package/dist/src/builtin/specialExpressions/object.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/or.d.ts +3 -3
- package/dist/src/builtin/specialExpressions/qq.d.ts +3 -3
- package/dist/src/builtin/specialExpressions/recur.d.ts +3 -3
- package/dist/src/builtin/specialExpressions/switch.d.ts +6 -0
- package/dist/src/builtin/specialExpressions/throw.d.ts +3 -3
- package/dist/src/builtin/specialExpressions/try.d.ts +3 -5
- package/dist/src/builtin/specialExpressions/unless.d.ts +6 -0
- package/dist/src/builtin/utils.d.ts +3 -15
- package/dist/src/constants/constants.d.ts +18 -44
- package/dist/src/errors.d.ts +2 -5
- package/dist/src/evaluator/ContextStack.d.ts +16 -11
- package/dist/src/evaluator/functionExecutors.d.ts +4 -4
- package/dist/src/evaluator/index.d.ts +2 -2
- package/dist/src/evaluator/interface.d.ts +5 -5
- package/dist/src/full.d.ts +17 -0
- package/dist/src/getUndefinedSymbols/index.d.ts +7 -0
- package/dist/src/index.d.ts +9 -12
- package/dist/src/initReferenceData.d.ts +1 -0
- package/dist/src/interface.d.ts +1 -2
- package/dist/src/modules/assert.d.ts +2 -0
- package/dist/src/modules/bitwise.d.ts +2 -0
- package/dist/src/modules/collection.d.ts +2 -0
- package/dist/src/modules/functional.d.ts +2 -0
- package/dist/src/modules/grid.d.ts +2 -0
- package/dist/src/modules/linear-algebra.d.ts +2 -0
- package/dist/src/modules/math.d.ts +2 -0
- package/dist/src/modules/matrix.d.ts +2 -0
- package/dist/src/modules/number-theory.d.ts +2 -0
- package/dist/src/modules/random.d.ts +2 -0
- package/dist/src/modules/sequence.d.ts +2 -0
- package/dist/src/modules/string.d.ts +2 -0
- package/dist/src/modules/vector.d.ts +2 -0
- package/dist/src/parser/Parser.d.ts +58 -0
- package/dist/src/parser/types.d.ts +133 -0
- package/dist/src/symbolPatterns.d.ts +2 -0
- package/dist/src/tokenizer/minifyTokenStream.d.ts +4 -0
- package/dist/src/tokenizer/operators.d.ts +12 -0
- package/dist/src/tokenizer/reservedNames.d.ts +66 -0
- package/dist/src/tokenizer/token.d.ts +86 -0
- package/dist/src/tokenizer/tokenize.d.ts +8 -0
- package/dist/src/tokenizer/tokenizers.d.ts +14 -19
- package/dist/src/transformer/index.d.ts +2 -2
- package/dist/src/typeGuards/annotatedArrays.d.ts +16 -0
- package/dist/src/typeGuards/array.d.ts +1 -1
- package/dist/src/typeGuards/astNode.d.ts +20 -17
- package/dist/src/typeGuards/index.d.ts +1 -10
- package/dist/src/typeGuards/lits.d.ts +5 -2
- package/dist/src/typeGuards/litsFunction.d.ts +3 -3
- package/dist/src/typeGuards/number.d.ts +1 -1
- package/dist/src/typeGuards/string.d.ts +1 -1
- package/dist/src/untokenizer/index.d.ts +1 -1
- package/dist/src/utils/arity.d.ts +10 -0
- package/dist/src/utils/debug/debugTools.d.ts +0 -2
- package/dist/src/utils/debug/getCodeMarker.d.ts +2 -0
- package/dist/src/utils/debug/getSourceCodeInfo.d.ts +2 -2
- package/dist/src/utils/docString/generateDocString.d.ts +2 -0
- package/dist/src/utils/getAssertionError.d.ts +1 -1
- package/dist/src/utils/index.d.ts +9 -6
- package/dist/testFramework.esm.js +1 -8913
- package/dist/testFramework.esm.js.map +1 -1
- package/dist/testFramework.js +1 -8916
- package/dist/testFramework.js.map +1 -1
- package/package.json +88 -8
- package/dist/cli/common/clojureDocs.d.ts +0 -1
- package/dist/cli/reference/categories/array.d.ts +0 -3
- package/dist/cli/reference/categories/assert.d.ts +0 -3
- package/dist/cli/reference/categories/bitwise.d.ts +0 -3
- package/dist/cli/reference/categories/collection.d.ts +0 -3
- package/dist/cli/reference/categories/functional.d.ts +0 -3
- package/dist/cli/reference/categories/math.d.ts +0 -3
- package/dist/cli/reference/categories/misc.d.ts +0 -3
- package/dist/cli/reference/categories/object.d.ts +0 -3
- package/dist/cli/reference/categories/predicate.d.ts +0 -3
- package/dist/cli/reference/categories/regularExpression.d.ts +0 -3
- package/dist/cli/reference/categories/sequence.d.ts +0 -3
- package/dist/cli/reference/categories/specialExpressions.d.ts +0 -3
- package/dist/cli/reference/categories/string.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateAndOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateCommentOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateCondOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateDeclaredOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateDefOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateDefsOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateDoOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateFunctionOutcomes.d.ts +0 -5
- package/dist/cli/src/analyze/calculateOutcomes/calculateIfLetOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateIfNotOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateIfOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateLetOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateLoopOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateLoopsOutcomes.d.ts +0 -4
- package/dist/cli/src/analyze/calculateOutcomes/calculateOrOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateQqOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateRecurOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateThrowOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateTimeOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateTryOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateWhenFirstOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateWhenLetOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateWhenNotOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/calculateWhenOutcomes.d.ts +0 -3
- package/dist/cli/src/analyze/calculateOutcomes/index.d.ts +0 -18
- package/dist/cli/src/analyze/calculateOutcomes/specialExpressionCalculators.d.ts +0 -55
- package/dist/cli/src/analyze/findUnresolvedIdentifiers.d.ts +0 -2
- package/dist/cli/src/analyze/index.d.ts +0 -17
- package/dist/cli/src/analyze/utils.d.ts +0 -4
- package/dist/cli/src/builtin/normalExpressions/categories/assert.d.ts +0 -2
- package/dist/cli/src/builtin/normalExpressions/categories/sequence.d.ts +0 -4
- package/dist/cli/src/builtin/specialExpressions/comment.d.ts +0 -5
- package/dist/cli/src/builtin/specialExpressions/declared.d.ts +0 -5
- package/dist/cli/src/builtin/specialExpressions/defs.d.ts +0 -5
- package/dist/cli/src/builtin/specialExpressions/do.d.ts +0 -6
- package/dist/cli/src/builtin/specialExpressions/if-let.d.ts +0 -10
- package/dist/cli/src/builtin/specialExpressions/if-not.d.ts +0 -6
- package/dist/cli/src/builtin/specialExpressions/time.d.ts +0 -6
- package/dist/cli/src/builtin/specialExpressions/when-first.d.ts +0 -7
- package/dist/cli/src/builtin/specialExpressions/when-let.d.ts +0 -7
- package/dist/cli/src/builtin/specialExpressions/when-not.d.ts +0 -6
- package/dist/cli/src/builtin/specialExpressions/when.d.ts +0 -6
- package/dist/cli/src/identifier.d.ts +0 -8
- package/dist/cli/src/parser/index.d.ts +0 -3
- package/dist/cli/src/parser/interface.d.ts +0 -155
- package/dist/cli/src/parser/parsers.d.ts +0 -4
- package/dist/cli/src/removeCommentNodes/index.d.ts +0 -11
- package/dist/cli/src/removeCommentNodes/removeCommentNodesFromSpecialExpression.d.ts +0 -3
- package/dist/cli/src/reservedNames.d.ts +0 -7
- package/dist/cli/src/tokenizer/index.d.ts +0 -9
- package/dist/cli/src/tokenizer/interface.d.ts +0 -35
- package/dist/cli/src/tokenizer/sugar/applyCollectionAccessor.d.ts +0 -2
- package/dist/cli/src/tokenizer/sugar/index.d.ts +0 -3
- package/dist/cli/src/typeGuards/token.d.ts +0 -13
- package/dist/cli/src/unparser/UnparseOptions.d.ts +0 -15
- package/dist/cli/src/unparser/unparse.d.ts +0 -5
- package/dist/cli/src/unparser/unparseArrayLiteral.d.ts +0 -3
- package/dist/cli/src/unparser/unparseBindings.d.ts +0 -3
- package/dist/cli/src/unparser/unparseNormalExpression.d.ts +0 -3
- package/dist/cli/src/unparser/unparseObjectLiteral.d.ts +0 -3
- package/dist/cli/src/unparser/unparseParams.d.ts +0 -17
- package/dist/cli/src/unparser/unparseSpecialExpression/index.d.ts +0 -3
- package/dist/cli/src/unparser/unparseSpecialExpression/unparseCond.d.ts +0 -3
- package/dist/cli/src/unparser/unparseSpecialExpression/unparseDo.d.ts +0 -3
- package/dist/cli/src/unparser/unparseSpecialExpression/unparseIfLet.d.ts +0 -3
- package/dist/cli/src/unparser/unparseSpecialExpression/unparseIfOrWhenLike.d.ts +0 -6
- package/dist/cli/src/unparser/unparseSpecialExpression/unparseLet.d.ts +0 -3
- package/dist/cli/src/unparser/utils.d.ts +0 -5
- package/dist/common/clojureDocs.d.ts +0 -1
- package/dist/reference/categories/array.d.ts +0 -3
- package/dist/reference/categories/assert.d.ts +0 -3
- package/dist/reference/categories/bitwise.d.ts +0 -3
- package/dist/reference/categories/collection.d.ts +0 -3
- package/dist/reference/categories/functional.d.ts +0 -3
- package/dist/reference/categories/math.d.ts +0 -3
- package/dist/reference/categories/misc.d.ts +0 -3
- package/dist/reference/categories/object.d.ts +0 -3
- package/dist/reference/categories/predicate.d.ts +0 -3
- package/dist/reference/categories/regularExpression.d.ts +0 -3
- package/dist/reference/categories/sequence.d.ts +0 -3
- package/dist/reference/categories/specialExpressions.d.ts +0 -3
- package/dist/reference/categories/string.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateAndOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateCommentOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateCondOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateDeclaredOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateDefOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateDefsOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateDoOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateFunctionOutcomes.d.ts +0 -5
- package/dist/src/analyze/calculateOutcomes/calculateIfLetOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateIfNotOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateIfOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateLetOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateLoopOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateLoopsOutcomes.d.ts +0 -4
- package/dist/src/analyze/calculateOutcomes/calculateOrOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateQqOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateRecurOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateThrowOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateTimeOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateTryOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateWhenFirstOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateWhenLetOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateWhenNotOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/calculateWhenOutcomes.d.ts +0 -3
- package/dist/src/analyze/calculateOutcomes/index.d.ts +0 -18
- package/dist/src/analyze/calculateOutcomes/specialExpressionCalculators.d.ts +0 -55
- package/dist/src/analyze/findUnresolvedIdentifiers.d.ts +0 -2
- package/dist/src/analyze/index.d.ts +0 -17
- package/dist/src/analyze/utils.d.ts +0 -4
- package/dist/src/builtin/normalExpressions/categories/assert.d.ts +0 -2
- package/dist/src/builtin/normalExpressions/categories/sequence.d.ts +0 -4
- package/dist/src/builtin/specialExpressions/comment.d.ts +0 -5
- package/dist/src/builtin/specialExpressions/declared.d.ts +0 -5
- package/dist/src/builtin/specialExpressions/defs.d.ts +0 -5
- package/dist/src/builtin/specialExpressions/do.d.ts +0 -6
- package/dist/src/builtin/specialExpressions/if-let.d.ts +0 -10
- package/dist/src/builtin/specialExpressions/if-not.d.ts +0 -6
- package/dist/src/builtin/specialExpressions/time.d.ts +0 -6
- package/dist/src/builtin/specialExpressions/when-first.d.ts +0 -7
- package/dist/src/builtin/specialExpressions/when-let.d.ts +0 -7
- package/dist/src/builtin/specialExpressions/when-not.d.ts +0 -6
- package/dist/src/builtin/specialExpressions/when.d.ts +0 -6
- package/dist/src/identifier.d.ts +0 -8
- package/dist/src/parser/index.d.ts +0 -3
- package/dist/src/parser/interface.d.ts +0 -155
- package/dist/src/parser/parsers.d.ts +0 -4
- package/dist/src/removeCommentNodes/index.d.ts +0 -11
- package/dist/src/removeCommentNodes/removeCommentNodesFromSpecialExpression.d.ts +0 -3
- package/dist/src/reservedNames.d.ts +0 -7
- package/dist/src/tokenizer/index.d.ts +0 -9
- package/dist/src/tokenizer/interface.d.ts +0 -35
- package/dist/src/tokenizer/sugar/applyCollectionAccessor.d.ts +0 -2
- package/dist/src/tokenizer/sugar/index.d.ts +0 -3
- package/dist/src/typeGuards/token.d.ts +0 -13
- package/dist/src/unparser/UnparseOptions.d.ts +0 -15
- package/dist/src/unparser/__tests__/testFormatter.d.ts +0 -1
- package/dist/src/unparser/unparse.d.ts +0 -5
- package/dist/src/unparser/unparseArrayLiteral.d.ts +0 -3
- package/dist/src/unparser/unparseBindings.d.ts +0 -3
- package/dist/src/unparser/unparseNormalExpression.d.ts +0 -3
- package/dist/src/unparser/unparseObjectLiteral.d.ts +0 -3
- package/dist/src/unparser/unparseParams.d.ts +0 -17
- package/dist/src/unparser/unparseSpecialExpression/index.d.ts +0 -3
- package/dist/src/unparser/unparseSpecialExpression/unparseCond.d.ts +0 -3
- package/dist/src/unparser/unparseSpecialExpression/unparseDo.d.ts +0 -3
- package/dist/src/unparser/unparseSpecialExpression/unparseIfLet.d.ts +0 -3
- package/dist/src/unparser/unparseSpecialExpression/unparseIfOrWhenLike.d.ts +0 -6
- package/dist/src/unparser/unparseSpecialExpression/unparseLet.d.ts +0 -3
- package/dist/src/unparser/utils.d.ts +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.js","sources":["../../src/utils/debug/getCodeMarker.ts","../../src/errors.ts","../../src/constants/constants.ts","../../src/utils/debug/debugTools.ts","../../src/utils/symbols.ts","../../src/utils/debug/getSourceCodeInfo.ts","../../src/typeGuards/index.ts","../../src/utils/getAssertionError.ts","../../src/typeGuards/number.ts","../../src/typeGuards/string.ts","../../src/utils/arity.ts","../../src/builtin/modules/string/index.ts","../../src/utils/index.ts","../../src/typeGuards/array.ts"],"sourcesContent":["import type { SourceCodeInfo } from '../../tokenizer/token'\n\nexport function getCodeMarker(sourceCodeInfo: SourceCodeInfo): string {\n if (!sourceCodeInfo.position || !sourceCodeInfo.code)\n return ''\n\n const leftPadding = sourceCodeInfo.position.column - 1\n const rightPadding = sourceCodeInfo.code.length - leftPadding - 1\n return `${' '.repeat(Math.max(leftPadding, 0))}^${' '.repeat(Math.max(rightPadding, 0))}`\n}\n","import { getCodeMarker } from '../src/utils/debug/getCodeMarker'\nimport type { Arr } from './interface'\nimport type { SourceCodeInfo } from './tokenizer/token'\n\nfunction getLitsErrorMessage(message: string, sourceCodeInfo?: SourceCodeInfo) {\n if (!sourceCodeInfo) {\n return message\n }\n const location = `${sourceCodeInfo.position.line}:${sourceCodeInfo.position.column}`\n const filePathLine = sourceCodeInfo.filePath\n ? `\\n${sourceCodeInfo.filePath}:${location}`\n : `\\nLocation ${location}`\n const codeLine = `\\n${sourceCodeInfo.code}`\n const codeMarker = `\\n${getCodeMarker(sourceCodeInfo)}`\n return `${message}${filePathLine}${codeLine}${codeMarker}`\n}\n\nexport class RecurSignal extends Error {\n public params: Arr\n constructor(params: Arr) {\n super(`recur, params: ${params}`)\n Object.setPrototypeOf(this, RecurSignal.prototype)\n this.name = 'RecurSignal'\n this.params = params\n }\n}\n\nexport class LitsError extends Error {\n public readonly sourceCodeInfo?: SourceCodeInfo\n public readonly shortMessage: string\n constructor(err: unknown, sourceCodeInfo: SourceCodeInfo | undefined) {\n const message = err instanceof Error\n ? err.message\n : `${err}`\n\n super(getLitsErrorMessage(message, sourceCodeInfo))\n this.shortMessage = message\n this.sourceCodeInfo = sourceCodeInfo\n Object.setPrototypeOf(this, LitsError.prototype)\n this.name = 'LitsError'\n }\n\n public getCodeMarker(): string | undefined {\n return this.sourceCodeInfo && getCodeMarker(this.sourceCodeInfo)\n }\n}\n\nexport class UserDefinedError extends LitsError {\n public userMessage: string\n constructor(message: string, sourceCodeInfo?: SourceCodeInfo) {\n super(message, sourceCodeInfo)\n this.userMessage = message\n Object.setPrototypeOf(this, UserDefinedError.prototype)\n this.name = 'UserDefinedError'\n }\n}\n\nexport class AssertionError extends LitsError {\n constructor(message: string | Error, sourceCodeInfo?: SourceCodeInfo) {\n super(message, sourceCodeInfo)\n Object.setPrototypeOf(this, AssertionError.prototype)\n this.name = 'AssertionError'\n }\n}\n\nexport class UndefinedSymbolError extends LitsError {\n public symbol: string\n constructor(symbolName: string, sourceCodeInfo?: SourceCodeInfo) {\n const message = `Undefined symbol '${symbolName}'.`\n super(message, sourceCodeInfo)\n this.symbol = symbolName\n Object.setPrototypeOf(this, UndefinedSymbolError.prototype)\n this.name = 'UndefinedSymbolError'\n }\n}\n\nexport function isLitsError(error: unknown): error is LitsError {\n return error instanceof LitsError\n}\n","export const NodeTypes = {\n Number: 1,\n String: 2,\n NormalExpression: 3,\n SpecialExpression: 4,\n UserDefinedSymbol: 5,\n NormalBuiltinSymbol: 6,\n SpecialBuiltinSymbol: 7,\n ReservedSymbol: 8,\n Binding: 9,\n Spread: 10,\n} as const\n\nconst NodeTypesSet = new Set(Object.values(NodeTypes))\n\nexport type NodeType = typeof NodeTypes[keyof typeof NodeTypes]\n\nexport function getNodeTypeName(type: NodeType): keyof typeof NodeTypes {\n return Object.keys(NodeTypes).find(key => NodeTypes[key as keyof typeof NodeTypes] === type) as keyof typeof NodeTypes\n}\n\n// TODO, is this needed?\nexport function isNodeType(type: unknown): type is NodeType {\n return typeof type === 'number' && NodeTypesSet.has(type as NodeType)\n}\n\nconst functionTypes = [\n 'UserDefined',\n 'Partial',\n 'Comp',\n 'Constantly',\n 'Juxt',\n 'Complement',\n 'EveryPred',\n 'SomePred',\n 'Fnull',\n 'Builtin',\n 'SpecialBuiltin',\n 'NativeJsFunction',\n 'Module',\n] as const\n\nconst functionTypeSet = new Set(functionTypes)\n\nexport type FunctionType = typeof functionTypes[number]\n\nexport function isFunctionType(type: unknown): type is FunctionType {\n return typeof type === 'string' && functionTypeSet.has(type as FunctionType)\n}\n","import { getNodeTypeName, isFunctionType, isNodeType } from '../../constants/constants'\nimport type { LitsFunction, Node } from '../../parser/types'\nimport { FUNCTION_SYMBOL } from '../symbols'\n\nfunction isLitsFunction(func: unknown): func is LitsFunction {\n if (func === null || typeof func !== 'object')\n return false\n\n return FUNCTION_SYMBOL in func && 'functionType' in func && isFunctionType(func.functionType)\n}\n\nfunction isNode(value: unknown): value is Node {\n if (!Array.isArray(value) || value.length < 2)\n return false\n return isNodeType(value[0])\n}\n\nexport function valueToString(value: unknown): string {\n if (isLitsFunction(value))\n // eslint-disable-next-line ts/no-unsafe-member-access\n return `<function ${(value as any).name || '\\u03BB'}>`\n\n if (isNode(value))\n return `${getNodeTypeName(value[0])}-node`\n\n if (value === null)\n return 'null'\n\n if (typeof value === 'object' && value instanceof RegExp)\n return `${value}`\n\n if (typeof value === 'object' && value instanceof Error)\n return value.toString()\n\n return JSON.stringify(value)\n}\n","export const FUNCTION_SYMBOL = '^^fn^^'\nexport const REGEXP_SYMBOL = '^^re^^'\n","import type { SourceCodeInfo } from '../../tokenizer/token'\n\nexport function getSourceCodeInfo(anyValue: any, sourceCodeInfo: SourceCodeInfo | undefined): SourceCodeInfo | undefined {\n // eslint-disable-next-line ts/no-unsafe-return, ts/no-unsafe-member-access\n return anyValue?.sourceCodeInfo ?? sourceCodeInfo\n}\n","import { LitsError } from '../errors'\nimport type { UnknownRecord } from '../interface'\nimport type { SourceCodeInfo } from '../tokenizer/token'\nimport { valueToString } from '../utils/debug/debugTools'\nimport { getSourceCodeInfo } from '../utils/debug/getSourceCodeInfo'\n\nexport function isNonUndefined<T>(value: T | undefined): value is T {\n return value !== undefined\n}\n\nexport function asNonUndefined<T>(value: T | undefined, sourceCodeInfo?: SourceCodeInfo): T {\n assertNonUndefined(value, sourceCodeInfo)\n return value\n}\n\nexport function assertNonUndefined<T>(value: T | undefined, sourceCodeInfo?: SourceCodeInfo): asserts value is T {\n if (!isNonUndefined(value))\n throw new LitsError('Unexpected undefined', getSourceCodeInfo(value, sourceCodeInfo))\n}\n\nexport function isUnknownRecord(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n}\n\nexport function assertUnknownRecord(value: unknown, sourceCodeInfo?: SourceCodeInfo): asserts value is UnknownRecord {\n if (!isUnknownRecord(value)) {\n throw new LitsError(\n `Expected ${'UnknownRecord'}, got ${valueToString(value)}.`,\n getSourceCodeInfo(value, sourceCodeInfo),\n )\n }\n}\n\nexport function asUnknownRecord(value: unknown, sourceCodeInfo?: SourceCodeInfo): UnknownRecord {\n assertUnknownRecord(value, sourceCodeInfo)\n return value\n}\n","import { LitsError } from '../errors'\nimport type { SourceCodeInfo } from '../tokenizer/token'\nimport { valueToString } from './debug/debugTools'\nimport { getSourceCodeInfo } from './debug/getSourceCodeInfo'\n\nexport function getAssertionError(typeName: string, value: unknown, sourceCodeInfo?: SourceCodeInfo): LitsError {\n return new LitsError(`Expected ${typeName}, got ${valueToString(value)}.`, getSourceCodeInfo(value, sourceCodeInfo))\n}\n","import { LitsError } from '../errors'\nimport type { SourceCodeInfo } from '../tokenizer/token'\nimport { valueToString } from '../utils/debug/debugTools'\nimport { getSourceCodeInfo } from '../utils/debug/getSourceCodeInfo'\n\ntype SignOptions =\n | {\n positive?: true\n negative?: never\n nonPositive?: never\n nonNegative?: never\n zero?: never\n nonZero?: never\n }\n | {\n positive?: never\n negative?: true\n nonPositive?: never\n nonNegative?: never\n zero?: never\n nonZero?: never\n }\n | {\n positive?: never\n negative?: never\n nonPositive?: true\n nonNegative?: never\n zero?: never\n nonZero?: never\n }\n | {\n positive?: never\n negative?: never\n nonPositive?: never\n nonNegative?: true\n zero?: never\n nonZero?: never\n }\n | {\n positive?: never\n negative?: never\n nonPositive?: never\n nonNegative?: never\n zero?: true\n nonZero?: never\n }\n | {\n positive?: never\n negative?: never\n nonPositive?: never\n nonNegative?: never\n zero?: never\n nonZero?: true\n }\n\ntype GtOptions =\n | {\n gt?: number\n gte?: never\n }\n | {\n gt?: never\n gte?: number\n }\n\ntype LtOptions =\n | {\n lt?: number\n lte?: never\n }\n | {\n lt?: never\n lte?: number\n }\n\ntype NumberOptions = {\n integer?: true\n finite?: true\n} & SignOptions &\nGtOptions &\nLtOptions\n\nfunction getRangeString(options: NumberOptions): string {\n const hasUpperAndLowerBound\n = (typeof options.gt === 'number' || typeof options.gte === 'number')\n && (typeof options.lt === 'number' || typeof options.lte === 'number')\n if (hasUpperAndLowerBound) {\n return `${typeof options.gt === 'number' ? `${options.gt} < n ` : `${options.gte} <= n `}${\n typeof options.lt === 'number' ? `< ${options.lt}` : `<= ${options.lte}`\n }`\n }\n else if (typeof options.gt === 'number' || typeof options.gte === 'number') {\n return `${typeof options.gt === 'number' ? `n > ${options.gt}` : `n >= ${options.gte}`}`\n }\n else if (typeof options.lt === 'number' || typeof options.lte === 'number') {\n return `${typeof options.lt === 'number' ? `n < ${options.lt}` : `n <= ${options.lte}`}`\n }\n else { return '' }\n}\n\nfunction getSignString(options: NumberOptions): string {\n return options.positive\n ? 'positive'\n : options.negative\n ? 'negative'\n : options.nonNegative\n ? 'non negative'\n : options.nonPositive\n ? 'non positive'\n : options.nonZero\n ? 'non zero'\n : ''\n}\n\nfunction getNumberTypeName(options: NumberOptions): string {\n if (options.zero)\n return 'zero'\n\n const sign = getSignString(options)\n const numberType = options.integer ? 'integer' : 'number'\n const finite = options.finite ? 'finite' : ''\n const range = getRangeString(options)\n\n return [sign, finite, numberType, range].filter(x => !!x).join(' ')\n}\n\nexport function isNumber(value: unknown, options: NumberOptions = {}): value is number {\n if (typeof value !== 'number')\n return false\n\n if (Number.isNaN(value))\n return false\n\n if (options.integer && !Number.isInteger(value))\n return false\n\n if (options.finite && !Number.isFinite(value))\n return false\n\n if (options.zero && value !== 0)\n return false\n\n if (options.nonZero && value === 0)\n return false\n\n if (options.positive && value <= 0)\n return false\n\n if (options.negative && value >= 0)\n return false\n\n if (options.nonPositive && value > 0)\n return false\n\n if (options.nonNegative && value < 0)\n return false\n\n if (typeof options.gt === 'number' && value <= options.gt)\n return false\n\n if (typeof options.gte === 'number' && value < options.gte)\n return false\n\n if (typeof options.lt === 'number' && value >= options.lt)\n return false\n\n if (typeof options.lte === 'number' && value > options.lte)\n return false\n\n return true\n}\n\nexport function assertNumber(\n value: unknown,\n sourceCodeInfo?: SourceCodeInfo,\n options: NumberOptions = {},\n): asserts value is number {\n if (!isNumber(value, options)) {\n throw new LitsError(\n `Expected ${getNumberTypeName(options)}, got ${valueToString(value)}.`,\n getSourceCodeInfo(value, sourceCodeInfo),\n )\n }\n}\n\nexport function asNumber(\n value: unknown,\n sourceCodeInfo: SourceCodeInfo | undefined,\n options: NumberOptions = {},\n): number {\n assertNumber(value, sourceCodeInfo, options)\n return value\n}\n","import type { SourceCodeInfo } from '../tokenizer/token'\nimport { getAssertionError } from '../utils/getAssertionError'\n\ntype StringAssertionOptions =\n | {\n nonEmpty?: true\n char?: never\n }\n | {\n nonEmpty?: never\n char?: true\n }\n\nexport function isString(value: unknown, options: StringAssertionOptions = {}): value is string {\n if (typeof value !== 'string')\n return false\n\n if (options.nonEmpty && value.length === 0)\n return false\n\n if (options.char && value.length !== 1)\n return false\n\n return true\n}\n\nexport function assertString(\n value: unknown,\n sourceCodeInfo: SourceCodeInfo | undefined,\n options: StringAssertionOptions = {},\n): asserts value is string {\n if (!isString(value, options)) {\n throw getAssertionError(\n `${options.nonEmpty ? 'non empty string' : options.char ? 'character' : 'string'}`,\n value,\n sourceCodeInfo,\n )\n }\n}\n\nexport function asString(\n value: unknown,\n sourceCodeInfo: SourceCodeInfo | undefined,\n options: StringAssertionOptions = {},\n): string {\n assertString(value, sourceCodeInfo, options)\n return value\n}\n\nexport function isStringOrNumber(value: unknown): value is string | number {\n return typeof value === 'string' || typeof value === 'number'\n}\nexport function asStringOrNumber(value: unknown, sourceCodeInfo?: SourceCodeInfo): string | number {\n assertStringOrNumber(value, sourceCodeInfo)\n return value\n}\nexport function assertStringOrNumber(\n value: unknown,\n sourceCodeInfo?: SourceCodeInfo,\n): asserts value is string | number {\n if (!isStringOrNumber(value))\n throw getAssertionError('string or number', value, sourceCodeInfo)\n}\n","import type { Arity } from '../builtin/interface'\nimport { LitsError } from '../errors'\nimport type { FunctionLike } from '../parser/types'\nimport type { SourceCodeInfo } from '../tokenizer/token'\nimport { isColl } from '../typeGuards/lits'\nimport { valueToString } from './debug/debugTools'\n\nexport function arityAccepts(arity: Arity, nbrOfParams: number): boolean {\n const { min, max } = arity\n if (typeof min === 'number' && nbrOfParams < min) {\n return false\n }\n if (typeof max === 'number' && nbrOfParams > max) {\n return false\n }\n return true\n}\n\nexport function arityAcceptsMin(arity: Arity, nbrOfParams: number): boolean {\n const { min } = arity\n if (typeof min === 'number' && nbrOfParams < min) {\n return false\n }\n return true\n}\n\nexport function getCommonArityFromFunctions(params: FunctionLike[]): Arity | null {\n return params.reduce((acc: Arity | null, param): Arity | null => {\n if (acc === null) {\n return null\n }\n const arity: Arity = (typeof param === 'number' || isColl(param)) ? toFixedArity(1) : param.arity\n const { min: aMin, max: aMax } = arity\n const { min: bMin, max: bMax } = acc\n const min = typeof aMin === 'number' && typeof bMin === 'number'\n ? Math.max(aMin, bMin)\n : typeof aMin === 'number' ? aMin : typeof bMin === 'number' ? bMin : undefined\n const max = typeof aMax === 'number' && typeof bMax === 'number'\n ? Math.min(aMax, bMax)\n : typeof aMax === 'number' ? aMax : typeof bMax === 'number' ? bMax : undefined\n\n if (typeof min === 'number' && typeof max === 'number' && min > max) {\n return null\n }\n\n return { min, max }\n }, {})\n}\n\nexport function getArityFromFunction(param: FunctionLike): Arity {\n return (typeof param === 'number' || isColl(param)) ? toFixedArity(1) : param.arity\n}\n\nexport function assertNumberOfParams(arity: Arity, length: number, sourceCodeInfo: SourceCodeInfo | undefined): void {\n const { min, max } = arity\n if (typeof min === 'number' && length < min) {\n throw new LitsError(\n `Wrong number of arguments, expected at least ${min}, got ${valueToString(length)}.`,\n sourceCodeInfo,\n )\n }\n\n if (typeof max === 'number' && length > max) {\n throw new LitsError(\n `Wrong number of arguments, expected at most ${max}, got ${valueToString(length)}.`,\n sourceCodeInfo,\n )\n }\n}\n\nexport function canBeOperator(count: Arity): boolean {\n if (typeof count.max === 'number' && count.max < 2) {\n return false\n }\n\n if (typeof count.min === 'number' && count.min > 2) {\n return false\n }\n\n return true\n}\n\nexport function toFixedArity(arity: number): Arity {\n return { min: arity, max: arity }\n}\n","import { LitsError } from '../../../errors'\nimport { asNonUndefined } from '../../../typeGuards'\nimport { assertArray } from '../../../typeGuards/array'\nimport { assertNumber } from '../../../typeGuards/number'\nimport { asStringOrNumber, assertString } from '../../../typeGuards/string'\nimport { toNonNegativeInteger } from '../../../utils'\nimport { toFixedArity } from '../../../utils/arity'\nimport type { BuiltinNormalExpressions } from '../../interface'\nimport type { LitsModule } from '../interface'\nimport type { SourceCodeInfo } from '../../../tokenizer/token'\n\nconst stringUtilsFunctions: BuiltinNormalExpressions = {\n 'string-repeat': {\n evaluate: ([str, count], sourceCodeInfo): string => {\n assertString(str, sourceCodeInfo)\n assertNumber(count, sourceCodeInfo, { integer: true, nonNegative: true })\n\n return str.repeat(count)\n },\n arity: toFixedArity(2),\n docs: {\n category: 'string',\n returns: { type: 'number' },\n args: {\n a: { type: 'string' },\n b: { type: 'integer' },\n s: { type: 'string' },\n n: { type: 'integer' },\n },\n variants: [{ argumentNames: ['s', 'n'] }],\n description: 'Repeates $s $n times.',\n seeAlso: ['str', 'repeat'],\n examples: [\n 'let { string-repeat } = import(\"string\"); \"*\" string-repeat 10',\n 'let { string-repeat } = import(\"string\"); string-repeat(\"*\", 10)',\n 'let { string-repeat } = import(\"string\"); string-repeat(\"***\", 0)',\n ],\n },\n },\n\n 'from-char-code': {\n evaluate: ([num], sourceCodeInfo): string => {\n assertNumber(num, sourceCodeInfo, { finite: true })\n const int = toNonNegativeInteger(num)\n try {\n return String.fromCodePoint(int)\n }\n catch (error) {\n throw new LitsError(error as Error, sourceCodeInfo)\n }\n },\n arity: toFixedArity(1),\n docs: {\n category: 'string',\n returns: { type: 'string' },\n args: { code: { type: 'number' } },\n variants: [{ argumentNames: ['code'] }],\n description: 'Return character for code point $code.',\n seeAlso: ['string.to-char-code'],\n examples: [\n 'let { from-char-code } = import(\"string\"); from-char-code(65)',\n 'let { from-char-code } = import(\"string\"); from-char-code(0)',\n ],\n },\n },\n\n 'to-char-code': {\n evaluate: ([str], sourceCodeInfo): number => {\n assertString(str, sourceCodeInfo, { nonEmpty: true })\n return asNonUndefined(str.codePointAt(0), sourceCodeInfo)\n },\n arity: toFixedArity(1),\n docs: {\n category: 'string',\n returns: { type: 'number' },\n args: { c: { type: 'string' } },\n variants: [{ argumentNames: ['c'] }],\n description: 'Return code point for first character in $c.',\n seeAlso: ['string.from-char-code'],\n examples: [\n 'let { to-char-code } = import(\"string\"); to-char-code(\"A\")',\n 'let { to-char-code } = import(\"string\"); to-char-code(\"Albert\")',\n ],\n },\n },\n\n 'trim-left': {\n evaluate: ([str], sourceCodeInfo): string => {\n assertString(str, sourceCodeInfo)\n return str.replace(/^\\s+/, '')\n },\n arity: toFixedArity(1),\n docs: {\n category: 'string',\n returns: { type: 'string' },\n args: { s: { type: 'string' } },\n variants: [{ argumentNames: ['s'] }],\n description: 'Returns a new string with leading whitespaces removed.',\n seeAlso: ['trim', 'string.trim-right'],\n examples: [\n 'let { trim-left } = import(\"string\"); trim-left(\" Albert \")',\n 'let { trim-left } = import(\"string\"); trim-left(\" \")',\n 'let { trim-left } = import(\"string\"); trim-left(\"\")',\n ],\n },\n },\n\n 'trim-right': {\n evaluate: ([str], sourceCodeInfo): string => {\n assertString(str, sourceCodeInfo)\n return str.replace(/\\s+$/, '')\n },\n arity: toFixedArity(1),\n docs: {\n category: 'string',\n returns: { type: 'string' },\n args: { s: { type: 'string' } },\n variants: [{ argumentNames: ['s'] }],\n description: 'Returns a new string with trailing whitespaces removed.',\n seeAlso: ['trim', 'string.trim-left'],\n examples: [\n 'let { trim-right } = import(\"string\"); trim-right(\" Albert \")',\n 'let { trim-right } = import(\"string\"); trim-right(\" \")',\n 'let { trim-right } = import(\"string\"); trim-right(\"\")',\n ],\n },\n },\n\n 'split-lines': {\n evaluate: ([str], sourceCodeInfo): string[] => {\n assertString(str, sourceCodeInfo)\n return str.split((/\\r\\n|\\n|\\r/)).filter(line => line !== '')\n },\n arity: toFixedArity(1),\n docs: {\n category: 'string',\n returns: { type: 'string' },\n args: { s: { type: 'string' } },\n variants: [{ argumentNames: ['s'] }],\n description: 'Divides $s into an array of substrings, each representing a line.',\n seeAlso: ['split'],\n examples: [\n 'let { split-lines } = import(\"string\"); split-lines(\"Albert\\nMojir\\n\")',\n 'let { split-lines } = import(\"string\"); split-lines(\"Albert\\n\\nMojir\")',\n 'let { split-lines } = import(\"string\"); split-lines(\"Albert\\nMojir\\n\\n\")',\n 'let { split-lines } = import(\"string\"); split-lines(\"\")',\n ],\n },\n },\n\n 'pad-left': {\n evaluate: ([str, length, padString], sourceCodeInfo): string => {\n assertString(str, sourceCodeInfo)\n assertNumber(length, sourceCodeInfo, { integer: true })\n\n if (padString !== undefined)\n assertString(padString, sourceCodeInfo)\n\n return str.padStart(length, padString)\n },\n arity: { min: 2, max: 3 },\n docs: {\n category: 'string',\n returns: { type: 'string' },\n args: {\n a: { type: 'string' },\n b: { type: 'integer' },\n s: { type: 'string' },\n length: { type: 'integer' },\n padString: { type: 'string' },\n },\n variants: [\n { argumentNames: ['s', 'length'] },\n { argumentNames: ['s', 'length', 'padString'] },\n ],\n description: 'Pads from the start of $s with `padString` (multiple times, if needed) until the resulting string reaches the given $length.',\n seeAlso: ['string.pad-right'],\n examples: [\n 'let { pad-left } = import(\"string\"); \"Albert\" pad-left 20',\n 'let { pad-left } = import(\"string\"); pad-left(\"Albert\", 20)',\n 'let { pad-left } = import(\"string\"); pad-left(\"Albert\", 20, \"-*-\")',\n 'let { pad-left } = import(\"string\"); pad-left(\"Albert\", 5)',\n 'let { pad-left } = import(\"string\"); pad-left(\"Albert\", -1)',\n ],\n },\n },\n\n 'pad-right': {\n evaluate: ([str, length, padString], sourceCodeInfo): string => {\n assertString(str, sourceCodeInfo)\n assertNumber(length, sourceCodeInfo, { integer: true })\n\n if (padString !== undefined)\n assertString(padString, sourceCodeInfo)\n\n return str.padEnd(length, padString)\n },\n arity: { min: 2, max: 3 },\n docs: {\n category: 'string',\n returns: { type: 'string' },\n args: {\n a: { type: 'string' },\n b: { type: 'integer' },\n s: { type: 'string' },\n length: { type: 'integer' },\n padString: { type: 'string' },\n },\n variants: [\n { argumentNames: ['s', 'length'] },\n { argumentNames: ['s', 'length', 'padString'] },\n ],\n description: 'Pads from the start of $s with `padString` (multiple times, if needed) until the resulting string reaches the given `length`.',\n seeAlso: ['string.pad-left'],\n examples: [\n 'let { pad-right } = import(\"string\"); \"Albert\" pad-right 20',\n 'let { pad-right } = import(\"string\"); pad-right(\"Albert\", 20)',\n 'let { pad-right } = import(\"string\"); pad-right(\"Albert\", 20, \"-*-\")',\n 'let { pad-right } = import(\"string\"); pad-right(\"Albert\", 5)',\n 'let { pad-right } = import(\"string\"); pad-right(\"Albert\", -1)',\n ],\n },\n },\n\n 'template': {\n evaluate: ([templateString, ...placeholders], sourceCodeInfo): string => {\n assertString(templateString, sourceCodeInfo)\n assertArray(placeholders, sourceCodeInfo)\n const templateStrings = templateString.split('||||')\n if (templateStrings.length <= 1) {\n return applyPlaceholders(templateStrings[0] as string, placeholders, sourceCodeInfo)\n }\n else {\n // Pluralisation\n const count = placeholders[0]\n assertNumber(count, sourceCodeInfo, { integer: true, nonNegative: true })\n const stringPlaceholders = [`${count}`, ...placeholders.slice(1)] as string[]\n if (templateStrings.length === 2) {\n // Exactly two valiants.\n // First variant (singular) for count = 1, Second variant (plural) for count = 0 or count > 1\n\n const placehoder = templateStrings[count === 1 ? 0 : 1] as string\n return applyPlaceholders(placehoder, stringPlaceholders, sourceCodeInfo)\n }\n else {\n // More than two variant:\n // Use count as index\n // If count >= number of variants, use last variant\n\n const placehoder = templateStrings[Math.min(count, templateStrings.length - 1)] as string\n return applyPlaceholders(placehoder, stringPlaceholders, sourceCodeInfo)\n }\n }\n },\n arity: { min: 1, max: 10 },\n docs: {\n category: 'string',\n returns: { type: 'string' },\n args: {\n s: { type: 'string' },\n params: { type: 'any', rest: true },\n },\n variants: [{ argumentNames: ['s', 'params'] }],\n description: 'Applies placeholders to a string. Support for basic pluralization - see examples. If pluralization is used, first placeholder must be a number.',\n seeAlso: ['str'],\n examples: [\n 'let { template } = import(\"string\"); template(\"Hi, $1 and $2\", \"Carl\", \"Larry\")',\n 'let { template } = import(\"string\"); template(\"Hi $1, $2, $3, $4, $5, $6, $7, $8 and $9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\")',\n 'let { template } = import(\"string\"); template(\"$1 book||||$1 books\", 0)',\n 'let { template } = import(\"string\"); template(\"$1 book||||$1 books\", 1)',\n 'let { template } = import(\"string\"); template(\"$1 book||||$1 books\", 2)',\n 'let { template } = import(\"string\"); template(\"No book||||$1 book||||$1 books\", 0)',\n 'let { template } = import(\"string\"); template(\"No book||||$1 book||||$1 books\", 1)',\n 'let { template } = import(\"string\"); template(\"No book||||$1 book||||$1 books\", 10)',\n 'let { template } = import(\"string\"); template(\"No book||||One book||||Two books||||Three books||||$1 books\", 0)',\n 'let { template } = import(\"string\"); template(\"No book||||One book||||Two books||||Three books||||$1 books\", 1)',\n 'let { template } = import(\"string\"); template(\"No book||||One book||||Two books||||Three books||||$1 books\", 2)',\n 'let { template } = import(\"string\"); template(\"No book||||One book||||Two books||||Three books||||$1 books\", 3)',\n 'let { template } = import(\"string\"); template(\"No book||||One book||||Two books||||Three books||||$1 books\", 4)',\n ],\n hideOperatorForm: true,\n },\n },\n\n 'encode-base64': {\n evaluate: ([value], sourceCodeInfo): string => {\n assertString(value, sourceCodeInfo)\n return btoa(\n encodeURIComponent(value).replace(/%([0-9A-F]{2})/g, (_match, p1) => {\n // eslint-disable-next-line ts/no-unsafe-argument\n return String.fromCharCode(Number.parseInt(p1, 16))\n }),\n )\n },\n arity: toFixedArity(1),\n docs: {\n category: 'string',\n returns: { type: 'string' },\n args: { s: { type: 'string' } },\n variants: [{ argumentNames: ['s'] }],\n description: 'Returns a Base64 encoded string from $s.',\n seeAlso: ['string.decode-base64'],\n examples: [\n 'let { encode-base64 } = import(\"string\"); encode-base64(\"Albert\")',\n ],\n },\n },\n\n 'decode-base64': {\n evaluate: ([value], sourceCodeInfo): string => {\n assertString(value, sourceCodeInfo)\n try {\n return decodeURIComponent(\n Array.prototype.map\n .call(atob(value), (c) => {\n // eslint-disable-next-line ts/no-unsafe-call, ts/no-unsafe-member-access\n return `%${(`00${c.charCodeAt(0).toString(16)}`).slice(-2)}`\n })\n .join(''),\n )\n }\n catch (error) {\n throw new LitsError(error as Error, sourceCodeInfo)\n }\n },\n arity: toFixedArity(1),\n docs: {\n category: 'string',\n returns: { type: 'string' },\n args: { base64string: { type: 'string' } },\n variants: [{ argumentNames: ['base64string'] }],\n description: 'Returns a Base64 decoded string from $base64string.',\n seeAlso: ['string.encode-base64'],\n examples: [\n 'let { decode-base64 } = import(\"string\"); decode-base64(\"QWxiZXJ0IPCfkLs=\")',\n ],\n },\n },\n\n 'encode-uri-component': {\n evaluate: ([value], sourceCodeInfo): string => {\n assertString(value, sourceCodeInfo)\n return encodeURIComponent(value)\n },\n arity: toFixedArity(1),\n docs: {\n category: 'string',\n returns: { type: 'string' },\n args: { s: { type: 'string' } },\n variants: [{ argumentNames: ['s'] }],\n description: 'Returns an escaped `URI` string.',\n seeAlso: ['string.decode-uri-component'],\n examples: [\n 'let { encode-uri-component } = import(\"string\"); encode-uri-component(\"Hi everyone!?\")',\n ],\n },\n },\n\n 'decode-uri-component': {\n evaluate: ([value], sourceCodeInfo): string => {\n assertString(value, sourceCodeInfo)\n try {\n return decodeURIComponent(value)\n }\n catch (error) {\n throw new LitsError(error as Error, sourceCodeInfo)\n }\n },\n arity: toFixedArity(1),\n docs: {\n category: 'string',\n returns: { type: 'string' },\n args: { s: { type: 'string' } },\n variants: [{ argumentNames: ['s'] }],\n description: 'Returns an un-escaped `URI` string.',\n seeAlso: ['string.encode-uri-component'],\n examples: [\n 'let { decode-uri-component } = import(\"string\"); decode-uri-component(\"Hi%20everyone!%3F%20%F0%9F%91%8D\")',\n ],\n },\n },\n\n 'capitalize': {\n evaluate: ([str], sourceCodeInfo): string => {\n assertString(str, sourceCodeInfo)\n return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()\n },\n arity: toFixedArity(1),\n docs: {\n category: 'string',\n returns: { type: 'string' },\n args: { s: { type: 'string' } },\n variants: [{ argumentNames: ['s'] }],\n description: 'Returns $s with the first character converted to uppercase and the rest to lowercase.',\n seeAlso: ['lower-case', 'upper-case'],\n examples: [\n 'let { capitalize } = import(\"string\"); capitalize(\"albert\")',\n 'let { capitalize } = import(\"string\"); capitalize(\"ALBERT\")',\n 'let { capitalize } = import(\"string\"); capitalize(\"aLBERT\")',\n 'let { capitalize } = import(\"string\"); capitalize(\"\")',\n ],\n },\n },\n}\n\nconst doubleDollarRegexp = /\\$\\$/g\nfunction applyPlaceholders(templateString: string, placeholders: unknown[], sourceCodeInfo?: SourceCodeInfo): string {\n for (let i = 0; i < 9; i += 1) {\n // Matches $1, $2, ..., $9\n // Does not match $$1\n // But does match $$$1, (since the two first '$' will later be raplaced with a single '$'\n const re = new RegExp(`(\\\\$\\\\$|[^$]|^)\\\\$${i + 1}`, 'g')\n if (re.test(templateString)) {\n const placeHolder = asStringOrNumber(placeholders[i], sourceCodeInfo)\n templateString = templateString.replace(re, `$1${placeHolder}`)\n }\n }\n templateString = templateString.replace(doubleDollarRegexp, '$')\n return templateString\n}\n\nexport const stringUtilsModule: LitsModule = {\n name: 'string',\n functions: stringUtilsFunctions,\n}\n","import type { Any, Coll, Obj } from '../interface'\nimport type { SourceCodeInfo } from '../tokenizer/token'\nimport { asAny, isColl, isObj, isRegularExpression } from '../typeGuards/lits'\nimport { isNumber } from '../typeGuards/number'\nimport { asString, assertStringOrNumber } from '../typeGuards/string'\nimport { isUnknownRecord } from '../typeGuards'\nimport { LitsError } from '../errors'\n\nexport function collHasKey(coll: unknown, key: string | number): boolean {\n if (!isColl(coll))\n return false\n\n if (typeof coll === 'string' || Array.isArray(coll)) {\n if (!isNumber(key, { integer: true }))\n return false\n\n return key >= 0 && key < coll.length\n }\n return !!Object.getOwnPropertyDescriptor(coll, key)\n}\n\nexport function compare<T extends string | number>(a: T, b: T, sourceCodeInfo: SourceCodeInfo | undefined): number {\n assertStringOrNumber(a, sourceCodeInfo)\n assertStringOrNumber(b, sourceCodeInfo)\n\n if (typeof a === 'string' && typeof b === 'string') {\n return a < b ? -1 : a > b ? 1 : 0\n }\n if (typeof a === 'number' && typeof b === 'number') {\n return Math.sign((a) - (b))\n }\n throw new LitsError(`Cannot compare values of different types: ${typeof a} and ${typeof b}`, sourceCodeInfo)\n}\n\nexport function deepEqual(a: unknown, b: unknown, sourceCodeInfo?: SourceCodeInfo): boolean {\n if (a === b)\n return true\n\n if (typeof a === 'number' && typeof b === 'number')\n return approxEqual(a, b)\n\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length)\n return false\n\n for (let i = 0; i < a.length; i += 1) {\n if (!deepEqual(asAny(a[i], sourceCodeInfo), asAny(b[i], sourceCodeInfo), sourceCodeInfo))\n return false\n }\n return true\n }\n if (isRegularExpression(a) && isRegularExpression(b))\n return a.s === b.s && a.f === b.f\n\n if (isUnknownRecord(a) && isUnknownRecord(b)) {\n const aKeys = Object.keys(a)\n const bKeys = Object.keys(b)\n if (aKeys.length !== bKeys.length)\n return false\n\n for (let i = 0; i < aKeys.length; i += 1) {\n const key = asString(aKeys[i], sourceCodeInfo)\n if (!deepEqual(a[key], b[key], sourceCodeInfo))\n return false\n }\n return true\n }\n return false\n}\n\nexport function toNonNegativeInteger(num: number): number {\n return Math.max(0, Math.ceil(num))\n}\n\nexport function toAny(value: unknown): Any {\n return (value ?? null) as Any\n}\n\nfunction clone<T>(value: T): T {\n if (isObj(value)) {\n return Object.entries(value).reduce((result: Obj, entry) => {\n const [key, val] = entry\n result[key] = clone(val)\n return result\n }, {}) as T\n }\n if (Array.isArray(value))\n // eslint-disable-next-line ts/no-unsafe-return\n return value.map(item => clone(item)) as unknown as T\n\n return value\n}\n\nexport function cloneColl<T extends Coll>(value: T): T {\n return clone(value)\n}\n\nexport function joinSets<T>(...results: Set<T>[]): Set<T> {\n const result = new Set<T>()\n for (const symbols of results)\n symbols.forEach(symbol => result.add(symbol))\n\n return result\n}\n\nexport function addToSet<T>(target: Set<T>, source: Set<T>): void {\n source.forEach(symbol => target.add(symbol))\n}\n\nexport const EPSILON = 1e-10\n\nexport function approxEqual(a: number, b: number, epsilon: number = EPSILON): boolean {\n if (a === b) {\n return true\n }\n\n const diff = Math.abs(a - b)\n\n if (a === 0 || b === 0 || diff < epsilon) {\n // Use absolute error for values near zero\n return diff < epsilon\n }\n const absA = Math.abs(a)\n const absB = Math.abs(b)\n\n // Use relative error for larger values\n return diff / (absA + absB) < epsilon\n}\n\nexport function approxZero(value: number): boolean {\n return Math.abs(value) < EPSILON\n}\n\nexport function smartTrim(str: string, minIndent = 0): string {\n const lines = str.split('\\n')\n while (lines[0]?.match(/^\\s*$/)) {\n lines.shift() // Remove leading empty lines\n }\n while (lines[lines.length - 1]?.match(/^\\s*$/)) {\n lines.pop() // Remove trailing empty lines\n }\n const indent = lines.reduce((acc, line) => {\n if (line.match(/^\\s*$/))\n return acc // Skip empty lines\n const lineIndent = line.match(/^\\s*/)![0].length\n return Math.min(acc, lineIndent)\n }, Infinity)\n return lines.map(line => ' '.repeat(minIndent) + line.slice(indent)).join('\\n').trimEnd()\n}\n","import type { SourceCodeInfo } from '../tokenizer/token'\nimport { getAssertionError } from '../utils/getAssertionError'\n\n// isArray not needed, use Array.isArary\nexport function asArray(value: unknown, sourceCodeInfo?: SourceCodeInfo): unknown[] {\n assertArray(value, sourceCodeInfo)\n return value\n}\nexport function assertArray(value: unknown, sourceCodeInfo?: SourceCodeInfo): asserts value is unknown[] {\n if (!Array.isArray(value))\n throw getAssertionError('array', value, sourceCodeInfo)\n}\n\nexport function isStringArray(value: unknown): value is string[] {\n return Array.isArray(value) && value.every(v => typeof v === 'string')\n}\nexport function asStringArray(value: unknown, sourceCodeInfo?: SourceCodeInfo): string[] {\n assertStringArray(value, sourceCodeInfo)\n return value\n}\nexport function assertStringArray(value: unknown, sourceCodeInfo?: SourceCodeInfo): asserts value is string[] {\n if (!isStringArray(value))\n throw getAssertionError('array of strings', value, sourceCodeInfo)\n}\n\nexport function isCharArray(value: unknown): value is string[] {\n return Array.isArray(value) && value.every(v => typeof v === 'string' && v.length === 1)\n}\nexport function asCharArray(value: unknown, sourceCodeInfo?: SourceCodeInfo): string[] {\n assertCharArray(value, sourceCodeInfo)\n return value\n}\nexport function assertCharArray(value: unknown, sourceCodeInfo?: SourceCodeInfo): asserts value is string[] {\n if (!isCharArray(value))\n throw getAssertionError('array of strings', value, sourceCodeInfo)\n}\n"],"names":["getCodeMarker","sourceCodeInfo","position","code","leftPadding","column","rightPadding","length","repeat","Math","max","LitsError","Error","shortMessage","constructor","err","message","super","location","line","filePath","getLitsErrorMessage","this","Object","setPrototypeOf","prototype","name","NodeTypes","Number","String","NormalExpression","SpecialExpression","UserDefinedSymbol","NormalBuiltinSymbol","SpecialBuiltinSymbol","ReservedSymbol","Binding","Spread","NodeTypesSet","Set","values","functionTypeSet","isLitsFunction","func","type","functionType","has","isNode","value","Array","isArray","valueToString","keys","find","key","RegExp","toString","JSON","stringify","getSourceCodeInfo","anyValue","asNonUndefined","undefined","isNonUndefined","assertNonUndefined","getAssertionError","typeName","assertNumber","options","isNaN","integer","isInteger","finite","isFinite","zero","nonZero","positive","negative","nonPositive","nonNegative","gt","gte","lt","lte","isNumber","sign","getSignString","numberType","range","getRangeString","filter","x","join","getNumberTypeName","assertString","nonEmpty","char","isString","asStringOrNumber","isStringOrNumber","assertStringOrNumber","toFixedArity","arity","min","stringUtilsFunctions","evaluate","str","count","docs","category","returns","args","a","b","s","n","variants","argumentNames","description","seeAlso","examples","num","int","ceil","toNonNegativeInteger","fromCodePoint","error","codePointAt","c","replace","split","padString","padStart","padEnd","template","templateString","placeholders","assertArray","templateStrings","applyPlaceholders","stringPlaceholders","slice","params","rest","hideOperatorForm","btoa","encodeURIComponent","_match","p1","fromCharCode","parseInt","decodeURIComponent","map","call","atob","charCodeAt","base64string","capitalize","charAt","toUpperCase","toLowerCase","doubleDollarRegexp","i","re","test","placeHolder","stringUtilsModule","functions"],"mappings":"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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e){if(!e.position||!e.code)return"";const t=e.position.column-1,r=e.code.length-t-1;return`${" ".repeat(Math.max(t,0))}^${" ".repeat(Math.max(r,0))}`}class t extends Error{sourceCodeInfo;shortMessage;constructor(r,n){const o=r instanceof Error?r.message:`${r}`;super(function(t,r){if(!r)return t;const n=`${r.position.line}:${r.position.column}`;return`${t}${r.filePath?`\n${r.filePath}:${n}`:`\nLocation ${n}`}\n${r.code}\n${e(r)}`}(o,n)),this.shortMessage=o,this.sourceCodeInfo=n,Object.setPrototypeOf(this,t.prototype),this.name="LitsError"}getCodeMarker(){return this.sourceCodeInfo&&e(this.sourceCodeInfo)}}const r={Number:1,String:2,NormalExpression:3,SpecialExpression:4,UserDefinedSymbol:5,NormalBuiltinSymbol:6,SpecialBuiltinSymbol:7,ReservedSymbol:8,Binding:9,Spread:10},n=new Set(Object.values(r));const o=new Set(["UserDefined","Partial","Comp","Constantly","Juxt","Complement","EveryPred","SomePred","Fnull","Builtin","SpecialBuiltin","NativeJsFunction","Module"]);const i="^^fn^^",s="^^re^^";function c(e){return null!==e&&"object"==typeof e&&(i in e&&"functionType"in e&&("string"==typeof(t=e.functionType)&&o.has(t)));var t}function a(e){return!(!Array.isArray(e)||e.length<2)&&("number"==typeof(t=e[0])&&n.has(t));var t}function v(e){return c(e)?`<function ${e.name||"λ"}>`:a(e)?`${t=e[0],Object.keys(r).find(e=>r[e]===t)}-node`:null===e?"null":"object"==typeof e&&e instanceof RegExp?`${e}`:"object"==typeof e&&e instanceof Error?e.toString():JSON.stringify(e);var t}function m(e,t){return e?.sourceCodeInfo??t}function l(e,t={}){return"number"==typeof e&&(!Number.isNaN(e)&&(!(t.integer&&!Number.isInteger(e))&&(!(t.finite&&!Number.isFinite(e))&&((!t.zero||0===e)&&((!t.nonZero||0!==e)&&(!(t.positive&&e<=0)&&(!(t.negative&&e>=0)&&(!(t.nonPositive&&e>0)&&(!(t.nonNegative&&e<0)&&(!("number"==typeof t.gt&&e<=t.gt)&&(!("number"==typeof t.gte&&e<t.gte)&&(!("number"==typeof t.lt&&e>=t.lt)&&!("number"==typeof t.lte&&e>t.lte)))))))))))))}function g(e,r,n={}){if(!l(e,n))throw new t(`Expected ${function(e){if(e.zero)return"zero";const t=function(e){return e.positive?"positive":e.negative?"negative":e.nonNegative?"non negative":e.nonPositive?"non positive":e.nonZero?"non zero":""}(e),r=e.integer?"integer":"number",n=e.finite?"finite":"",o=function(e){return"number"!=typeof e.gt&&"number"!=typeof e.gte||"number"!=typeof e.lt&&"number"!=typeof e.lte?"number"==typeof e.gt||"number"==typeof e.gte?"number"==typeof e.gt?`n > ${e.gt}`:`n >= ${e.gte}`:"number"==typeof e.lt||"number"==typeof e.lte?"number"==typeof e.lt?`n < ${e.lt}`:`n <= ${e.lte}`:"":`${"number"==typeof e.gt?`${e.gt} < n `:`${e.gte} <= n `}${"number"==typeof e.lt?`< ${e.lt}`:`<= ${e.lte}`}`}(e);return[t,n,r,o].filter(e=>!!e).join(" ")}(n)}, got ${v(e)}.`,m(e,r))}const p=new WeakSet,d=new WeakSet,u=new WeakSet;function h(e,r){if(!function(e){return!(!Array.isArray(e)||!d.has(e)&&(u.has(e)||(e.every(e=>l(e))?(p.add(e),d.add(e),0):(u.add(e),1))))}(e))throw new t(`Expected a vector, but got ${e}`,r)}function y(e,r){if(h(e,r),0===e.length)throw new t(`Expected a non empty vector, but got ${e}`,r)}function f(e){return null!==e&&"object"==typeof e&&!!e[i]}function w(e){return!(null===e||"object"!=typeof e||Array.isArray(e)||e instanceof RegExp||f(e)||(t=e,null!==t&&"object"==typeof t&&t[s]));var t}function b(e){return function(e){return Array.isArray(e)||"string"==typeof e}(e)||w(e)}function x(e,r){if(!function(e){return"number"==typeof e||!!b(e)||!!f(e)}(e))throw function(e,r,n){return new t(`Expected ${e}, got ${v(r)}.`,m(r,n))}("FunctionLike",e,r)}function k(e){return{min:e,max:e}}const z={mean:{category:"vector",description:"Returns the **mean** of all elements in the `vector`.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **mean** of."}},variants:[{argumentNames:["vector"]}],examples:["mean([1, 2, 3])","mean([1, 2, -3])"],seeAlso:["mean","vector.moving-mean","vector.centered-moving-mean","vector.running-mean","vector.geometric-mean","vector.harmonic-mean","vector.median","vector.mode","vector.sum","vector.rms"]},"moving-mean":{category:"vector",description:"Returns the **moving mean** of the `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving mean** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-mean } = import("vector");\nmoving-mean([1, 2, 3, 4, 5], 3)','let { moving-mean } = import("vector");\nmoving-mean([1, 2, 3, 4, 5], 5)'],seeAlso:["moving-fn","vector.mean","vector.centered-moving-mean","vector.running-mean"]},"centered-moving-mean":{category:"vector",description:"Returns the **centered moving mean** of the `vector` with a given window size.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving mean** of."},windowSize:{type:"integer",description:"The size of the centered moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-mean } = import("vector");\ncentered-moving-mean([1, 2, 3, 4, 5], 3)','let { centered-moving-mean } = import("vector");\ncentered-moving-mean([1, 2, 3, 4, 5], 3, 0, 10)','let { centered-moving-mean } = import("vector");\ncentered-moving-mean([1, 2, 3, 4, 5], 3, 10)'],seeAlso:["vector.mean","vector.moving-mean","vector.running-mean"]},"running-mean":{category:"vector",description:"Returns the **running mean** of the `vector`.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running mean** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-mean } = import("vector");\nrunning-mean([1, 2, 3, 4, 5])'],seeAlso:["running-fn","vector.mean","vector.moving-mean","vector.centered-moving-mean"]},"geometric-mean":{category:"vector",description:"Returns the **geometric mean** of all elements in the `vector`.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **geometric mean** of."}},variants:[{argumentNames:["vector"]}],examples:['let { geometric-mean } = import("vector");\ngeometric-mean([1, 2, 3])','let { geometric-mean } = import("vector");\ngeometric-mean([1, 2, 9])'],seeAlso:["vector.moving-geometric-mean","vector.centered-moving-geometric-mean","vector.running-geometric-mean","vector.mean","vector.harmonic-mean"]},"moving-geometric-mean":{category:"vector",description:"Returns the **moving geometric mean** of the `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving geometric mean** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-geometric-mean } = import("vector");\nmoving-geometric-mean([1, 2, 3, 4, 5], 3)','let { moving-geometric-mean } = import("vector");\nmoving-geometric-mean([1, 2, 3, 4, 5], 5)'],seeAlso:["vector.geometric-mean","vector.centered-moving-geometric-mean","vector.running-geometric-mean"]},"centered-moving-geometric-mean":{category:"vector",description:"Returns the **centered moving geometric mean** of the `vector` with a given window size.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving geometric mean** of."},windowSize:{type:"integer",description:"The size of the centered moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-geometric-mean } = import("vector");\ncentered-moving-geometric-mean([1, 2, 3, 4, 5], 3)','let { centered-moving-geometric-mean } = import("vector");\ncentered-moving-geometric-mean([1, 2, 3, 4, 5], 3, 0, 10)','let { centered-moving-geometric-mean } = import("vector");\ncentered-moving-geometric-mean([1, 2, 3, 4, 5], 3, 10)'],seeAlso:["vector.geometric-mean","vector.moving-geometric-mean","vector.running-geometric-mean"]},"running-geometric-mean":{category:"vector",description:"Returns the **running geometric mean** of the `vector`.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running geometric mean** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-geometric-mean } = import("vector");\nrunning-geometric-mean([1, 2, 3, 4, 5])'],seeAlso:["vector.geometric-mean","vector.moving-geometric-mean","vector.centered-moving-geometric-mean"]},"harmonic-mean":{category:"vector",description:"Returns the **harmonic mean** of all elements in the `vector`.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **harmonic mean** of."}},variants:[{argumentNames:["vector"]}],examples:['let { harmonic-mean } = import("vector");\nharmonic-mean([1, 2, 3])','let { harmonic-mean } = import("vector");\nharmonic-mean([1, 2, 9])'],seeAlso:["vector.moving-harmonic-mean","vector.centered-moving-harmonic-mean","vector.running-harmonic-mean","vector.mean","vector.geometric-mean"]},"moving-harmonic-mean":{category:"vector",description:"Returns the **moving harmonic mean** of the `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving harmonic mean** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-harmonic-mean } = import("vector");\nmoving-harmonic-mean([1, 2, 3, 4, 5], 3)','let { moving-harmonic-mean } = import("vector");\nmoving-harmonic-mean([1, 2, 3, 4, 5], 5)'],seeAlso:["vector.harmonic-mean","vector.centered-moving-harmonic-mean","vector.running-harmonic-mean"]},"centered-moving-harmonic-mean":{category:"vector",description:"Returns the **centered moving harmonic mean** of the `vector` with a given window size.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving harmonic mean** of."},windowSize:{type:"integer",description:"The size of the centered moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-harmonic-mean } = import("vector");\ncentered-moving-harmonic-mean([1, 2, 3, 4, 5], 3)','let { centered-moving-harmonic-mean } = import("vector");\ncentered-moving-harmonic-mean([1, 2, 3, 4, 5], 3, 0, 10)','let { centered-moving-harmonic-mean } = import("vector");\ncentered-moving-harmonic-mean([1, 2, 3, 4, 5], 3, 10)'],seeAlso:["vector.harmonic-mean","vector.moving-harmonic-mean","vector.running-harmonic-mean"]},"running-harmonic-mean":{category:"vector",description:"Returns the **running harmonic mean** of the `vector`.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running harmonic mean** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-harmonic-mean } = import("vector");\nrunning-harmonic-mean([1, 2, 3, 4, 5])'],seeAlso:["vector.harmonic-mean","vector.moving-harmonic-mean","vector.centered-moving-harmonic-mean"]},median:{category:"vector",description:"Returns the median of all elements in the vector.",returns:{type:"number"},args:{vector:{type:"vector",description:"The vector to calculate the median of."}},variants:[{argumentNames:["vector"]}],examples:["median([1, 2, 3])","median([1, 2, -3])","median([1, 2, 3, 4])","median([1, 2, -3, 4])"],seeAlso:["median","vector.moving-median","vector.centered-moving-median","vector.running-median","vector.mean","vector.mode","vector.quartiles","vector.percentile","vector.iqr","vector.medad"]},"moving-median":{category:"vector",description:"Returns the **moving median** of the `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving median** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-median } = import("vector");\nmoving-median([1, 2, 3, 4, 5], 3)','let { moving-median } = import("vector");\nmoving-median([1, 2, 3, 4, 5], 5)'],seeAlso:["vector.median","vector.centered-moving-median","vector.running-median"]},"centered-moving-median":{category:"vector",description:"Returns the **centered moving median** of the `vector` with a given window size.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving median** of."},windowSize:{type:"integer",description:"The size of the centered moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-median } = import("vector");\ncentered-moving-median([1, 2, 3, 4, 5], 3)','let { centered-moving-median } = import("vector");\ncentered-moving-median([1, 2, 3, 4, 5], 3, 0, 10)','let { centered-moving-median } = import("vector");\ncentered-moving-median([1, 2, 3, 4, 5], 3, 10)'],seeAlso:["vector.median","vector.moving-median","vector.running-median"]},"running-median":{category:"vector",description:"Returns the **running median** of the `vector`.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running median** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-median } = import("vector");\nrunning-median([1, 2, 3, 4, 5])'],seeAlso:["vector.median","vector.moving-median","vector.centered-moving-median"]},variance:{category:"vector",description:"Returns the **variance** of all elements in the `vector`.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **variance** of."}},variants:[{argumentNames:["vector"]}],examples:['let { variance } = import("vector");\nvariance([1, 2, 3])','let { variance } = import("vector");\nvariance([1, 2, -3])'],seeAlso:["linear-algebra.cov","vector.moving-variance","vector.centered-moving-variance","vector.running-variance","vector.stdev","vector.sample-variance","vector.mad"]},"moving-variance":{category:"vector",description:"Returns the **moving variance** of the `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving variance** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-variance } = import("vector");\nmoving-variance([1, 2, 3, 4, 5], 3)','let { moving-variance } = import("vector");\nmoving-variance([1, 2, 3, 4, 5], 5)'],seeAlso:["vector.variance","vector.centered-moving-variance","vector.running-variance"]},"centered-moving-variance":{category:"vector",description:"Returns the **centered moving variance** of the `vector` with a given window size.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving variance** of."},windowSize:{type:"integer",description:"The size of the centered moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-variance } = import("vector");\ncentered-moving-variance([1, 2, 3, 4, 5], 3)','let { centered-moving-variance } = import("vector");\ncentered-moving-variance([1, 2, 3, 4, 5], 3, 1)','let { centered-moving-variance } = import("vector");\ncentered-moving-variance([1, 2, 3, 4, 5], 3, 1, 5)','let { centered-moving-variance } = import("vector");\ncentered-moving-variance([1, 2, 3, 4, 5], 3, 0, 6)'],seeAlso:["vector.variance","vector.moving-variance","vector.running-variance"]},"running-variance":{category:"vector",description:"Returns the **running variance** of the `vector`.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running variance** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-variance } = import("vector");\nrunning-variance([1, 2, 3, 4, 5])'],seeAlso:["vector.variance","vector.moving-variance","vector.centered-moving-variance"]},"sample-variance":{category:"vector",description:"Returns the sample variance of all elements in the vector.",returns:{type:"number"},args:{vector:{type:"vector",description:"Non emtpy vector to calculate the sample variance of."}},variants:[{argumentNames:["vector"]}],examples:['let { sample-variance } = import("vector");\nsample-variance([1, 2, 3])','let { sample-variance } = import("vector");\nsample-variance([1, 2, -3])','let { sample-variance } = import("vector");\nsample-variance([1, 2, 3, 4])','let { sample-variance } = import("vector");\nsample-variance([1, 2, -3, 4])','let { sample-variance } = import("vector");\nsample-variance([1, 2, 3, 40, 50])'],seeAlso:["vector.moving-sample-variance","vector.centered-moving-sample-variance","vector.running-sample-variance","vector.variance","vector.sample-stdev"]},"moving-sample-variance":{category:"vector",description:"Returns the **moving sample variance** of the `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving sample variance** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-sample-variance } = import("vector");\nmoving-sample-variance([1, 2, 3, 4, 5], 3)','let { moving-sample-variance } = import("vector");\nmoving-sample-variance([1, 2, 3, 4, 5], 5)'],seeAlso:["vector.sample-variance","vector.centered-moving-sample-variance","vector.running-sample-variance"]},"centered-moving-sample-variance":{category:"vector",description:"Returns the **centered moving sample variance** of the `vector` with a given window size.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving sample variance** of."},windowSize:{type:"integer",description:"The size of the centered moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-sample-variance } = import("vector");\ncentered-moving-sample-variance([1, 2, 3, 4, 5], 3)','let { centered-moving-sample-variance } = import("vector");\ncentered-moving-sample-variance([1, 2, 3, 4, 5], 3, 1)','let { centered-moving-sample-variance } = import("vector");\ncentered-moving-sample-variance([1, 2, 3, 4, 5], 3, 1, 5)','let { centered-moving-sample-variance } = import("vector");\ncentered-moving-sample-variance([1, 2, 3, 4, 5], 3, 0, 6)'],seeAlso:["vector.sample-variance","vector.moving-sample-variance","vector.running-sample-variance"]},"running-sample-variance":{category:"vector",description:"Returns the **running sample variance** of the `vector`.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running sample variance** of. First element in result is `null` since **sample variance** is not defined for a single element."}},variants:[{argumentNames:["vector"]}],examples:['let { running-sample-variance } = import("vector");\nrunning-sample-variance([1, 2, 3, 4, 5])'],seeAlso:["vector.sample-variance","vector.moving-sample-variance","vector.centered-moving-sample-variance"]},stdev:{category:"vector",description:"Returns the standard deviation of all elements in the vector.",returns:{type:"number"},args:{vector:{type:"vector",description:"Non emtpy vector to calculate the standard deviation of."}},variants:[{argumentNames:["vector"]}],examples:['let { stdev } = import("vector");\nstdev([1, 2, 3])','let { stdev } = import("vector");\nstdev([1, 2, -3])','let { stdev } = import("vector");\nstdev([1, 2, 3, 4])','let { stdev } = import("vector");\nstdev([1, 2, -3, 4])','let { stdev } = import("vector");\nstdev([1, 2, 3, 40, 50])'],seeAlso:["vector.moving-stdev","vector.centered-moving-stdev","vector.running-stdev","vector.variance","vector.sample-stdev","vector.rms","vector.mad"]},"moving-stdev":{category:"vector",description:"Returns the **moving standard deviation** of the `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving standard deviation** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-stdev } = import("vector");\nmoving-stdev([1, 2, 3, 4, 5], 3)','let { moving-stdev } = import("vector");\nmoving-stdev([1, 2, 3, 4, 5], 5)'],seeAlso:["vector.stdev","vector.centered-moving-stdev","vector.running-stdev"]},"centered-moving-stdev":{category:"vector",description:"Returns the **centered moving standard deviation** of the `vector` with a given window size.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving standard deviation** of."},windowSize:{type:"integer",description:"The size of the centered moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-stdev } = import("vector");\ncentered-moving-stdev([1, 2, 3, 4, 5], 3)','let { centered-moving-stdev } = import("vector");\ncentered-moving-stdev([1, 2, 3, 4, 5], 3, 1)','let { centered-moving-stdev } = import("vector");\ncentered-moving-stdev([1, 2, 3, 4, 5], 3, 1, 5)','let { centered-moving-stdev } = import("vector");\ncentered-moving-stdev([1, 2, 3, 4, 5], 3, 0, 6)'],seeAlso:["vector.stdev","vector.moving-stdev","vector.running-stdev"]},"running-stdev":{category:"vector",description:"Returns the **running standard deviation** of the `vector`.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running standard deviation** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-stdev } = import("vector");\nrunning-stdev([1, 2, 3, 4, 5])'],seeAlso:["vector.stdev","vector.moving-stdev","vector.centered-moving-stdev"]},"sample-stdev":{category:"vector",description:"Returns the sample standard deviation of all elements in the vector.",returns:{type:"number"},args:{vector:{type:"vector",description:"Non emtpy vector to calculate the sample standard deviation of."}},variants:[{argumentNames:["vector"]}],examples:['let { sample-stdev } = import("vector");\nsample-stdev([1, 2, 3])','let { sample-stdev } = import("vector");\nsample-stdev([1, 2, -3])','let { sample-stdev } = import("vector");\nsample-stdev([1, 2, 3, 4])','let { sample-stdev } = import("vector");\nsample-stdev([1, 2, -3, 4])','let { sample-stdev } = import("vector");\nsample-stdev([1, 2, 3, 40, 50])'],seeAlso:["vector.moving-sample-stdev","vector.centered-moving-sample-stdev","vector.running-sample-stdev","vector.stdev","vector.sample-variance"]},"moving-sample-stdev":{category:"vector",description:"Returns the **moving sample standard deviation** of the `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving sample standard deviation** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-sample-stdev } = import("vector");\nmoving-sample-stdev([1, 2, 3, 4, 5], 3)','let { moving-sample-stdev } = import("vector");\nmoving-sample-stdev([1, 2, 3, 4, 5], 5)'],seeAlso:["vector.sample-stdev","vector.centered-moving-sample-stdev","vector.running-sample-stdev"]},"centered-moving-sample-stdev":{category:"vector",description:"Returns the **centered moving sample standard deviation** of the `vector` with a given window size.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving sample standard deviation** of."},windowSize:{type:"integer",description:"The size of the centered moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-sample-stdev } = import("vector");\ncentered-moving-sample-stdev([1, 2, 3, 4, 5], 3)','let { centered-moving-sample-stdev } = import("vector");\ncentered-moving-sample-stdev([1, 2, 3, 4, 5], 3, 1)','let { centered-moving-sample-stdev } = import("vector");\ncentered-moving-sample-stdev([1, 2, 3, 4, 5], 3, 1, 5)','let { centered-moving-sample-stdev } = import("vector");\ncentered-moving-sample-stdev([1, 2, 3, 4, 5], 3, 0, 6)'],seeAlso:["vector.sample-stdev","vector.moving-sample-stdev","vector.running-sample-stdev"]},"running-sample-stdev":{category:"vector",description:"Returns the **running sample standard deviation** of the `vector`.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running sample standard deviation** of. First element in result is `null` since **sample standard deviation** is not defined for a single element."}},variants:[{argumentNames:["vector"]}],examples:['let { running-sample-stdev } = import("vector");\nrunning-sample-stdev([1, 2, 3, 4, 5])'],seeAlso:["vector.sample-stdev","vector.moving-sample-stdev","vector.centered-moving-sample-stdev"]},iqr:{category:"vector",description:"Calculates the **interquartile range** of a `vector`. Returns the difference between the third and first quartiles.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **interquartile range** of. Minimum length is 4."}},variants:[{argumentNames:["vector"]}],examples:['let { iqr } = import("vector");\niqr([1, 2, 3, 4])','let { iqr } = import("vector");\niqr([5, 4, 3, 2, 1, 2, 3, 4, 5])','let { iqr } = import("vector");\niqr(range(1, 1000))','let { iqr, generate } = import("vector");\niqr(generate(1000, -> 1e6 / ($ + 1) ^ 2))','let { iqr, generate } = import("vector");\nlet { ln } = import("math");\niqr(generate(1000, -> ln($ + 1)))'],seeAlso:["vector.moving-iqr","vector.centered-moving-iqr","vector.running-iqr","vector.quartiles","vector.median","vector.mad","vector.medad","vector.outliers?","vector.outliers"]},"moving-iqr":{category:"vector",description:"Calculates the **moving interquartile range** of a `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving interquartile range** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-iqr } = import("vector");\nmoving-iqr([1, 2, 4, 7, 11, 16], 4)','let { moving-iqr } = import("vector");\nmoving-iqr([1, 2, 4, 7, 11, 16], 5)','let { moving-iqr } = import("vector");\nmoving-iqr([1, 2, 4, 7, 11, 16], 6)'],seeAlso:["vector.iqr","vector.centered-moving-iqr","vector.running-iqr"]},"centered-moving-iqr":{category:"vector",description:"Calculates the **centered moving interquartile range** of a `vector` with a given window size.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving interquartile range** of."},windowSize:{type:"integer",description:"The size of the moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-iqr } = import("vector");\ncentered-moving-iqr([1, 2, 4, 7, 11, 16], 4)','let { centered-moving-iqr } = import("vector");\ncentered-moving-iqr([1, 2, 4, 7, 11, 16], 4, 0, 0)'],seeAlso:["vector.iqr","vector.moving-iqr","vector.running-iqr"]},"running-iqr":{category:"vector",description:"Calculates the **running interquartile range** of a `vector`. First three element in result is `null` since **running interquartile range** is not defined for less than four elements.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running interquartile range** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-iqr } = import("vector");\nrunning-iqr([1, 2, 3, 4, 5, 6])','let { running-iqr } = import("vector");\nrunning-iqr([-1, -2, -3, 1, 2, 3])'],seeAlso:["vector.iqr","vector.moving-iqr","vector.centered-moving-iqr"]},sum:{category:"vector",description:"Returns the sum of all elements in the vector.",returns:{type:"number"},args:{vector:{type:"vector",description:"The vector to sum."}},variants:[{argumentNames:["vector"]}],examples:["sum([1, 2, 3])","sum([1, 2, -3])"],seeAlso:["sum","vector.moving-sum","vector.centered-moving-sum","vector.running-sum","vector.prod","vector.cumsum","vector.mean"]},"moving-sum":{category:"vector",description:"Returns the **moving sum** of the `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving sum** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-sum } = import("vector");\nmoving-sum([1, 2, 3, 4, 5], 3)','let { moving-sum } = import("vector");\nmoving-sum([1, 2, 3, 4, 5], 5)'],seeAlso:["vector.sum","vector.centered-moving-sum","vector.running-sum"]},"centered-moving-sum":{category:"vector",description:"Returns the **centered moving sum** of the `vector` with a given window size.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving sum** of."},windowSize:{type:"integer",description:"The size of the centered moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-sum } = import("vector");\ncentered-moving-sum([1, 2, 3, 4, 5], 3)','let { centered-moving-sum } = import("vector");\ncentered-moving-sum([1, 2, 3, 4, 5], 3, 0, 0)','let { centered-moving-sum } = import("vector");\ncentered-moving-sum([1, 2, 3, 4, 5], 3, 10)'],seeAlso:["vector.sum","vector.moving-sum","vector.running-sum"]},"running-sum":{category:"vector",description:"Returns the **running sum** of the `vector`.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running sum** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-sum } = import("vector");\nrunning-sum([1, 2, 3])','let { running-sum } = import("vector");\nrunning-sum([1, -2, -3])'],seeAlso:["vector.sum","vector.moving-sum","vector.centered-moving-sum","vector.cumsum"]},prod:{category:"vector",description:"Returns the **product** of all elements in the `vector`.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **product** of."}},variants:[{argumentNames:["vector"]}],examples:["prod([1, 2, 3])","prod([1, 2, -3])"],seeAlso:["prod","vector.moving-prod","vector.centered-moving-prod","vector.running-prod","vector.sum","vector.cumprod"]},"moving-prod":{category:"vector",description:"Returns the **moving product** of the `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving product** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-prod } = import("vector");\nmoving-prod([1, 2, 3, 4, 5], 3)','let { moving-prod } = import("vector");\nmoving-prod([1, 2, 3, 4, 5], 5)'],seeAlso:["vector.prod","vector.centered-moving-prod","vector.running-prod"]},"centered-moving-prod":{category:"vector",description:"Returns the **centered moving product** of the `vector` with a given window size.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving product** of."},windowSize:{type:"integer",description:"The size of the moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-prod } = import("vector");\ncentered-moving-prod([1, 2, 3, 4, 5], 3)','let { centered-moving-prod } = import("vector");\ncentered-moving-prod([1, 2, 3, 4, 5], 3, 0, 0)'],seeAlso:["vector.prod","vector.moving-prod","vector.running-prod"]},"running-prod":{category:"vector",description:"Returns the **running product** of the `vector`.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running product** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-prod } = import("vector");\nrunning-prod([1, 2, 3, 4, 5])','let { running-prod } = import("vector");\nrunning-prod([1, -2, -3])'],seeAlso:["vector.prod","vector.moving-prod","vector.centered-moving-prod","vector.cumprod"]},span:{category:"vector",description:"Returns the difference between the maximum and minimum values in a vector.",returns:{type:"number"},args:{vector:{type:"vector",description:"The vector to calculate the span of."}},variants:[{argumentNames:["vector"]}],examples:['let { span } = import("vector");\nspan([1, 2, 3])','let { span } = import("vector");\nspan([1, 1, 2, 3, 3])','let { span } = import("vector");\nspan([1, 2, -3])'],seeAlso:["vector.moving-span","vector.centered-moving-span","vector.running-span","min","max"]},"moving-span":{category:"vector",description:"Calculates the **moving span** of a `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving span** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-span } = import("vector");\nmoving-span([1, 2, 4, 7, 11, 16], 4)','let { moving-span } = import("vector");\nmoving-span([1, 2, 4, 7, 11, 16], 5)','let { moving-span } = import("vector");\nmoving-span([1, 2, 4, 7, 11, 16], 6)'],seeAlso:["vector.span","vector.centered-moving-span","vector.running-span"]},"centered-moving-span":{category:"vector",description:"Calculates the **centered moving span** of a `vector` with a given window size. The result is padded with `leftPadding` on the left and right.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving span** of."},windowSize:{type:"integer",description:"The size of the moving window."},leftPadding:{type:"number",description:"The value to pad the result with on the left."},rightPadding:{type:"number",description:"The value to pad the result with on the right."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-span } = import("vector");\ncentered-moving-span([1, 2, 4, 7, 11, 16], 4)','let { centered-moving-span } = import("vector");\ncentered-moving-span([1, 2, 4, 7, 11, 16], 3, 0, 100)'],seeAlso:["vector.span","vector.moving-span","vector.running-span"]},"running-span":{category:"vector",description:"Calculates the **running span** of a `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running span** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-span } = import("vector");\nrunning-span([1, 2, 4])'],seeAlso:["vector.span","vector.moving-span","vector.centered-moving-span"]},skewness:{category:"vector",description:"Calculates the **skewness** of a `vector`. Returns the third standardized moment.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **skewness** of. Minimum length is 3."}},variants:[{argumentNames:["vector"]}],examples:['let { skewness } = import("vector");\nskewness([1, 2, 3, 6, 20])','let { skewness } = import("vector");\nskewness([1, 2, 2, 3])'],seeAlso:["vector.moving-skewness","vector.centered-moving-skewness","vector.running-skewness","vector.kurtosis","vector.sample-skewness","vector.excess-kurtosis"]},"moving-skewness":{category:"vector",description:"Calculates the **moving skewness** of a `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving skewness** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-skewness } = import("vector");\nmoving-skewness([1, 2, 4, 7, 11, 16], 4)','let { moving-skewness } = import("vector");\nmoving-skewness([1, 2, 4, 7, 11, 16], 5)'],seeAlso:["vector.skewness","vector.centered-moving-skewness","vector.running-skewness"]},"centered-moving-skewness":{category:"vector",description:"Calculates the **centered moving skewness** of a `vector` with a given window size and padding.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving skewness** of."},windowSize:{type:"integer",description:"The size of the moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-skewness } = import("vector");\ncentered-moving-skewness([1, 2, 4, 7, 11, 16], 4)','let { centered-moving-skewness } = import("vector");\ncentered-moving-skewness([1, 2, 4, 7, 11, 16], 4, 0, 0)'],seeAlso:["vector.skewness","vector.moving-skewness","vector.running-skewness"]},"running-skewness":{category:"vector",description:"Calculates the **running skewness** of a `vector` with a given window size. First two element in result is `null` since **running skewness** is not defined for less than three elements.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running skewness** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-skewness } = import("vector");\nrunning-skewness([1, 2, 4, 7, 11])'],seeAlso:["vector.skewness","vector.moving-skewness","vector.centered-moving-skewness"]},"sample-skewness":{category:"vector",description:"Calculates the **sample skewness** of a `vector`. Returns the third standardized moment.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **sample skewness** of. Minimum length is 3."}},variants:[{argumentNames:["vector"]}],examples:['let { sample-skewness } = import("vector");\nsample-skewness([1, 2, 3, 6, 20])','let { sample-skewness } = import("vector");\nsample-skewness([1, 2, 2, 3])'],seeAlso:["vector.moving-sample-skewness","vector.centered-moving-sample-skewness","vector.running-sample-skewness","vector.skewness","vector.sample-kurtosis"]},"moving-sample-skewness":{category:"vector",description:"Calculates the **moving sample skewness** of a `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving sample skewness** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-sample-skewness } = import("vector");\nmoving-sample-skewness([1, 2, 4, 7, 11, 16], 4)','let { moving-sample-skewness } = import("vector");\nmoving-sample-skewness([1, 2, 4, 7, 11, 16], 5)'],seeAlso:["vector.sample-skewness","vector.centered-moving-sample-skewness","vector.running-sample-skewness"]},"centered-moving-sample-skewness":{category:"vector",description:"Calculates the **centered moving sample skewness** of a `vector` with a given window size and padding.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving sample skewness** of."},windowSize:{type:"integer",description:"The size of the moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-sample-skewness } = import("vector");\ncentered-moving-sample-skewness([1, 2, 4, 7, 11, 16], 4)','let { centered-moving-sample-skewness } = import("vector");\ncentered-moving-sample-skewness([1, 2, 4, 7, 11, 16], 3, 0, 100)'],seeAlso:["vector.sample-skewness","vector.moving-sample-skewness","vector.running-sample-skewness"]},"running-sample-skewness":{category:"vector",description:"Calculates the **running sample skewness** of a `vector` with a given window size. First two element in result is `null` since **running sample skewness** is not defined for less than three elements.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running sample skewness** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-sample-skewness } = import("vector");\nrunning-sample-skewness([1, 2, 4, 7, 11])'],seeAlso:["vector.sample-skewness","vector.moving-sample-skewness","vector.centered-moving-sample-skewness"]},"excess-kurtosis":{category:"vector",description:"Calculates the **excess kurtosis** of a `vector`. Returns the third standardized moment.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **excess kurtosis** of. Minimum length is 3."}},variants:[{argumentNames:["vector"]}],examples:['let { excess-kurtosis } = import("vector");\nexcess-kurtosis([1, 2, 3, 6, 20])','let { excess-kurtosis } = import("vector");\nexcess-kurtosis([1, 2, 2, 3])'],seeAlso:["vector.moving-excess-kurtosis","vector.centered-moving-excess-kurtosis","vector.running-excess-kurtosis","vector.kurtosis","vector.sample-excess-kurtosis","vector.skewness"]},"moving-excess-kurtosis":{category:"vector",description:"Calculates the **moving excess kurtosis** of a `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving excess kurtosis** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-excess-kurtosis } = import("vector");\nmoving-excess-kurtosis([1, 2, 4, 7, 11, 16], 4)','let { moving-excess-kurtosis } = import("vector");\nmoving-excess-kurtosis([1, 2, 4, 7, 11, 16], 5)'],seeAlso:["vector.excess-kurtosis","vector.centered-moving-excess-kurtosis","vector.running-excess-kurtosis"]},"centered-moving-excess-kurtosis":{category:"vector",description:"Calculates the **centered moving excess kurtosis** of a `vector` with a given window size and padding.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving excess kurtosis** of."},windowSize:{type:"integer",description:"The size of the moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-excess-kurtosis } = import("vector");\ncentered-moving-excess-kurtosis([1, 2, 4, 7, 11, 16], 4)','let { centered-moving-excess-kurtosis } = import("vector");\ncentered-moving-excess-kurtosis([1, 2, 4, 7, 11, 16], 4, 0, 0)'],seeAlso:["vector.excess-kurtosis","vector.moving-excess-kurtosis","vector.running-excess-kurtosis"]},"running-excess-kurtosis":{category:"vector",description:"Calculates the **running excess kurtosis** of a `vector` with a given window size. First two element in result is `null` since **running excess kurtosis** is not defined for less than three elements.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running excess kurtosis** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-excess-kurtosis } = import("vector");\nrunning-excess-kurtosis([1, 2, 4, 7, 11])'],seeAlso:["vector.excess-kurtosis","vector.moving-excess-kurtosis","vector.centered-moving-excess-kurtosis"]},kurtosis:{category:"vector",description:"Calculates the **kurtosis** of a `vector`. Returns the third standardized moment.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **kurtosis** of. Minimum length is 3."}},variants:[{argumentNames:["vector"]}],examples:['let { kurtosis } = import("vector");\nkurtosis([1, 2, 3, 6, 20])','let { kurtosis } = import("vector");\nkurtosis([1, 2, 2, 3])'],seeAlso:["vector.moving-kurtosis","vector.centered-moving-kurtosis","vector.running-kurtosis","vector.excess-kurtosis","vector.sample-kurtosis","vector.skewness"]},"moving-kurtosis":{category:"vector",description:"Calculates the **moving kurtosis** of a `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving kurtosis** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-kurtosis } = import("vector");\nmoving-kurtosis([1, 2, 4, 7, 11, 16], 4)','let { moving-kurtosis } = import("vector");\nmoving-kurtosis([1, 2, 4, 7, 11, 16], 5)'],seeAlso:["vector.kurtosis","vector.centered-moving-kurtosis","vector.running-kurtosis"]},"centered-moving-kurtosis":{category:"vector",description:"Calculates the **centered moving kurtosis** of a `vector` with a given window size and padding.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving kurtosis** of."},windowSize:{type:"integer",description:"The size of the moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-kurtosis } = import("vector");\ncentered-moving-kurtosis([1, 2, 4, 7, 11, 16], 4)','let { centered-moving-kurtosis } = import("vector");\ncentered-moving-kurtosis([1, 2, 4, 7, 11, 16], 4, 0, 0)'],seeAlso:["vector.kurtosis","vector.moving-kurtosis","vector.running-kurtosis"]},"running-kurtosis":{category:"vector",description:"Calculates the **running kurtosis** of a `vector` with a given window size. First two element in result is `null` since **running kurtosis** is not defined for less than three elements.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running kurtosis** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-kurtosis } = import("vector");\nrunning-kurtosis([1, 2, 4, 7, 11])'],seeAlso:["vector.kurtosis","vector.moving-kurtosis","vector.centered-moving-kurtosis"]},"sample-excess-kurtosis":{category:"vector",description:"Calculates the **sample excess kurtosis** of a `vector`. Returns the third standardized moment.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **sample excess kurtosis** of. Minimum length is 3."}},variants:[{argumentNames:["vector"]}],examples:['let { sample-excess-kurtosis } = import("vector");\nsample-excess-kurtosis([1, 2, 3, 6, 20])','let { sample-excess-kurtosis } = import("vector");\nsample-excess-kurtosis([1, 2, 2, 3])'],seeAlso:["vector.moving-sample-excess-kurtosis","vector.centered-moving-sample-excess-kurtosis","vector.running-sample-excess-kurtosis","vector.sample-kurtosis","vector.excess-kurtosis"]},"moving-sample-excess-kurtosis":{category:"vector",description:"Calculates the **moving sample excess kurtosis** of a `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving sample excess kurtosis** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-sample-excess-kurtosis } = import("vector");\nmoving-sample-excess-kurtosis([1, 2, 4, 7, 11, 16], 4)','let { moving-sample-excess-kurtosis } = import("vector");\nmoving-sample-excess-kurtosis([1, 2, 4, 7, 11, 16], 5)'],seeAlso:["vector.sample-excess-kurtosis","vector.centered-moving-sample-excess-kurtosis","vector.running-sample-excess-kurtosis"]},"centered-moving-sample-excess-kurtosis":{category:"vector",description:"Calculates the **centered moving sample excess kurtosis** of a `vector` with a given window size and padding.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving sample excess kurtosis** of."},windowSize:{type:"integer",description:"The size of the moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-sample-excess-kurtosis } = import("vector");\ncentered-moving-sample-excess-kurtosis([1, 2, 4, 7, 11, 16], 4)','let { centered-moving-sample-excess-kurtosis } = import("vector");\ncentered-moving-sample-excess-kurtosis([1, 2, 4, 7, 11, 16], 4, 0, 100)'],seeAlso:["vector.sample-excess-kurtosis","vector.moving-sample-excess-kurtosis","vector.running-sample-excess-kurtosis"]},"running-sample-excess-kurtosis":{category:"vector",description:"Calculates the **running sample excess kurtosis** of a `vector` with a given window size. First two element in result is `null` since **running sample excess kurtosis** is not defined for less than three elements.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running sample excess kurtosis** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-sample-excess-kurtosis } = import("vector");\nrunning-sample-excess-kurtosis([1, 2, 4, 7, 11])'],seeAlso:["vector.sample-excess-kurtosis","vector.moving-sample-excess-kurtosis","vector.centered-moving-sample-excess-kurtosis"]},"sample-kurtosis":{category:"vector",description:"Calculates the **sample kurtosis** of a `vector`. Returns the third standardized moment.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **sample kurtosis** of. Minimum length is 3."}},variants:[{argumentNames:["vector"]}],examples:['let { sample-kurtosis } = import("vector");\nsample-kurtosis([1, 2, 3, 6, 20])','let { sample-kurtosis } = import("vector");\nsample-kurtosis([1, 2, 2, 3])'],seeAlso:["vector.moving-sample-kurtosis","vector.centered-moving-sample-kurtosis","vector.running-sample-kurtosis","vector.sample-excess-kurtosis","vector.kurtosis","vector.sample-skewness"]},"moving-sample-kurtosis":{category:"vector",description:"Calculates the **moving sample kurtosis** of a `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving sample kurtosis** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-sample-kurtosis } = import("vector");\nmoving-sample-kurtosis([1, 2, 4, 7, 11, 16], 4)','let { moving-sample-kurtosis } = import("vector");\nmoving-sample-kurtosis([1, 2, 4, 7, 11, 16], 5)'],seeAlso:["vector.sample-kurtosis","vector.centered-moving-sample-kurtosis","vector.running-sample-kurtosis"]},"centered-moving-sample-kurtosis":{category:"vector",description:"Calculates the **centered moving sample kurtosis** of a `vector` with a given window size and padding.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving sample kurtosis** of."},windowSize:{type:"integer",description:"The size of the moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-sample-kurtosis } = import("vector");\ncentered-moving-sample-kurtosis([1, 2, 4, 7, 11, 16], 4)','let { centered-moving-sample-kurtosis } = import("vector");\ncentered-moving-sample-kurtosis([1, 2, 4, 7, 11, 16], 4, 0, 100)'],seeAlso:["vector.sample-kurtosis","vector.moving-sample-kurtosis","vector.running-sample-kurtosis"]},"running-sample-kurtosis":{category:"vector",description:"Calculates the **running sample kurtosis** of a `vector` with a given window size. First two element in result is `null` since **running sample kurtosis** is not defined for less than three elements.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running sample kurtosis** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-sample-kurtosis } = import("vector");\nrunning-sample-kurtosis([1, 2, 4, 7, 11])'],seeAlso:["vector.sample-kurtosis","vector.moving-sample-kurtosis","vector.centered-moving-sample-kurtosis"]},rms:{category:"vector",description:"Calculates the **root mean square** of a `vector`. Returns the square root of the average of the squares of the elements.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **root mean square** of. Minimum length is 1."}},variants:[{argumentNames:["vector"]}],examples:['let { rms } = import("vector");\nrms([1, 2, 3, 4])','let { rms } = import("vector");\nrms([5, 4, 3, 2, 1])','let { rms } = import("vector");\nrms(range(1, 1000))','let { rms, generate } = import("vector");\nrms(generate(1000, -> 1e6 / ($ + 1) ^ 2))','let { rms, generate } = import("vector");\nlet { ln } = import("math");\nrms(generate(1000, -> ln($ + 1)))'],seeAlso:["vector.moving-rms","vector.centered-moving-rms","vector.running-rms","vector.mean","vector.stdev"]},"moving-rms":{category:"vector",description:"Calculates the **moving root mean square** of a `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving root mean square** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-rms } = import("vector");\nmoving-rms([1, 2, 4, 7, 11, 16], 4)','let { moving-rms } = import("vector");\nmoving-rms([1, 2, 4, 7, 11, 16], 5)','let { moving-rms } = import("vector");\nmoving-rms([1, 2, 4, 7, 11, 16], 6)'],seeAlso:["vector.rms","vector.centered-moving-rms","vector.running-rms"]},"centered-moving-rms":{category:"vector",description:"Calculates the **centered moving root mean square** of a `vector` with a given window size and padding value.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving root mean square** of."},windowSize:{type:"integer",description:"The size of the moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-rms } = import("vector");\ncentered-moving-rms([1, 2, 4, 7, 11, 16], 4)','let { centered-moving-rms } = import("vector");\ncentered-moving-rms([1, 2, 4, 7, 11, 16], 5, 0)','let { centered-moving-rms } = import("vector");\ncentered-moving-rms([1, 2, 4, 7, 11, 16], 6, 0, 0)'],seeAlso:["vector.rms","vector.moving-rms","vector.running-rms"]},"running-rms":{category:"vector",description:"Calculates the **running root mean square** of a `vector`.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running root mean square** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-rms } = import("vector");\nrunning-rms([1, 2, 3, 4, 5, 6])','let { running-rms } = import("vector");\nrunning-rms([1, -3, 2])','let { running-rms } = import("vector");\nrunning-rms([-1, -2, -3])','let { running-rms } = import("vector");\nrunning-rms([0])'],seeAlso:["vector.rms","vector.moving-rms","vector.centered-moving-rms"]},mad:{category:"vector",description:"Returns the **mean absolute deviation** of all elements in the `vector`.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **mean absolute deviation** of."}},variants:[{argumentNames:["vector"]}],examples:['let { mad } = import("vector");\nmad([1, 2, 3])','let { mad } = import("vector");\nmad([1, 2, -3])'],seeAlso:["vector.moving-mad","vector.centered-moving-mad","vector.running-mad","vector.medad","vector.stdev","vector.variance","vector.iqr"]},"moving-mad":{category:"vector",description:"Returns the **moving mean absolute deviation** of the `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving mean absolute deviation** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-mad } = import("vector");\nmoving-mad([1, 2, 3, 4, 5], 3)','let { moving-mad } = import("vector");\nmoving-mad([1, 2, 3, 4, 5], 5)'],seeAlso:["vector.mad","vector.centered-moving-mad","vector.running-mad"]},"centered-moving-mad":{category:"vector",description:"Returns the **centered moving mean absolute deviation** of the `vector` with a given window size.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving mean absolute deviation** of."},windowSize:{type:"integer",description:"The size of the moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-mad } = import("vector");\ncentered-moving-mad([1, 2, 3, 4, 5], 3)','let { centered-moving-mad } = import("vector");\ncentered-moving-mad([1, 2, 3, 4, 5], 5)'],seeAlso:["vector.mad","vector.moving-mad","vector.running-mad"]},"running-mad":{category:"vector",description:"Returns the **running mean absolute deviation** of the `vector`.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running mean absolute deviation** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-mad } = import("vector");\nrunning-mad([1, 2, 3])','let { running-mad } = import("vector");\nrunning-mad([1, 2, -3])'],seeAlso:["vector.mad","vector.moving-mad","vector.centered-moving-mad"]},medad:{category:"vector",description:"Returns the **median absolute deviation** of all elements in the `vector`.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **median absolute deviation** of."}},variants:[{argumentNames:["vector"]}],examples:['let { medad } = import("vector");\nmedad([1, 2, 3])','let { medad } = import("vector");\nmedad([1, 2, -3])'],seeAlso:["vector.moving-medad","vector.centered-moving-medad","vector.running-medad","vector.mad","vector.median","vector.iqr"]},"moving-medad":{category:"vector",description:"Returns the **moving median absolute deviation** of the `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving median absolute deviation** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-medad } = import("vector");\nmoving-medad([1, 2, 3, 4, 5], 3)','let { moving-medad } = import("vector");\nmoving-medad([1, 2, 3, 4, 5], 5)'],seeAlso:["vector.medad","vector.centered-moving-medad","vector.running-medad"]},"centered-moving-medad":{category:"vector",description:"Returns the **centered moving median absolute deviation** of the `vector` with a given window size.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving median absolute deviation** of."},windowSize:{type:"integer",description:"The size of the moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-medad } = import("vector");\ncentered-moving-medad([1, 2, 3, 4, 5], 3)','let { centered-moving-medad } = import("vector");\ncentered-moving-medad([1, 2, 3, 4, 5], 5)'],seeAlso:["vector.medad","vector.moving-medad","vector.running-medad"]},"running-medad":{category:"vector",description:"Returns the **running median absolute deviation** of the `vector`.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running median absolute deviation** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-medad } = import("vector");\nrunning-medad([1, 2, 3])','let { running-medad } = import("vector");\nrunning-medad([1, 2, -3])'],seeAlso:["vector.medad","vector.moving-medad","vector.centered-moving-medad"]},"gini-coefficient":{category:"vector",description:"Returns the **gini coefficient** of all elements in the `vector`.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **gini coefficient** of."}},variants:[{argumentNames:["vector"]}],examples:['let { gini-coefficient } = import("vector");\ngini-coefficient([1, 2, 3])','let { gini-coefficient } = import("vector");\ngini-coefficient([1, 1, 3])'],seeAlso:["vector.moving-gini-coefficient","vector.centered-moving-gini-coefficient","vector.running-gini-coefficient","vector.entropy"]},"moving-gini-coefficient":{category:"vector",description:"Returns the **moving gini coefficient** of the `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving gini coefficient** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-gini-coefficient } = import("vector");\nmoving-gini-coefficient([1, 2, 3], 2)','let { moving-gini-coefficient } = import("vector");\nmoving-gini-coefficient([1, 1, 3], 2)'],seeAlso:["vector.gini-coefficient","vector.centered-moving-gini-coefficient","vector.running-gini-coefficient"]},"centered-moving-gini-coefficient":{category:"vector",description:"Returns the **centered moving gini coefficient** of the `vector` with a given window size.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving gini coefficient** of."},windowSize:{type:"integer",description:"The size of the moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-gini-coefficient } = import("vector");\ncentered-moving-gini-coefficient([1, 2, 3], 2)','let { centered-moving-gini-coefficient } = import("vector");\ncentered-moving-gini-coefficient([1, 1, 3], 2)'],seeAlso:["vector.gini-coefficient","vector.moving-gini-coefficient","vector.running-gini-coefficient"]},"running-gini-coefficient":{category:"vector",description:"Returns the **running gini coefficient** of the `vector`.",returns:{type:"array"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running gini coefficient** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-gini-coefficient } = import("vector");\nrunning-gini-coefficient([1, 2, 3])','let { running-gini-coefficient } = import("vector");\nrunning-gini-coefficient([1, 1, 3])'],seeAlso:["vector.gini-coefficient","vector.moving-gini-coefficient","vector.centered-moving-gini-coefficient"]},entropy:{category:"vector",description:"Calculates the **entropy** of a `vector`. The entropy is a measure of the uncertainty associated with a random variable.",returns:{type:"number"},args:{vector:{type:"vector",description:"The `vector` to calculate the **entropy** of. Minimum length is 1."}},variants:[{argumentNames:["vector"]}],examples:['let { entropy } = import("vector");\nentropy([1, 1, 2, 3, 3, 3])','let { entropy } = import("vector");\nentropy([1, 2, 3])','let { entropy } = import("vector");\nentropy([1, 2, 2, 3])','let { entropy } = import("vector");\nentropy([0])','let { entropy } = import("vector");\nentropy([1])','let { entropy } = import("vector");\nentropy([1, 2])'],seeAlso:["vector.moving-entropy","vector.centered-moving-entropy","vector.running-entropy","vector.gini-coefficient"]},"moving-entropy":{category:"vector",description:"Calculates the **moving entropy** of a `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **moving entropy** of."},windowSize:{type:"integer",description:"The size of the moving window."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]}],examples:['let { moving-entropy } = import("vector");\nmoving-entropy([1, 1, 2, 3, 3, 3], 4)','let { moving-entropy } = import("vector");\nmoving-entropy([1, 1, 2, 3, 3, 3], 3)','let { moving-entropy } = import("vector");\nmoving-entropy([1, 2], 2)'],seeAlso:["vector.entropy","vector.centered-moving-entropy","vector.running-entropy"]},"centered-moving-entropy":{category:"vector",description:"Calculates the **centered moving entropy** of a `vector` with a given window size.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **centered moving entropy** of."},windowSize:{type:"integer",description:"The size of the moving window."},leftPadding:{type:"number",description:"Optional value to use for padding. Default is `null`."},rightPadding:{type:"number",description:"Optional value to use for right padding. Default is `null`."},a:{type:"vector"},b:{type:"integer"}},variants:[{argumentNames:["vector","windowSize"]},{argumentNames:["vector","windowSize","leftPadding"]},{argumentNames:["vector","windowSize","leftPadding","rightPadding"]}],examples:['let { centered-moving-entropy } = import("vector");\ncentered-moving-entropy([1, 1, 2, 3, 3, 3], 4)','let { centered-moving-entropy } = import("vector");\ncentered-moving-entropy([1, 1, 2, 3, 3, 3], 3)','let { centered-moving-entropy } = import("vector");\ncentered-moving-entropy([1, 2], 2)'],seeAlso:["vector.entropy","vector.moving-entropy","vector.running-entropy"]},"running-entropy":{category:"vector",description:"Calculates the **running entropy** of a `vector`.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The `vector` to calculate the **running entropy** of."}},variants:[{argumentNames:["vector"]}],examples:['let { running-entropy } = import("vector");\nrunning-entropy([1, 1, 2, 3, 3, 3])','let { running-entropy } = import("vector");\nrunning-entropy([1, 2])'],seeAlso:["vector.entropy","vector.moving-entropy","vector.centered-moving-entropy"]},"monotonic?":{category:"vector",description:"Checks if a vector is monotonic.",returns:{type:"boolean"},args:{vector:{type:"vector",description:"The vector to check."}},variants:[{argumentNames:["vector"]}],examples:['let { monotonic? } = import("vector");\nmonotonic?([1, 2, 3])','let { monotonic? } = import("vector");\nmonotonic?([1, 2, 2, 3])','let { monotonic? } = import("vector");\nmonotonic?([3, 2, 1])','let { monotonic? } = import("vector");\nmonotonic?([3, 2, 1, 1])','let { monotonic? } = import("vector");\nmonotonic?([3, 2, 1, 2])','let { monotonic? } = import("vector");\nmonotonic?([1])','let { monotonic? } = import("vector");\nmonotonic?([])'],seeAlso:["vector.strictly-monotonic?","vector.increasing?","vector.decreasing?"]},"strictly-monotonic?":{category:"vector",description:"Checks if a vector is strictly monotonic.",returns:{type:"boolean"},args:{vector:{type:"vector",description:"The vector to check."}},variants:[{argumentNames:["vector"]}],examples:['let { strictly-monotonic? } = import("vector");\nstrictly-monotonic?([1, 2, 3])','let { strictly-monotonic? } = import("vector");\nstrictly-monotonic?([1, 2, 2, 3])','let { strictly-monotonic? } = import("vector");\nstrictly-monotonic?([3, 2, 1])','let { strictly-monotonic? } = import("vector");\nstrictly-monotonic?([3, 2, 1, 1])','let { strictly-monotonic? } = import("vector");\nstrictly-monotonic?([3, 2, 1, 2])','let { strictly-monotonic? } = import("vector");\nstrictly-monotonic?([1])','let { strictly-monotonic? } = import("vector");\nstrictly-monotonic?([])'],seeAlso:["vector.monotonic?","vector.strictly-increasing?","vector.strictly-decreasing?"]},"increasing?":{category:"vector",description:"Checks if a vector is increasing.",returns:{type:"boolean"},args:{vector:{type:"vector",description:"The vector to check."}},variants:[{argumentNames:["vector"]}],examples:['let { increasing? } = import("vector");\nincreasing?([1, 2, 3])','let { increasing? } = import("vector");\nincreasing?([1, 2, 2, 3])','let { increasing? } = import("vector");\nincreasing?([3, 2, 1])','let { increasing? } = import("vector");\nincreasing?([3, 2, 1, 1])','let { increasing? } = import("vector");\nincreasing?([3, 2, 1, 2])','let { increasing? } = import("vector");\nincreasing?([1])','let { increasing? } = import("vector");\nincreasing?([])'],seeAlso:["vector.strictly-increasing?","vector.decreasing?","vector.strictly-decreasing?","vector.monotonic?"]},"decreasing?":{category:"vector",description:"Checks if a vector is decreasing.",returns:{type:"boolean"},args:{vector:{type:"vector",description:"The vector to check."}},variants:[{argumentNames:["vector"]}],examples:['let { decreasing? } = import("vector");\ndecreasing?([1, 2, 3])','let { decreasing? } = import("vector");\ndecreasing?([1, 2, 2, 3])','let { decreasing? } = import("vector");\ndecreasing?([3, 2, 1])','let { decreasing? } = import("vector");\ndecreasing?([3, 2, 1, 1])','let { decreasing? } = import("vector");\ndecreasing?([3, 2, 1, 2])','let { decreasing? } = import("vector");\ndecreasing?([1])','let { decreasing? } = import("vector");\ndecreasing?([])'],seeAlso:["vector.strictly-decreasing?","vector.increasing?","vector.strictly-increasing?","vector.monotonic?"]},"strictly-increasing?":{category:"vector",description:"Checks if a vector is strictly increasing.",returns:{type:"boolean"},args:{vector:{type:"vector",description:"The vector to check."}},variants:[{argumentNames:["vector"]}],examples:['let { strictly-increasing? } = import("vector");\nstrictly-increasing?([1, 2, 3])','let { strictly-increasing? } = import("vector");\nstrictly-increasing?([1, 2, 2, 3])','let { strictly-increasing? } = import("vector");\nstrictly-increasing?([3, 2, 1])','let { strictly-increasing? } = import("vector");\nstrictly-increasing?([3, 2, 1, 1])','let { strictly-increasing? } = import("vector");\nstrictly-increasing?([3, 2, 1, 2])','let { strictly-increasing? } = import("vector");\nstrictly-increasing?([1])','let { strictly-increasing? } = import("vector");\nstrictly-increasing?([])'],seeAlso:["vector.increasing?","vector.decreasing?","vector.strictly-decreasing?","vector.strictly-monotonic?"]},"strictly-decreasing?":{category:"vector",description:"Checks if a vector is strictly decreasing.",returns:{type:"boolean"},args:{vector:{type:"vector",description:"The vector to check."}},variants:[{argumentNames:["vector"]}],examples:['let { strictly-decreasing? } = import("vector");\nstrictly-decreasing?([1, 2, 3])','let { strictly-decreasing? } = import("vector");\nstrictly-decreasing?([1, 2, 2, 3])','let { strictly-decreasing? } = import("vector");\nstrictly-decreasing?([3, 2, 1])','let { strictly-decreasing? } = import("vector");\nstrictly-decreasing?([3, 2, 1, 1])','let { strictly-decreasing? } = import("vector");\nstrictly-decreasing?([3, 2, 1, 2])','let { strictly-decreasing? } = import("vector");\nstrictly-decreasing?([1])','let { strictly-decreasing? } = import("vector");\nstrictly-decreasing?([])'],seeAlso:["vector.increasing?","vector.strictly-increasing?","vector.decreasing?","vector.strictly-monotonic?"]},mode:{category:"vector",description:"Returns the mode of all elements in the vector.",returns:{type:"number"},args:{vector:{type:"vector",description:"The vector to calculate the mode of."}},variants:[{argumentNames:["vector"]}],examples:['let { mode } = import("vector");\nmode([1, 2, 3])','let { mode } = import("vector");\nmode([1, 2, -3, 1])','let { mode } = import("vector");\nmode([2, 2, 3, 3, 4])','let { mode } = import("vector");\nmode([2, 2, 3, 3])','let { mode } = import("vector");\nmode([1, 2, 3, 2, 1, 2])'],seeAlso:["vector.mean","vector.median"]},"min-index":{category:"vector",description:"Returns the index of the minimum value of all elements in the vector.",returns:{type:"integer"},args:{vector:{type:"vector",description:"Non emtpy vector to calculate the minimum index of."}},variants:[{argumentNames:["vector"]}],examples:['let { min-index } = import("vector");\nmin-index([1, 2, 3])','let { min-index } = import("vector");\nmin-index([1, 1, 2, 3, 3])','let { min-index } = import("vector");\nmin-index([1, 2, -3])','let { min-index } = import("vector");\nmin-index([1, 2, 3, 4])','let { min-index } = import("vector");\nmin-index([1, 2, -3, 4])'],seeAlso:["vector.max-index","min"]},"max-index":{category:"vector",description:"Returns the index of the maximum value of all elements in the vector.",returns:{type:"integer"},args:{vector:{type:"vector",description:"Non emtpy vector to calculate the maximum index of."}},variants:[{argumentNames:["vector"]}],examples:['let { max-index } = import("vector");\nmax-index([1, 2, 3])','let { max-index } = import("vector");\nmax-index([1, 1, 2, 3, 3])','let { max-index } = import("vector");\nmax-index([1, 2, -3])','let { max-index } = import("vector");\nmax-index([1, 2, 3, 4])','let { max-index } = import("vector");\nmax-index([1, 2, -3, 4])'],seeAlso:["vector.min-index","max"]},"sort-indices":{category:"vector",description:"Returns the indices of the elements in the vector sorted in ascending order.",returns:{type:"vector"},args:{vector:{type:"vector",description:"Non emtpy vector to calculate the sorted indices of."}},variants:[{argumentNames:["vector"]}],examples:['let { sort-indices } = import("vector");\nsort-indices([1, 2, 3])','let { sort-indices } = import("vector");\nsort-indices([1, 1, 2, 3, 3])','let { sort-indices } = import("vector");\nsort-indices([1, 2, -3])','let { sort-indices } = import("vector");\nsort-indices([1, 2, 3, 4])','let { sort-indices } = import("vector");\nsort-indices([1, 2, -3, 4])'],seeAlso:["sort"]},"count-values":{category:"vector",description:"Counts the number of occurrences of each value in the vector.",returns:{type:"number",array:!0},args:{vector:{type:"vector",description:"Vector to count the values of."}},variants:[{argumentNames:["vector"]}],examples:['let { count-values } = import("vector");\ncount-values([1, 2, 3])','let { count-values } = import("vector");\ncount-values([1, 1, 2, 3, 3])','let { count-values } = import("vector");\ncount-values([1, 2, -3])','let { count-values } = import("vector");\ncount-values([1, 2, 2, 1, 3, 2, 4, 2, 1, 2, 2, 1, 3, 2, 4])'],seeAlso:["sequence.frequencies","vector.bincount"]},linspace:{category:"vector",description:"Generates a vector of evenly spaced numbers between two values.",returns:{type:"number",array:!0},args:{start:{type:"number",description:"The starting value."},stop:{type:"number",description:"The ending value."},n:{type:"integer",description:"The number of values to generate."}},variants:[{argumentNames:["start","stop","n"]}],examples:['let { linspace } = import("vector");\nlinspace(0, 10, 6)','let { linspace } = import("vector");\nlinspace(10, 20, 25)'],seeAlso:["range","vector.ones","vector.zeros","vector.fill","vector.generate"]},ones:{category:"vector",description:"Generates a vector of ones.",returns:{type:"number",array:!0},args:{length:{type:"integer",description:"The length of the vector."}},variants:[{argumentNames:["length"]}],examples:['let { ones } = import("vector");\nones(5)','let { ones } = import("vector");\nones(10)','let { ones } = import("vector");\nones(0)'],seeAlso:["repeat","vector.zeros","vector.fill","vector.generate","vector.linspace"]},zeros:{category:"vector",description:"Generates a vector of zeros.",returns:{type:"number",array:!0},args:{length:{type:"integer",description:"The length of the vector."}},variants:[{argumentNames:["length"]}],examples:['let { zeros } = import("vector");\nzeros(5)','let { zeros } = import("vector");\nzeros(10)','let { zeros } = import("vector");\nzeros(0)'],seeAlso:["repeat","vector.ones","vector.fill","vector.generate","vector.linspace"]},fill:{category:"vector",description:"Generates a vector filled with a number.",returns:{type:"number",array:!0},args:{length:{type:"integer",description:"The length of the vector."},value:{type:"number",description:"The value to fill the vector with."},a:{type:"number"},b:{type:"integer"}},variants:[{argumentNames:["length","value"]}],examples:['let { fill } = import("vector");\nfill(5, PI)','let { fill } = import("vector");\nfill(10, -1)'],seeAlso:["repeat","vector.ones","vector.zeros","vector.generate","vector.linspace","grid.fill"]},generate:{category:"vector",description:"Generates a vector of numbers based on a function.",returns:{type:"number",array:!0},args:{length:{type:"integer",description:"The length of the vector."},func:{type:"function",description:"A function that takes an index and returns a number."},a:{type:"number"},b:{type:"integer"}},variants:[{argumentNames:["length","func"]}],examples:['let { generate } = import("vector");\ngenerate(5, -> $ * 2)','let { generate } = import("vector");\ngenerate(10, -> $ + 1)','let { generate } = import("vector");\ngenerate(0, -> $ + 1)'],seeAlso:["repeat","vector.ones","vector.zeros","vector.fill","vector.linspace","grid.generate"]},cumsum:{category:"vector",description:"Calculates the cumulative sum of a vector.",returns:{type:"number",array:!0},args:{vector:{type:"vector",description:"The vector to calculate the cumulative sum of."}},variants:[{argumentNames:["vector"]}],examples:['let { cumsum } = import("vector");\ncumsum([1, 2, 3])','let { cumsum } = import("vector");\ncumsum([1, 2, -3])','let { cumsum } = import("vector");\ncumsum([])'],seeAlso:["vector.cumprod","vector.sum","vector.running-sum"]},cumprod:{category:"vector",description:"Calculates the cumulative product of a vector.",returns:{type:"number",array:!0},args:{vector:{type:"vector",description:"The vector to calculate the cumulative product of."}},variants:[{argumentNames:["vector"]}],examples:['let { cumprod } = import("vector");\ncumprod([1, 2, 3])','let { cumprod } = import("vector");\ncumprod([1, 2, -3, 0, 10])','let { cumprod } = import("vector");\ncumprod([])'],seeAlso:["vector.cumsum","vector.prod","vector.running-prod"]},quartiles:{category:"vector",description:"Calculates the quartiles of a vector. Returns an array containing the first, second (median), and third quartiles.",returns:{type:"number",array:!0},args:{vector:{type:"vector",description:"The vector to calculate the quartiles of. Minimum length is 4."}},variants:[{argumentNames:["vector"]}],examples:['let { quartiles } = import("vector");\nquartiles([1, 2, 3, 4])','let { quartiles } = import("vector");\nquartiles([5, 4, 3, 2, 1, 2, 3, 4, 5])','let { quartiles } = import("vector");\nquartiles(range(1, 1000))','let { quartiles, generate } = import("vector");\nquartiles(generate(1000, -> 1e6 / ($ + 1) ^ 2))','let { quartiles, generate } = import("vector");\nlet { ln } = import("math");\nquartiles(generate(1000, -> ln($ + 1)))'],seeAlso:["vector.percentile","vector.quantile","vector.median","vector.iqr"]},percentile:{category:"vector",description:"Calculates the percentile of a vector. Returns the value at the specified percentile.",returns:{type:"number"},args:{vector:{type:"vector",description:"The non empty vector to calculate the percentile of."},percentile:{type:"number",description:"The percentile to calculate. Must be between 0 and 1."},a:{type:"number"},b:{type:"integer"}},variants:[{argumentNames:["vector","percentile"]}],examples:['let { percentile } = import("vector");\npercentile([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 35)','let { percentile } = import("vector");\npercentile(range(100) ^ 0.5, 0)','let { percentile } = import("vector");\npercentile(range(100) ^ 0.5, 10)','let { percentile } = import("vector");\npercentile(range(100) ^ 0.5, 20)','let { percentile } = import("vector");\npercentile(range(100) ^ 0.5, 30)','let { percentile } = import("vector");\npercentile(range(100) ^ 0.5, 40)','let { percentile } = import("vector");\npercentile(range(100) ^ 0.5, 50)','let { percentile } = import("vector");\npercentile(range(100) ^ 0.5, 60)','let { percentile } = import("vector");\npercentile(range(100) ^ 0.5, 70)','let { percentile } = import("vector");\npercentile(range(100) ^ 0.5, 80)','let { percentile } = import("vector");\npercentile(range(100) ^ 0.5, 90)','let { percentile } = import("vector");\npercentile(range(100) ^ 0.5, 100)'],seeAlso:["vector.quantile","vector.quartiles","vector.median","vector.ecdf","vector.winsorize"]},quantile:{category:"vector",description:"Calculates the quantile of a vector. Returns the value at the specified quantile.",returns:{type:"number"},args:{vector:{type:"vector",description:"The non empty vector to calculate the quantile of."},quantile:{type:"number",description:"The quantile to calculate. Must be between 0 and 1."},a:{type:"number"},b:{type:"integer"}},variants:[{argumentNames:["vector","quantile"]}],examples:['let { quantile } = import("vector");\nquantile([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 0.35)','let { quantile } = import("vector");\nquantile(range(100) ^ 0.5, 0)','let { quantile } = import("vector");\nquantile(range(100) ^ 0.5, 0.1)','let { quantile } = import("vector");\nquantile(range(100) ^ 0.5, 0.2)','let { quantile } = import("vector");\nquantile(range(100) ^ 0.5, 0.3)','let { quantile } = import("vector");\nquantile(range(100) ^ 0.5, 0.4)','let { quantile } = import("vector");\nquantile(range(100) ^ 0.5, 0.5)','let { quantile } = import("vector");\nquantile(range(100) ^ 0.5, 0.6)','let { quantile } = import("vector");\nquantile(range(100) ^ 0.5, 0.7)','let { quantile } = import("vector");\nquantile(range(100) ^ 0.5, 0.8)','let { quantile } = import("vector");\nquantile(range(100) ^ 0.5, 0.9)','let { quantile } = import("vector");\nquantile(range(100) ^ 0.5, 1)'],seeAlso:["vector.percentile","vector.quartiles","vector.ecdf"]},histogram:{category:"vector",description:"Creates a histogram from a numeric `array` by dividing the data range into the specified number of bins. Returns an `array` of `[binStart, binEnd, count]` tuples representing each bin's range and the number of values within it. Handles empty arrays, identical values, and properly places maximum values in the last bin.",returns:{type:"array",array:!0},args:{vector:{type:"vector",description:"The numeric array to create a histogram from."},bins:{type:"integer",description:"The number of bins to divide the data range into."},a:{type:"number"},b:{type:"integer"}},variants:[{argumentNames:["vector","bins"]}],examples:['let { histogram } = import("vector");\nhistogram([1, 2, 2, 3, 2, 6, 4, 3, 2, 4, 1, 3, 2, 9], 3)','let { histogram } = import("vector");\nhistogram([1, 2, 3, 4, 5], 5)','let { histogram } = import("vector");\nhistogram([1, 2, 3, 4, 5], 10)','let { histogram } = import("vector");\nhistogram([1, 2, 3, 4, 5], 1)'],seeAlso:["vector.bincount","vector.ecdf"]},ecdf:{category:"vector",description:"Calculates the empirical cumulative distribution function value for a given threshold in a non empty dataset. Returns the proportion of values in the `array` that are less than or equal to the specified threshold.",returns:{type:"number"},args:{vector:{type:"vector",description:"The numeric array to calculate the ECDF from."},threshold:{type:"number",description:"The threshold value to calculate the ECDF for."},a:{type:"number"},b:{type:"integer"}},variants:[{argumentNames:["vector","threshold"]}],examples:['let { ecdf } = import("vector");\necdf([1, 2, 2, 3, 2, 6, 4, 3, 2, 4, 1, 3, 2, 9, 10, 12], 5)','let { ecdf } = import("vector");\necdf([1, 2, 3, 4, 5], 3)','let { ecdf } = import("vector");\necdf([1, 2, 3, 4, 5], 0)','let { ecdf } = import("vector");\necdf([1, 2, 3, 4, 5], 10)','let { ecdf } = import("vector");\necdf([1, 2, 3, 4, 5], 2)'],seeAlso:["vector.histogram","vector.percentile","vector.quantile"]},"outliers?":{category:"vector",description:"Checks if the `vector` contains outliers based on the interquartile range (IQR) method. Returns `true` if outliers are present, `false` otherwise.",returns:{type:"boolean"},args:{vector:{type:"vector",description:"The `vector` to check for outliers."}},variants:[{argumentNames:["vector"]}],examples:['let { outliers? } = import("vector");\noutliers?([1, 2, 3])','let { outliers? } = import("vector");\noutliers?([1, 2, -3])','let { outliers? } = import("vector");\noutliers?([1, 2, 3, 2, 4, 120])'],seeAlso:["vector.outliers","vector.winsorize","vector.iqr"]},outliers:{category:"vector",description:"Identifies outliers in the `vector` based on the interquartile range (IQR) method. Returns an array of outlier values.",returns:{type:"number",array:!0},args:{vector:{type:"vector",description:"The `vector` to check for outliers."}},variants:[{argumentNames:["vector"]}],examples:['let { outliers } = import("vector");\noutliers([1, 2, 3])','let { outliers } = import("vector");\noutliers([1, 2, -3])','let { outliers } = import("vector");\noutliers([1, 2, 3, 2, 4, 120])'],seeAlso:["vector.outliers?","vector.winsorize","vector.iqr"]},bincount:{category:"vector",description:"counts occurrences of each `integer` in a vector, returning an array where index `i` contains the count of value `i`, with optional **minimum size** and **weights parameters**.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The vector to count occurrences in."},minSize:{type:"integer",description:"Optional minimum size of the output array."},weights:{type:"number",array:!0,description:"Optional weights for each element in the vector."}},variants:[{argumentNames:["vector"]},{argumentNames:["vector","minSize"]},{argumentNames:["vector","minSize","weights"]}],examples:['let { bincount } = import("vector");\nbincount([1, 2, 3])','let { bincount } = import("vector");\nbincount([1, 2, 2, 3, 3])'],seeAlso:["vector.count-values","vector.histogram"],hideOperatorForm:!0},winsorize:{category:"vector",description:"Limits extreme values in a `vector` by replacing values below the **lower quantile** and above the **upper quantile** with the values at those quantiles. The function takes a `vector` of values and **quantile thresholds** (between 0 and 1), with the upper quantile. Winsorization reduces the influence of outliers while preserving the overall distribution shape, making statistical analyses more robust.",returns:{type:"vector"},args:{vector:{type:"vector",description:"The vector to winsorize."},"lower-quantile":{type:"number",description:"The lower quantile threshold (between 0 and 1)."},"upper-quantile":{type:"number",description:"Optional Upper quantile threshold (between 0 and 1). Defaults to `(1 - lower-quantile)` if `lower-quantile <= 0.5` otherwise `1`."}},variants:[{argumentNames:["vector","lower-quantile"]},{argumentNames:["vector","lower-quantile","upper-quantile"]}],examples:['let { winsorize } = import("vector");\nwinsorize([2, 5, 8, 10, 15, 18, 20, 35, 60, 100], 0.25)','let { winsorize } = import("vector");\nwinsorize([2, 5, 8, 10, 15, 18, 20, 35, 60, 100], 0.25, 0.75)','let { winsorize } = import("vector");\nwinsorize([2, 5, 8, 10, 15, 18, 20, 35, 60, 100], 0.25, 0.5)'],seeAlso:["vector.outliers","vector.outliers?","vector.percentile"],hideOperatorForm:!0},mse:{category:"vector",description:"Calculates the **Mean Squared Error (MSE)** between two vectors. Returns the average of the squared differences between corresponding elements.",returns:{type:"number"},args:{a:{type:"vector",description:"The first vector."},b:{type:"vector",description:"The second vector."}},variants:[{argumentNames:["a","b"]}],examples:['let { mse } = import("vector");\nmse([1, 2, 3], [1, 2, 3])','let { mse } = import("vector");\nmse([1, 2, 3], [4, 5, 6])','let { mse } = import("vector");\nmse([1, 2, 3], [2, 2, 2])','let { mse } = import("vector");\nmse([1, 2], [3, 3])','let { mse } = import("vector");\nmse([1], [3])'],seeAlso:["vector.rmse","vector.mae","vector.smape"]},rmse:{category:"vector",description:"Calculates the **Root Mean Squared Error (RMSE)** between two vectors. Returns the square root of the average of the squared differences between corresponding elements.",returns:{type:"number"},args:{a:{type:"vector",description:"The first vector."},b:{type:"vector",description:"The second vector."}},variants:[{argumentNames:["a","b"]}],examples:['let { rmse } = import("vector");\nrmse([1, 2, 3], [1, 2, 3])','let { rmse } = import("vector");\nrmse([1, 2, 3], [4, 5, 6])','let { rmse } = import("vector");\nrmse([1, 2, 3], [2, 2, 2])','let { rmse } = import("vector");\nrmse([1, 2], [3, 3])','let { rmse } = import("vector");\nrmse([1], [3])'],seeAlso:["vector.mse","vector.mae","vector.smape"]},mae:{category:"vector",description:"Calculates the **Mean Absolute Error (MAE)** between two vectors. Returns the average of the absolute differences between corresponding elements.",returns:{type:"number"},args:{a:{type:"vector",description:"The first vector."},b:{type:"vector",description:"The second vector."}},variants:[{argumentNames:["a","b"]}],examples:['let { mae } = import("vector");\nmae([1, 2, 3], [1, 2, 3])','let { mae } = import("vector");\nmae([1, 2, 3], [4, 5, 6])','let { mae } = import("vector");\nmae([1, 2, 3], [2, 2, 2])','let { mae } = import("vector");\nmae([1, 2], [3, 3])','let { mae } = import("vector");\nmae([1], [3])'],seeAlso:["vector.mse","vector.rmse","vector.smape"]},smape:{category:"vector",description:"Calculates the **Symmetric Mean Absolute Percentage Error (SMAPE)** between two vectors. Returns the average of the absolute percentage differences between corresponding elements.",returns:{type:"number"},args:{a:{type:"vector",description:"The first vector."},b:{type:"vector",description:"The second vector."}},variants:[{argumentNames:["a","b"]}],examples:['let { smape } = import("vector");\nsmape([1, 2, 3], [1, 2, 3])','let { smape } = import("vector");\nsmape([1, 2, 3], [4, 5, 6])','let { smape } = import("vector");\nsmape([1, 2, 3], [2, 2, 2])','let { smape } = import("vector");\nsmape([1, 2], [3, 3])','let { smape } = import("vector");\nsmape([1], [3])'],seeAlso:["vector.mse","vector.rmse","vector.mae"]}};function N(e){if(e.length<=1)return[];const t=[...e].sort((e,t)=>e-t),r=Math.floor(.25*t.length),n=t.length%4==0?(t[r-1]+t[r])/2:t[r],o=Math.floor(.75*t.length),i=t.length%4==0?(t[o-1]+t[o])/2:t[o],s=i-n,c=n-1.5*s,a=i+1.5*s;return e.filter(e=>e<c||e>a)}function T(e,t){const r=[...e].sort((e,t)=>e-t);if(0===t)return r[0];if(100===t)return r[r.length-1];const n=t/100*(r.length-1);if(Number.isInteger(n))return r[n];const o=Math.floor(n),i=Math.ceil(n),s=n-o;return r[o]*(1-s)+r[i]*s}function S(e){const t=[...e].sort((e,t)=>e-t),r=t.length/2;let n;n=t.length%2==0?(t[r-1]+t[r])/2:t[Math.floor(r)];const o=t.slice(0,Math.floor(t.length/2)),i=t.slice(Math.ceil(t.length/2));let s,c;if(o.length%2==0){const e=o.length/2;s=(o[e-1]+o[e])/2}else s=o[Math.floor(o.length/2)];if(i.length%2==0){const e=i.length/2;c=(i[e-1]+i[e])/2}else c=i[Math.floor(i.length/2)];return[s,n,c]}function q(e){if(0===e.length)return 0;return e.reduce((e,t)=>e+t,0)/e.length}const A={"geometric-mean":e=>{if(e.some(e=>e<0))throw new Error("Geometric mean is not defined for non-positive numbers");return Math.exp(e.reduce((e,t)=>e+Math.log(t),0)/e.length)}};function P(e){const t=[...e].sort((e,t)=>e-t),r=Math.floor(t.length/2);return t.length%2==0?(t[r-1]+t[r])/2:t[r]}const R={median:e=>P(e)};function M(e,t){const r=q(e);return e.reduce((e,t)=>e+(t-r)**2,0)/e.length}const C={variance:e=>M(e)},O={"sample-variance":e=>function(e){const t=q(e);return e.reduce((e,r)=>e+(r-t)**2,0)/(e.length-1)}(e),minLength:2};function D(e,t){const r=M(e);return Math.sqrt(r)}const $={stdev:e=>D(e)},E={"sample-stdev":e=>function(e){const t=M(e);return Math.sqrt(t*(e.length/(e.length-1)))}(e),minLength:2},L={iqr:e=>{const[t,,r]=S(e);return r-t},minLength:4},F={span:e=>0===e.length?0:Math.max(...e)-Math.min(...e),minLength:0};const j={skewness:e=>function(e){const t=q(e),r=D(e);if(0===r)throw new Error("Standard deviation is zero, skewness is undefined");return e.reduce((e,r)=>e+(r-t)**3,0)/(e.length*r**3)}(e),minLength:3},I={"sample-skewness":e=>function(e){const t=e.length,r=e.reduce((e,t)=>e+t,0)/t;let n=0,o=0;for(const t of e){const e=t-r;n+=e*e,o+=e*e*e}const i=n/(t-1),s=Math.sqrt(i);if(0===s)throw new Error("Cannot calculate sample skewness when standard deviation is 0");return t/((t-1)*(t-2))*o/s**3}(e),minLength:3};function V(e){const t=q(e),r=D(e);if(0===r)throw new Error("Standard deviation is zero, kurtosis is undefined");return e.reduce((e,r)=>e+(r-t)**4,0)/(e.length*r**4)}const G={kurtosis:e=>V(e),minLength:4},B={"excess-kurtosis":e=>function(e){return V(e)-3}(e),minLength:4},W={"sample-kurtosis":e=>function(e){const t=e.length,r=e.reduce((e,t)=>e+t,0)/t,n=e.reduce((e,t)=>e+(t-r)**2,0)/(t-1);if(0===n)throw new Error("Variance is zero, kurtosis is undefined");return t*(t+1)*e.reduce((e,t)=>e+(t-r)**4,0)/((t-1)*(t-2)*(t-3)*n**2)}(e),minLength:4},J={"sample-excess-kurtosis":e=>function(e){const t=e.length,r=e.reduce((e,t)=>e+t,0)/t,n=e.reduce((e,t)=>e+(t-r)**2,0)/(t-1);if(0===n)throw new Error("Variance is zero, kurtosis is undefined");return t*(t+1)*e.reduce((e,t)=>e+(t-r)**4,0)/((t-1)*(t-2)*(t-3)*n**2)-3*(t-1)*(t-1)/((t-2)*(t-3))}(e),minLength:4},Q={rms:e=>Math.sqrt(e.reduce((e,t)=>e+t**2,0)/e.length)};const U={mad:e=>function(e){const t=P(e);return e.reduce((e,r)=>e+Math.abs(r-t),0)/e.length}(e)};const Z={medad:e=>function(e){const t=P(e);return 1.4826*P(e.map(e=>Math.abs(e-t)))}(e)},H={"gini-coefficient":e=>{if(e.some(e=>e<0))throw new Error("Gini coefficient is not defined for negative values");const t=[...e].sort((e,t)=>e-t),r=t.length,n=t.reduce((e,t)=>e+t,0);if(0===n)return 0;return 2*t.reduce((e,t,r)=>e+(r+1)*t,0)/(r*n)-(r+1)/r},minLength:1};const K={entropy:e=>function(e){const t=new Map;for(const r of e)t.set(r,(t.get(r)||0)+1);const r=e.length;let n=0;for(const e of t.values()){const t=e/r;t>0&&(n-=t*Math.log2(t))}return n}(e),minLength:1},X={};function Y(e){for(const[t,r]of Object.entries(e)){if(X[t])throw new Error(`Duplicate normal expression key found: ${t}`);if("minLength"!==t&&"padding"!==t&&"function"==typeof r){const n=r,o=t.replace(/^/,""),i=`moving-${o}`,s=`centered-moving-${o}`,c=`running-${o}`,a=e.minLength??1;g(a,void 0,{integer:!0,finite:!0,gte:0}),X[t]=_(n,a),X[i]=ee(n,a),X[s]=te(n,a,e.padding??null),X[c]=re(n,a)}}}function _(e,r){return{evaluate:([n],o)=>{if(h(n,o),n.length<r)throw new t(`Vector length must be at least ${r}`,o);try{return e(n)}catch(e){throw new t(e,o)}},arity:k(1)}}function ee(e,r){return{evaluate:([n,o],i)=>{if(h(n,i),g(o,i,{integer:!0,finite:!0,gte:r,lte:n.length}),0===n.length)return[];try{if(o>=n.length)return[e(n)];const t=[];for(let r=0;r<n.length-o+1;r+=1)t.push(e(n.slice(r,r+o)));return t}catch(e){throw new t(e,i)}},arity:k(2)}}function te(e,r,n){return{evaluate:([o,i,s,c],a)=>{if(h(o,a),o.length<r)throw new t(`Vector length must be at least ${r}`,a);if(g(i,a,{integer:!0,finite:!0,gte:r,lte:o.length}),null!==(s=s??n)&&g(s,a,{finite:!0}),null!==(c=c??n)&&g(c,a,{finite:!0}),0===o.length)return[];const v=Math.floor(i/2),m=[...Array(v).fill(s),...o,...Array(v).fill(c)],l="number"==typeof s?0:v,p=o.length-("number"==typeof c?0:i-v-1),d=[...Array(l).fill(null)];try{for(let t=l;t<p;t+=1)d.push(e(m.slice(t,t+i)))}catch(e){throw new t(e,a)}return d.push(...Array(o.length-p).fill(null)),d},arity:{min:2,max:4}}}function re(e,r){return{evaluate:([n],o)=>{if(h(n,o),n.length<r)throw new t(`Vector length must be at least ${r}`,o);if(0===n.length)return[];try{const t=Math.max(r-1,0),o=Array(t).fill(null);for(let r=t;r<n.length;r+=1)o.push(e(n.slice(0,r+1)));return o}catch(e){throw new t(e,o)}},arity:k(1)}}Y({mean:e=>q(e)}),Y(A),Y({"harmonic-mean":e=>e.length/e.reduce((e,t)=>e+1/t,0)}),Y(R),Y({sum:e=>e.reduce((e,t)=>e+t,0),minLength:0}),Y({prod:e=>e.reduce((e,t)=>e*t,1),padding:1,minLength:0}),Y(C),Y(O),Y($),Y(E),Y(L),Y(F),Y(j),Y(I),Y(B),Y(G),Y(J),Y(W),Y(Q),Y(U),Y(Z),Y(H),Y(K);const ne={"monotonic?":{evaluate:([e],t)=>(h(e,t),e.every((t,r)=>0===r||t>=e[r-1])||e.every((t,r)=>0===r||t<=e[r-1])),arity:k(1)},"strictly-monotonic?":{evaluate:([e],t)=>(h(e,t),e.every((t,r)=>0===r||t>e[r-1])||e.every((t,r)=>0===r||t<e[r-1])),arity:k(1)},"increasing?":{evaluate:([e],t)=>(h(e,t),e.every((t,r)=>0===r||t>=e[r-1])),arity:k(1)},"decreasing?":{evaluate:([e],t)=>(h(e,t),e.every((t,r)=>0===r||t<=e[r-1])),arity:k(1)},"strictly-increasing?":{evaluate:([e],t)=>(h(e,t),e.every((t,r)=>0===r||t>e[r-1])),arity:k(1)},"strictly-decreasing?":{evaluate:([e],t)=>(h(e,t),e.every((t,r)=>0===r||t<e[r-1])),arity:k(1)},mode:{evaluate:([e],t)=>(y(e,t),function(e){const t=new Map;for(const r of e)t.set(r,(t.get(r)||0)+1);let r=0;for(const e of t.values())e>r&&(r=e);if(1===r)return e;const n=[];for(const[e,o]of t.entries())o===r&&n.push(e);return n}(e)),arity:k(1)},"min-index":{evaluate:([e],t)=>(y(e,t),e.reduce((t,r,n)=>r<e[t]?n:t,0)),arity:k(1)},"max-index":{evaluate:([e],t)=>(y(e,t),e.reduce((t,r,n)=>r>e[t]?n:t,0)),arity:k(1)},"sort-indices":{evaluate:([e],t)=>(h(e,t),[...e.keys()].sort((t,r)=>e[t]-e[r])),arity:k(1)},"count-values":{evaluate:([e],t)=>{h(e,t);const r=new Map;for(const t of e)r.set(t,(r.get(t)||0)+1);return[...r.entries()].sort((e,t)=>{const r=t[1]-e[1];return 0!==r?r:e[0]-t[0]})},arity:k(1)},linspace:{evaluate:([e,t,r],n)=>{if(g(e,n,{finite:!0}),g(t,n,{finite:!0}),g(r,n,{integer:!0,nonNegative:!0}),0===r)return[];if(1===r)return[e];const o=(t-e)/(r-1);return Array.from({length:r},(t,r)=>e+r*o)},arity:k(3)},ones:{evaluate:([e],t)=>(g(e,t,{integer:!0,nonNegative:!0}),Array.from({length:e},()=>1)),arity:k(1)},zeros:{evaluate:([e],t)=>(g(e,t,{integer:!0,nonNegative:!0}),Array.from({length:e},()=>0)),arity:k(1)},fill:{evaluate:([e,t],r)=>(g(e,r,{integer:!0,nonNegative:!0}),Array.from({length:e},()=>t)),arity:k(2)},generate:{evaluate:([e,t],r,n,{executeFunction:o})=>(g(e,r,{integer:!0,nonNegative:!0}),x(t,r),Array.from({length:e},(e,i)=>{const s=o(t,[i],n,r);return g(s,r,{finite:!0}),s})),arity:k(2)},cumsum:{evaluate:([e],t)=>(h(e,t),e.reduce((e,t)=>{const r=e[e.length-1]??0;return e.push(r+t),e},[])),arity:k(1)},cumprod:{evaluate:([e],t)=>(h(e,t),e.reduce((e,t)=>{const r=e[e.length-1]??1;return e.push(r*t),e},[])),arity:k(1)},quartiles:{evaluate:([e],r)=>{if(h(e,r),e.length<4)throw new t("Quartiles require at least four values",r);return S(e)},arity:k(1)},percentile:{evaluate:([e,t],r)=>(y(e,r),g(t,r,{finite:!0,nonNegative:!0,lte:100}),T(e,t)),arity:k(2)},quantile:{evaluate:([e,t],r)=>(h(e,r),g(t,r,{finite:!0,nonNegative:!0,lte:1}),T(e,100*t)),arity:k(2)},histogram:{evaluate:([e,t],r)=>(h(e,r),g(t,r,{integer:!0,positive:!0}),function(e,t){if(0===e.length){const e=[];for(let r=0;r<t;r++)e.push([0,0,0]);return e}const r=Math.min(...e),n=Math.max(...e);if(r===n){const n=[];for(let e=0;e<t;e++)n.push([r,r,0]);return n[0][2]=e.length,n}const o=(n-r)/t,i=[];for(let e=0;e<t;e++){const s=r+e*o,c=e===t-1?n:r+(e+1)*o;i.push([s,c,0])}for(const s of e)s===n?i[t-1][2]+=1:i[Math.min(Math.floor((s-r)/o),t-1)][2]+=1;return i}(e,t)),arity:k(2)},ecdf:{evaluate:([e,t],r)=>{y(e,r),g(t,r,{finite:!0});const n=[...e].sort((e,t)=>e-t),o=n.findIndex(e=>e>t);return-1===o?1:o/n.length},arity:k(2)},"outliers?":{evaluate:([e],t)=>(h(e,t),function(e){return N(e).length>0}(e)),arity:k(1)},outliers:{evaluate:([e],t)=>(h(e,t),N(e)),arity:k(1)},bincount:{evaluate:(e,r)=>{const n=e[0];h(n,r),n.forEach(e=>g(e,r,{finite:!0,integer:!0,nonNegative:!0}));const o=e[1]??0;g(o,r,{integer:!0,nonNegative:!0});const i=e[2]??void 0;if(void 0!==i){if(h(i,r),i.length!==n.length)throw new t("Weights vector must be the same length as the input vector",r);i.forEach(e=>g(e,r,{finite:!0}))}return function(e,t=0,r){if(0===e.length)return Array.from({length:t},()=>0);const n=Math.max(...e),o=Math.max(n+1,t),i=Array.from({length:o},()=>0);for(let t=0;t<e.length;t++){const n=Math.floor(e[t]);n<o&&(i[n]+=r?r[t]:1)}return i}(n,o,i)},arity:{min:1,max:3}},winsorize:{evaluate:([e,t,r],n)=>{if(h(e,n),g(t,n,{finite:!0,gte:0,lte:1}),r??=t>.5?1:1-t,g(r,n,{finite:!0,gte:t,lte:1}),0===e.length)return[];const o=[...e].sort((e,t)=>e-t),i=Math.max(0,Math.floor(t*e.length)),s=Math.min(e.length-1,Math.max(0,Math.floor(r*e.length)-1)),c=o[i],a=o[s];return e.map(e=>Math.max(c,Math.min(e,a)))},arity:{min:2,max:3}},mse:{evaluate:([e,r],n)=>{if(y(e,n),y(r,n),e.length!==r.length)throw new t("Vectors must be of the same length",n);return e.reduce((e,t,n)=>e+(t-r[n])**2,0)/e.length},arity:k(2)},rmse:{evaluate:([e,r],n)=>{if(y(e,n),y(r,n),e.length!==r.length)throw new t("Vectors must be of the same length",n);return Math.sqrt(e.reduce((e,t,n)=>e+(t-r[n])**2,0)/e.length)},arity:k(2)},mae:{evaluate:([e,r],n)=>{if(y(e,n),y(r,n),e.length!==r.length)throw new t("Vectors must be of the same length",n);return e.reduce((e,t,n)=>e+Math.abs(t-r[n]),0)/e.length},arity:k(2)},smape:{evaluate:([e,r],n)=>{if(y(e,n),y(r,n),e.length!==r.length)throw new t("Vectors must be of the same length",n);return e.reduce((e,t,n)=>{const o=Math.abs(t-r[n]),i=(Math.abs(t)+Math.abs(r[n]))/2;return e+(0===i?0:o/i)},0)/e.length},arity:k(2)}};!function(e){for(const[t,r]of Object.entries(e)){if(ne[t])throw new Error(`Duplicate normal expression key found: ${t}`);ne[t]=r}}(X);for(const[e,t]of Object.entries(z))ne[e]&&(ne[e].docs=t);const oe={name:"vector",functions:ne};export{oe as vectorModule};
|
|
2
|
+
//# sourceMappingURL=vector.esm.js.map
|