pimath 0.0.120 → 0.0.122
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/.idea/PI.iml +7 -1
- package/.idea/shelf/Uncommitted_changes_before_Update_at_24_07_2023_15_31_[Default_Changelist]/shelved.patch +90 -0
- package/.idea/shelf/Uncommitted_changes_before_Update_at_24_07_2023_15_31_[Default_Changelist]1/shelved.patch +107 -0
- package/.idea/shelf/Uncommitted_changes_before_Update_at_24_07_2023_15_31__Default_Changelist_.xml +4 -0
- package/.idea/shelf/Uncommitted_changes_before_Update_at_24_07_2023_15_31__Default_Changelist_1.xml +4 -0
- package/LICENSE.md +1 -1
- package/dev/pimath.js +7929 -0
- package/dev/pimath.js.map +1 -0
- package/dist/{pi.js → pimath.js} +7613 -7840
- package/dist/pimath.js.map +1 -0
- package/dist/pimath.min.js +2 -0
- package/dist/pimath.min.js.map +1 -0
- package/docs/assets/main.js +58 -58
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +1367 -1280
- package/docs/classes/Logicalset.Logicalset.html +221 -212
- package/docs/classes/Polynom.Rational.html +391 -388
- package/docs/classes/Vector-1.Vector.html +494 -448
- package/docs/classes/Vector.Point.html +341 -342
- package/docs/classes/algebra_equation.Equation.html +796 -753
- package/docs/classes/algebra_linearSystem.LinearSystem.html +408 -397
- package/docs/classes/algebra_monom.Monom.html +967 -910
- package/docs/classes/algebra_polynom.Polynom.html +1281 -1260
- package/docs/classes/coefficients_fraction.Fraction.html +939 -931
- package/docs/classes/geometry_circle.Circle.html +476 -476
- package/docs/classes/geometry_line.Line.html +779 -719
- package/docs/classes/geometry_triangle.Triangle.html +429 -420
- package/docs/classes/numeric.Numeric.html +269 -263
- package/docs/classes/shutingyard.Shutingyard.html +259 -248
- package/docs/enums/algebra_equation.PARTICULAR_SOLUTION.html +89 -88
- package/docs/enums/geometry_line.LinePropriety.html +102 -102
- package/docs/enums/shutingyard.ShutingyardMode.html +106 -102
- package/docs/enums/shutingyard.ShutingyardType.html +120 -116
- package/docs/index.html +63 -65
- package/docs/interfaces/algebra_equation.ISolution.html +111 -109
- package/docs/interfaces/algebra_polynom.IEuclidian.html +93 -92
- package/docs/interfaces/geometry_triangle.remarquableLines.html +150 -150
- package/docs/modules/Logicalset.html +69 -74
- package/docs/modules/Polynom.html +69 -74
- package/docs/modules/Vector-1.html +69 -74
- package/docs/modules/Vector.html +69 -74
- package/docs/modules/algebra_equation.html +75 -81
- package/docs/modules/algebra_linearSystem.html +65 -71
- package/docs/modules/algebra_monom.html +70 -76
- package/docs/modules/algebra_polynom.html +75 -81
- package/docs/modules/coefficients_fraction.html +70 -76
- package/docs/modules/geometry_circle.html +65 -71
- package/docs/modules/geometry_line.html +70 -76
- package/docs/modules/geometry_triangle.html +70 -76
- package/docs/modules/numeric.html +65 -71
- package/docs/modules/shutingyard.html +84 -90
- package/docs/types/algebra_monom.literalType.html +66 -70
- package/docs/types/algebra_polynom.PolynomParsingType.html +62 -66
- package/docs/types/coefficients_fraction.FractionParsingType.html +61 -65
- package/docs/types/shutingyard.Token.html +72 -76
- package/docs/types/shutingyard.tokenType.html +77 -81
- package/docs/variables/shutingyard.tokenConstant.html +70 -74
- package/esm/index.d.ts +38 -41
- package/esm/index.js +43 -46
- package/esm/index.js.map +1 -1
- package/esm/maths/algebra/equation.d.ts +119 -117
- package/esm/maths/algebra/equation.js +796 -785
- package/esm/maths/algebra/equation.js.map +1 -1
- package/esm/maths/algebra/linearSystem.d.ts +39 -38
- package/esm/maths/algebra/linearSystem.js +278 -262
- package/esm/maths/algebra/linearSystem.js.map +1 -1
- package/esm/maths/algebra/logicalset.d.ts +28 -28
- package/esm/maths/algebra/logicalset.js +157 -157
- package/esm/maths/algebra/monom.d.ts +206 -206
- package/esm/maths/algebra/monom.js +908 -908
- package/esm/maths/algebra/monom.js.map +1 -1
- package/esm/maths/algebra/polynom.d.ts +157 -157
- package/esm/maths/algebra/polynom.js +1277 -1277
- package/esm/maths/algebra/rational.d.ts +45 -45
- package/esm/maths/algebra/rational.js +183 -183
- package/esm/maths/algebra/study/rationalStudy.d.ts +28 -28
- package/esm/maths/algebra/study/rationalStudy.js +243 -243
- package/esm/maths/algebra/study.d.ts +143 -142
- package/esm/maths/algebra/study.js +378 -377
- package/esm/maths/algebra/study.js.map +1 -1
- package/esm/maths/coefficients/fraction.d.ts +90 -90
- package/esm/maths/coefficients/fraction.js +516 -516
- package/esm/maths/coefficients/fraction.js.map +1 -1
- package/esm/maths/coefficients/nthRoot.d.ts +23 -23
- package/esm/maths/coefficients/nthRoot.js +136 -136
- package/esm/maths/geometry/circle.d.ts +45 -45
- package/esm/maths/geometry/circle.js +323 -323
- package/esm/maths/geometry/line.d.ts +99 -99
- package/esm/maths/geometry/line.js +481 -481
- package/esm/maths/geometry/line.js.map +1 -1
- package/esm/maths/geometry/point.d.ts +34 -34
- package/esm/maths/geometry/point.js +166 -166
- package/esm/maths/geometry/point.js.map +1 -1
- package/esm/maths/geometry/triangle.d.ts +85 -85
- package/esm/maths/geometry/triangle.js +268 -268
- package/esm/maths/geometry/vector.d.ts +41 -41
- package/esm/maths/geometry/vector.js +197 -197
- package/esm/maths/geometry/vector.js.map +1 -1
- package/esm/maths/numeric.d.ts +28 -28
- package/esm/maths/numeric.js +180 -180
- package/esm/maths/numexp.d.ts +19 -0
- package/esm/maths/numexp.js +186 -0
- package/esm/maths/numexp.js.map +1 -0
- package/esm/maths/randomization/random.d.ts +23 -23
- package/esm/maths/randomization/random.js +78 -78
- package/esm/maths/randomization/random.js.map +1 -1
- package/esm/maths/randomization/randomCore.d.ts +7 -7
- package/esm/maths/randomization/randomCore.js +21 -21
- package/esm/maths/randomization/rndFraction.d.ts +12 -12
- package/esm/maths/randomization/rndFraction.js +43 -43
- package/esm/maths/randomization/rndGeometryLine.d.ts +12 -12
- package/esm/maths/randomization/rndGeometryLine.js +45 -45
- package/esm/maths/randomization/rndGeometryPoint.d.ts +12 -12
- package/esm/maths/randomization/rndGeometryPoint.js +60 -60
- package/esm/maths/randomization/rndHelpers.d.ts +23 -23
- package/esm/maths/randomization/rndHelpers.js +76 -76
- package/esm/maths/randomization/rndMonom.d.ts +12 -12
- package/esm/maths/randomization/rndMonom.js +52 -52
- package/esm/maths/randomization/rndPolynom.d.ts +13 -13
- package/esm/maths/randomization/rndPolynom.js +74 -74
- package/esm/maths/randomization/rndTypes.d.ts +34 -34
- package/esm/maths/randomization/rndTypes.js +2 -2
- package/esm/maths/shutingyard.d.ts +59 -59
- package/esm/maths/shutingyard.js +442 -442
- package/esm/maths/shutingyard.js.map +1 -1
- package/package.json +11 -11
- package/public/index.html +50 -81
- package/public/playground.html +7 -8
- package/src/index.ts +1 -4
- package/src/maths/algebra/equation.ts +16 -0
- package/src/maths/algebra/linearSystem.ts +20 -0
- package/src/maths/algebra/study.ts +12 -10
- package/src/maths/{expressions/numexp.ts → numexp.ts} +2 -2
- package/tests/algebra/equation.test.ts +19 -5
- package/tests/algebra/linear.test.ts +3 -11
- package/tests/algebra/polynom.test.ts +7 -8
- package/tests/algebra/rationnal.test.ts +1 -1
- package/tests/algebra/study.test.ts +2 -9
- package/tests/coefficients/fraction.test.ts +8 -8
- package/tests/custom.test.ts +33 -37
- package/tests/numeric.test.ts +1 -2
- package/tests/numexp.test.ts +13 -5
- package/tests/shutingyard.test.ts +3 -3
- package/webpack-production-min.config.js +1 -1
- package/webpack-production.config.js +1 -1
- package/webpack.config.js +1 -1
- package/dist/pi.js.map +0 -1
- package/dist/pi.min.js +0 -2
- package/dist/pi.min.js.map +0 -1
- package/docs/classes/expressions_numexp.NumExp.html +0 -236
- package/docs/classes/expressions_polynomexp.PolynomExpFactor.html +0 -317
- package/docs/classes/expressions_polynomexp.PolynomExpProduct.html +0 -285
- package/docs/modules/expressions_numexp.html +0 -71
- package/docs/modules/expressions_polynomexp.html +0 -73
- package/docs/modules.html +0 -76
- package/graph.svg +0 -1033
- package/src/maths/expressions/ExpressionTree.ts +0 -172
- package/src/maths/expressions/expression.ts +0 -286
- package/src/maths/expressions/expressionFactor.ts +0 -190
- package/src/maths/expressions/expressionMember.ts +0 -233
- package/src/maths/expressions/expressionOperators.ts +0 -49
- package/src/maths/expressions/expressionParser.ts +0 -295
- package/src/maths/expressions/factors/ExpFactor.ts +0 -39
- package/src/maths/expressions/factors/ExpFactorConstant.ts +0 -60
- package/src/maths/expressions/factors/ExpFactorExponential.ts +0 -26
- package/src/maths/expressions/factors/ExpFactorNumber.ts +0 -72
- package/src/maths/expressions/factors/ExpFactorPower.ts +0 -42
- package/src/maths/expressions/factors/ExpFactorTrigo.ts +0 -53
- package/src/maths/expressions/factors/ExpFactorVariable.ts +0 -45
- package/src/maths/expressions/internals.ts +0 -14
- package/src/maths/expressions/polynomexp.bkp.ts +0 -221
- package/src/maths/expressions/polynomexp.ts +0 -310
- package/tests/expressions/expressions.test.ts +0 -145
- package/tests/expressions/expressiontree.test.ts +0 -11
- package/tests/polynomexp.test.ts +0 -12
|
@@ -1,206 +1,206 @@
|
|
|
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
|
-
private _coefficient;
|
|
8
|
-
private _literal;
|
|
9
|
-
/**
|
|
10
|
-
* Create a Monom
|
|
11
|
-
* Defined as \\(k \\cdot x^{n}\\), where \\( k,n \in \\mathbb{Q}\\).
|
|
12
|
-
* Examples: \\(3x^2\\) or \\(3/5x^2\\)
|
|
13
|
-
* @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).
|
|
14
|
-
*/
|
|
15
|
-
constructor(value?: unknown);
|
|
16
|
-
/**
|
|
17
|
-
* Get the coefficient \\(k\\) of the Monom \\(k\\cdot x^{n}\\)
|
|
18
|
-
* @returns {Fraction}
|
|
19
|
-
*/
|
|
20
|
-
get coefficient(): Fraction;
|
|
21
|
-
/**
|
|
22
|
-
* Set the coefficient \\(k\\) value of the monom
|
|
23
|
-
* @param {Fraction | number | string} F
|
|
24
|
-
*/
|
|
25
|
-
set coefficient(F: Fraction | number | string);
|
|
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
|
-
* Get the literal square roots of the Monom.
|
|
33
|
-
* TODO: remove this getter ? Is it used and is it correct ?
|
|
34
|
-
* @returns {literalType}
|
|
35
|
-
*/
|
|
36
|
-
get literalSqrt(): literalType;
|
|
37
|
-
/**
|
|
38
|
-
* Set the literal part of the monom. Must be a dictionary {x: Fraction, y: Fraction, ...}
|
|
39
|
-
* @param {literalType} L
|
|
40
|
-
*/
|
|
41
|
-
set literal(L: 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
|
-
private _getLiteralDividers;
|
|
57
|
-
/**
|
|
58
|
-
* Display the monom, forcing the '+' sign to appear
|
|
59
|
-
*/
|
|
60
|
-
get displayWithSign(): string;
|
|
61
|
-
get texWithSign(): string;
|
|
62
|
-
get plotFunction(): string;
|
|
63
|
-
/**
|
|
64
|
-
* Get the tex output of the monom
|
|
65
|
-
*/
|
|
66
|
-
get tex(): string;
|
|
67
|
-
/**
|
|
68
|
-
* Parse a string to a monom. The string may include fraction.
|
|
69
|
-
* @param inputStr
|
|
70
|
-
*/
|
|
71
|
-
parse: (inputStr: unknown) => Monom;
|
|
72
|
-
addToken: (stack: Monom[], element: Token) => void;
|
|
73
|
-
private _shutingYardToReducedMonom;
|
|
74
|
-
/**
|
|
75
|
-
* Clone the current Monom.
|
|
76
|
-
*/
|
|
77
|
-
clone: () => Monom;
|
|
78
|
-
copyLiterals: (literal: literalType) => literalType;
|
|
79
|
-
makeSame: (M: Monom) => Monom;
|
|
80
|
-
/**
|
|
81
|
-
* Create a zero value monom
|
|
82
|
-
*/
|
|
83
|
-
zero: () => Monom;
|
|
84
|
-
/**
|
|
85
|
-
* Create a one value monom
|
|
86
|
-
*/
|
|
87
|
-
one: () => Monom;
|
|
88
|
-
/**
|
|
89
|
-
* Clean the monom by removing each letters with a power of zero.
|
|
90
|
-
*/
|
|
91
|
-
clean: () => Monom;
|
|
92
|
-
reduce: () => Monom;
|
|
93
|
-
/**
|
|
94
|
-
* Get the opposed
|
|
95
|
-
* Returns a monom.
|
|
96
|
-
*/
|
|
97
|
-
opposed: () => Monom;
|
|
98
|
-
/**
|
|
99
|
-
* Add all similar monoms. If they aren't similar, they are simply skipped.
|
|
100
|
-
* @param M (Monom[]) The monoms to add.
|
|
101
|
-
*/
|
|
102
|
-
add: (...M: Monom[]) => Monom;
|
|
103
|
-
/**
|
|
104
|
-
* Subtract multiple monoms
|
|
105
|
-
* @param M (Monom[]) The monoms to subtract
|
|
106
|
-
*/
|
|
107
|
-
subtract: (...M: Monom[]) => Monom;
|
|
108
|
-
/**
|
|
109
|
-
* Multiple multiple monoms to the current monom
|
|
110
|
-
* @param M (Monom[]) The monoms to multiply to.
|
|
111
|
-
*/
|
|
112
|
-
multiply: (...M: Monom[]) => Monom;
|
|
113
|
-
multiplyByNumber: (F: Fraction | number) => Monom;
|
|
114
|
-
/**
|
|
115
|
-
* Divide the current monoms by multiple monoms
|
|
116
|
-
* @param M (Monom[])
|
|
117
|
-
*/
|
|
118
|
-
divide: (...M: Monom[]) => Monom;
|
|
119
|
-
/**
|
|
120
|
-
* Get the pow of a monom.
|
|
121
|
-
* @param nb (number) : Mathematical pow
|
|
122
|
-
*/
|
|
123
|
-
pow: (nb: number | Fraction) => Monom;
|
|
124
|
-
/**
|
|
125
|
-
* Get the nth-root of the monom
|
|
126
|
-
* @param p
|
|
127
|
-
*/
|
|
128
|
-
root: (p: number) => Monom;
|
|
129
|
-
/**
|
|
130
|
-
* Return the square root of a monom
|
|
131
|
-
*/
|
|
132
|
-
sqrt: () => Monom;
|
|
133
|
-
compare: (M: Monom, sign?: string) => boolean;
|
|
134
|
-
/**
|
|
135
|
-
* Determine if the monom is null
|
|
136
|
-
*/
|
|
137
|
-
isZero(): boolean;
|
|
138
|
-
/**
|
|
139
|
-
* Determine if the monom is one
|
|
140
|
-
*/
|
|
141
|
-
isOne(): boolean;
|
|
142
|
-
/**
|
|
143
|
-
* Determine if two monoms are equals
|
|
144
|
-
* @param M
|
|
145
|
-
*/
|
|
146
|
-
isEqual: (M: Monom) => boolean;
|
|
147
|
-
/**
|
|
148
|
-
* Determine if two monoms are similar
|
|
149
|
-
* @param M
|
|
150
|
-
*/
|
|
151
|
-
isSameAs: (M: Monom) => boolean;
|
|
152
|
-
isSquare: () => boolean;
|
|
153
|
-
isLiteralSquare: () => boolean;
|
|
154
|
-
hasFractionCoefficient: () => boolean;
|
|
155
|
-
/**
|
|
156
|
-
* Determine if a monom contains a setLetter in it's literal part
|
|
157
|
-
* @param letter
|
|
158
|
-
*/
|
|
159
|
-
hasLetter: (letter?: string) => boolean;
|
|
160
|
-
/**
|
|
161
|
-
* Set the power of a particular setLetter
|
|
162
|
-
* @param letter (string) Letter to change
|
|
163
|
-
* @param pow (number) Power of the setLetter (must be positive integer.
|
|
164
|
-
*/
|
|
165
|
-
setLetter: (letter: string, pow: Fraction | number) => void;
|
|
166
|
-
/**
|
|
167
|
-
* Get the degree of a monom. If no setLetter is given, the result will be the global degree.
|
|
168
|
-
* @param letter (string) Letter to get to degree (power)
|
|
169
|
-
*/
|
|
170
|
-
degree: (letter?: string) => Fraction;
|
|
171
|
-
/**
|
|
172
|
-
* Evaluate a monom. Each setLetter must be assigned to a Fraction.
|
|
173
|
-
* @param values Dictionary of <setLetter: Fraction>
|
|
174
|
-
*/
|
|
175
|
-
evaluate: (values: literalType | Fraction | number) => Fraction;
|
|
176
|
-
evaluateAsNumeric: (values: number | {
|
|
177
|
-
[Key: string]: number;
|
|
178
|
-
}) => number;
|
|
179
|
-
/**
|
|
180
|
-
* Derivative the monom
|
|
181
|
-
* @param letter
|
|
182
|
-
*/
|
|
183
|
-
derivative: (letter?: string) => Monom;
|
|
184
|
-
primitive: (letter?: string) => Monom;
|
|
185
|
-
/**
|
|
186
|
-
* Get the least common multiple of monoms
|
|
187
|
-
* @param monoms Array of monoms
|
|
188
|
-
*/
|
|
189
|
-
static lcm: (...monoms: Monom[]) => Monom;
|
|
190
|
-
/**
|
|
191
|
-
* Multiply two monoms and return a NEW monom.
|
|
192
|
-
* @param monoms
|
|
193
|
-
*/
|
|
194
|
-
static xmultiply: (...monoms: Monom[]) => Monom;
|
|
195
|
-
/**
|
|
196
|
-
* Determine if multiple monoms are similar
|
|
197
|
-
* @param M
|
|
198
|
-
*/
|
|
199
|
-
areSameAs: (...M: Monom[]) => boolean;
|
|
200
|
-
/**
|
|
201
|
-
* Determine if multiple monoms are equals
|
|
202
|
-
* @param M
|
|
203
|
-
*/
|
|
204
|
-
areEquals: (...M: Monom[]) => boolean;
|
|
205
|
-
isDivisible: (div: Monom) => boolean;
|
|
206
|
-
}
|
|
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
|
+
private _coefficient;
|
|
8
|
+
private _literal;
|
|
9
|
+
/**
|
|
10
|
+
* Create a Monom
|
|
11
|
+
* Defined as \\(k \\cdot x^{n}\\), where \\( k,n \in \\mathbb{Q}\\).
|
|
12
|
+
* Examples: \\(3x^2\\) or \\(3/5x^2\\)
|
|
13
|
+
* @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).
|
|
14
|
+
*/
|
|
15
|
+
constructor(value?: unknown);
|
|
16
|
+
/**
|
|
17
|
+
* Get the coefficient \\(k\\) of the Monom \\(k\\cdot x^{n}\\)
|
|
18
|
+
* @returns {Fraction}
|
|
19
|
+
*/
|
|
20
|
+
get coefficient(): Fraction;
|
|
21
|
+
/**
|
|
22
|
+
* Set the coefficient \\(k\\) value of the monom
|
|
23
|
+
* @param {Fraction | number | string} F
|
|
24
|
+
*/
|
|
25
|
+
set coefficient(F: Fraction | number | string);
|
|
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
|
+
* Get the literal square roots of the Monom.
|
|
33
|
+
* TODO: remove this getter ? Is it used and is it correct ?
|
|
34
|
+
* @returns {literalType}
|
|
35
|
+
*/
|
|
36
|
+
get literalSqrt(): literalType;
|
|
37
|
+
/**
|
|
38
|
+
* Set the literal part of the monom. Must be a dictionary {x: Fraction, y: Fraction, ...}
|
|
39
|
+
* @param {literalType} L
|
|
40
|
+
*/
|
|
41
|
+
set literal(L: 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
|
+
private _getLiteralDividers;
|
|
57
|
+
/**
|
|
58
|
+
* Display the monom, forcing the '+' sign to appear
|
|
59
|
+
*/
|
|
60
|
+
get displayWithSign(): string;
|
|
61
|
+
get texWithSign(): string;
|
|
62
|
+
get plotFunction(): string;
|
|
63
|
+
/**
|
|
64
|
+
* Get the tex output of the monom
|
|
65
|
+
*/
|
|
66
|
+
get tex(): string;
|
|
67
|
+
/**
|
|
68
|
+
* Parse a string to a monom. The string may include fraction.
|
|
69
|
+
* @param inputStr
|
|
70
|
+
*/
|
|
71
|
+
parse: (inputStr: unknown) => Monom;
|
|
72
|
+
addToken: (stack: Monom[], element: Token) => void;
|
|
73
|
+
private _shutingYardToReducedMonom;
|
|
74
|
+
/**
|
|
75
|
+
* Clone the current Monom.
|
|
76
|
+
*/
|
|
77
|
+
clone: () => Monom;
|
|
78
|
+
copyLiterals: (literal: literalType) => literalType;
|
|
79
|
+
makeSame: (M: Monom) => Monom;
|
|
80
|
+
/**
|
|
81
|
+
* Create a zero value monom
|
|
82
|
+
*/
|
|
83
|
+
zero: () => Monom;
|
|
84
|
+
/**
|
|
85
|
+
* Create a one value monom
|
|
86
|
+
*/
|
|
87
|
+
one: () => Monom;
|
|
88
|
+
/**
|
|
89
|
+
* Clean the monom by removing each letters with a power of zero.
|
|
90
|
+
*/
|
|
91
|
+
clean: () => Monom;
|
|
92
|
+
reduce: () => Monom;
|
|
93
|
+
/**
|
|
94
|
+
* Get the opposed
|
|
95
|
+
* Returns a monom.
|
|
96
|
+
*/
|
|
97
|
+
opposed: () => Monom;
|
|
98
|
+
/**
|
|
99
|
+
* Add all similar monoms. If they aren't similar, they are simply skipped.
|
|
100
|
+
* @param M (Monom[]) The monoms to add.
|
|
101
|
+
*/
|
|
102
|
+
add: (...M: Monom[]) => Monom;
|
|
103
|
+
/**
|
|
104
|
+
* Subtract multiple monoms
|
|
105
|
+
* @param M (Monom[]) The monoms to subtract
|
|
106
|
+
*/
|
|
107
|
+
subtract: (...M: Monom[]) => Monom;
|
|
108
|
+
/**
|
|
109
|
+
* Multiple multiple monoms to the current monom
|
|
110
|
+
* @param M (Monom[]) The monoms to multiply to.
|
|
111
|
+
*/
|
|
112
|
+
multiply: (...M: Monom[]) => Monom;
|
|
113
|
+
multiplyByNumber: (F: Fraction | number) => Monom;
|
|
114
|
+
/**
|
|
115
|
+
* Divide the current monoms by multiple monoms
|
|
116
|
+
* @param M (Monom[])
|
|
117
|
+
*/
|
|
118
|
+
divide: (...M: Monom[]) => Monom;
|
|
119
|
+
/**
|
|
120
|
+
* Get the pow of a monom.
|
|
121
|
+
* @param nb (number) : Mathematical pow
|
|
122
|
+
*/
|
|
123
|
+
pow: (nb: number | Fraction) => Monom;
|
|
124
|
+
/**
|
|
125
|
+
* Get the nth-root of the monom
|
|
126
|
+
* @param p
|
|
127
|
+
*/
|
|
128
|
+
root: (p: number) => Monom;
|
|
129
|
+
/**
|
|
130
|
+
* Return the square root of a monom
|
|
131
|
+
*/
|
|
132
|
+
sqrt: () => Monom;
|
|
133
|
+
compare: (M: Monom, sign?: string) => boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Determine if the monom is null
|
|
136
|
+
*/
|
|
137
|
+
isZero(): boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Determine if the monom is one
|
|
140
|
+
*/
|
|
141
|
+
isOne(): boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Determine if two monoms are equals
|
|
144
|
+
* @param M
|
|
145
|
+
*/
|
|
146
|
+
isEqual: (M: Monom) => boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Determine if two monoms are similar
|
|
149
|
+
* @param M
|
|
150
|
+
*/
|
|
151
|
+
isSameAs: (M: Monom) => boolean;
|
|
152
|
+
isSquare: () => boolean;
|
|
153
|
+
isLiteralSquare: () => boolean;
|
|
154
|
+
hasFractionCoefficient: () => boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Determine if a monom contains a setLetter in it's literal part
|
|
157
|
+
* @param letter
|
|
158
|
+
*/
|
|
159
|
+
hasLetter: (letter?: string) => boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Set the power of a particular setLetter
|
|
162
|
+
* @param letter (string) Letter to change
|
|
163
|
+
* @param pow (number) Power of the setLetter (must be positive integer.
|
|
164
|
+
*/
|
|
165
|
+
setLetter: (letter: string, pow: Fraction | number) => void;
|
|
166
|
+
/**
|
|
167
|
+
* Get the degree of a monom. If no setLetter is given, the result will be the global degree.
|
|
168
|
+
* @param letter (string) Letter to get to degree (power)
|
|
169
|
+
*/
|
|
170
|
+
degree: (letter?: string) => Fraction;
|
|
171
|
+
/**
|
|
172
|
+
* Evaluate a monom. Each setLetter must be assigned to a Fraction.
|
|
173
|
+
* @param values Dictionary of <setLetter: Fraction>
|
|
174
|
+
*/
|
|
175
|
+
evaluate: (values: literalType | Fraction | number) => Fraction;
|
|
176
|
+
evaluateAsNumeric: (values: number | {
|
|
177
|
+
[Key: string]: number;
|
|
178
|
+
}) => number;
|
|
179
|
+
/**
|
|
180
|
+
* Derivative the monom
|
|
181
|
+
* @param letter
|
|
182
|
+
*/
|
|
183
|
+
derivative: (letter?: string) => Monom;
|
|
184
|
+
primitive: (letter?: string) => Monom;
|
|
185
|
+
/**
|
|
186
|
+
* Get the least common multiple of monoms
|
|
187
|
+
* @param monoms Array of monoms
|
|
188
|
+
*/
|
|
189
|
+
static lcm: (...monoms: Monom[]) => Monom;
|
|
190
|
+
/**
|
|
191
|
+
* Multiply two monoms and return a NEW monom.
|
|
192
|
+
* @param monoms
|
|
193
|
+
*/
|
|
194
|
+
static xmultiply: (...monoms: Monom[]) => Monom;
|
|
195
|
+
/**
|
|
196
|
+
* Determine if multiple monoms are similar
|
|
197
|
+
* @param M
|
|
198
|
+
*/
|
|
199
|
+
areSameAs: (...M: Monom[]) => boolean;
|
|
200
|
+
/**
|
|
201
|
+
* Determine if multiple monoms are equals
|
|
202
|
+
* @param M
|
|
203
|
+
*/
|
|
204
|
+
areEquals: (...M: Monom[]) => boolean;
|
|
205
|
+
isDivisible: (div: Monom) => boolean;
|
|
206
|
+
}
|