umt 1.0.13 → 1.0.15
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/jest.config.js +16 -0
- package/make_test.py +24 -0
- package/module/Array/getArraysCommon.js +17 -13
- package/module/Array/getArraysDiff.js +5 -13
- package/module/Array/index.js +17 -17
- package/module/Date/index.js +5 -5
- package/module/Math/average.js +4 -2
- package/module/Math/calculator/calculatorInitialization.js +2 -2
- package/module/Math/calculator/exchange.js +8 -12
- package/module/Math/deviationValue.js +3 -1
- package/module/Math/index.d.ts +2 -4
- package/module/Math/index.js +116 -123
- package/module/Math/isDouble.d.ts +2 -3
- package/module/Math/isDouble.js +2 -3
- package/module/Math/lcm.js +3 -0
- package/module/Math/{roundOff.d.ts → roundOf.d.ts} +0 -0
- package/module/Math/{roundOff.js → roundOf.js} +0 -0
- package/module/Math/softmax.js +2 -2
- package/module/Math/toCelsius.d.ts +5 -0
- package/module/Math/toCelsius.js +5 -0
- package/module/Simple/Date/index.js +5 -5
- package/module/Simple/{Math/dayOfWeek.d.ts → Tool/dayOfWeekSimple.d.ts} +2 -2
- package/module/Simple/{Math/dayOfWeek.js → Tool/dayOfWeekSimple.js} +0 -0
- package/module/Simple/{Math/deviationValue.d.ts → Tool/deviationValueSimple.d.ts} +0 -0
- package/module/Simple/{Math/deviationValue.js → Tool/deviationValueSimple.js} +0 -0
- package/module/Simple/Tool/index.d.ts +6 -0
- package/module/Simple/Tool/index.js +17 -5
- package/module/Simple/index.d.ts +3 -5
- package/module/Simple/index.js +10 -16
- package/module/Tool/index.js +20 -20
- package/module/index.d.ts +1 -1
- package/module/index.js +17 -17
- package/module/tsconfig.tsbuildinfo +1 -1
- package/package.json +39 -28
- package/module/Compiler/core.d.ts +0 -5
- package/module/Compiler/core.js +0 -19
- package/module/Compiler/token.d.ts +0 -10
- package/module/Compiler/token.js +0 -120
- package/module/Simple/Math/index.d.ts +0 -10
- package/module/Simple/Math/index.js +0 -33
package/module/Math/index.js
CHANGED
|
@@ -10,9 +10,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var
|
|
13
|
+
var _UMTMathClass_Local_addition, _UMTMathClass_Local_average, _UMTMathClass_Local_calculator, _UMTMathClass_Local_calculatorInitialization, _UMTMathClass_Local_degToRad, _UMTMathClass_Local_deviationValue, _UMTMathClass_Local_division, _UMTMathClass_Local_factorial, _UMTMathClass_Local_factorize, _UMTMathClass_Local_gcd, _UMTMathClass_Local_getDecimalLength, _UMTMathClass_Local_isDouble, _UMTMathClass_Local_isNumber, _UMTMathClass_Local_isPrimeNumber, _UMTMathClass_Local_lcm, _UMTMathClass_Local_mathConverter, _UMTMathClass_Local_mathSeparator, _UMTMathClass_Local_max, _UMTMathClass_Local_min, _UMTMathClass_Local_multiples, _UMTMathClass_Local_multiplication, _UMTMathClass_Local_nCr, _UMTMathClass_Local_nHr, _UMTMathClass_Local_nPr, _UMTMathClass_Local_primeFactorization, _UMTMathClass_Local_quotient, _UMTMathClass_Local_radToDeg, _UMTMathClass_Local_random, _UMTMathClass_Local_reduce, _UMTMathClass_Local_repeatedTrial, _UMTMathClass_Local_roundOf, _UMTMathClass_Local_standardDeviation, _UMTMathClass_Local_subtract, _UMTMathClass_Local_toBinary, _UMTMathClass_Local_toCelsius, _UMTMathClass_Local_toKelvin, _UMTMathClass_Local_valueSwap;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.UMT_Math = exports.UMTMathClass = exports.valueSwap = exports.toKelvin = exports.toCelsius = exports.toBinary = exports.subtract = exports.standardDeviation = exports.
|
|
15
|
+
exports.UMT_Math = exports.UMTMathClass = exports.valueSwap = exports.toKelvin = exports.toCelsius = exports.toBinary = exports.subtract = exports.standardDeviation = exports.roundOf = exports.repeatedTrial = exports.reduce = exports.random = exports.radToDeg = exports.quotient = exports.primeFactorization = exports.nPr = exports.nHr = exports.nCr = exports.multiplication = exports.multiples = exports.min = exports.max = exports.mathSeparator = exports.mathConverter = exports.lcm = exports.isPrimeNumber = exports.isNumber = exports.isDouble = exports.getDecimalLength = exports.gcd = exports.factorize = exports.factorial = exports.division = exports.deviationValue = exports.degToRad = exports.calculatorInitialization = exports.calculator = exports.average = exports.addition = void 0;
|
|
16
16
|
const addition_1 = require("./addition");
|
|
17
17
|
Object.defineProperty(exports, "addition", { enumerable: true, get: function () { return addition_1.addition; } });
|
|
18
18
|
const average_1 = require("./average");
|
|
@@ -73,10 +73,8 @@ const reduce_1 = require("./reduce");
|
|
|
73
73
|
Object.defineProperty(exports, "reduce", { enumerable: true, get: function () { return reduce_1.reduce; } });
|
|
74
74
|
const repeatedTrial_1 = require("./repeatedTrial");
|
|
75
75
|
Object.defineProperty(exports, "repeatedTrial", { enumerable: true, get: function () { return repeatedTrial_1.repeatedTrial; } });
|
|
76
|
-
const
|
|
77
|
-
Object.defineProperty(exports, "roundOf", { enumerable: true, get: function () { return
|
|
78
|
-
const softmax_1 = require("./softmax");
|
|
79
|
-
Object.defineProperty(exports, "softmax", { enumerable: true, get: function () { return softmax_1.softmax; } });
|
|
76
|
+
const roundOf_1 = require("./roundOf");
|
|
77
|
+
Object.defineProperty(exports, "roundOf", { enumerable: true, get: function () { return roundOf_1.roundOf; } });
|
|
80
78
|
const standardDeviation_1 = require("./standardDeviation");
|
|
81
79
|
Object.defineProperty(exports, "standardDeviation", { enumerable: true, get: function () { return standardDeviation_1.standardDeviation; } });
|
|
82
80
|
const subtract_1 = require("./subtract");
|
|
@@ -91,198 +89,193 @@ const valueSwap_1 = require("./valueSwap");
|
|
|
91
89
|
Object.defineProperty(exports, "valueSwap", { enumerable: true, get: function () { return valueSwap_1.valueSwap; } });
|
|
92
90
|
class UMTMathClass {
|
|
93
91
|
constructor() {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
__classPrivateFieldSet(this,
|
|
133
|
-
__classPrivateFieldSet(this,
|
|
134
|
-
__classPrivateFieldSet(this,
|
|
135
|
-
__classPrivateFieldSet(this,
|
|
136
|
-
__classPrivateFieldSet(this,
|
|
137
|
-
__classPrivateFieldSet(this,
|
|
138
|
-
__classPrivateFieldSet(this,
|
|
139
|
-
__classPrivateFieldSet(this,
|
|
140
|
-
__classPrivateFieldSet(this,
|
|
141
|
-
__classPrivateFieldSet(this,
|
|
142
|
-
__classPrivateFieldSet(this,
|
|
143
|
-
__classPrivateFieldSet(this,
|
|
144
|
-
__classPrivateFieldSet(this,
|
|
145
|
-
__classPrivateFieldSet(this,
|
|
146
|
-
__classPrivateFieldSet(this,
|
|
147
|
-
__classPrivateFieldSet(this,
|
|
148
|
-
__classPrivateFieldSet(this,
|
|
149
|
-
__classPrivateFieldSet(this,
|
|
150
|
-
__classPrivateFieldSet(this,
|
|
151
|
-
__classPrivateFieldSet(this,
|
|
152
|
-
__classPrivateFieldSet(this,
|
|
153
|
-
__classPrivateFieldSet(this,
|
|
154
|
-
__classPrivateFieldSet(this,
|
|
155
|
-
__classPrivateFieldSet(this,
|
|
156
|
-
__classPrivateFieldSet(this,
|
|
157
|
-
__classPrivateFieldSet(this,
|
|
158
|
-
__classPrivateFieldSet(this,
|
|
159
|
-
__classPrivateFieldSet(this,
|
|
160
|
-
__classPrivateFieldSet(this,
|
|
161
|
-
__classPrivateFieldSet(this,
|
|
162
|
-
__classPrivateFieldSet(this,
|
|
163
|
-
__classPrivateFieldSet(this,
|
|
164
|
-
__classPrivateFieldSet(this,
|
|
165
|
-
__classPrivateFieldSet(this,
|
|
166
|
-
__classPrivateFieldSet(this,
|
|
167
|
-
__classPrivateFieldSet(this,
|
|
168
|
-
__classPrivateFieldSet(this, _UMTMathClass_LocaltoKelvin, toKelvin_1.toKelvin, "f");
|
|
169
|
-
__classPrivateFieldSet(this, _UMTMathClass_LocalvalueSwap, valueSwap_1.valueSwap, "f");
|
|
92
|
+
_UMTMathClass_Local_addition.set(this, void 0);
|
|
93
|
+
_UMTMathClass_Local_average.set(this, void 0);
|
|
94
|
+
_UMTMathClass_Local_calculator.set(this, void 0);
|
|
95
|
+
_UMTMathClass_Local_calculatorInitialization.set(this, void 0);
|
|
96
|
+
_UMTMathClass_Local_degToRad.set(this, void 0);
|
|
97
|
+
_UMTMathClass_Local_deviationValue.set(this, void 0);
|
|
98
|
+
_UMTMathClass_Local_division.set(this, void 0);
|
|
99
|
+
_UMTMathClass_Local_factorial.set(this, void 0);
|
|
100
|
+
_UMTMathClass_Local_factorize.set(this, void 0);
|
|
101
|
+
_UMTMathClass_Local_gcd.set(this, void 0);
|
|
102
|
+
_UMTMathClass_Local_getDecimalLength.set(this, void 0);
|
|
103
|
+
_UMTMathClass_Local_isDouble.set(this, void 0);
|
|
104
|
+
_UMTMathClass_Local_isNumber.set(this, void 0);
|
|
105
|
+
_UMTMathClass_Local_isPrimeNumber.set(this, void 0);
|
|
106
|
+
_UMTMathClass_Local_lcm.set(this, void 0);
|
|
107
|
+
_UMTMathClass_Local_mathConverter.set(this, void 0);
|
|
108
|
+
_UMTMathClass_Local_mathSeparator.set(this, void 0);
|
|
109
|
+
_UMTMathClass_Local_max.set(this, void 0);
|
|
110
|
+
_UMTMathClass_Local_min.set(this, void 0);
|
|
111
|
+
_UMTMathClass_Local_multiples.set(this, void 0);
|
|
112
|
+
_UMTMathClass_Local_multiplication.set(this, void 0);
|
|
113
|
+
_UMTMathClass_Local_nCr.set(this, void 0);
|
|
114
|
+
_UMTMathClass_Local_nHr.set(this, void 0);
|
|
115
|
+
_UMTMathClass_Local_nPr.set(this, void 0);
|
|
116
|
+
_UMTMathClass_Local_primeFactorization.set(this, void 0);
|
|
117
|
+
_UMTMathClass_Local_quotient.set(this, void 0);
|
|
118
|
+
_UMTMathClass_Local_radToDeg.set(this, void 0);
|
|
119
|
+
_UMTMathClass_Local_random.set(this, void 0);
|
|
120
|
+
_UMTMathClass_Local_reduce.set(this, void 0);
|
|
121
|
+
_UMTMathClass_Local_repeatedTrial.set(this, void 0);
|
|
122
|
+
_UMTMathClass_Local_roundOf.set(this, void 0);
|
|
123
|
+
_UMTMathClass_Local_standardDeviation.set(this, void 0);
|
|
124
|
+
_UMTMathClass_Local_subtract.set(this, void 0);
|
|
125
|
+
_UMTMathClass_Local_toBinary.set(this, void 0);
|
|
126
|
+
_UMTMathClass_Local_toCelsius.set(this, void 0);
|
|
127
|
+
_UMTMathClass_Local_toKelvin.set(this, void 0);
|
|
128
|
+
_UMTMathClass_Local_valueSwap.set(this, void 0);
|
|
129
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_addition, addition_1.addition, "f");
|
|
130
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_average, average_1.average, "f");
|
|
131
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_calculator, calculator_1.calculator, "f");
|
|
132
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_calculatorInitialization, calculatorInitialization_1.calculatorInitialization, "f");
|
|
133
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_degToRad, degToRad_1.degToRad, "f");
|
|
134
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_deviationValue, deviationValue_1.deviationValue, "f");
|
|
135
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_division, division_1.division, "f");
|
|
136
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_factorial, factorial_1.factorial, "f");
|
|
137
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_factorize, factorize_1.factorize, "f");
|
|
138
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_gcd, gcd_1.gcd, "f");
|
|
139
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_getDecimalLength, getDecimalLength_1.getDecimalLength, "f");
|
|
140
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_isDouble, isDouble_1.isDouble, "f");
|
|
141
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_isNumber, isNumber_1.isNumber, "f");
|
|
142
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_isPrimeNumber, isPrimeNumber_1.isPrimeNumber, "f");
|
|
143
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_lcm, lcm_1.lcm, "f");
|
|
144
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_mathConverter, mathConverter_1.mathConverter, "f");
|
|
145
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_mathSeparator, mathSeparator_1.mathSeparator, "f");
|
|
146
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_max, max_1.max, "f");
|
|
147
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_min, min_1.min, "f");
|
|
148
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_multiples, multiples_1.multiples, "f");
|
|
149
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_multiplication, multiplication_1.multiplication, "f");
|
|
150
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_nCr, nCr_1.nCr, "f");
|
|
151
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_nHr, nHr_1.nHr, "f");
|
|
152
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_nPr, nPr_1.nPr, "f");
|
|
153
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_primeFactorization, primeFactorization_1.primeFactorization, "f");
|
|
154
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_quotient, quotient_1.quotient, "f");
|
|
155
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_radToDeg, radToDeg_1.radToDeg, "f");
|
|
156
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_random, random_1.random, "f");
|
|
157
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_reduce, reduce_1.reduce, "f");
|
|
158
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_repeatedTrial, repeatedTrial_1.repeatedTrial, "f");
|
|
159
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_roundOf, roundOf_1.roundOf, "f");
|
|
160
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_standardDeviation, standardDeviation_1.standardDeviation, "f");
|
|
161
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_subtract, subtract_1.subtract, "f");
|
|
162
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_toBinary, toBinary_1.toBinary, "f");
|
|
163
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_toCelsius, toCelsius_1.toCelsius, "f");
|
|
164
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_toKelvin, toKelvin_1.toKelvin, "f");
|
|
165
|
+
__classPrivateFieldSet(this, _UMTMathClass_Local_valueSwap, valueSwap_1.valueSwap, "f");
|
|
170
166
|
}
|
|
171
167
|
get addition() {
|
|
172
|
-
return __classPrivateFieldGet(this,
|
|
168
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_addition, "f");
|
|
173
169
|
}
|
|
174
170
|
get average() {
|
|
175
|
-
return __classPrivateFieldGet(this,
|
|
171
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_average, "f");
|
|
176
172
|
}
|
|
177
173
|
get calculator() {
|
|
178
|
-
return __classPrivateFieldGet(this,
|
|
174
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_calculator, "f");
|
|
179
175
|
}
|
|
180
176
|
get calculatorInitialization() {
|
|
181
|
-
return __classPrivateFieldGet(this,
|
|
177
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_calculatorInitialization, "f");
|
|
182
178
|
}
|
|
183
179
|
get degToRad() {
|
|
184
|
-
return __classPrivateFieldGet(this,
|
|
180
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_degToRad, "f");
|
|
185
181
|
}
|
|
186
182
|
get deviationValue() {
|
|
187
|
-
return __classPrivateFieldGet(this,
|
|
183
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_deviationValue, "f");
|
|
188
184
|
}
|
|
189
185
|
get division() {
|
|
190
|
-
return __classPrivateFieldGet(this,
|
|
186
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_division, "f");
|
|
191
187
|
}
|
|
192
188
|
get factorial() {
|
|
193
|
-
return __classPrivateFieldGet(this,
|
|
189
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_factorial, "f");
|
|
194
190
|
}
|
|
195
191
|
get factorize() {
|
|
196
|
-
return __classPrivateFieldGet(this,
|
|
192
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_factorize, "f");
|
|
197
193
|
}
|
|
198
194
|
get gcd() {
|
|
199
|
-
return __classPrivateFieldGet(this,
|
|
195
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_gcd, "f");
|
|
200
196
|
}
|
|
201
197
|
get getDecimalLength() {
|
|
202
|
-
return __classPrivateFieldGet(this,
|
|
198
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_getDecimalLength, "f");
|
|
203
199
|
}
|
|
204
200
|
get isDouble() {
|
|
205
|
-
return __classPrivateFieldGet(this,
|
|
201
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_isDouble, "f");
|
|
206
202
|
}
|
|
207
203
|
get isNumber() {
|
|
208
|
-
return __classPrivateFieldGet(this,
|
|
204
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_isNumber, "f");
|
|
209
205
|
}
|
|
210
206
|
get isPrimeNumber() {
|
|
211
|
-
return __classPrivateFieldGet(this,
|
|
207
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_isPrimeNumber, "f");
|
|
212
208
|
}
|
|
213
209
|
get lcm() {
|
|
214
|
-
return __classPrivateFieldGet(this,
|
|
210
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_lcm, "f");
|
|
215
211
|
}
|
|
216
212
|
get mathConverter() {
|
|
217
|
-
return __classPrivateFieldGet(this,
|
|
213
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_mathConverter, "f");
|
|
218
214
|
}
|
|
219
215
|
get mathSeparator() {
|
|
220
|
-
return __classPrivateFieldGet(this,
|
|
216
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_mathSeparator, "f");
|
|
221
217
|
}
|
|
222
218
|
get max() {
|
|
223
|
-
return __classPrivateFieldGet(this,
|
|
219
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_max, "f");
|
|
224
220
|
}
|
|
225
221
|
get min() {
|
|
226
|
-
return __classPrivateFieldGet(this,
|
|
222
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_min, "f");
|
|
227
223
|
}
|
|
228
224
|
get multiples() {
|
|
229
|
-
return __classPrivateFieldGet(this,
|
|
225
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_multiples, "f");
|
|
230
226
|
}
|
|
231
227
|
get multiplication() {
|
|
232
|
-
return __classPrivateFieldGet(this,
|
|
228
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_multiplication, "f");
|
|
233
229
|
}
|
|
234
230
|
get nCr() {
|
|
235
|
-
return __classPrivateFieldGet(this,
|
|
231
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_nCr, "f");
|
|
236
232
|
}
|
|
237
233
|
get nHr() {
|
|
238
|
-
return __classPrivateFieldGet(this,
|
|
234
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_nHr, "f");
|
|
239
235
|
}
|
|
240
236
|
get nPr() {
|
|
241
|
-
return __classPrivateFieldGet(this,
|
|
237
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_nPr, "f");
|
|
242
238
|
}
|
|
243
239
|
get primeFactorization() {
|
|
244
|
-
return __classPrivateFieldGet(this,
|
|
240
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_primeFactorization, "f");
|
|
245
241
|
}
|
|
246
242
|
get quotient() {
|
|
247
|
-
return __classPrivateFieldGet(this,
|
|
243
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_quotient, "f");
|
|
248
244
|
}
|
|
249
245
|
get radToDeg() {
|
|
250
|
-
return __classPrivateFieldGet(this,
|
|
246
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_radToDeg, "f");
|
|
251
247
|
}
|
|
252
248
|
get random() {
|
|
253
|
-
return __classPrivateFieldGet(this,
|
|
249
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_random, "f");
|
|
254
250
|
}
|
|
255
251
|
get reduce() {
|
|
256
|
-
return __classPrivateFieldGet(this,
|
|
252
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_reduce, "f");
|
|
257
253
|
}
|
|
258
254
|
get repeatedTrial() {
|
|
259
|
-
return __classPrivateFieldGet(this,
|
|
255
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_repeatedTrial, "f");
|
|
260
256
|
}
|
|
261
257
|
get roundOf() {
|
|
262
|
-
return __classPrivateFieldGet(this,
|
|
263
|
-
}
|
|
264
|
-
get softmax() {
|
|
265
|
-
return __classPrivateFieldGet(this, _UMTMathClass_Localsoftmax, "f");
|
|
258
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_roundOf, "f");
|
|
266
259
|
}
|
|
267
260
|
get standardDeviation() {
|
|
268
|
-
return __classPrivateFieldGet(this,
|
|
261
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_standardDeviation, "f");
|
|
269
262
|
}
|
|
270
263
|
get subtract() {
|
|
271
|
-
return __classPrivateFieldGet(this,
|
|
264
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_subtract, "f");
|
|
272
265
|
}
|
|
273
266
|
get toBinary() {
|
|
274
|
-
return __classPrivateFieldGet(this,
|
|
267
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_toBinary, "f");
|
|
275
268
|
}
|
|
276
269
|
get toCelsius() {
|
|
277
|
-
return __classPrivateFieldGet(this,
|
|
270
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_toCelsius, "f");
|
|
278
271
|
}
|
|
279
272
|
get toKelvin() {
|
|
280
|
-
return __classPrivateFieldGet(this,
|
|
273
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_toKelvin, "f");
|
|
281
274
|
}
|
|
282
275
|
get valueSwap() {
|
|
283
|
-
return __classPrivateFieldGet(this,
|
|
276
|
+
return __classPrivateFieldGet(this, _UMTMathClass_Local_valueSwap, "f");
|
|
284
277
|
}
|
|
285
278
|
}
|
|
286
279
|
exports.UMTMathClass = UMTMathClass;
|
|
287
|
-
|
|
280
|
+
_UMTMathClass_Local_addition = new WeakMap(), _UMTMathClass_Local_average = new WeakMap(), _UMTMathClass_Local_calculator = new WeakMap(), _UMTMathClass_Local_calculatorInitialization = new WeakMap(), _UMTMathClass_Local_degToRad = new WeakMap(), _UMTMathClass_Local_deviationValue = new WeakMap(), _UMTMathClass_Local_division = new WeakMap(), _UMTMathClass_Local_factorial = new WeakMap(), _UMTMathClass_Local_factorize = new WeakMap(), _UMTMathClass_Local_gcd = new WeakMap(), _UMTMathClass_Local_getDecimalLength = new WeakMap(), _UMTMathClass_Local_isDouble = new WeakMap(), _UMTMathClass_Local_isNumber = new WeakMap(), _UMTMathClass_Local_isPrimeNumber = new WeakMap(), _UMTMathClass_Local_lcm = new WeakMap(), _UMTMathClass_Local_mathConverter = new WeakMap(), _UMTMathClass_Local_mathSeparator = new WeakMap(), _UMTMathClass_Local_max = new WeakMap(), _UMTMathClass_Local_min = new WeakMap(), _UMTMathClass_Local_multiples = new WeakMap(), _UMTMathClass_Local_multiplication = new WeakMap(), _UMTMathClass_Local_nCr = new WeakMap(), _UMTMathClass_Local_nHr = new WeakMap(), _UMTMathClass_Local_nPr = new WeakMap(), _UMTMathClass_Local_primeFactorization = new WeakMap(), _UMTMathClass_Local_quotient = new WeakMap(), _UMTMathClass_Local_radToDeg = new WeakMap(), _UMTMathClass_Local_random = new WeakMap(), _UMTMathClass_Local_reduce = new WeakMap(), _UMTMathClass_Local_repeatedTrial = new WeakMap(), _UMTMathClass_Local_roundOf = new WeakMap(), _UMTMathClass_Local_standardDeviation = new WeakMap(), _UMTMathClass_Local_subtract = new WeakMap(), _UMTMathClass_Local_toBinary = new WeakMap(), _UMTMathClass_Local_toCelsius = new WeakMap(), _UMTMathClass_Local_toKelvin = new WeakMap(), _UMTMathClass_Local_valueSwap = new WeakMap();
|
|
288
281
|
exports.UMT_Math = new UMTMathClass();
|
package/module/Math/isDouble.js
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isDouble = void 0;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* @param
|
|
7
|
-
* @param {boolean} [isStrict=true] - 文字列も対象にするかどうか
|
|
5
|
+
* @param {any} x
|
|
6
|
+
* @param {boolean} [loose=true] - 文字列も対象にするかどうか
|
|
8
7
|
* @returns boolean
|
|
9
8
|
*/
|
|
10
9
|
const isDouble = (x, loose = true) => {
|
package/module/Math/lcm.js
CHANGED
|
@@ -10,10 +10,13 @@ const valueSwap_1 = require("./valueSwap");
|
|
|
10
10
|
* @returns number
|
|
11
11
|
*/
|
|
12
12
|
const lcm = (x, y) => {
|
|
13
|
+
// If either input is 0, the least common multiple is 0
|
|
13
14
|
if (x === 0 || y === 0) {
|
|
14
15
|
return 0;
|
|
15
16
|
}
|
|
17
|
+
// Swap the values of x and y if x is greater than y
|
|
16
18
|
[x, y] = (0, valueSwap_1.valueSwap)(x, y);
|
|
19
|
+
// The least common multiple is x times y divided by their greatest common divisor
|
|
17
20
|
return (x / (0, gcd_1.gcd)(x, y)) * y;
|
|
18
21
|
};
|
|
19
22
|
exports.lcm = lcm;
|
|
File without changes
|
|
File without changes
|
package/module/Math/softmax.js
CHANGED
|
@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.softmax = void 0;
|
|
27
27
|
const ArraySum = __importStar(require("../Array/sum"));
|
|
28
28
|
const division_1 = require("./division");
|
|
29
|
-
const
|
|
29
|
+
const roundOf_1 = require("./roundOf");
|
|
30
30
|
/**
|
|
31
31
|
* @param {number[]} x
|
|
32
32
|
* @return {number[]}
|
|
@@ -35,6 +35,6 @@ const softmax = (x) => {
|
|
|
35
35
|
const max = Math.max(...x);
|
|
36
36
|
const exp = x.map((i) => Math.exp(i - max));
|
|
37
37
|
const sum = ArraySum.sum(exp);
|
|
38
|
-
return exp.map((i) => (0,
|
|
38
|
+
return exp.map((i) => (0, roundOf_1.roundOf)((0, division_1.division)(i, sum), 3));
|
|
39
39
|
};
|
|
40
40
|
exports.softmax = softmax;
|
package/module/Math/toCelsius.js
CHANGED
|
@@ -2,5 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toCelsius = void 0;
|
|
4
4
|
const subtract_1 = require("./subtract");
|
|
5
|
+
/**
|
|
6
|
+
* Converts a temperature from Kelvin to Celsius.
|
|
7
|
+
* @param kelvin The temperature in Kelvin.
|
|
8
|
+
* @returns The temperature in Celsius.
|
|
9
|
+
*/
|
|
5
10
|
const toCelsius = (kelvin) => (0, subtract_1.subtract)(kelvin, 273.15);
|
|
6
11
|
exports.toCelsius = toCelsius;
|
|
@@ -10,18 +10,18 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var
|
|
13
|
+
var _UMTSimpleDateClass_Local_now;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.UMTSimpleDateClass = void 0;
|
|
16
16
|
const now_1 = require("./now");
|
|
17
17
|
class UMTSimpleDateClass {
|
|
18
18
|
constructor() {
|
|
19
|
-
|
|
20
|
-
__classPrivateFieldSet(this,
|
|
19
|
+
_UMTSimpleDateClass_Local_now.set(this, void 0);
|
|
20
|
+
__classPrivateFieldSet(this, _UMTSimpleDateClass_Local_now, now_1.nowSimple, "f");
|
|
21
21
|
}
|
|
22
22
|
get now() {
|
|
23
|
-
return __classPrivateFieldGet(this,
|
|
23
|
+
return __classPrivateFieldGet(this, _UMTSimpleDateClass_Local_now, "f");
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
exports.UMTSimpleDateClass = UMTSimpleDateClass;
|
|
27
|
-
|
|
27
|
+
_UMTSimpleDateClass_Local_now = new WeakMap();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { dayType, MonthsWihout31Days, MonthsWith31Days } from '../../types/monType';
|
|
2
|
-
export declare const dayOfWeekSimple: <T extends MonthsWith31Days | MonthsWihout31Days>(props?: {
|
|
2
|
+
export declare const dayOfWeekSimple: <T extends MonthsWith31Days | MonthsWihout31Days>(props?: Date | {
|
|
3
3
|
yer?: number | undefined;
|
|
4
4
|
mon?: T | undefined;
|
|
5
5
|
day?: dayType<T> | undefined;
|
|
6
|
-
} | `${number}-${T}-${dayType<T>}` | `${number}:${T}:${dayType<T>}` | `${number}/${T}/${dayType<T>}` |
|
|
6
|
+
} | `${number}-${T}-${dayType<T>}` | `${number}:${T}:${dayType<T>}` | `${number}/${T}/${dayType<T>}` | undefined, timeDifference?: number) => number;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,4 +2,10 @@ export declare class UMTSimpleToolClass {
|
|
|
2
2
|
#private;
|
|
3
3
|
constructor();
|
|
4
4
|
get birthday(): import("./birthday").BIRTHDAYSIMPLE;
|
|
5
|
+
get dayOfWeek(): <T extends import("../../types/monType").MonthsWith31Days | import("../../types/monType").MonthsWihout31Days>(props?: Date | {
|
|
6
|
+
yer?: number | undefined;
|
|
7
|
+
mon?: T | undefined;
|
|
8
|
+
day?: import("../../types/monType").dayType<T> | undefined;
|
|
9
|
+
} | `${number}-${T}-${import("../../types/monType").dayType<T>}` | `${number}:${T}:${import("../../types/monType").dayType<T>}` | `${number}/${T}/${import("../../types/monType").dayType<T>}` | undefined, timeDifference?: number) => number;
|
|
10
|
+
get deviationValue(): import("./deviationValueSimple").DeviationValueSimple;
|
|
5
11
|
}
|
|
@@ -10,18 +10,30 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var
|
|
13
|
+
var _UMTSimpleToolClass_Local_birthday, _UMTSimpleToolClass_Local_dayOfWeek, _UMTSimpleToolClass_Local_deviationValue;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.UMTSimpleToolClass = void 0;
|
|
16
16
|
const birthday_1 = require("./birthday");
|
|
17
|
+
const dayOfWeekSimple_1 = require("./dayOfWeekSimple");
|
|
18
|
+
const deviationValueSimple_1 = require("./deviationValueSimple");
|
|
17
19
|
class UMTSimpleToolClass {
|
|
18
20
|
constructor() {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
_UMTSimpleToolClass_Local_birthday.set(this, void 0);
|
|
22
|
+
_UMTSimpleToolClass_Local_dayOfWeek.set(this, void 0);
|
|
23
|
+
_UMTSimpleToolClass_Local_deviationValue.set(this, void 0);
|
|
24
|
+
__classPrivateFieldSet(this, _UMTSimpleToolClass_Local_dayOfWeek, dayOfWeekSimple_1.dayOfWeekSimple, "f");
|
|
25
|
+
__classPrivateFieldSet(this, _UMTSimpleToolClass_Local_deviationValue, deviationValueSimple_1.deviationValueSimple, "f");
|
|
26
|
+
__classPrivateFieldSet(this, _UMTSimpleToolClass_Local_birthday, birthday_1.birthdaySimple, "f");
|
|
21
27
|
}
|
|
22
28
|
get birthday() {
|
|
23
|
-
return __classPrivateFieldGet(this,
|
|
29
|
+
return __classPrivateFieldGet(this, _UMTSimpleToolClass_Local_birthday, "f");
|
|
30
|
+
}
|
|
31
|
+
get dayOfWeek() {
|
|
32
|
+
return __classPrivateFieldGet(this, _UMTSimpleToolClass_Local_dayOfWeek, "f");
|
|
33
|
+
}
|
|
34
|
+
get deviationValue() {
|
|
35
|
+
return __classPrivateFieldGet(this, _UMTSimpleToolClass_Local_deviationValue, "f");
|
|
24
36
|
}
|
|
25
37
|
}
|
|
26
38
|
exports.UMTSimpleToolClass = UMTSimpleToolClass;
|
|
27
|
-
|
|
39
|
+
_UMTSimpleToolClass_Local_birthday = new WeakMap(), _UMTSimpleToolClass_Local_dayOfWeek = new WeakMap(), _UMTSimpleToolClass_Local_deviationValue = new WeakMap();
|
package/module/Simple/index.d.ts
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { UMTSimpleDateClass } from './Date/index';
|
|
2
|
-
import { UMTSimpleMathClass } from './Math';
|
|
3
2
|
import { UMTSimpleToolClass } from './Tool';
|
|
4
|
-
export declare class UMTSimpleClass<LOCALDATE,
|
|
3
|
+
export declare class UMTSimpleClass<LOCALDATE, LOCALTOOL> {
|
|
5
4
|
#private;
|
|
6
|
-
constructor(constructorLocalDateValue: LOCALDATE,
|
|
5
|
+
constructor(constructorLocalDateValue: LOCALDATE, constructorLocalToolValue: LOCALTOOL);
|
|
7
6
|
get Date(): LOCALDATE;
|
|
8
|
-
get Math(): LOCALMATH;
|
|
9
7
|
get Tool(): LOCALTOOL;
|
|
10
8
|
}
|
|
11
|
-
export declare const UMT_Simple: UMTSimpleClass<UMTSimpleDateClass,
|
|
9
|
+
export declare const UMT_Simple: UMTSimpleClass<UMTSimpleDateClass, UMTSimpleToolClass>;
|
package/module/Simple/index.js
CHANGED
|
@@ -10,31 +10,25 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var
|
|
13
|
+
var _UMTSimpleClass_Local_Date, _UMTSimpleClass_Local_Tool;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.UMT_Simple = exports.UMTSimpleClass = void 0;
|
|
16
16
|
const index_1 = require("./Date/index");
|
|
17
|
-
const Math_1 = require("./Math");
|
|
18
17
|
const Tool_1 = require("./Tool");
|
|
19
18
|
class UMTSimpleClass {
|
|
20
|
-
constructor(constructorLocalDateValue,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
__classPrivateFieldSet(this,
|
|
25
|
-
__classPrivateFieldSet(this, _UMTSimpleClass_LocalMath, constructorLocalMathValue, "f");
|
|
26
|
-
__classPrivateFieldSet(this, _UMTSimpleClass_LocalTool, constructorLocalToolValue, "f");
|
|
19
|
+
constructor(constructorLocalDateValue, constructorLocalToolValue) {
|
|
20
|
+
_UMTSimpleClass_Local_Date.set(this, void 0);
|
|
21
|
+
_UMTSimpleClass_Local_Tool.set(this, void 0);
|
|
22
|
+
__classPrivateFieldSet(this, _UMTSimpleClass_Local_Date, constructorLocalDateValue, "f");
|
|
23
|
+
__classPrivateFieldSet(this, _UMTSimpleClass_Local_Tool, constructorLocalToolValue, "f");
|
|
27
24
|
}
|
|
28
25
|
get Date() {
|
|
29
|
-
return __classPrivateFieldGet(this,
|
|
30
|
-
}
|
|
31
|
-
get Math() {
|
|
32
|
-
return __classPrivateFieldGet(this, _UMTSimpleClass_LocalMath, "f");
|
|
26
|
+
return __classPrivateFieldGet(this, _UMTSimpleClass_Local_Date, "f");
|
|
33
27
|
}
|
|
34
28
|
get Tool() {
|
|
35
|
-
return __classPrivateFieldGet(this,
|
|
29
|
+
return __classPrivateFieldGet(this, _UMTSimpleClass_Local_Tool, "f");
|
|
36
30
|
}
|
|
37
31
|
}
|
|
38
32
|
exports.UMTSimpleClass = UMTSimpleClass;
|
|
39
|
-
|
|
40
|
-
exports.UMT_Simple = new UMTSimpleClass(new index_1.UMTSimpleDateClass(), new
|
|
33
|
+
_UMTSimpleClass_Local_Date = new WeakMap(), _UMTSimpleClass_Local_Tool = new WeakMap();
|
|
34
|
+
exports.UMT_Simple = new UMTSimpleClass(new index_1.UMTSimpleDateClass(), new Tool_1.UMTSimpleToolClass());
|