@danielsimonjr/mathts-functions 0.42.0 → 0.43.1

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.
Files changed (45) hide show
  1. package/dist/core/config.d.ts +10 -13
  2. package/dist/core/config.d.ts.map +1 -1
  3. package/dist/core/create.d.ts +2 -8
  4. package/dist/core/create.d.ts.map +1 -1
  5. package/dist/error/DimensionError.d.ts +11 -12
  6. package/dist/error/DimensionError.d.ts.map +1 -1
  7. package/dist/error/IndexError.d.ts +13 -19
  8. package/dist/error/IndexError.d.ts.map +1 -1
  9. package/dist/factories/index.d.ts.map +1 -1
  10. package/dist/factories/matrix-bridge.d.ts +1 -1
  11. package/dist/factories/scope.d.ts +1 -1
  12. package/dist/index.js +498 -1462
  13. package/dist/numeric/matrix-functions.d.ts +7 -5
  14. package/dist/numeric/matrix-functions.d.ts.map +1 -1
  15. package/dist/signal/fft-helpers.d.ts +6 -0
  16. package/dist/signal/fft-helpers.d.ts.map +1 -1
  17. package/dist/signal/fft.d.ts +9 -0
  18. package/dist/signal/fft.d.ts.map +1 -1
  19. package/dist/type/matrix/types.d.ts +8 -35
  20. package/dist/type/matrix/types.d.ts.map +1 -1
  21. package/dist/typed/arithmetic.d.ts.map +1 -1
  22. package/dist/typed/bitwise.d.ts +1 -1
  23. package/dist/typed/probability.d.ts +2 -2
  24. package/dist/typed/relational.d.ts +3 -3
  25. package/dist/typed/string.d.ts +3 -3
  26. package/dist/typed/typed-bridge.d.ts +1 -1
  27. package/dist/utils/array.d.ts +20 -237
  28. package/dist/utils/array.d.ts.map +1 -1
  29. package/dist/utils/collection.d.ts +12 -64
  30. package/dist/utils/collection.d.ts.map +1 -1
  31. package/dist/utils/factory.d.ts +45 -70
  32. package/dist/utils/factory.d.ts.map +1 -1
  33. package/dist/utils/map.d.ts +30 -103
  34. package/dist/utils/map.d.ts.map +1 -1
  35. package/dist/utils/string.d.ts +15 -59
  36. package/dist/utils/string.d.ts.map +1 -1
  37. package/dist/wasm/WasmLoader.d.ts +2 -10
  38. package/dist/wasm/WasmLoader.d.ts.map +1 -1
  39. package/dist/wasm/integrity.d.ts +2 -4
  40. package/dist/wasm/integrity.d.ts.map +1 -1
  41. package/package.json +5 -5
  42. package/dist/error/MathjsError.d.ts +0 -13
  43. package/dist/error/MathjsError.d.ts.map +0 -1
  44. package/dist/utils/bignumber/formatter.d.ts +0 -136
  45. package/dist/utils/bignumber/formatter.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"integrity.d.ts","sourceRoot":"","sources":["../../src/wasm/integrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,MAAM,WAAW,YAAY;IAC3B,kDAAkD;IAClD,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAwBtF;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAmBrF;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,WAAW,GAAG,UAAU,EAChC,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GACnE,OAAO,CAAC,IAAI,CAAC,CAmCf"}
