1 |
|
2 |
|
3 |
|
4 |
|
5 | import { config } from './configReadonly'
|
6 | import {
|
7 | createNode,
|
8 | createArrayNode,
|
9 | createBlockNode,
|
10 | createConstantNode,
|
11 | createObjectNode,
|
12 | createParenthesisNode,
|
13 | createRelationalNode,
|
14 | createChainClass,
|
15 | createReviver,
|
16 | createConditionalNode,
|
17 | createOperatorNode,
|
18 | createRangeNode,
|
19 | createFunctionAssignmentNode,
|
20 | createChain,
|
21 | createAccessorNode,
|
22 | createIndexNode,
|
23 | createAssignmentNode,
|
24 | createSymbolNode,
|
25 | createFunctionNode,
|
26 | createParse,
|
27 | createEvaluate,
|
28 | createParserClass,
|
29 | createHelpClass,
|
30 | createCompile,
|
31 | createParser,
|
32 | createSimplify,
|
33 | createRationalize,
|
34 | createHelp,
|
35 | createDerivative,
|
36 | createApplyTransform,
|
37 | createFilterTransform,
|
38 | createMapTransform,
|
39 | createForEachTransform,
|
40 | createMaxTransform,
|
41 | createMinTransform,
|
42 | createSubsetTransform,
|
43 | createConcatTransform,
|
44 | createRangeTransform,
|
45 | createSumTransform,
|
46 | createIndexTransform,
|
47 | createColumnTransform,
|
48 | createRowTransform,
|
49 | createStdTransform,
|
50 | createMeanTransform,
|
51 | createVarianceTransform
|
52 | } from '../factoriesAny'
|
53 | import {
|
54 | ResultSet,
|
55 | Complex,
|
56 | Range,
|
57 | eye,
|
58 | _false,
|
59 | _null,
|
60 | _true,
|
61 | BigNumber,
|
62 | Matrix,
|
63 | e,
|
64 | i,
|
65 | LN10,
|
66 | LOG10E,
|
67 | _NaN,
|
68 | pi,
|
69 | SQRT1_2,
|
70 | tau,
|
71 | efimovFactor,
|
72 | fineStructure,
|
73 | sackurTetrode,
|
74 | weakMixingAngle,
|
75 | Fraction,
|
76 | LN2,
|
77 | phi,
|
78 | SQRT2,
|
79 | DenseMatrix,
|
80 | _Infinity,
|
81 | typed,
|
82 | isInteger,
|
83 | isNumeric,
|
84 | isPositive,
|
85 | isNaN,
|
86 | equalScalar,
|
87 | number,
|
88 | boolean,
|
89 | complex,
|
90 | splitUnit,
|
91 | unaryPlus,
|
92 | apply,
|
93 | cube,
|
94 | expm1,
|
95 | log10,
|
96 | multiplyScalar,
|
97 | sign,
|
98 | square,
|
99 | bitNot,
|
100 | arg,
|
101 | im,
|
102 | not,
|
103 | filter,
|
104 | forEach,
|
105 | map,
|
106 | erf,
|
107 | format,
|
108 | isPrime,
|
109 | acos,
|
110 | acot,
|
111 | acsc,
|
112 | asec,
|
113 | asin,
|
114 | atan,
|
115 | atanh,
|
116 | cosh,
|
117 | coth,
|
118 | csch,
|
119 | sech,
|
120 | sinh,
|
121 | tanh,
|
122 | combinations,
|
123 | pickRandom,
|
124 | randomInt,
|
125 | LOG2E,
|
126 | clone,
|
127 | hasNumericValue,
|
128 | typeOf,
|
129 | string,
|
130 | fraction,
|
131 | unaryMinus,
|
132 | addScalar,
|
133 | exp,
|
134 | log2,
|
135 | sqrt,
|
136 | conj,
|
137 | getMatrixDataType,
|
138 | mode,
|
139 | print,
|
140 | acosh,
|
141 | acsch,
|
142 | asinh,
|
143 | cos,
|
144 | csc,
|
145 | sin,
|
146 | combinationsWithRep,
|
147 | random,
|
148 | version,
|
149 | isNegative,
|
150 | SparseMatrix,
|
151 | matrix,
|
152 | cbrt,
|
153 | gcd,
|
154 | mod,
|
155 | nthRoot,
|
156 | xgcd,
|
157 | bitAnd,
|
158 | bitXor,
|
159 | or,
|
160 | concat,
|
161 | diag,
|
162 | identity,
|
163 | ones,
|
164 | reshape,
|
165 | size,
|
166 | subset,
|
167 | zeros,
|
168 | to,
|
169 | round,
|
170 | leftShift,
|
171 | rightLogShift,
|
172 | compare,
|
173 | compareText,
|
174 | smaller,
|
175 | larger,
|
176 | unequal,
|
177 | max,
|
178 | ImmutableDenseMatrix,
|
179 | FibonacciHeap,
|
180 | sparse,
|
181 | acoth,
|
182 | atan2,
|
183 | sec,
|
184 | add,
|
185 | trace,
|
186 | composition,
|
187 | isZero,
|
188 | abs,
|
189 | floor,
|
190 | multiply,
|
191 | dotMultiply,
|
192 | re,
|
193 | flatten,
|
194 | resize,
|
195 | squeeze,
|
196 | prod,
|
197 | pow,
|
198 | dotPow,
|
199 | rightArithShift,
|
200 | compareNatural,
|
201 | equalText,
|
202 | largerEq,
|
203 | partitionSelect,
|
204 | min,
|
205 | Spa,
|
206 | asech,
|
207 | tan,
|
208 | setSize,
|
209 | norm,
|
210 | quantileSeq,
|
211 | gamma,
|
212 | bignumber,
|
213 | lcm,
|
214 | bitOr,
|
215 | kron,
|
216 | transpose,
|
217 | numeric,
|
218 | and,
|
219 | smallerEq,
|
220 | sort,
|
221 | cot,
|
222 | dot,
|
223 | sum,
|
224 | factorial,
|
225 | permutations,
|
226 | ceil,
|
227 | subtract,
|
228 | cross,
|
229 | ctranspose,
|
230 | equal,
|
231 | Index,
|
232 | setCartesian,
|
233 | setDistinct,
|
234 | setIsSubset,
|
235 | setPowerset,
|
236 | index,
|
237 | fix,
|
238 | range,
|
239 | divideScalar,
|
240 | nthRoots,
|
241 | lsolve,
|
242 | deepEqual,
|
243 | setDifference,
|
244 | setMultiplicity,
|
245 | hypot,
|
246 | lup,
|
247 | slu,
|
248 | det,
|
249 | distance,
|
250 | stirlingS2,
|
251 | catalan,
|
252 | xor,
|
253 | row,
|
254 | dotDivide,
|
255 | Unit,
|
256 | createUnit,
|
257 | setSymDifference,
|
258 | qr,
|
259 | inv,
|
260 | sqrtm,
|
261 | intersect,
|
262 | bellNumbers,
|
263 | atomicMass,
|
264 | bohrMagneton,
|
265 | boltzmann,
|
266 | conductanceQuantum,
|
267 | deuteronMass,
|
268 | electronMass,
|
269 | faraday,
|
270 | firstRadiation,
|
271 | gravitationConstant,
|
272 | hartreeEnergy,
|
273 | klitzing,
|
274 | magneticConstant,
|
275 | molarMass,
|
276 | molarPlanckConstant,
|
277 | neutronMass,
|
278 | planckCharge,
|
279 | planckLength,
|
280 | planckTemperature,
|
281 | protonMass,
|
282 | reducedPlanckConstant,
|
283 | secondRadiation,
|
284 | stefanBoltzmann,
|
285 | vacuumImpedance,
|
286 | column,
|
287 | usolve,
|
288 | setIntersect,
|
289 | lusolve,
|
290 | expm,
|
291 | avogadro,
|
292 | classicalElectronRadius,
|
293 | electricConstant,
|
294 | fermiCoupling,
|
295 | gravity,
|
296 | loschmidt,
|
297 | molarMassC12,
|
298 | nuclearMagneton,
|
299 | planckMass,
|
300 | quantumOfCirculation,
|
301 | speedOfLight,
|
302 | wienDisplacement,
|
303 | log,
|
304 | unit,
|
305 | divide,
|
306 | median,
|
307 | variance,
|
308 | std,
|
309 | multinomial,
|
310 | bohrRadius,
|
311 | elementaryCharge,
|
312 | inverseConductanceQuantum,
|
313 | molarVolume,
|
314 | planckTime,
|
315 | thomsonCrossSection,
|
316 | log1p,
|
317 | mean,
|
318 | gasConstant,
|
319 | planckConstant,
|
320 | setUnion,
|
321 | kldivergence,
|
322 | coulomb,
|
323 | rydberg,
|
324 | mad,
|
325 | magneticFluxQuantum
|
326 | } from './pureFunctionsAny.generated'
|
327 |
|
328 | const math = {}
|
329 | const mathWithTransform = {}
|
330 | const classes = {}
|
331 |
|
332 | export const Node = createNode({ mathWithTransform })
|
333 | export const ArrayNode = createArrayNode({ Node })
|
334 | export const BlockNode = createBlockNode({ Node, ResultSet })
|
335 | export const ConstantNode = createConstantNode({ Node })
|
336 | export const ObjectNode = createObjectNode({ Node })
|
337 | export const ParenthesisNode = createParenthesisNode({ Node })
|
338 | export const RelationalNode = createRelationalNode({ Node })
|
339 | export const Chain = createChainClass({ math })
|
340 | export const reviver = createReviver({ classes })
|
341 | export const ConditionalNode = createConditionalNode({ Node })
|
342 | export const OperatorNode = createOperatorNode({ Node })
|
343 | export const RangeNode = createRangeNode({ Node })
|
344 | export const FunctionAssignmentNode = createFunctionAssignmentNode({ Node, typed })
|
345 | export const chain = createChain({ Chain, typed })
|
346 | export const AccessorNode = createAccessorNode({ Node, subset })
|
347 | export const IndexNode = createIndexNode({ Node, Range, size })
|
348 | export const AssignmentNode = createAssignmentNode({ matrix, Node, subset })
|
349 | export const SymbolNode = createSymbolNode({ Unit, Node, math })
|
350 | export const FunctionNode = createFunctionNode({ Node, SymbolNode, math })
|
351 | export const parse = createParse({ AccessorNode, ArrayNode, AssignmentNode, BlockNode, ConditionalNode, ConstantNode, FunctionAssignmentNode, FunctionNode, IndexNode, ObjectNode, OperatorNode, ParenthesisNode, RangeNode, RelationalNode, SymbolNode, config, numeric, typed })
|
352 | export const evaluate = createEvaluate({ parse, typed })
|
353 | export const Parser = createParserClass({ parse })
|
354 | export const Help = createHelpClass({ parse })
|
355 | export const compile = createCompile({ parse, typed })
|
356 | export const parser = createParser({ Parser, typed })
|
357 | export const simplify = createSimplify({ bignumber, fraction, ConstantNode, FunctionNode, OperatorNode, ParenthesisNode, SymbolNode, add, config, divide, equal, isZero, mathWithTransform, multiply, parse, pow, subtract, typed })
|
358 | export const rationalize = createRationalize({ bignumber, fraction, ConstantNode, FunctionNode, OperatorNode, ParenthesisNode, SymbolNode, add, config, divide, equal, isZero, mathWithTransform, multiply, parse, pow, simplify, subtract, typed })
|
359 | export const help = createHelp({ Help, mathWithTransform, typed })
|
360 | export const derivative = createDerivative({ ConstantNode, FunctionNode, OperatorNode, ParenthesisNode, SymbolNode, config, equal, isZero, numeric, parse, simplify, typed })
|
361 |
|
362 | Object.assign(math, {
|
363 | 'typeof': typeOf,
|
364 | eye,
|
365 | reviver,
|
366 | false: _false,
|
367 | null: _null,
|
368 | true: _true,
|
369 | e,
|
370 | i,
|
371 | LN10,
|
372 | LOG10E,
|
373 | NaN: _NaN,
|
374 | pi,
|
375 | SQRT1_2,
|
376 | tau,
|
377 | efimovFactor,
|
378 | fineStructure,
|
379 | sackurTetrode,
|
380 | weakMixingAngle,
|
381 | 'E': e,
|
382 | LN2,
|
383 | phi,
|
384 | SQRT2,
|
385 | Infinity: _Infinity,
|
386 | 'PI': pi,
|
387 | typed,
|
388 | isInteger,
|
389 | isNumeric,
|
390 | isPositive,
|
391 | isNaN,
|
392 | equalScalar,
|
393 | number,
|
394 | boolean,
|
395 | complex,
|
396 | splitUnit,
|
397 | unaryPlus,
|
398 | apply,
|
399 | cube,
|
400 | expm1,
|
401 | log10,
|
402 | multiplyScalar,
|
403 | sign,
|
404 | square,
|
405 | bitNot,
|
406 | arg,
|
407 | im,
|
408 | not,
|
409 | filter,
|
410 | forEach,
|
411 | map,
|
412 | erf,
|
413 | format,
|
414 | isPrime,
|
415 | acos,
|
416 | acot,
|
417 | acsc,
|
418 | asec,
|
419 | asin,
|
420 | atan,
|
421 | atanh,
|
422 | cosh,
|
423 | coth,
|
424 | csch,
|
425 | sech,
|
426 | sinh,
|
427 | tanh,
|
428 | chain,
|
429 | combinations,
|
430 | pickRandom,
|
431 | randomInt,
|
432 | LOG2E,
|
433 | clone,
|
434 | hasNumericValue,
|
435 | typeOf,
|
436 | string,
|
437 | fraction,
|
438 | unaryMinus,
|
439 | addScalar,
|
440 | exp,
|
441 | log2,
|
442 | sqrt,
|
443 | conj,
|
444 | getMatrixDataType,
|
445 | mode,
|
446 | print,
|
447 | acosh,
|
448 | acsch,
|
449 | asinh,
|
450 | cos,
|
451 | csc,
|
452 | sin,
|
453 | combinationsWithRep,
|
454 | random,
|
455 | version,
|
456 | isNegative,
|
457 | matrix,
|
458 | cbrt,
|
459 | gcd,
|
460 | mod,
|
461 | nthRoot,
|
462 | xgcd,
|
463 | bitAnd,
|
464 | bitXor,
|
465 | or,
|
466 | concat,
|
467 | diag,
|
468 | identity,
|
469 | ones,
|
470 | reshape,
|
471 | size,
|
472 | subset,
|
473 | zeros,
|
474 | to,
|
475 | round,
|
476 | leftShift,
|
477 | rightLogShift,
|
478 | compare,
|
479 | compareText,
|
480 | smaller,
|
481 | larger,
|
482 | unequal,
|
483 | max,
|
484 | sparse,
|
485 | acoth,
|
486 | atan2,
|
487 | sec,
|
488 | add,
|
489 | trace,
|
490 | composition,
|
491 | isZero,
|
492 | abs,
|
493 | floor,
|
494 | multiply,
|
495 | dotMultiply,
|
496 | re,
|
497 | flatten,
|
498 | resize,
|
499 | squeeze,
|
500 | prod,
|
501 | pow,
|
502 | dotPow,
|
503 | rightArithShift,
|
504 | compareNatural,
|
505 | equalText,
|
506 | largerEq,
|
507 | partitionSelect,
|
508 | min,
|
509 | asech,
|
510 | tan,
|
511 | setSize,
|
512 | norm,
|
513 | quantileSeq,
|
514 | gamma,
|
515 | bignumber,
|
516 | lcm,
|
517 | bitOr,
|
518 | kron,
|
519 | transpose,
|
520 | numeric,
|
521 | and,
|
522 | smallerEq,
|
523 | sort,
|
524 | cot,
|
525 | dot,
|
526 | sum,
|
527 | factorial,
|
528 | permutations,
|
529 | ceil,
|
530 | subtract,
|
531 | cross,
|
532 | ctranspose,
|
533 | equal,
|
534 | setCartesian,
|
535 | setDistinct,
|
536 | setIsSubset,
|
537 | setPowerset,
|
538 | index,
|
539 | fix,
|
540 | range,
|
541 | divideScalar,
|
542 | nthRoots,
|
543 | lsolve,
|
544 | deepEqual,
|
545 | setDifference,
|
546 | setMultiplicity,
|
547 | hypot,
|
548 | lup,
|
549 | slu,
|
550 | det,
|
551 | distance,
|
552 | stirlingS2,
|
553 | catalan,
|
554 | xor,
|
555 | row,
|
556 | dotDivide,
|
557 | createUnit,
|
558 | setSymDifference,
|
559 | qr,
|
560 | inv,
|
561 | sqrtm,
|
562 | intersect,
|
563 | bellNumbers,
|
564 | atomicMass,
|
565 | bohrMagneton,
|
566 | boltzmann,
|
567 | conductanceQuantum,
|
568 | deuteronMass,
|
569 | electronMass,
|
570 | faraday,
|
571 | firstRadiation,
|
572 | gravitationConstant,
|
573 | hartreeEnergy,
|
574 | klitzing,
|
575 | magneticConstant,
|
576 | molarMass,
|
577 | molarPlanckConstant,
|
578 | neutronMass,
|
579 | planckCharge,
|
580 | planckLength,
|
581 | planckTemperature,
|
582 | protonMass,
|
583 | reducedPlanckConstant,
|
584 | secondRadiation,
|
585 | stefanBoltzmann,
|
586 | vacuumImpedance,
|
587 | column,
|
588 | usolve,
|
589 | setIntersect,
|
590 | lusolve,
|
591 | expm,
|
592 | avogadro,
|
593 | classicalElectronRadius,
|
594 | electricConstant,
|
595 | fermiCoupling,
|
596 | gravity,
|
597 | loschmidt,
|
598 | molarMassC12,
|
599 | nuclearMagneton,
|
600 | planckMass,
|
601 | quantumOfCirculation,
|
602 | speedOfLight,
|
603 | wienDisplacement,
|
604 | log,
|
605 | unit,
|
606 | parse,
|
607 | evaluate,
|
608 | divide,
|
609 | median,
|
610 | variance,
|
611 | std,
|
612 | multinomial,
|
613 | bohrRadius,
|
614 | elementaryCharge,
|
615 | inverseConductanceQuantum,
|
616 | molarVolume,
|
617 | planckTime,
|
618 | thomsonCrossSection,
|
619 | log1p,
|
620 | compile,
|
621 | parser,
|
622 | mean,
|
623 | 'var': variance,
|
624 | simplify,
|
625 | rationalize,
|
626 | gasConstant,
|
627 | planckConstant,
|
628 | setUnion,
|
629 | help,
|
630 | kldivergence,
|
631 | coulomb,
|
632 | rydberg,
|
633 | 'eval': evaluate,
|
634 | derivative,
|
635 | mad,
|
636 | magneticFluxQuantum,
|
637 | config
|
638 | })
|
639 |
|
640 | Object.assign(mathWithTransform, math, {
|
641 | apply: createApplyTransform({ isInteger, typed }),
|
642 | filter: createFilterTransform({ typed }),
|
643 | map: createMapTransform({ typed }),
|
644 | forEach: createForEachTransform({ typed }),
|
645 | max: createMaxTransform({ larger, typed }),
|
646 | min: createMinTransform({ smaller, typed }),
|
647 | subset: createSubsetTransform({ matrix, typed }),
|
648 | concat: createConcatTransform({ isInteger, matrix, typed }),
|
649 | range: createRangeTransform({ bignumber, matrix, config, larger, largerEq, smaller, smallerEq, typed }),
|
650 | sum: createSumTransform({ bignumber, fraction, add, config, typed }),
|
651 | index: createIndexTransform({ Index }),
|
652 | column: createColumnTransform({ Index, matrix, range, typed }),
|
653 | row: createRowTransform({ Index, matrix, range, typed }),
|
654 | std: createStdTransform({ sqrt, typed, variance }),
|
655 | mean: createMeanTransform({ add, divide, typed }),
|
656 | variance: createVarianceTransform({ add, apply, divide, isNaN, multiply, subtract, typed })
|
657 | })
|
658 |
|
659 | Object.assign(classes, {
|
660 | ResultSet,
|
661 | Complex,
|
662 | Range,
|
663 | Node,
|
664 | ArrayNode,
|
665 | BlockNode,
|
666 | ConstantNode,
|
667 | ObjectNode,
|
668 | ParenthesisNode,
|
669 | RelationalNode,
|
670 | Chain,
|
671 | BigNumber,
|
672 | Matrix,
|
673 | ConditionalNode,
|
674 | OperatorNode,
|
675 | Fraction,
|
676 | RangeNode,
|
677 | DenseMatrix,
|
678 | FunctionAssignmentNode,
|
679 | SparseMatrix,
|
680 | ImmutableDenseMatrix,
|
681 | FibonacciHeap,
|
682 | AccessorNode,
|
683 | IndexNode,
|
684 | Spa,
|
685 | AssignmentNode,
|
686 | Index,
|
687 | Unit,
|
688 | SymbolNode,
|
689 | FunctionNode,
|
690 | Parser,
|
691 | Help
|
692 | })
|
693 |
|
694 | Chain.createProxy(math)
|
695 |
|
696 | export { embeddedDocs as docs } from '../expression/embeddedDocs/embeddedDocs'
|