@danielsimonjr/mathts-functions 0.2.3 → 0.2.4
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/dist/algebra/decomposition/lup.d.ts +78 -0
- package/dist/algebra/decomposition/lup.d.ts.map +1 -0
- package/dist/algebra/decomposition/qr.d.ts +60 -0
- package/dist/algebra/decomposition/qr.d.ts.map +1 -0
- package/dist/algebra/decomposition/schur.d.ts +40 -0
- package/dist/algebra/decomposition/schur.d.ts.map +1 -0
- package/dist/algebra/decomposition/slu.d.ts +37 -0
- package/dist/algebra/decomposition/slu.d.ts.map +1 -0
- package/dist/algebra/derivative.d.ts +35 -0
- package/dist/algebra/derivative.d.ts.map +1 -0
- package/dist/algebra/leafCount.d.ts +9 -0
- package/dist/algebra/leafCount.d.ts.map +1 -0
- package/dist/algebra/lyap.d.ts +14 -0
- package/dist/algebra/lyap.d.ts.map +1 -0
- package/dist/algebra/polynomialRoot.d.ts +22 -0
- package/dist/algebra/polynomialRoot.d.ts.map +1 -0
- package/dist/algebra/rationalize.d.ts +43 -0
- package/dist/algebra/rationalize.d.ts.map +1 -0
- package/dist/algebra/resolve.d.ts +25 -0
- package/dist/algebra/resolve.d.ts.map +1 -0
- package/dist/algebra/simplify/util.d.ts +35 -0
- package/dist/algebra/simplify/util.d.ts.map +1 -0
- package/dist/algebra/simplify/wildcards.d.ts +5 -0
- package/dist/algebra/simplify/wildcards.d.ts.map +1 -0
- package/dist/algebra/simplify.d.ts +57 -0
- package/dist/algebra/simplify.d.ts.map +1 -0
- package/dist/algebra/simplifyConstant.d.ts +20 -0
- package/dist/algebra/simplifyConstant.d.ts.map +1 -0
- package/dist/algebra/simplifyCore.d.ts +21 -0
- package/dist/algebra/simplifyCore.d.ts.map +1 -0
- package/dist/algebra/solver/lsolve.d.ts +46 -0
- package/dist/algebra/solver/lsolve.d.ts.map +1 -0
- package/dist/algebra/solver/lsolveAll.d.ts +53 -0
- package/dist/algebra/solver/lsolveAll.d.ts.map +1 -0
- package/dist/algebra/solver/lusolve.d.ts +62 -0
- package/dist/algebra/solver/lusolve.d.ts.map +1 -0
- package/dist/algebra/solver/usolve.d.ts +46 -0
- package/dist/algebra/solver/usolve.d.ts.map +1 -0
- package/dist/algebra/solver/usolveAll.d.ts +53 -0
- package/dist/algebra/solver/usolveAll.d.ts.map +1 -0
- package/dist/algebra/solver/utils/solveValidation.d.ts +31 -0
- package/dist/algebra/solver/utils/solveValidation.d.ts.map +1 -0
- package/dist/algebra/sparse/csAmd.d.ts +15 -0
- package/dist/algebra/sparse/csAmd.d.ts.map +1 -0
- package/dist/algebra/sparse/csChol.d.ts +39 -0
- package/dist/algebra/sparse/csChol.d.ts.map +1 -0
- package/dist/algebra/sparse/csCounts.d.ts +13 -0
- package/dist/algebra/sparse/csCounts.d.ts.map +1 -0
- package/dist/algebra/sparse/csCumsum.d.ts +9 -0
- package/dist/algebra/sparse/csCumsum.d.ts.map +1 -0
- package/dist/algebra/sparse/csDfs.d.ts +23 -0
- package/dist/algebra/sparse/csDfs.d.ts.map +1 -0
- package/dist/algebra/sparse/csEreach.d.ts +20 -0
- package/dist/algebra/sparse/csEreach.d.ts.map +1 -0
- package/dist/algebra/sparse/csEtree.d.ts +16 -0
- package/dist/algebra/sparse/csEtree.d.ts.map +1 -0
- package/dist/algebra/sparse/csFkeep.d.ts +22 -0
- package/dist/algebra/sparse/csFkeep.d.ts.map +1 -0
- package/dist/algebra/sparse/csFlip.d.ts +7 -0
- package/dist/algebra/sparse/csFlip.d.ts.map +1 -0
- package/dist/algebra/sparse/csIpvec.d.ts +10 -0
- package/dist/algebra/sparse/csIpvec.d.ts.map +1 -0
- package/dist/algebra/sparse/csLeaf.d.ts +21 -0
- package/dist/algebra/sparse/csLeaf.d.ts.map +1 -0
- package/dist/algebra/sparse/csLu.d.ts +37 -0
- package/dist/algebra/sparse/csLu.d.ts.map +1 -0
- package/dist/algebra/sparse/csMark.d.ts +8 -0
- package/dist/algebra/sparse/csMark.d.ts.map +1 -0
- package/dist/algebra/sparse/csMarked.d.ts +8 -0
- package/dist/algebra/sparse/csMarked.d.ts.map +1 -0
- package/dist/algebra/sparse/csPermute.d.ts +27 -0
- package/dist/algebra/sparse/csPermute.d.ts.map +1 -0
- package/dist/algebra/sparse/csPost.d.ts +8 -0
- package/dist/algebra/sparse/csPost.d.ts.map +1 -0
- package/dist/algebra/sparse/csReach.d.ts +23 -0
- package/dist/algebra/sparse/csReach.d.ts.map +1 -0
- package/dist/algebra/sparse/csSpsolve.d.ts +15 -0
- package/dist/algebra/sparse/csSpsolve.d.ts.map +1 -0
- package/dist/algebra/sparse/csSqr.d.ts +25 -0
- package/dist/algebra/sparse/csSqr.d.ts.map +1 -0
- package/dist/algebra/sparse/csSymperm.d.ts +22 -0
- package/dist/algebra/sparse/csSymperm.d.ts.map +1 -0
- package/dist/algebra/sparse/csTdfs.d.ts +13 -0
- package/dist/algebra/sparse/csTdfs.d.ts.map +1 -0
- package/dist/algebra/sparse/csUnflip.d.ts +7 -0
- package/dist/algebra/sparse/csUnflip.d.ts.map +1 -0
- package/dist/algebra/sylvester.d.ts +30 -0
- package/dist/algebra/sylvester.d.ts.map +1 -0
- package/dist/algebra/symbolicEqual.d.ts +18 -0
- package/dist/algebra/symbolicEqual.d.ts.map +1 -0
- package/dist/arithmetic/abs.d.ts +7 -0
- package/dist/arithmetic/abs.d.ts.map +1 -0
- package/dist/arithmetic/addScalar.d.ts +7 -0
- package/dist/arithmetic/addScalar.d.ts.map +1 -0
- package/dist/arithmetic/cbrt.d.ts +37 -0
- package/dist/arithmetic/cbrt.d.ts.map +1 -0
- package/dist/arithmetic/ceil.d.ts +22 -0
- package/dist/arithmetic/ceil.d.ts.map +1 -0
- package/dist/arithmetic/cube.d.ts +7 -0
- package/dist/arithmetic/cube.d.ts.map +1 -0
- package/dist/arithmetic/divide.d.ts +42 -0
- package/dist/arithmetic/divide.d.ts.map +1 -0
- package/dist/arithmetic/divideScalar.d.ts +8 -0
- package/dist/arithmetic/divideScalar.d.ts.map +1 -0
- package/dist/arithmetic/dotDivide.d.ts +13 -0
- package/dist/arithmetic/dotDivide.d.ts.map +1 -0
- package/dist/arithmetic/dotMultiply.d.ts +11 -0
- package/dist/arithmetic/dotMultiply.d.ts.map +1 -0
- package/dist/arithmetic/dotPow.d.ts +16 -0
- package/dist/arithmetic/dotPow.d.ts.map +1 -0
- package/dist/arithmetic/exp.d.ts +7 -0
- package/dist/arithmetic/exp.d.ts.map +1 -0
- package/dist/arithmetic/expm1.d.ts +15 -0
- package/dist/arithmetic/expm1.d.ts.map +1 -0
- package/dist/arithmetic/fix.d.ts +30 -0
- package/dist/arithmetic/fix.d.ts.map +1 -0
- package/dist/arithmetic/floor.d.ts +22 -0
- package/dist/arithmetic/floor.d.ts.map +1 -0
- package/dist/arithmetic/gcd.d.ts +25 -0
- package/dist/arithmetic/gcd.d.ts.map +1 -0
- package/dist/arithmetic/hypot.d.ts +14 -0
- package/dist/arithmetic/hypot.d.ts.map +1 -0
- package/dist/arithmetic/invmod.d.ts +19 -0
- package/dist/arithmetic/invmod.d.ts.map +1 -0
- package/dist/arithmetic/lcm.d.ts +10 -0
- package/dist/arithmetic/lcm.d.ts.map +1 -0
- package/dist/arithmetic/log.d.ts +18 -0
- package/dist/arithmetic/log.d.ts.map +1 -0
- package/dist/arithmetic/log10.d.ts +18 -0
- package/dist/arithmetic/log10.d.ts.map +1 -0
- package/dist/arithmetic/log1p.d.ts +19 -0
- package/dist/arithmetic/log1p.d.ts.map +1 -0
- package/dist/arithmetic/log2.d.ts +17 -0
- package/dist/arithmetic/log2.d.ts.map +1 -0
- package/dist/arithmetic/mod.d.ts +15 -0
- package/dist/arithmetic/mod.d.ts.map +1 -0
- package/dist/arithmetic/multiplyScalar.d.ts +7 -0
- package/dist/arithmetic/multiplyScalar.d.ts.map +1 -0
- package/dist/arithmetic/norm.d.ts +33 -0
- package/dist/arithmetic/norm.d.ts.map +1 -0
- package/dist/arithmetic/nthRoot.d.ts +38 -0
- package/dist/arithmetic/nthRoot.d.ts.map +1 -0
- package/dist/arithmetic/nthRoots.d.ts +23 -0
- package/dist/arithmetic/nthRoots.d.ts.map +1 -0
- package/dist/arithmetic/pow.d.ts +34 -0
- package/dist/arithmetic/pow.d.ts.map +1 -0
- package/dist/arithmetic/round.d.ts +27 -0
- package/dist/arithmetic/round.d.ts.map +1 -0
- package/dist/arithmetic/sign.d.ts +31 -0
- package/dist/arithmetic/sign.d.ts.map +1 -0
- package/dist/arithmetic/sqrt.d.ts +16 -0
- package/dist/arithmetic/sqrt.d.ts.map +1 -0
- package/dist/arithmetic/square.d.ts +7 -0
- package/dist/arithmetic/square.d.ts.map +1 -0
- package/dist/arithmetic/subtract.d.ts +18 -0
- package/dist/arithmetic/subtract.d.ts.map +1 -0
- package/dist/arithmetic/subtractScalar.d.ts +7 -0
- package/dist/arithmetic/subtractScalar.d.ts.map +1 -0
- package/dist/arithmetic/unaryMinus.d.ts +10 -0
- package/dist/arithmetic/unaryMinus.d.ts.map +1 -0
- package/dist/arithmetic/unaryPlus.d.ts +10 -0
- package/dist/arithmetic/unaryPlus.d.ts.map +1 -0
- package/dist/arithmetic/utils/nodeOperations.d.ts +37 -0
- package/dist/arithmetic/utils/nodeOperations.d.ts.map +1 -0
- package/dist/arithmetic/xgcd.d.ts +25 -0
- package/dist/arithmetic/xgcd.d.ts.map +1 -0
- package/dist/bitwise/bitAnd.d.ts +10 -0
- package/dist/bitwise/bitAnd.d.ts.map +1 -0
- package/dist/bitwise/bitNot.d.ts +7 -0
- package/dist/bitwise/bitNot.d.ts.map +1 -0
- package/dist/bitwise/bitOr.d.ts +11 -0
- package/dist/bitwise/bitOr.d.ts.map +1 -0
- package/dist/bitwise/bitXor.d.ts +11 -0
- package/dist/bitwise/bitXor.d.ts.map +1 -0
- package/dist/bitwise/leftShift.d.ts +17 -0
- package/dist/bitwise/leftShift.d.ts.map +1 -0
- package/dist/bitwise/rightArithShift.d.ts +17 -0
- package/dist/bitwise/rightArithShift.d.ts.map +1 -0
- package/dist/bitwise/rightLogShift.d.ts +17 -0
- package/dist/bitwise/rightLogShift.d.ts.map +1 -0
- package/dist/bitwise/useMatrixForArrayScalar.d.ts +19 -0
- package/dist/bitwise/useMatrixForArrayScalar.d.ts.map +1 -0
- package/dist/combinatorics/bellNumbers.d.ts +14 -0
- package/dist/combinatorics/bellNumbers.d.ts.map +1 -0
- package/dist/combinatorics/catalan.d.ts +16 -0
- package/dist/combinatorics/catalan.d.ts.map +1 -0
- package/dist/combinatorics/composition.d.ts +16 -0
- package/dist/combinatorics/composition.d.ts.map +1 -0
- package/dist/combinatorics/stirlingS2.d.ts +22 -0
- package/dist/combinatorics/stirlingS2.d.ts.map +1 -0
- package/dist/complex/arg.d.ts +7 -0
- package/dist/complex/arg.d.ts.map +1 -0
- package/dist/complex/conj.d.ts +7 -0
- package/dist/complex/conj.d.ts.map +1 -0
- package/dist/complex/im.d.ts +7 -0
- package/dist/complex/im.d.ts.map +1 -0
- package/dist/complex/re.d.ts +7 -0
- package/dist/complex/re.d.ts.map +1 -0
- package/dist/core/config.d.ts +17 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/create.d.ts +137 -0
- package/dist/core/create.d.ts.map +1 -0
- package/dist/core/function/config.d.ts +35 -0
- package/dist/core/function/config.d.ts.map +1 -0
- package/dist/core/function/import.d.ts +30 -0
- package/dist/core/function/import.d.ts.map +1 -0
- package/dist/core/function/typed.d.ts +127 -0
- package/dist/core/function/typed.d.ts.map +1 -0
- package/dist/error/ArgumentsError.d.ts +21 -0
- package/dist/error/ArgumentsError.d.ts.map +1 -0
- package/dist/error/DimensionError.d.ts +18 -0
- package/dist/error/DimensionError.d.ts.map +1 -0
- package/dist/error/IndexError.d.ts +24 -0
- package/dist/error/IndexError.d.ts.map +1 -0
- package/dist/error/MathjsError.d.ts +13 -0
- package/dist/error/MathjsError.d.ts.map +1 -0
- package/dist/expression/operators.d.ts +942 -0
- package/dist/expression/operators.d.ts.map +1 -0
- package/dist/factories/evaluate.d.ts +91 -0
- package/dist/factories/evaluate.d.ts.map +1 -0
- package/dist/factories/index.d.ts +317 -0
- package/dist/factories/index.d.ts.map +1 -0
- package/dist/factories/matrix-bridge.d.ts +241 -0
- package/dist/factories/matrix-bridge.d.ts.map +1 -0
- package/dist/factories/scope.d.ts +12 -0
- package/dist/factories/scope.d.ts.map +1 -0
- package/dist/geometry/distance.d.ts +15 -0
- package/dist/geometry/distance.d.ts.map +1 -0
- package/dist/geometry/intersect.d.ts +26 -0
- package/dist/geometry/intersect.d.ts.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/logical/and.d.ts +17 -0
- package/dist/logical/and.d.ts.map +1 -0
- package/dist/logical/not.d.ts +7 -0
- package/dist/logical/not.d.ts.map +1 -0
- package/dist/logical/nullish.d.ts +11 -0
- package/dist/logical/nullish.d.ts.map +1 -0
- package/dist/logical/or.d.ts +15 -0
- package/dist/logical/or.d.ts.map +1 -0
- package/dist/logical/xor.d.ts +15 -0
- package/dist/logical/xor.d.ts.map +1 -0
- package/dist/matrix/column.d.ts +22 -0
- package/dist/matrix/column.d.ts.map +1 -0
- package/dist/matrix/concat.d.ts +6 -0
- package/dist/matrix/concat.d.ts.map +1 -0
- package/dist/matrix/count.d.ts +9 -0
- package/dist/matrix/count.d.ts.map +1 -0
- package/dist/matrix/cross.d.ts +7 -0
- package/dist/matrix/cross.d.ts.map +1 -0
- package/dist/matrix/ctranspose.d.ts +9 -0
- package/dist/matrix/ctranspose.d.ts.map +1 -0
- package/dist/matrix/det.d.ts +42 -0
- package/dist/matrix/det.d.ts.map +1 -0
- package/dist/matrix/diag.d.ts +26 -0
- package/dist/matrix/diag.d.ts.map +1 -0
- package/dist/matrix/diff.d.ts +8 -0
- package/dist/matrix/diff.d.ts.map +1 -0
- package/dist/matrix/dot.d.ts +17 -0
- package/dist/matrix/dot.d.ts.map +1 -0
- package/dist/matrix/eigs/complexEigs.d.ts +48 -0
- package/dist/matrix/eigs/complexEigs.d.ts.map +1 -0
- package/dist/matrix/eigs/realSymmetric.d.ts +34 -0
- package/dist/matrix/eigs/realSymmetric.d.ts.map +1 -0
- package/dist/matrix/eigs.d.ts +75 -0
- package/dist/matrix/eigs.d.ts.map +1 -0
- package/dist/matrix/expm.d.ts +26 -0
- package/dist/matrix/expm.d.ts.map +1 -0
- package/dist/matrix/fft.d.ts +41 -0
- package/dist/matrix/fft.d.ts.map +1 -0
- package/dist/matrix/filter.d.ts +7 -0
- package/dist/matrix/filter.d.ts.map +1 -0
- package/dist/matrix/flatten.d.ts +7 -0
- package/dist/matrix/flatten.d.ts.map +1 -0
- package/dist/matrix/forEach.d.ts +7 -0
- package/dist/matrix/forEach.d.ts.map +1 -0
- package/dist/matrix/getMatrixDataType.d.ts +7 -0
- package/dist/matrix/getMatrixDataType.d.ts.map +1 -0
- package/dist/matrix/identity.d.ts +41 -0
- package/dist/matrix/identity.d.ts.map +1 -0
- package/dist/matrix/ifft.d.ts +33 -0
- package/dist/matrix/ifft.d.ts.map +1 -0
- package/dist/matrix/inv.d.ts +48 -0
- package/dist/matrix/inv.d.ts.map +1 -0
- package/dist/matrix/kron.d.ts +17 -0
- package/dist/matrix/kron.d.ts.map +1 -0
- package/dist/matrix/map.d.ts +7 -0
- package/dist/matrix/map.d.ts.map +1 -0
- package/dist/matrix/mapSlices.d.ts +6 -0
- package/dist/matrix/mapSlices.d.ts.map +1 -0
- package/dist/matrix/matrixFromColumns.d.ts +36 -0
- package/dist/matrix/matrixFromColumns.d.ts.map +1 -0
- package/dist/matrix/matrixFromFunction.d.ts +7 -0
- package/dist/matrix/matrixFromFunction.d.ts.map +1 -0
- package/dist/matrix/matrixFromRows.d.ts +36 -0
- package/dist/matrix/matrixFromRows.d.ts.map +1 -0
- package/dist/matrix/ones.d.ts +3 -0
- package/dist/matrix/ones.d.ts.map +1 -0
- package/dist/matrix/partitionSelect.d.ts +13 -0
- package/dist/matrix/partitionSelect.d.ts.map +1 -0
- package/dist/matrix/pinv.d.ts +51 -0
- package/dist/matrix/pinv.d.ts.map +1 -0
- package/dist/matrix/range.d.ts +27 -0
- package/dist/matrix/range.d.ts.map +1 -0
- package/dist/matrix/reshape.d.ts +8 -0
- package/dist/matrix/reshape.d.ts.map +1 -0
- package/dist/matrix/resize.d.ts +17 -0
- package/dist/matrix/resize.d.ts.map +1 -0
- package/dist/matrix/rotate.d.ts +7 -0
- package/dist/matrix/rotate.d.ts.map +1 -0
- package/dist/matrix/rotationMatrix.d.ts +17 -0
- package/dist/matrix/rotationMatrix.d.ts.map +1 -0
- package/dist/matrix/row.d.ts +22 -0
- package/dist/matrix/row.d.ts.map +1 -0
- package/dist/matrix/size.d.ts +9 -0
- package/dist/matrix/size.d.ts.map +1 -0
- package/dist/matrix/sort.d.ts +8 -0
- package/dist/matrix/sort.d.ts.map +1 -0
- package/dist/matrix/sqrtm.d.ts +33 -0
- package/dist/matrix/sqrtm.d.ts.map +1 -0
- package/dist/matrix/squeeze.d.ts +7 -0
- package/dist/matrix/squeeze.d.ts.map +1 -0
- package/dist/matrix/subset.d.ts +7 -0
- package/dist/matrix/subset.d.ts.map +1 -0
- package/dist/matrix/trace.d.ts +25 -0
- package/dist/matrix/trace.d.ts.map +1 -0
- package/dist/matrix/transpose.d.ts +45 -0
- package/dist/matrix/transpose.d.ts.map +1 -0
- package/dist/matrix/utils/zerosAndOnes.d.ts +32 -0
- package/dist/matrix/utils/zerosAndOnes.d.ts.map +1 -0
- package/dist/matrix/zeros.d.ts +3 -0
- package/dist/matrix/zeros.d.ts.map +1 -0
- package/dist/numeric/solveODE.d.ts +2 -0
- package/dist/numeric/solveODE.d.ts.map +1 -0
- package/dist/plain/number/arithmetic.d.ts +168 -0
- package/dist/plain/number/arithmetic.d.ts.map +1 -0
- package/dist/plain/number/bitwise.d.ts +29 -0
- package/dist/plain/number/bitwise.d.ts.map +1 -0
- package/dist/plain/number/combinations.d.ts +5 -0
- package/dist/plain/number/combinations.d.ts.map +1 -0
- package/dist/plain/number/constants.d.ts +5 -0
- package/dist/plain/number/constants.d.ts.map +1 -0
- package/dist/plain/number/index.d.ts +10 -0
- package/dist/plain/number/index.d.ts.map +1 -0
- package/dist/plain/number/logical.d.ts +17 -0
- package/dist/plain/number/logical.d.ts.map +1 -0
- package/dist/plain/number/probability.d.ts +15 -0
- package/dist/plain/number/probability.d.ts.map +1 -0
- package/dist/plain/number/relational.d.ts +29 -0
- package/dist/plain/number/relational.d.ts.map +1 -0
- package/dist/plain/number/trigonometry.d.ts +101 -0
- package/dist/plain/number/trigonometry.d.ts.map +1 -0
- package/dist/plain/number/utils.d.ts +21 -0
- package/dist/plain/number/utils.d.ts.map +1 -0
- package/dist/probability/bernoulli.d.ts +19 -0
- package/dist/probability/bernoulli.d.ts.map +1 -0
- package/dist/probability/combinations.d.ts +7 -0
- package/dist/probability/combinations.d.ts.map +1 -0
- package/dist/probability/combinationsWithRep.d.ts +7 -0
- package/dist/probability/combinationsWithRep.d.ts.map +1 -0
- package/dist/probability/factorial.d.ts +8 -0
- package/dist/probability/factorial.d.ts.map +1 -0
- package/dist/probability/gamma.d.ts +45 -0
- package/dist/probability/gamma.d.ts.map +1 -0
- package/dist/probability/kldivergence.d.ts +18 -0
- package/dist/probability/kldivergence.d.ts.map +1 -0
- package/dist/probability/lgamma.d.ts +24 -0
- package/dist/probability/lgamma.d.ts.map +1 -0
- package/dist/probability/multinomial.d.ts +13 -0
- package/dist/probability/multinomial.d.ts.map +1 -0
- package/dist/probability/permutations.d.ts +8 -0
- package/dist/probability/permutations.d.ts.map +1 -0
- package/dist/probability/pickRandom.d.ts +10 -0
- package/dist/probability/pickRandom.d.ts.map +1 -0
- package/dist/probability/random.d.ts +11 -0
- package/dist/probability/random.d.ts.map +1 -0
- package/dist/probability/randomInt.d.ts +11 -0
- package/dist/probability/randomInt.d.ts.map +1 -0
- package/dist/probability/util/randomMatrix.d.ts +10 -0
- package/dist/probability/util/randomMatrix.d.ts.map +1 -0
- package/dist/probability/util/seededRNG.d.ts +4 -0
- package/dist/probability/util/seededRNG.d.ts.map +1 -0
- package/dist/relational/compare.d.ts +38 -0
- package/dist/relational/compare.d.ts.map +1 -0
- package/dist/relational/compareNatural.d.ts +8 -0
- package/dist/relational/compareNatural.d.ts.map +1 -0
- package/dist/relational/compareText.d.ts +15 -0
- package/dist/relational/compareText.d.ts.map +1 -0
- package/dist/relational/compareUnits.d.ts +9 -0
- package/dist/relational/compareUnits.d.ts.map +1 -0
- package/dist/relational/deepEqual.d.ts +8 -0
- package/dist/relational/deepEqual.d.ts.map +1 -0
- package/dist/relational/equal.d.ts +26 -0
- package/dist/relational/equal.d.ts.map +1 -0
- package/dist/relational/equalScalar.d.ts +11 -0
- package/dist/relational/equalScalar.d.ts.map +1 -0
- package/dist/relational/equalText.d.ts +9 -0
- package/dist/relational/equalText.d.ts.map +1 -0
- package/dist/relational/larger.d.ts +34 -0
- package/dist/relational/larger.d.ts.map +1 -0
- package/dist/relational/largerEq.d.ts +27 -0
- package/dist/relational/largerEq.d.ts.map +1 -0
- package/dist/relational/smaller.d.ts +34 -0
- package/dist/relational/smaller.d.ts.map +1 -0
- package/dist/relational/smallerEq.d.ts +27 -0
- package/dist/relational/smallerEq.d.ts.map +1 -0
- package/dist/relational/unequal.d.ts +28 -0
- package/dist/relational/unequal.d.ts.map +1 -0
- package/dist/set/setCartesian.d.ts +15 -0
- package/dist/set/setCartesian.d.ts.map +1 -0
- package/dist/set/setDifference.d.ts +15 -0
- package/dist/set/setDifference.d.ts.map +1 -0
- package/dist/set/setDistinct.d.ts +2 -0
- package/dist/set/setDistinct.d.ts.map +1 -0
- package/dist/set/setIntersect.d.ts +15 -0
- package/dist/set/setIntersect.d.ts.map +1 -0
- package/dist/set/setIsSubset.d.ts +2 -0
- package/dist/set/setIsSubset.d.ts.map +1 -0
- package/dist/set/setMultiplicity.d.ts +2 -0
- package/dist/set/setMultiplicity.d.ts.map +1 -0
- package/dist/set/setPowerset.d.ts +2 -0
- package/dist/set/setPowerset.d.ts.map +1 -0
- package/dist/set/setSize.d.ts +2 -0
- package/dist/set/setSize.d.ts.map +1 -0
- package/dist/set/setSymDifference.d.ts +15 -0
- package/dist/set/setSymDifference.d.ts.map +1 -0
- package/dist/set/setUnion.d.ts +16 -0
- package/dist/set/setUnion.d.ts.map +1 -0
- package/dist/signal/freqz.d.ts +2 -0
- package/dist/signal/freqz.d.ts.map +1 -0
- package/dist/signal/zpk2tf.d.ts +2 -0
- package/dist/signal/zpk2tf.d.ts.map +1 -0
- package/dist/special/erf.d.ts +7 -0
- package/dist/special/erf.d.ts.map +1 -0
- package/dist/special/zeta.d.ts +38 -0
- package/dist/special/zeta.d.ts.map +1 -0
- package/dist/statistics/corr.d.ts +18 -0
- package/dist/statistics/corr.d.ts.map +1 -0
- package/dist/statistics/cumsum.d.ts +9 -0
- package/dist/statistics/cumsum.d.ts.map +1 -0
- package/dist/statistics/mad.d.ts +11 -0
- package/dist/statistics/mad.d.ts.map +1 -0
- package/dist/statistics/max.d.ts +12 -0
- package/dist/statistics/max.d.ts.map +1 -0
- package/dist/statistics/mean.d.ts +9 -0
- package/dist/statistics/mean.d.ts.map +1 -0
- package/dist/statistics/median.d.ts +11 -0
- package/dist/statistics/median.d.ts.map +1 -0
- package/dist/statistics/min.d.ts +12 -0
- package/dist/statistics/min.d.ts.map +1 -0
- package/dist/statistics/mode.d.ts +9 -0
- package/dist/statistics/mode.d.ts.map +1 -0
- package/dist/statistics/prod.d.ts +12 -0
- package/dist/statistics/prod.d.ts.map +1 -0
- package/dist/statistics/quantileSeq.d.ts +26 -0
- package/dist/statistics/quantileSeq.d.ts.map +1 -0
- package/dist/statistics/std.d.ts +10 -0
- package/dist/statistics/std.d.ts.map +1 -0
- package/dist/statistics/sum.d.ts +12 -0
- package/dist/statistics/sum.d.ts.map +1 -0
- package/dist/statistics/utils/improveErrorMessage.d.ts +18 -0
- package/dist/statistics/utils/improveErrorMessage.d.ts.map +1 -0
- package/dist/statistics/variance.d.ts +13 -0
- package/dist/statistics/variance.d.ts.map +1 -0
- package/dist/string/bin.d.ts +36 -0
- package/dist/string/bin.d.ts.map +1 -0
- package/dist/string/format.d.ts +7 -0
- package/dist/string/format.d.ts.map +1 -0
- package/dist/string/hex.d.ts +35 -0
- package/dist/string/hex.d.ts.map +1 -0
- package/dist/string/oct.d.ts +36 -0
- package/dist/string/oct.d.ts.map +1 -0
- package/dist/string/print.d.ts +7 -0
- package/dist/string/print.d.ts.map +1 -0
- package/dist/trigonometry/acos.d.ts +16 -0
- package/dist/trigonometry/acos.d.ts.map +1 -0
- package/dist/trigonometry/acosh.d.ts +14 -0
- package/dist/trigonometry/acosh.d.ts.map +1 -0
- package/dist/trigonometry/acot.d.ts +12 -0
- package/dist/trigonometry/acot.d.ts.map +1 -0
- package/dist/trigonometry/acoth.d.ts +19 -0
- package/dist/trigonometry/acoth.d.ts.map +1 -0
- package/dist/trigonometry/acsc.d.ts +19 -0
- package/dist/trigonometry/acsc.d.ts.map +1 -0
- package/dist/trigonometry/acsch.d.ts +12 -0
- package/dist/trigonometry/acsch.d.ts.map +1 -0
- package/dist/trigonometry/asec.d.ts +19 -0
- package/dist/trigonometry/asec.d.ts.map +1 -0
- package/dist/trigonometry/asech.d.ts +19 -0
- package/dist/trigonometry/asech.d.ts.map +1 -0
- package/dist/trigonometry/asin.d.ts +16 -0
- package/dist/trigonometry/asin.d.ts.map +1 -0
- package/dist/trigonometry/asinh.d.ts +5 -0
- package/dist/trigonometry/asinh.d.ts.map +1 -0
- package/dist/trigonometry/atan.d.ts +7 -0
- package/dist/trigonometry/atan.d.ts.map +1 -0
- package/dist/trigonometry/atan2.d.ts +22 -0
- package/dist/trigonometry/atan2.d.ts.map +1 -0
- package/dist/trigonometry/atanh.d.ts +14 -0
- package/dist/trigonometry/atanh.d.ts.map +1 -0
- package/dist/trigonometry/cos.d.ts +7 -0
- package/dist/trigonometry/cos.d.ts.map +1 -0
- package/dist/trigonometry/cosh.d.ts +7 -0
- package/dist/trigonometry/cosh.d.ts.map +1 -0
- package/dist/trigonometry/cot.d.ts +12 -0
- package/dist/trigonometry/cot.d.ts.map +1 -0
- package/dist/trigonometry/coth.d.ts +12 -0
- package/dist/trigonometry/coth.d.ts.map +1 -0
- package/dist/trigonometry/csc.d.ts +12 -0
- package/dist/trigonometry/csc.d.ts.map +1 -0
- package/dist/trigonometry/csch.d.ts +12 -0
- package/dist/trigonometry/csch.d.ts.map +1 -0
- package/dist/trigonometry/sec.d.ts +12 -0
- package/dist/trigonometry/sec.d.ts.map +1 -0
- package/dist/trigonometry/sech.d.ts +12 -0
- package/dist/trigonometry/sech.d.ts.map +1 -0
- package/dist/trigonometry/sin.d.ts +7 -0
- package/dist/trigonometry/sin.d.ts.map +1 -0
- package/dist/trigonometry/sinh.d.ts +7 -0
- package/dist/trigonometry/sinh.d.ts.map +1 -0
- package/dist/trigonometry/tan.d.ts +7 -0
- package/dist/trigonometry/tan.d.ts.map +1 -0
- package/dist/trigonometry/tanh.d.ts +7 -0
- package/dist/trigonometry/tanh.d.ts.map +1 -0
- package/dist/trigonometry/trigUnit.d.ts +9 -0
- package/dist/trigonometry/trigUnit.d.ts.map +1 -0
- package/dist/type/bignumber/BigNumber.d.ts +46 -0
- package/dist/type/bignumber/BigNumber.d.ts.map +1 -0
- package/dist/type/chain/Chain.d.ts +58 -0
- package/dist/type/chain/Chain.d.ts.map +1 -0
- package/dist/type/chain/function/chain.d.ts +6 -0
- package/dist/type/chain/function/chain.d.ts.map +1 -0
- package/dist/type/complex/Complex.d.ts +74 -0
- package/dist/type/complex/Complex.d.ts.map +1 -0
- package/dist/type/local/Decimal.d.ts +223 -0
- package/dist/type/local/Decimal.d.ts.map +1 -0
- package/dist/type/matrix/FibonacciHeap.d.ts +59 -0
- package/dist/type/matrix/FibonacciHeap.d.ts.map +1 -0
- package/dist/type/matrix/ImmutableDenseMatrix.d.ts +282 -0
- package/dist/type/matrix/ImmutableDenseMatrix.d.ts.map +1 -0
- package/dist/type/matrix/MatrixIndex.d.ts +386 -0
- package/dist/type/matrix/MatrixIndex.d.ts.map +1 -0
- package/dist/type/matrix/Spa.d.ts +40 -0
- package/dist/type/matrix/Spa.d.ts.map +1 -0
- package/dist/type/matrix/function/index.d.ts +11 -0
- package/dist/type/matrix/function/index.d.ts.map +1 -0
- package/dist/type/matrix/types.d.ts +435 -0
- package/dist/type/matrix/types.d.ts.map +1 -0
- package/dist/type/matrix/utils/broadcast.d.ts +18 -0
- package/dist/type/matrix/utils/broadcast.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo01xDSid.d.ts +34 -0
- package/dist/type/matrix/utils/matAlgo01xDSid.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo02xDS0.d.ts +32 -0
- package/dist/type/matrix/utils/matAlgo02xDS0.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo03xDSf.d.ts +31 -0
- package/dist/type/matrix/utils/matAlgo03xDSf.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo04xSidSid.d.ts +21 -0
- package/dist/type/matrix/utils/matAlgo04xSidSid.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo05xSfSf.d.ts +21 -0
- package/dist/type/matrix/utils/matAlgo05xSfSf.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo06xS0S0.d.ts +21 -0
- package/dist/type/matrix/utils/matAlgo06xS0S0.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo07xSSf.d.ts +26 -0
- package/dist/type/matrix/utils/matAlgo07xSSf.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo08xS0Sid.d.ts +21 -0
- package/dist/type/matrix/utils/matAlgo08xS0Sid.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo09xS0Sf.d.ts +21 -0
- package/dist/type/matrix/utils/matAlgo09xS0Sf.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo10xSids.d.ts +33 -0
- package/dist/type/matrix/utils/matAlgo10xSids.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo11xS0s.d.ts +19 -0
- package/dist/type/matrix/utils/matAlgo11xS0s.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo12xSfs.d.ts +33 -0
- package/dist/type/matrix/utils/matAlgo12xSfs.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo13xDD.d.ts +20 -0
- package/dist/type/matrix/utils/matAlgo13xDD.d.ts.map +1 -0
- package/dist/type/matrix/utils/matAlgo14xDs.d.ts +19 -0
- package/dist/type/matrix/utils/matAlgo14xDs.d.ts.map +1 -0
- package/dist/type/matrix/utils/matrixAlgorithmSuite.d.ts +23 -0
- package/dist/type/matrix/utils/matrixAlgorithmSuite.d.ts.map +1 -0
- package/dist/type/resultset/ResultSet.d.ts +28 -0
- package/dist/type/resultset/ResultSet.d.ts.map +1 -0
- package/dist/type/unit/Unit.d.ts +13907 -0
- package/dist/type/unit/Unit.d.ts.map +1 -0
- package/dist/type/unit/function/createUnit.d.ts +40 -0
- package/dist/type/unit/function/createUnit.d.ts.map +1 -0
- package/dist/type/unit/function/splitUnit.d.ts +10 -0
- package/dist/type/unit/function/splitUnit.d.ts.map +1 -0
- package/dist/type/unit/function/unit.d.ts +27 -0
- package/dist/type/unit/function/unit.d.ts.map +1 -0
- package/dist/type/unit/physicalConstants.d.ts +89 -0
- package/dist/type/unit/physicalConstants.d.ts.map +1 -0
- package/dist/typed/algebra.d.ts +418 -0
- package/dist/typed/algebra.d.ts.map +1 -0
- package/dist/typed/arithmetic.d.ts +302 -0
- package/dist/typed/arithmetic.d.ts.map +1 -0
- package/dist/typed/bitwise.d.ts +48 -0
- package/dist/typed/bitwise.d.ts.map +1 -0
- package/dist/typed/cas.d.ts +691 -0
- package/dist/typed/cas.d.ts.map +1 -0
- package/dist/typed/combinatorics.d.ts +333 -0
- package/dist/typed/combinatorics.d.ts.map +1 -0
- package/dist/typed/complex.d.ts +91 -0
- package/dist/typed/complex.d.ts.map +1 -0
- package/dist/typed/dist-objects.d.ts +219 -0
- package/dist/typed/dist-objects.d.ts.map +1 -0
- package/dist/typed/distributions.d.ts +247 -0
- package/dist/typed/distributions.d.ts.map +1 -0
- package/dist/typed/geometry.d.ts +329 -0
- package/dist/typed/geometry.d.ts.map +1 -0
- package/dist/typed/gpu.d.ts +62 -0
- package/dist/typed/gpu.d.ts.map +1 -0
- package/dist/typed/graph.d.ts +339 -0
- package/dist/typed/graph.d.ts.map +1 -0
- package/dist/typed/hypothesis.d.ts +274 -0
- package/dist/typed/hypothesis.d.ts.map +1 -0
- package/dist/typed/index.d.ts +299 -0
- package/dist/typed/index.d.ts.map +1 -0
- package/dist/typed/integration.d.ts +219 -0
- package/dist/typed/integration.d.ts.map +1 -0
- package/dist/typed/interpolation.d.ts +189 -0
- package/dist/typed/interpolation.d.ts.map +1 -0
- package/dist/typed/logical.d.ts +87 -0
- package/dist/typed/logical.d.ts.map +1 -0
- package/dist/typed/matrix-ops.d.ts +303 -0
- package/dist/typed/matrix-ops.d.ts.map +1 -0
- package/dist/typed/numeric.d.ts +395 -0
- package/dist/typed/numeric.d.ts.map +1 -0
- package/dist/typed/probability.d.ts +165 -0
- package/dist/typed/probability.d.ts.map +1 -0
- package/dist/typed/relational.d.ts +136 -0
- package/dist/typed/relational.d.ts.map +1 -0
- package/dist/typed/set.d.ts +145 -0
- package/dist/typed/set.d.ts.map +1 -0
- package/dist/typed/signal.d.ts +427 -0
- package/dist/typed/signal.d.ts.map +1 -0
- package/dist/typed/special.d.ts +469 -0
- package/dist/typed/special.d.ts.map +1 -0
- package/dist/typed/statistics.d.ts +174 -0
- package/dist/typed/statistics.d.ts.map +1 -0
- package/dist/typed/string.d.ts +114 -0
- package/dist/typed/string.d.ts.map +1 -0
- package/dist/typed/trigonometry.d.ts +111 -0
- package/dist/typed/trigonometry.d.ts.map +1 -0
- package/dist/typed/typed-bridge.d.ts +6 -0
- package/dist/typed/typed-bridge.d.ts.map +1 -0
- package/dist/typed/unit.d.ts +60 -0
- package/dist/typed/unit.d.ts.map +1 -0
- package/dist/types.d.ts +20 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/unit/to.d.ts +13 -0
- package/dist/unit/to.d.ts.map +1 -0
- package/dist/unit/toBest.d.ts +5 -0
- package/dist/unit/toBest.d.ts.map +1 -0
- package/dist/utils/array.d.ts +249 -0
- package/dist/utils/array.d.ts.map +1 -0
- package/dist/utils/bigint.d.ts +18 -0
- package/dist/utils/bigint.d.ts.map +1 -0
- package/dist/utils/bignumber/bitwise.d.ts +99 -0
- package/dist/utils/bignumber/bitwise.d.ts.map +1 -0
- package/dist/utils/bignumber/constants.d.ts +25 -0
- package/dist/utils/bignumber/constants.d.ts.map +1 -0
- package/dist/utils/bignumber/formatter.d.ts +105 -0
- package/dist/utils/bignumber/formatter.d.ts.map +1 -0
- package/dist/utils/bignumber/nearlyEqual.d.ts +18 -0
- package/dist/utils/bignumber/nearlyEqual.d.ts.map +1 -0
- package/dist/utils/clone.d.ts +7 -0
- package/dist/utils/clone.d.ts.map +1 -0
- package/dist/utils/collection.d.ts +67 -0
- package/dist/utils/collection.d.ts.map +1 -0
- package/dist/utils/complex.d.ts +11 -0
- package/dist/utils/complex.d.ts.map +1 -0
- package/dist/utils/customs.d.ts +51 -0
- package/dist/utils/customs.d.ts.map +1 -0
- package/dist/utils/emitter.d.ts +13 -0
- package/dist/utils/emitter.d.ts.map +1 -0
- package/dist/utils/factory.d.ts +112 -0
- package/dist/utils/factory.d.ts.map +1 -0
- package/dist/utils/function.d.ts +44 -0
- package/dist/utils/function.d.ts.map +1 -0
- package/dist/utils/hasNumericValue.d.ts +8 -0
- package/dist/utils/hasNumericValue.d.ts.map +1 -0
- package/dist/utils/is.d.ts +204 -0
- package/dist/utils/is.d.ts.map +1 -0
- package/dist/utils/isBounded.d.ts +6 -0
- package/dist/utils/isBounded.d.ts.map +1 -0
- package/dist/utils/isFinite.d.ts +10 -0
- package/dist/utils/isFinite.d.ts.map +1 -0
- package/dist/utils/isInteger.d.ts +8 -0
- package/dist/utils/isInteger.d.ts.map +1 -0
- package/dist/utils/isNaN.d.ts +7 -0
- package/dist/utils/isNaN.d.ts.map +1 -0
- package/dist/utils/isNegative.d.ts +9 -0
- package/dist/utils/isNegative.d.ts.map +1 -0
- package/dist/utils/isNumeric.d.ts +6 -0
- package/dist/utils/isNumeric.d.ts.map +1 -0
- package/dist/utils/isPositive.d.ts +9 -0
- package/dist/utils/isPositive.d.ts.map +1 -0
- package/dist/utils/isPrime.d.ts +7 -0
- package/dist/utils/isPrime.d.ts.map +1 -0
- package/dist/utils/isZero.d.ts +8 -0
- package/dist/utils/isZero.d.ts.map +1 -0
- package/dist/utils/log.d.ts +5 -0
- package/dist/utils/log.d.ts.map +1 -0
- package/dist/utils/lruQueue.d.ts +6 -0
- package/dist/utils/lruQueue.d.ts.map +1 -0
- package/dist/utils/map.d.ts +95 -0
- package/dist/utils/map.d.ts.map +1 -0
- package/dist/utils/node.d.ts +2 -0
- package/dist/utils/node.d.ts.map +1 -0
- package/dist/utils/noop.d.ts +6 -0
- package/dist/utils/noop.d.ts.map +1 -0
- package/dist/utils/number.d.ts +314 -0
- package/dist/utils/number.d.ts.map +1 -0
- package/dist/utils/numeric.d.ts +10 -0
- package/dist/utils/numeric.d.ts.map +1 -0
- package/dist/utils/object.d.ts +123 -0
- package/dist/utils/object.d.ts.map +1 -0
- package/dist/utils/optimizeCallback.d.ts +22 -0
- package/dist/utils/optimizeCallback.d.ts.map +1 -0
- package/dist/utils/parseNumber.d.ts +2 -0
- package/dist/utils/parseNumber.d.ts.map +1 -0
- package/dist/utils/print.d.ts +2 -0
- package/dist/utils/print.d.ts.map +1 -0
- package/dist/utils/product.d.ts +6 -0
- package/dist/utils/product.d.ts.map +1 -0
- package/dist/utils/string.d.ts +66 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/switch.d.ts +8 -0
- package/dist/utils/switch.d.ts.map +1 -0
- package/dist/utils/typeOf.d.ts +7 -0
- package/dist/utils/typeOf.d.ts.map +1 -0
- package/dist/wasm/WasmLoader.d.ts +395 -0
- package/dist/wasm/WasmLoader.d.ts.map +1 -0
- package/dist/wasm/bitwise/wasm-bridge.d.ts +65 -0
- package/dist/wasm/bitwise/wasm-bridge.d.ts.map +1 -0
- package/dist/wasm/integrity.d.ts +48 -0
- package/dist/wasm/integrity.d.ts.map +1 -0
- package/dist/wasm/interpolation/wasm-bridge.d.ts +95 -0
- package/dist/wasm/interpolation/wasm-bridge.d.ts.map +1 -0
- package/dist/wasm/poly/wasm-bridge.d.ts +99 -0
- package/dist/wasm/poly/wasm-bridge.d.ts.map +1 -0
- package/dist/wasm/signal/wasm-bridge.d.ts +61 -0
- package/dist/wasm/signal/wasm-bridge.d.ts.map +1 -0
- package/dist/wasm/sort/wasm-bridge.d.ts +43 -0
- package/dist/wasm/sort/wasm-bridge.d.ts.map +1 -0
- package/dist/wasm/special/wasm-bridge.d.ts +133 -0
- package/dist/wasm/special/wasm-bridge.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed String Formatting Functions
|
|
3
|
+
*
|
|
4
|
+
* Polymorphic string-formatting operations using typed-function for runtime dispatch.
|
|
5
|
+
* Supports `number`, `BigNumber`, and `string` types as appropriate for each op.
|
|
6
|
+
*
|
|
7
|
+
* These are clean implementations using mathTyped dispatch — the dormant synced
|
|
8
|
+
* layer under functions/src/string/ is left untouched and used only as an
|
|
9
|
+
* algorithm reference.
|
|
10
|
+
*
|
|
11
|
+
* Semantics follow the mathjs convention:
|
|
12
|
+
* - bin/hex/oct: sign-magnitude representation for negative numbers (NOT two's-complement),
|
|
13
|
+
* e.g. bin(-5) === '-0b101', hex(-5) === '-0x5'.
|
|
14
|
+
* (Two's-complement only applies when the optional wordSize argument is used.)
|
|
15
|
+
* - format: delegates to utils/string.ts `format()` which dispatches on number vs
|
|
16
|
+
* BigNumber, with full options-object support (notation, precision, lowerExp, upperExp, etc.)
|
|
17
|
+
* - print: replaces $key / $key.nested placeholders in a template string using
|
|
18
|
+
* values from a supplied object or array.
|
|
19
|
+
*
|
|
20
|
+
* @packageDocumentation
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Format a number as binary.
|
|
24
|
+
*
|
|
25
|
+
* Negative numbers use sign-magnitude notation (e.g. -5 → '-0b101').
|
|
26
|
+
* When the optional `wordSize` argument is supplied the value is
|
|
27
|
+
* formatted as a signed two's-complement integer of that many bits
|
|
28
|
+
* and a size suffix ('i<wordSize>') is appended.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* bin(2) // '0b10'
|
|
33
|
+
* bin(255) // '0b11111111'
|
|
34
|
+
* bin(-5) // '-0b101'
|
|
35
|
+
* bin(0) // '0b0'
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare const bin: import("typed-function").TypedFunction;
|
|
39
|
+
/**
|
|
40
|
+
* Format a number as hexadecimal.
|
|
41
|
+
*
|
|
42
|
+
* Negative numbers use sign-magnitude notation (e.g. -5 → '-0x5').
|
|
43
|
+
* When the optional `wordSize` argument is supplied the value is
|
|
44
|
+
* formatted as a signed two's-complement integer of that many bits.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* hex(255) // '0xff'
|
|
49
|
+
* hex(-5) // '-0x5'
|
|
50
|
+
* hex(0) // '0x0'
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare const hex: import("typed-function").TypedFunction;
|
|
54
|
+
/**
|
|
55
|
+
* Format a number as octal.
|
|
56
|
+
*
|
|
57
|
+
* Negative numbers use sign-magnitude notation (e.g. -8 → '-0o10').
|
|
58
|
+
* When the optional `wordSize` argument is supplied the value is
|
|
59
|
+
* formatted as a signed two's-complement integer of that many bits.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```typescript
|
|
63
|
+
* oct(8) // '0o10'
|
|
64
|
+
* oct(-8) // '-0o10'
|
|
65
|
+
* oct(0) // '0o0'
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export declare const oct: import("typed-function").TypedFunction;
|
|
69
|
+
/**
|
|
70
|
+
* Format a value of any type into a string.
|
|
71
|
+
*
|
|
72
|
+
* When called with a plain number or BigNumber it delegates to the lower-level
|
|
73
|
+
* `utils/string.ts` formatter which supports the full options object:
|
|
74
|
+
* `{ notation, precision, lowerExp, upperExp, fraction, truncate }`.
|
|
75
|
+
*
|
|
76
|
+
* Passing a positional number as the second argument is shorthand for
|
|
77
|
+
* `{ precision: n }`.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```typescript
|
|
81
|
+
* format(3.14159, 3) // '3.14'
|
|
82
|
+
* format(0.0001, { precision: 2 }) // '1e-4'
|
|
83
|
+
* format(12400, { notation: 'engineering' }) // '12.4e+3'
|
|
84
|
+
* format(Infinity) // 'Infinity'
|
|
85
|
+
* format(NaN) // 'NaN'
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export declare const format: import("typed-function").TypedFunction;
|
|
89
|
+
/**
|
|
90
|
+
* Interpolate values into a string template.
|
|
91
|
+
*
|
|
92
|
+
* Placeholders have the form `$key` or `$key.nested`. Array indices are
|
|
93
|
+
* accessed as `$0`, `$1`, etc. Non-string values are converted using `format`.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* print('Hello $name!', { name: 'World' }) // 'Hello World!'
|
|
98
|
+
* print('Lucy is $age years old', { age: 5 }) // 'Lucy is 5 years old'
|
|
99
|
+
* print('$0 and $1', ['apples', 'bananas']) // 'apples and bananas'
|
|
100
|
+
* print('pi ≈ $pi', { pi: Math.PI }, 4) // 'pi ≈ 3.142'
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
export declare const print: import("typed-function").TypedFunction;
|
|
104
|
+
/**
|
|
105
|
+
* All typed string-formatting functions.
|
|
106
|
+
*/
|
|
107
|
+
export declare const typedString: {
|
|
108
|
+
bin: import("typed-function").TypedFunction;
|
|
109
|
+
hex: import("typed-function").TypedFunction;
|
|
110
|
+
oct: import("typed-function").TypedFunction;
|
|
111
|
+
format: import("typed-function").TypedFunction;
|
|
112
|
+
print: import("typed-function").TypedFunction;
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=string.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/typed/string.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAkGH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,GAAG,wCAQd,CAAC;AAMH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,GAAG,wCAQd,CAAC;AAMH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,GAAG,wCAQd,CAAC;AAMH;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,MAAM,wCAyCjB,CAAC;AAMH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,KAAK,wCAShB,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;CAMvB,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed Trigonometric Functions (Parallel-First)
|
|
3
|
+
*
|
|
4
|
+
* Polymorphic trigonometric operations using typed-function.
|
|
5
|
+
* Supports Complex, BigNumber, and Float64Array types.
|
|
6
|
+
*
|
|
7
|
+
* Following the parallel-first philosophy per CLAUDE.md:
|
|
8
|
+
* - Use workers for ALL array transformations (Float64Array)
|
|
9
|
+
* - Use workers for ALL numerical computations that can be batched
|
|
10
|
+
* - Only fall back to sequential for trivial scalar operations
|
|
11
|
+
*
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Sine function with parallel array support
|
|
16
|
+
*/
|
|
17
|
+
export declare const sin: import("typed-function").TypedFunction;
|
|
18
|
+
/**
|
|
19
|
+
* Cosine function with parallel array support
|
|
20
|
+
*/
|
|
21
|
+
export declare const cos: import("typed-function").TypedFunction;
|
|
22
|
+
/**
|
|
23
|
+
* Tangent function with parallel array support
|
|
24
|
+
*/
|
|
25
|
+
export declare const tan: import("typed-function").TypedFunction;
|
|
26
|
+
/**
|
|
27
|
+
* Cosecant function (1/sin)
|
|
28
|
+
*/
|
|
29
|
+
export declare const csc: import("typed-function").TypedFunction;
|
|
30
|
+
/**
|
|
31
|
+
* Secant function (1/cos)
|
|
32
|
+
*/
|
|
33
|
+
export declare const sec: import("typed-function").TypedFunction;
|
|
34
|
+
/**
|
|
35
|
+
* Cotangent function (1/tan)
|
|
36
|
+
*/
|
|
37
|
+
export declare const cot: import("typed-function").TypedFunction;
|
|
38
|
+
/**
|
|
39
|
+
* Arc sine (inverse sine)
|
|
40
|
+
*/
|
|
41
|
+
export declare const asin: import("typed-function").TypedFunction;
|
|
42
|
+
/**
|
|
43
|
+
* Arc cosine (inverse cosine)
|
|
44
|
+
*/
|
|
45
|
+
export declare const acos: import("typed-function").TypedFunction;
|
|
46
|
+
/**
|
|
47
|
+
* Arc tangent (inverse tangent)
|
|
48
|
+
*/
|
|
49
|
+
export declare const atan: import("typed-function").TypedFunction;
|
|
50
|
+
/**
|
|
51
|
+
* Arc tangent with two arguments (atan2)
|
|
52
|
+
*/
|
|
53
|
+
export declare const atan2: import("typed-function").TypedFunction;
|
|
54
|
+
/**
|
|
55
|
+
* Arc cosecant
|
|
56
|
+
*/
|
|
57
|
+
export declare const acsc: import("typed-function").TypedFunction;
|
|
58
|
+
/**
|
|
59
|
+
* Arc secant
|
|
60
|
+
*/
|
|
61
|
+
export declare const asec: import("typed-function").TypedFunction;
|
|
62
|
+
/**
|
|
63
|
+
* Arc cotangent
|
|
64
|
+
*/
|
|
65
|
+
export declare const acot: import("typed-function").TypedFunction;
|
|
66
|
+
/**
|
|
67
|
+
* Inverse hyperbolic sine
|
|
68
|
+
*/
|
|
69
|
+
export declare const asinh: import("typed-function").TypedFunction;
|
|
70
|
+
/**
|
|
71
|
+
* Inverse hyperbolic cosine
|
|
72
|
+
*/
|
|
73
|
+
export declare const acosh: import("typed-function").TypedFunction;
|
|
74
|
+
/**
|
|
75
|
+
* Inverse hyperbolic tangent
|
|
76
|
+
*/
|
|
77
|
+
export declare const atanh: import("typed-function").TypedFunction;
|
|
78
|
+
/**
|
|
79
|
+
* Convert degrees to radians
|
|
80
|
+
*/
|
|
81
|
+
export declare const toRadians: import("typed-function").TypedFunction;
|
|
82
|
+
/**
|
|
83
|
+
* Convert radians to degrees
|
|
84
|
+
*/
|
|
85
|
+
export declare const toDegrees: import("typed-function").TypedFunction;
|
|
86
|
+
/**
|
|
87
|
+
* Hypotenuse (sqrt(a^2 + b^2)) without intermediate overflow
|
|
88
|
+
*/
|
|
89
|
+
export declare const hypot: import("typed-function").TypedFunction;
|
|
90
|
+
export declare const typedTrigonometry: {
|
|
91
|
+
sin: import("typed-function").TypedFunction;
|
|
92
|
+
cos: import("typed-function").TypedFunction;
|
|
93
|
+
tan: import("typed-function").TypedFunction;
|
|
94
|
+
csc: import("typed-function").TypedFunction;
|
|
95
|
+
sec: import("typed-function").TypedFunction;
|
|
96
|
+
cot: import("typed-function").TypedFunction;
|
|
97
|
+
asin: import("typed-function").TypedFunction;
|
|
98
|
+
acos: import("typed-function").TypedFunction;
|
|
99
|
+
atan: import("typed-function").TypedFunction;
|
|
100
|
+
atan2: import("typed-function").TypedFunction;
|
|
101
|
+
acsc: import("typed-function").TypedFunction;
|
|
102
|
+
asec: import("typed-function").TypedFunction;
|
|
103
|
+
acot: import("typed-function").TypedFunction;
|
|
104
|
+
asinh: import("typed-function").TypedFunction;
|
|
105
|
+
acosh: import("typed-function").TypedFunction;
|
|
106
|
+
atanh: import("typed-function").TypedFunction;
|
|
107
|
+
toRadians: import("typed-function").TypedFunction;
|
|
108
|
+
toDegrees: import("typed-function").TypedFunction;
|
|
109
|
+
hypot: import("typed-function").TypedFunction;
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=trigonometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trigonometry.d.ts","sourceRoot":"","sources":["../../src/typed/trigonometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAiBH;;GAEG;AACH,eAAO,MAAM,GAAG,wCAUd,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,GAAG,wCAUd,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,GAAG,wCAUd,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,GAAG,wCAed,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,GAAG,wCAed,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,GAAG,wCAed,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,IAAI,wCAqBf,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,IAAI,wCAoBf,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,IAAI,wCAef,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,KAAK,wCAEhB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,IAAI,wCAGf,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,IAAI,wCAGf,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,IAAI,wCAGf,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,KAAK,wCAehB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,KAAK,wCAehB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,KAAK,wCAehB,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,SAAS,wCAEpB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,SAAS,wCAEpB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,KAAK,wCAKhB,CAAC;AAMH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;CA2B7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typed-bridge.d.ts","sourceRoot":"","sources":["../../src/typed/typed-bridge.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAIrC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed Unit Functions
|
|
3
|
+
*
|
|
4
|
+
* Polymorphic dimensional-analysis operations dispatched through
|
|
5
|
+
* `mathTyped`. Wraps the {@link Unit} value type from
|
|
6
|
+
* `@danielsimonjr/mathts-core`:
|
|
7
|
+
*
|
|
8
|
+
* - `to(value, target)` — convert a Unit (or construct one) to a target
|
|
9
|
+
* notation. Throws on dimension mismatch.
|
|
10
|
+
* - `toBest(value)` — pick the unit (with SI prefix) that gives the
|
|
11
|
+
* magnitude closest to 1.
|
|
12
|
+
*
|
|
13
|
+
* Both functions accept either a `Unit` instance or a `(value, notation)`
|
|
14
|
+
* pair (the latter just constructs a `Unit` on the fly).
|
|
15
|
+
*
|
|
16
|
+
* @packageDocumentation
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Convert a quantity to a target unit notation.
|
|
20
|
+
*
|
|
21
|
+
* Dispatches over:
|
|
22
|
+
*
|
|
23
|
+
* - `(Unit, string)` — convert an existing Unit to the target.
|
|
24
|
+
* - `(number, string)` — construct a Unit from a bare numeric value with
|
|
25
|
+
* the given notation. (No conversion happens — the result simply *labels*
|
|
26
|
+
* the value with the target notation. Useful for entering a quantity
|
|
27
|
+
* into the unit system.)
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* to(new Unit(1, 'm'), 'ft'); // 1 m → 3.28084 ft
|
|
32
|
+
* to(20, '°C'); // construct: 20 °C
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @throws {DimensionMismatchError} when converting between incompatible
|
|
36
|
+
* dimension vectors (e.g. metres to seconds).
|
|
37
|
+
*/
|
|
38
|
+
export declare const to: import("typed-function").TypedFunction;
|
|
39
|
+
/**
|
|
40
|
+
* Pick a unit-of-magnitude representation that places the displayed value
|
|
41
|
+
* closest to 1.
|
|
42
|
+
*
|
|
43
|
+
* For example, `0.0001 m` becomes `0.1 mm`, and `1500 g` (canonical
|
|
44
|
+
* `1.5 kg`) becomes `1.5 kg`.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* toBest(new Unit(0.0001, 'm')); // 0.1 mm
|
|
49
|
+
* toBest(new Unit(1000, 'g')); // 1 kg
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare const toBest: import("typed-function").TypedFunction;
|
|
53
|
+
/**
|
|
54
|
+
* All typed unit functions combined.
|
|
55
|
+
*/
|
|
56
|
+
export declare const typedUnit: {
|
|
57
|
+
to: import("typed-function").TypedFunction;
|
|
58
|
+
toBest: import("typed-function").TypedFunction;
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=unit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unit.d.ts","sourceRoot":"","sources":["../../src/typed/unit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAQH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,EAAE,wCAGb,CAAC;AAMH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,wCAEjB,CAAC;AAMH;;GAEG;AACH,eAAO,MAAM,SAAS;;;CAGrB,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type { TypedFunction } from './core/function/typed.js';
|
|
2
|
+
export type { MathJsConfig, ConfigOptions } from './core/config.js';
|
|
3
|
+
export type { MathJsInstance } from './core/create.js';
|
|
4
|
+
export type { Matrix, MathCollection, MathNumericType, MathScalarType, MathArray, } from '../types/index.js';
|
|
5
|
+
export type BigNumber = import('./type/local/Decimal.ts').Decimal;
|
|
6
|
+
export type Complex = import('complex.js').default;
|
|
7
|
+
export type Fraction = import('fraction.js').default;
|
|
8
|
+
export interface SparseMatrix {
|
|
9
|
+
type: 'SparseMatrix';
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
export interface Unit {
|
|
13
|
+
type: 'Unit';
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}
|
|
16
|
+
export interface MatrixConstructor {
|
|
17
|
+
new (...args: any[]): any;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAIA,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACpE,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD,YAAY,EACV,MAAM,EACN,cAAc,EACd,eAAe,EACf,cAAc,EACd,SAAS,GACV,MAAM,mBAAmB,CAAC;AAG3B,MAAM,MAAM,SAAS,GAAG,OAAO,yBAAyB,EAAE,OAAO,CAAC;AAClE,MAAM,MAAM,OAAO,GAAG,OAAO,YAAY,EAAE,OAAO,CAAC;AACnD,MAAM,MAAM,QAAQ,GAAG,OAAO,aAAa,EAAE,OAAO,CAAC;AAGrD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,cAAc,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAGD,MAAM,WAAW,iBAAiB;IAChC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TypedFunction } from '../core/function/typed.js';
|
|
2
|
+
interface Matrix {
|
|
3
|
+
size(): number[];
|
|
4
|
+
storage(): string;
|
|
5
|
+
}
|
|
6
|
+
interface ToDependencies {
|
|
7
|
+
typed: TypedFunction;
|
|
8
|
+
matrix: (data: unknown[]) => Matrix;
|
|
9
|
+
concat: TypedFunction;
|
|
10
|
+
}
|
|
11
|
+
export declare const createTo: import("../utils/factory.js").FactoryFunction<ToDependencies, unknown>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=to.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to.d.ts","sourceRoot":"","sources":["../../src/unit/to.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAO/D,UAAU,MAAM;IACd,IAAI,IAAI,MAAM,EAAE,CAAC;IACjB,OAAO,IAAI,MAAM,CAAC;CACnB;AAED,UAAU,cAAc;IACtB,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,MAAM,CAAC;IACpC,MAAM,EAAE,aAAa,CAAC;CACvB;AAKD,eAAO,MAAM,QAAQ,wEA0CpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toBest.d.ts","sourceRoot":"","sources":["../../src/unit/toBest.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAU/D,eAAO,MAAM,YAAY;WAGF,aAAa;WA2CnC,CAAC"}
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { Index, Matrix } from './is.js';
|
|
2
|
+
export type NestedArray<T> = T | NestedArray<T>[];
|
|
3
|
+
export type ArrayOrScalar<T> = T | T[] | NestedArray<T>;
|
|
4
|
+
export interface IdentifiedValue<T> {
|
|
5
|
+
value: T;
|
|
6
|
+
identifier: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Calculate the size of a multi dimensional array.
|
|
10
|
+
* This function checks the size of the first entry, it does not validate
|
|
11
|
+
* whether all dimensions match. (use function `validate` for that)
|
|
12
|
+
* @param {Array} x
|
|
13
|
+
* @return {number[]} size
|
|
14
|
+
*/
|
|
15
|
+
export declare function arraySize<T>(x: NestedArray<T>): number[];
|
|
16
|
+
/**
|
|
17
|
+
* Validate whether each element in a multi dimensional array has
|
|
18
|
+
* a size corresponding to the provided size array.
|
|
19
|
+
* @param {Array} array Array to be validated
|
|
20
|
+
* @param {number[]} size Array with the size of each dimension
|
|
21
|
+
* @throws DimensionError
|
|
22
|
+
*/
|
|
23
|
+
export declare function validate<T>(array: NestedArray<T>, size: number[]): void;
|
|
24
|
+
/**
|
|
25
|
+
* Validate whether the source of the index matches the size of the Array
|
|
26
|
+
* @param {Array | Matrix} value Array to be validated
|
|
27
|
+
* @param {Index} index Index with the source information to validate
|
|
28
|
+
* @throws DimensionError
|
|
29
|
+
*/
|
|
30
|
+
export declare function validateIndexSourceSize(value: any[] | Matrix, index: Index): void;
|
|
31
|
+
/**
|
|
32
|
+
* Test whether index is an integer number with index >= 0 and index < length
|
|
33
|
+
* when length is provided
|
|
34
|
+
* @param {number} index Zero-based index
|
|
35
|
+
* @param {number} [length] Length of the array
|
|
36
|
+
*/
|
|
37
|
+
export declare function validateIndex(index: number | undefined, length?: number): void;
|
|
38
|
+
/**
|
|
39
|
+
* Test if an index has empty values
|
|
40
|
+
* @param {Index} index Zero-based index
|
|
41
|
+
*/
|
|
42
|
+
export declare function isEmptyIndex(index: Index): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Resize a multi dimensional array. The resized array is returned.
|
|
45
|
+
* @param {Array | number} array Array to be resized
|
|
46
|
+
* @param {number[]} size Array with the size of each dimension
|
|
47
|
+
* @param {*} [defaultValue=0] Value to be filled in new entries,
|
|
48
|
+
* zero by default. Specify for example `null`,
|
|
49
|
+
* to clearly see entries that are not explicitly
|
|
50
|
+
* set.
|
|
51
|
+
* @return {Array} array The resized array
|
|
52
|
+
*/
|
|
53
|
+
export declare function resize<T = any>(array: T | T[] | NestedArray<T>, size: number[], defaultValue?: T): NestedArray<T>;
|
|
54
|
+
/**
|
|
55
|
+
* Re-shape a multi dimensional array to fit the specified dimensions
|
|
56
|
+
* @param {Array} array Array to be reshaped
|
|
57
|
+
* @param {number[]} sizes List of sizes for each dimension
|
|
58
|
+
* @returns {Array} Array whose data has been formatted to fit the
|
|
59
|
+
* specified dimensions
|
|
60
|
+
*
|
|
61
|
+
* @throws {DimensionError} If the product of the new dimension sizes does
|
|
62
|
+
* not equal that of the old ones
|
|
63
|
+
*/
|
|
64
|
+
export declare function reshape<T = any>(array: NestedArray<T>, sizes: number[]): NestedArray<T>;
|
|
65
|
+
/**
|
|
66
|
+
* Replaces the wildcard -1 in the sizes array.
|
|
67
|
+
* @param {number[]} sizes List of sizes for each dimension. At most one wildcard.
|
|
68
|
+
* @param {number} currentLength Number of elements in the array.
|
|
69
|
+
* @throws {Error} If more than one wildcard or unable to replace it.
|
|
70
|
+
* @returns {number[]} The sizes array with wildcard replaced.
|
|
71
|
+
*/
|
|
72
|
+
export declare function processSizesWildcard(sizes: number[], currentLength: number): number[];
|
|
73
|
+
/**
|
|
74
|
+
* Squeeze a multi dimensional array
|
|
75
|
+
* @param {Array} array
|
|
76
|
+
* @param {Array} [size]
|
|
77
|
+
* @returns {Array} returns the array itself
|
|
78
|
+
*/
|
|
79
|
+
export declare function squeeze<T>(array: NestedArray<T>, size?: number[]): T | NestedArray<T>;
|
|
80
|
+
/**
|
|
81
|
+
* Unsqueeze a multi dimensional array: add dimensions when missing
|
|
82
|
+
*
|
|
83
|
+
* Parameter `size` will be mutated to match the new, unsqueezed matrix size.
|
|
84
|
+
*
|
|
85
|
+
* @param {Array} array
|
|
86
|
+
* @param {number} dims Desired number of dimensions of the array
|
|
87
|
+
* @param {number} [outer] Number of outer dimensions to be added
|
|
88
|
+
* @param {Array} [size] Current size of array.
|
|
89
|
+
* @returns {Array} returns the array itself
|
|
90
|
+
* @private
|
|
91
|
+
*/
|
|
92
|
+
export declare function unsqueeze<T>(array: NestedArray<T>, dims: number, outer?: number, size?: number[]): NestedArray<T>;
|
|
93
|
+
/**
|
|
94
|
+
* Flatten a multi dimensional array, put all elements in a one dimensional
|
|
95
|
+
* array
|
|
96
|
+
* @param {Array} array A multi dimensional array
|
|
97
|
+
* @param {boolean} isRectangular Optional. If the array is rectangular (not jagged)
|
|
98
|
+
* @return {Array} The flattened array (1 dimensional)
|
|
99
|
+
*/
|
|
100
|
+
export declare function flatten<T>(array: NestedArray<T>, isRectangular?: boolean): T[];
|
|
101
|
+
/**
|
|
102
|
+
* A safe map
|
|
103
|
+
* @param {Array} array
|
|
104
|
+
* @param {function} callback
|
|
105
|
+
*/
|
|
106
|
+
export declare function map<T, U>(array: T[], callback: (value: T, index: number, array: T[]) => U): U[];
|
|
107
|
+
/**
|
|
108
|
+
* A safe forEach
|
|
109
|
+
* @param {Array} array
|
|
110
|
+
* @param {function} callback
|
|
111
|
+
*/
|
|
112
|
+
export declare function forEach<T>(array: T[], callback: (value: T, index: number, array: T[]) => void): void;
|
|
113
|
+
/**
|
|
114
|
+
* A safe filter
|
|
115
|
+
* @param {Array} array
|
|
116
|
+
* @param {function} callback
|
|
117
|
+
*/
|
|
118
|
+
export declare function filter<T>(array: T[], callback: (value: T, index: number, array: T[]) => boolean): T[];
|
|
119
|
+
/**
|
|
120
|
+
* Filter values in an array given a regular expression
|
|
121
|
+
* @param {Array} array
|
|
122
|
+
* @param {RegExp} regexp
|
|
123
|
+
* @return {Array} Returns the filtered array
|
|
124
|
+
* @private
|
|
125
|
+
*/
|
|
126
|
+
export declare function filterRegExp(array: string[], regexp: RegExp): string[];
|
|
127
|
+
/**
|
|
128
|
+
* A safe join
|
|
129
|
+
* @param {Array} array
|
|
130
|
+
* @param {string} separator
|
|
131
|
+
*/
|
|
132
|
+
export declare function join<T>(array: T[], separator: string): string;
|
|
133
|
+
/**
|
|
134
|
+
* Assign a numeric identifier to every element of a sorted array
|
|
135
|
+
* @param {Array} a An array
|
|
136
|
+
* @return {Array} An array of objects containing the original value and its identifier
|
|
137
|
+
*/
|
|
138
|
+
export declare function identify<T>(a: T[]): IdentifiedValue<T>[];
|
|
139
|
+
/**
|
|
140
|
+
* Remove the numeric identifier from the elements
|
|
141
|
+
* @param {array} a An array
|
|
142
|
+
* @return {array} An array of values without identifiers
|
|
143
|
+
*/
|
|
144
|
+
export declare function generalize<T>(a: IdentifiedValue<T>[]): T[];
|
|
145
|
+
/**
|
|
146
|
+
* Check the datatype of a given object
|
|
147
|
+
* This is a low level implementation that should only be used by
|
|
148
|
+
* parent Matrix classes such as SparseMatrix or DenseMatrix
|
|
149
|
+
* This method does not validate Array Matrix shape
|
|
150
|
+
* @param {Array} array
|
|
151
|
+
* @param {function} typeOf Callback function to use to determine the type of a value
|
|
152
|
+
* @return {string}
|
|
153
|
+
*/
|
|
154
|
+
export declare function getArrayDataType(array: any[], typeOf: (value: any) => string): string | undefined;
|
|
155
|
+
/**
|
|
156
|
+
* Return the last item from an array
|
|
157
|
+
* @param {Array} array
|
|
158
|
+
* @returns {*}
|
|
159
|
+
*/
|
|
160
|
+
export declare function last<T>(array: T[]): T;
|
|
161
|
+
/**
|
|
162
|
+
* Get all but the last element of array.
|
|
163
|
+
* @param {Array} array
|
|
164
|
+
* @returns {Array}
|
|
165
|
+
*/
|
|
166
|
+
export declare function initial<T>(array: T[]): T[];
|
|
167
|
+
/**
|
|
168
|
+
* Concatenates many arrays in the specified direction
|
|
169
|
+
* @param {...Array} arrays All the arrays to concatenate
|
|
170
|
+
* @param {number} concatDim The dimension on which to concatenate (zero-based)
|
|
171
|
+
* @returns {Array}
|
|
172
|
+
*/
|
|
173
|
+
export declare function concat<T>(...args: [...NestedArray<T>[], number]): NestedArray<T>[];
|
|
174
|
+
/**
|
|
175
|
+
* Receives two or more sizes and gets the broadcasted size for both.
|
|
176
|
+
* @param {...number[]} sizes Sizes to broadcast together
|
|
177
|
+
* @returns {number[]} The broadcasted size
|
|
178
|
+
*/
|
|
179
|
+
export declare function broadcastSizes(...sizes: number[][]): number[];
|
|
180
|
+
/**
|
|
181
|
+
* Checks if it's possible to broadcast a size to another size
|
|
182
|
+
* @param {number[]} size The size of the array to check
|
|
183
|
+
* @param {number[]} toSize The size of the array to validate if it can be broadcasted to
|
|
184
|
+
*/
|
|
185
|
+
export declare function checkBroadcastingRules(size: number[], toSize: number[]): void;
|
|
186
|
+
/**
|
|
187
|
+
* Broadcasts a single array to a certain size
|
|
188
|
+
* @param {Array} array Array to be broadcasted
|
|
189
|
+
* @param {number[]} toSize Size to broadcast the array
|
|
190
|
+
* @returns {Array} The broadcasted array
|
|
191
|
+
*/
|
|
192
|
+
export declare function broadcastTo<T>(array: NestedArray<T>, toSize: number[]): NestedArray<T>;
|
|
193
|
+
/**
|
|
194
|
+
* Broadcasts arrays and returns the broadcasted arrays in an array
|
|
195
|
+
* @param {...Array | any} arrays
|
|
196
|
+
* @returns {Array[]} The broadcasted arrays
|
|
197
|
+
*/
|
|
198
|
+
export declare function broadcastArrays<T>(...arrays: NestedArray<T>[]): NestedArray<T>[];
|
|
199
|
+
/**
|
|
200
|
+
* Stretches a matrix up to a certain size in a certain dimension
|
|
201
|
+
* @param {Array} arrayToStretch
|
|
202
|
+
* @param {number[]} sizeToStretch
|
|
203
|
+
* @param {number} dimToStretch
|
|
204
|
+
* @returns {Array} The stretched array
|
|
205
|
+
*/
|
|
206
|
+
export declare function stretch<T>(arrayToStretch: NestedArray<T>, sizeToStretch: number, dimToStretch: number): NestedArray<T>;
|
|
207
|
+
/**
|
|
208
|
+
* Retrieves a single element from an array given an index.
|
|
209
|
+
*
|
|
210
|
+
* @param {Array} array - The array from which to retrieve the value.
|
|
211
|
+
* @param {Array<number>} index - An array of indices specifying the position of the desired element in each dimension.
|
|
212
|
+
* @returns {*} - The value at the specified position in the array.
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* const arr = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]];
|
|
216
|
+
* const index = [1, 0, 1];
|
|
217
|
+
* console.log(get(arr, index)); // 6
|
|
218
|
+
*/
|
|
219
|
+
export declare function get<T>(array: NestedArray<T>, index: number[]): T;
|
|
220
|
+
/**
|
|
221
|
+
* Recursively maps over each element of nested array using a provided callback function.
|
|
222
|
+
*
|
|
223
|
+
* @param {Array} array - The array to be mapped.
|
|
224
|
+
* @param {Function} callback - The function to execute on each element, taking three arguments:
|
|
225
|
+
* - `value` (any): The current element being processed in the array.
|
|
226
|
+
* - `index` (Array<number>): The index of the current element being processed in the array.
|
|
227
|
+
* - `array` (Array): The array `deepMap` was called upon.
|
|
228
|
+
* @param {boolean} [skipIndex=false] - If true, the callback function is called with only the value.
|
|
229
|
+
* @returns {Array} A new array with each element being the result of the callback function.
|
|
230
|
+
*/
|
|
231
|
+
export declare function deepMap<T, U>(array: NestedArray<T>, callback: ((value: T, index: number[], array: NestedArray<T>) => U) | ((value: T) => U), skipIndex?: boolean): NestedArray<U>;
|
|
232
|
+
/**
|
|
233
|
+
* Recursively iterates over each element in a multi-dimensional array and applies a callback function.
|
|
234
|
+
*
|
|
235
|
+
* @param {Array} array - The multi-dimensional array to iterate over.
|
|
236
|
+
* @param {Function} callback - The function to execute for each element. It receives three arguments:
|
|
237
|
+
* - {any} value: The current element being processed in the array.
|
|
238
|
+
* - {Array<number>} index: The index of the current element in each dimension.
|
|
239
|
+
* - {Array} array: The original array being processed.
|
|
240
|
+
* @param {boolean} [skipIndex=false] - If true, the callback function is called with only the value.
|
|
241
|
+
*/
|
|
242
|
+
export declare function deepForEach<T>(array: NestedArray<T>, callback: ((value: T, index: number[], array: NestedArray<T>) => void) | ((value: T) => void), skipIndex?: boolean): void;
|
|
243
|
+
/**
|
|
244
|
+
* Deep clones a multidimensional array
|
|
245
|
+
* @param {Array} array
|
|
246
|
+
* @returns {Array} cloned array
|
|
247
|
+
*/
|
|
248
|
+
export declare function clone<T>(array: T[]): T[];
|
|
249
|
+
//# sourceMappingURL=array.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../src/utils/array.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build a bigint logarithm function from a number logarithm,
|
|
3
|
+
* still returning a number. The idea is that 15 hexadecimal digits
|
|
4
|
+
* (60 bits) saturates the mantissa of the log, and each additional hex
|
|
5
|
+
* digit effectively just adds the log of 16 to the resulting value. So
|
|
6
|
+
* convert the most significant 15 hex digits to a number and take its
|
|
7
|
+
* log, and then add the log of 16 for each additional hex digit that
|
|
8
|
+
* was in the bigint.
|
|
9
|
+
* For negative numbers (complex logarithms), following the bignum
|
|
10
|
+
* implementation, it just downgrades to number and uses the complex result.
|
|
11
|
+
* @param {number} log16 the log of 16
|
|
12
|
+
* @param {(number) -> number} numberLog the logarithm function for numbers
|
|
13
|
+
* @param {ConfigurationObject} config the mathjs configuration
|
|
14
|
+
* @param {(number) -> Complex} cplx the associated Complex log
|
|
15
|
+
* @returns {(bigint) -> number} the corresponding logarithm for bigints
|
|
16
|
+
*/
|
|
17
|
+
export declare function promoteLogarithm(log16: any, numberLog: any, config: any, cplx: any): (b: any) => any;
|
|
18
|
+
//# sourceMappingURL=bigint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bigint.d.ts","sourceRoot":"","sources":["../../src/utils/bigint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,IAChE,GAAG,GAAG,SASxB"}
|