1
+ {"version":3,"file":"integrity.d.ts","sourceRoot":"","sources":["../../src/wasm/integrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACxE,YAAY,EAAE,YAAY,EAAE,CAAC;AAI7B;;;GAGG;AACH,wBAAsB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAwBtF;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAmBrF;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,WAAW,GAAG,UAAU,EAChC,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GACnE,OAAO,CAAC,IAAI,CAAC,CAmCf"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danielsimonjr/mathts-functions",
3
- "version": "0.42.0",
3
+ "version": "0.43.1",
4
4
  "description": "Mathematical functions for MathTS - arithmetic, algebra, trigonometry, statistics, and more",
5
5
  "author": "Daniel Simon Jr.",
6
6
  "license": "MIT",
@@ -34,11 +34,11 @@
34
34
  "build:prod": "tsup src/index.ts --format esm --clean --minify --treeshake"
35
35
  },
36
36
  "dependencies": {
37
- "@danielsimonjr/mathts-core": "^0.10.0",
38
- "@danielsimonjr/mathts-expression": "^0.6.4",
37
+ "@danielsimonjr/mathts-core": "^0.12.0",
38
+ "@danielsimonjr/mathts-expression": "^0.6.6",
39
39
  "@danielsimonjr/mathts-gpu": "^0.2.0",
40
- "@danielsimonjr/mathts-matrix": "^0.6.0",
41
- "@danielsimonjr/mathts-parallel": "^0.6.0",
40
+ "@danielsimonjr/mathts-matrix": "^0.6.2",
41
+ "@danielsimonjr/mathts-parallel": "^0.6.2",
42
42
  "bignumber.js": "^9.1.2",
43
43
  "complex.js": "^2.2.5",
44
44
  "decimal.js": "^10.4.3",
@@ -1,13 +0,0 @@
1
- /**
2
- * Custom error type for Mathjs errors
3
- * @extends Error
4
- */
5
- export declare class MathjsError extends Error {
6
- isMathjsError: true;
7
- /**
8
- * Create a MathjsError
9
- * @param message Error message
10
- */
11
- constructor(message: string);
12
- }
13
- //# sourceMappingURL=MathjsError.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MathjsError.d.ts","sourceRoot":"","sources":["../../src/error/MathjsError.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,WAAY,SAAQ,KAAK;IACpC,aAAa,EAAG,IAAI,CAAU;IAE9B;;;OAGG;gBACS,OAAO,EAAE,MAAM;CAY5B"}
@@ -1,136 +0,0 @@
1
- /**
2
- * Structural contract for the BigNumber values handled by this formatter.
3
- * Captures exactly the methods/properties used here. The configured BigNumber
4
- * implementation (e.g. decimal.js) provides these; the project's `BigNumber`
5
- * type alias points at a minimal local Decimal that does not declare them all,
6
- * so we model the runtime contract explicitly.
7
- */
8
- interface BigNumberValue {
9
- e: number;
10
- constructor: new (value: number | string) => BigNumberValue;
11
- isFinite(): boolean;
12
- isNaN(): boolean;
13
- isZero(): boolean;
14
- isInteger(): boolean;
15
- gt(other: number | BigNumberValue): boolean;
16
- greaterThan(other: number | BigNumberValue): boolean;
17
- lessThan(other: number | BigNumberValue): boolean;
18
- add(other: number | BigNumberValue): BigNumberValue;
19
- sub(other: number | BigNumberValue): BigNumberValue;
20
- mul(other: number | BigNumberValue): BigNumberValue;
21
- pow(exp: number | BigNumberValue): BigNumberValue;
22
- toNumber(): number;
23
- toFixed(places?: number): string;
24
- toExponential(places?: number): string;
25
- toPrecision(sd?: number): string;
26
- toSignificantDigits(sd?: number): BigNumberValue;
27
- toBinary(): string;
28
- toOctal(): string;
29
- toHexadecimal(): string;
30
- }
31
- /**
32
- * Convert a BigNumber to a formatted string representation.
33
- *
34
- * Syntax:
35
- *
36
- * format(value)
37
- * format(value, options)
38
- * format(value, precision)
39
- * format(value, fn)
40
- *
41
- * Where:
42
- *
43
- * {number} value The value to be formatted
44
- * {Object} options An object with formatting options. Available options:
45
- * {string} notation
46
- * Number notation. Choose from:
47
- * 'fixed' Always use regular number notation.
48
- * For example '123.40' and '14000000'
49
- * 'exponential' Always use exponential notation.
50
- * For example '1.234e+2' and '1.4e+7'
51
- * 'auto' (default) Regular number notation for numbers
52
- * having an absolute value between
53
- * `lower` and `upper` bounds, and uses
54
- * exponential notation elsewhere.
55
- * Lower bound is included, upper bound
56
- * is excluded.
57
- * For example '123.4' and '1.4e7'.
58
- * 'bin', 'oct, or
59
- * 'hex' Format the number using binary, octal,
60
- * or hexadecimal notation.
61
- * For example '0b1101' and '0x10fe'.
62
- * {number} wordSize The word size in bits to use for formatting
63
- * in binary, octal, or hexadecimal notation.
64
- * To be used only with 'bin', 'oct', or 'hex'
65
- * values for 'notation' option. When this option
66
- * is defined the value is formatted as a signed
67
- * twos complement integer of the given word size
68
- * and the size suffix is appended to the output.
69
- * For example
70
- * format(-1, {notation: 'hex', wordSize: 8}) === '0xffi8'.
71
- * Default value is undefined.
72
- * {number} precision A number between 0 and 16 to round
73
- * the digits of the number.
74
- * In case of notations 'exponential',
75
- * 'engineering', and 'auto',
76
- * `precision` defines the total
77
- * number of significant digits returned.
78
- * In case of notation 'fixed',
79
- * `precision` defines the number of
80
- * significant digits after the decimal
81
- * point.
82
- * `precision` is undefined by default.
83
- * {number} lowerExp Exponent determining the lower boundary
84
- * for formatting a value with an exponent
85
- * when `notation='auto`.
86
- * Default value is `-3`.
87
- * {number} upperExp Exponent determining the upper boundary
88
- * for formatting a value with an exponent
89
- * when `notation='auto`.
90
- * Default value is `5`.
91
- * {Function} fn A custom formatting function. Can be used to override the
92
- * built-in notations. Function `fn` is called with `value` as
93
- * parameter and must return a string. Is useful for example to
94
- * format all values inside a matrix in a particular way.
95
- *
96
- * Examples:
97
- *
98
- * format(6.4) // '6.4'
99
- * format(1240000) // '1.24e6'
100
- * format(1/3) // '0.3333333333333333'
101
- * format(1/3, 3) // '0.333'
102
- * format(21385, 2) // '21000'
103
- * format(12e8, {notation: 'fixed'}) // returns '1200000000'
104
- * format(2.3, {notation: 'fixed', precision: 4}) // returns '2.3000'
105
- * format(52.8, {notation: 'exponential'}) // returns '5.28e+1'
106
- * format(12400, {notation: 'engineering'}) // returns '12.400e+3'
107
- *
108
- * @param {BigNumber} value
109
- * @param {Object | Function | number | BigNumber} [options]
110
- * @return {string} str The formatted value
111
- */
112
- export declare function format(value: unknown, options?: unknown): string;
113
- /**
114
- * Format a BigNumber in engineering notation. Like '1.23e+6', '2.3e+0', '3.500e-3'
115
- * @param {BigNumber} value
116
- * @param {number} [precision] Optional number of significant figures to return.
117
- */
118
- export declare function toEngineering(value: BigNumberValue, precision?: number): string;
119
- /**
120
- * Format a number in exponential notation. Like '1.23e+5', '2.3e+0', '3.500e-3'
121
- * @param {BigNumber} value
122
- * @param {number} [precision] Number of digits in formatted output.
123
- * If not provided, the maximum available digits
124
- * is used.
125
- * @returns {string} str
126
- */
127
- export declare function toExponential(value: BigNumberValue, precision?: number): string;
128
- /**
129
- * Format a number with fixed notation.
130
- * @param {BigNumber} value
131
- * @param {number} [precision=undefined] Optional number of decimals after the
132
- * decimal point. Undefined by default.
133
- */
134
- export declare function toFixed(value: BigNumberValue, precision?: number): string;
135
- export {};
136
- //# sourceMappingURL=formatter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../../../src/utils/bignumber/formatter.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,UAAU,cAAc;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,WAAW,EAAE,KAAK,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,cAAc,CAAC;IAC5D,QAAQ,IAAI,OAAO,CAAC;IACpB,KAAK,IAAI,OAAO,CAAC;IACjB,MAAM,IAAI,OAAO,CAAC;IAClB,SAAS,IAAI,OAAO,CAAC;IACrB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,GAAG,OAAO,CAAC;IAC5C,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,GAAG,OAAO,CAAC;IACrD,QAAQ,C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