pimath 0.0.127 → 0.0.128

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 (112) hide show
  1. package/.idea/jsLibraryMappings.xml +6 -0
  2. package/{public/index.html → dist/demo/exercises.html} +2 -2
  3. package/dist/demo/matrices.html +39 -0
  4. package/dist/demo/playground.html +20 -0
  5. package/dist/demo.css +3 -0
  6. package/dist/pimath.js +4239 -7819
  7. package/dist/pimath.umd.cjs +15 -0
  8. package/index.html +15 -0
  9. package/package.json +16 -8
  10. package/public/demo/exercises.html +283 -0
  11. package/public/demo/matrices.html +39 -0
  12. package/public/demo/playground.html +20 -0
  13. package/src/demo/exercises.ts +0 -0
  14. package/src/demo/matrices.ts +61 -0
  15. package/src/demo/playground.ts +153 -0
  16. package/src/{index.ts → main.ts} +1 -1
  17. package/src/maths/algebra/rational.ts +8 -4
  18. package/tsconfig.json +15 -4
  19. package/vite.config.js +23 -0
  20. package/webpack-production.config.js +22 -22
  21. package/webpack.config.js +22 -22
  22. package/dev/pimath.js +0 -7945
  23. package/dev/pimath.js.map +0 -1
  24. package/dist/pimath.js.map +0 -1
  25. package/dist/pimath.min.js +0 -2
  26. package/dist/pimath.min.js.map +0 -1
  27. package/esm/index.d.ts +0 -38
  28. package/esm/index.js +0 -44
  29. package/esm/index.js.map +0 -1
  30. package/esm/maths/algebra/equation.d.ts +0 -119
  31. package/esm/maths/algebra/equation.js +0 -797
  32. package/esm/maths/algebra/equation.js.map +0 -1
  33. package/esm/maths/algebra/linearSystem.d.ts +0 -39
  34. package/esm/maths/algebra/linearSystem.js +0 -279
  35. package/esm/maths/algebra/linearSystem.js.map +0 -1
  36. package/esm/maths/algebra/logicalset.d.ts +0 -28
  37. package/esm/maths/algebra/logicalset.js +0 -158
  38. package/esm/maths/algebra/logicalset.js.map +0 -1
  39. package/esm/maths/algebra/monom.d.ts +0 -206
  40. package/esm/maths/algebra/monom.js +0 -909
  41. package/esm/maths/algebra/monom.js.map +0 -1
  42. package/esm/maths/algebra/polynom.d.ts +0 -157
  43. package/esm/maths/algebra/polynom.js +0 -1305
  44. package/esm/maths/algebra/polynom.js.map +0 -1
  45. package/esm/maths/algebra/rational.d.ts +0 -46
  46. package/esm/maths/algebra/rational.js +0 -195
  47. package/esm/maths/algebra/rational.js.map +0 -1
  48. package/esm/maths/algebra/study/rationalStudy.d.ts +0 -28
  49. package/esm/maths/algebra/study/rationalStudy.js +0 -244
  50. package/esm/maths/algebra/study/rationalStudy.js.map +0 -1
  51. package/esm/maths/algebra/study.d.ts +0 -143
  52. package/esm/maths/algebra/study.js +0 -380
  53. package/esm/maths/algebra/study.js.map +0 -1
  54. package/esm/maths/coefficients/fraction.d.ts +0 -90
  55. package/esm/maths/coefficients/fraction.js +0 -517
  56. package/esm/maths/coefficients/fraction.js.map +0 -1
  57. package/esm/maths/coefficients/nthRoot.d.ts +0 -23
  58. package/esm/maths/coefficients/nthRoot.js +0 -137
  59. package/esm/maths/coefficients/nthRoot.js.map +0 -1
  60. package/esm/maths/geometry/circle.d.ts +0 -45
  61. package/esm/maths/geometry/circle.js +0 -324
  62. package/esm/maths/geometry/circle.js.map +0 -1
  63. package/esm/maths/geometry/line.d.ts +0 -99
  64. package/esm/maths/geometry/line.js +0 -485
  65. package/esm/maths/geometry/line.js.map +0 -1
  66. package/esm/maths/geometry/point.d.ts +0 -34
  67. package/esm/maths/geometry/point.js +0 -167
  68. package/esm/maths/geometry/point.js.map +0 -1
  69. package/esm/maths/geometry/triangle.d.ts +0 -91
  70. package/esm/maths/geometry/triangle.js +0 -276
  71. package/esm/maths/geometry/triangle.js.map +0 -1
  72. package/esm/maths/geometry/vector.d.ts +0 -41
  73. package/esm/maths/geometry/vector.js +0 -198
  74. package/esm/maths/geometry/vector.js.map +0 -1
  75. package/esm/maths/numeric.d.ts +0 -28
  76. package/esm/maths/numeric.js +0 -136
  77. package/esm/maths/numeric.js.map +0 -1
  78. package/esm/maths/numexp.d.ts +0 -19
  79. package/esm/maths/numexp.js +0 -186
  80. package/esm/maths/numexp.js.map +0 -1
  81. package/esm/maths/randomization/random.d.ts +0 -23
  82. package/esm/maths/randomization/random.js +0 -79
  83. package/esm/maths/randomization/random.js.map +0 -1
  84. package/esm/maths/randomization/randomCore.d.ts +0 -7
  85. package/esm/maths/randomization/randomCore.js +0 -22
  86. package/esm/maths/randomization/randomCore.js.map +0 -1
  87. package/esm/maths/randomization/rndFraction.d.ts +0 -12
  88. package/esm/maths/randomization/rndFraction.js +0 -44
  89. package/esm/maths/randomization/rndFraction.js.map +0 -1
  90. package/esm/maths/randomization/rndGeometryLine.d.ts +0 -12
  91. package/esm/maths/randomization/rndGeometryLine.js +0 -46
  92. package/esm/maths/randomization/rndGeometryLine.js.map +0 -1
  93. package/esm/maths/randomization/rndGeometryPoint.d.ts +0 -12
  94. package/esm/maths/randomization/rndGeometryPoint.js +0 -61
  95. package/esm/maths/randomization/rndGeometryPoint.js.map +0 -1
  96. package/esm/maths/randomization/rndHelpers.d.ts +0 -23
  97. package/esm/maths/randomization/rndHelpers.js +0 -98
  98. package/esm/maths/randomization/rndHelpers.js.map +0 -1
  99. package/esm/maths/randomization/rndMonom.d.ts +0 -12
  100. package/esm/maths/randomization/rndMonom.js +0 -53
  101. package/esm/maths/randomization/rndMonom.js.map +0 -1
  102. package/esm/maths/randomization/rndPolynom.d.ts +0 -13
  103. package/esm/maths/randomization/rndPolynom.js +0 -75
  104. package/esm/maths/randomization/rndPolynom.js.map +0 -1
  105. package/esm/maths/randomization/rndTypes.d.ts +0 -34
  106. package/esm/maths/randomization/rndTypes.js +0 -3
  107. package/esm/maths/randomization/rndTypes.js.map +0 -1
  108. package/esm/maths/shutingyard.d.ts +0 -59
  109. package/esm/maths/shutingyard.js +0 -443
  110. package/esm/maths/shutingyard.js.map +0 -1
  111. package/public/matrices.html +0 -100
  112. package/public/playground.html +0 -168
@@ -1,206 +0,0 @@
1
- import { Token } from "../shutingyard";
2
- import { Fraction } from "../coefficients/fraction";
3
- export type literalType = {
4
- [Key: string]: Fraction;
5
- };
6
- export declare class Monom {
7
- /**
8
- * Create a Monom
9
- * Defined as \\(k \\cdot x^{n}\\), where \\( k,n \in \\mathbb{Q}\\).
10
- * Examples: \\(3x^2\\) or \\(3/5x^2\\)
11
- * @param value (optional) string The value that should be parse. Can be a Monom, a Fraction, a string or a number. If nothing is provided, it will return the trivial monom (0).
12
- */
13
- constructor(value?: unknown);
14
- private _coefficient;
15
- /**
16
- * Get the coefficient \\(k\\) of the Monom \\(k\\cdot x^{n}\\)
17
- * @returns {Fraction}
18
- */
19
- get coefficient(): Fraction;
20
- /**
21
- * Set the coefficient \\(k\\) value of the monom
22
- * @param {Fraction | number | string} F
23
- */
24
- set coefficient(F: Fraction | number | string);
25
- private _literal;
26
- /**
27
- * Get the literal part of \\(x^{n_1}y^{n_2}\\) as dictionary \\[\\begin{array}{ll}x&=n_1\\\\y&=n_2\\end{array}\\]
28
- * @returns {literalType}
29
- */
30
- get literal(): literalType;
31
- /**
32
- * Set the literal part of the monom. Must be a dictionary {x: Fraction, y: Fraction, ...}
33
- * @param {literalType} L
34
- */
35
- set literal(L: literalType);
36
- /**
37
- * Get the literal square roots of the Monom.
38
- * TODO: remove this getter ? Is it used and is it correct ?
39
- * @returns {literalType}
40
- */
41
- get literalSqrt(): literalType;
42
- /**
43
- * Set the literal part of the monom from a string
44
- * @param inputStr String like x^2y^3
45
- */
46
- set literalStr(inputStr: string);
47
- /**
48
- * Get the variables letters
49
- */
50
- get variables(): string[];
51
- /**
52
- * This display getter is to be used in the polynom display getter
53
- */
54
- get display(): string;
55
- get dividers(): Monom[];
56
- /**
57
- * Display the monom, forcing the '+' sign to appear
58
- */
59
- get displayWithSign(): string;
60
- get texWithSign(): string;
61
- get plotFunction(): string;
62
- /**
63
- * Get the tex output of the monom
64
- */
65
- get tex(): string;
66
- /**
67
- * Get the least common multiple of monoms
68
- * @param monoms Array of monoms
69
- */
70
- static lcm: (...monoms: Monom[]) => Monom;
71
- /**
72
- * Multiply two monoms and return a NEW monom.
73
- * @param monoms
74
- */
75
- static xmultiply: (...monoms: Monom[]) => Monom;
76
- /**
77
- * Parse a string to a monom. The string may include fraction.
78
- * @param inputStr
79
- */
80
- parse: (inputStr: unknown) => Monom;
81
- addToken: (stack: Monom[], element: Token) => void;
82
- /**
83
- * Clone the current Monom.
84
- */
85
- clone: () => Monom;
86
- copyLiterals: (literal: literalType) => literalType;
87
- makeSame: (M: Monom) => Monom;
88
- /**
89
- * Create a zero value monom
90
- */
91
- zero: () => Monom;
92
- /**
93
- * Create a one value monom
94
- */
95
- one: () => Monom;
96
- /**
97
- * Clean the monom by removing each letters with a power of zero.
98
- */
99
- clean: () => Monom;
100
- reduce: () => Monom;
101
- /**
102
- * Get the opposed
103
- * Returns a monom.
104
- */
105
- opposed: () => Monom;
106
- /**
107
- * Add all similar monoms. If they aren't similar, they are simply skipped.
108
- * @param M (Monom[]) The monoms to add.
109
- */
110
- add: (...M: Monom[]) => Monom;
111
- /**
112
- * Subtract multiple monoms
113
- * @param M (Monom[]) The monoms to subtract
114
- */
115
- subtract: (...M: Monom[]) => Monom;
116
- /**
117
- * Multiple multiple monoms to the current monom
118
- * @param M (Monom[]) The monoms to multiply to.
119
- */
120
- multiply: (...M: Monom[]) => Monom;
121
- multiplyByNumber: (F: Fraction | number) => Monom;
122
- /**
123
- * Divide the current monoms by multiple monoms
124
- * @param M (Monom[])
125
- */
126
- divide: (...M: Monom[]) => Monom;
127
- /**
128
- * Get the pow of a monom.
129
- * @param nb (number) : Mathematical pow
130
- */
131
- pow: (nb: number | Fraction) => Monom;
132
- /**
133
- * Get the nth-root of the monom
134
- * @param p
135
- */
136
- root: (p: number) => Monom;
137
- /**
138
- * Return the square root of a monom
139
- */
140
- sqrt: () => Monom;
141
- compare: (M: Monom, sign?: string) => boolean;
142
- /**
143
- * Determine if the monom is null
144
- */
145
- isZero(): boolean;
146
- /**
147
- * Determine if the monom is one
148
- */
149
- isOne(): boolean;
150
- /**
151
- * Determine if two monoms are equals
152
- * @param M
153
- */
154
- isEqual: (M: Monom) => boolean;
155
- /**
156
- * Determine if two monoms are similar
157
- * @param M
158
- */
159
- isSameAs: (M: Monom) => boolean;
160
- isSquare: () => boolean;
161
- isLiteralSquare: () => boolean;
162
- hasFractionCoefficient: () => boolean;
163
- /**
164
- * Determine if a monom contains a setLetter in it's literal part
165
- * @param letter
166
- */
167
- hasLetter: (letter?: string) => boolean;
168
- /**
169
- * Set the power of a particular setLetter
170
- * @param letter (string) Letter to change
171
- * @param pow (number) Power of the setLetter (must be positive integer.
172
- */
173
- setLetter: (letter: string, pow: Fraction | number) => void;
174
- /**
175
- * Get the degree of a monom. If no setLetter is given, the result will be the global degree.
176
- * @param letter (string) Letter to get to degree (power)
177
- */
178
- degree: (letter?: string) => Fraction;
179
- /**
180
- * Evaluate a monom. Each setLetter must be assigned to a Fraction.
181
- * @param values Dictionary of <setLetter: Fraction>
182
- */
183
- evaluate: (values: literalType | Fraction | number) => Fraction;
184
- evaluateAsNumeric: (values: number | {
185
- [Key: string]: number;
186
- }) => number;
187
- /**
188
- * Derivative the monom
189
- * @param letter
190
- */
191
- derivative: (letter?: string) => Monom;
192
- primitive: (letter?: string) => Monom;
193
- /**
194
- * Determine if multiple monoms are similar
195
- * @param M
196
- */
197
- areSameAs: (...M: Monom[]) => boolean;
198
- /**
199
- * Determine if multiple monoms are equals
200
- * @param M
201
- */
202
- areEquals: (...M: Monom[]) => boolean;
203
- isDivisible: (div: Monom) => boolean;
204
- private _getLiteralDividers;
205
- private _shutingYardToReducedMonom;
206
- }