pimath 0.0.119 → 0.0.121
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/.eslintrc.js +23 -23
- package/.idea/PI.iml +7 -1
- package/dev/pimath.js +7929 -0
- package/dev/pimath.js.map +1 -0
- package/dist/{pi.js → pimath.js} +7612 -7829
- 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 +3 -3
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +450 -363
- package/docs/classes/Logicalset.Logicalset.html +119 -110
- package/docs/classes/Polynom.Rational.html +230 -227
- package/docs/classes/Vector-1.Vector.html +319 -273
- package/docs/classes/Vector.Point.html +189 -190
- package/docs/classes/algebra_equation.Equation.html +489 -446
- package/docs/classes/algebra_linearSystem.LinearSystem.html +228 -217
- package/docs/classes/algebra_monom.Monom.html +564 -507
- package/docs/classes/algebra_polynom.Polynom.html +774 -753
- package/docs/classes/coefficients_fraction.Fraction.html +573 -565
- package/docs/classes/geometry_circle.Circle.html +299 -299
- package/docs/classes/geometry_line.Line.html +511 -451
- package/docs/classes/geometry_triangle.Triangle.html +273 -264
- package/docs/classes/numeric.Numeric.html +138 -132
- package/docs/classes/shutingyard.Shutingyard.html +144 -133
- package/docs/enums/algebra_equation.PARTICULAR_SOLUTION.html +47 -46
- package/docs/enums/geometry_line.LinePropriety.html +58 -58
- package/docs/enums/shutingyard.ShutingyardMode.html +62 -58
- package/docs/enums/shutingyard.ShutingyardType.html +74 -70
- package/docs/index.html +31 -33
- package/docs/interfaces/algebra_equation.ISolution.html +61 -59
- package/docs/interfaces/algebra_polynom.IEuclidian.html +47 -46
- package/docs/interfaces/geometry_triangle.remarquableLines.html +74 -74
- package/docs/modules/Logicalset.html +33 -38
- package/docs/modules/Polynom.html +33 -38
- package/docs/modules/Vector-1.html +33 -38
- package/docs/modules/Vector.html +33 -38
- package/docs/modules/algebra_equation.html +35 -41
- package/docs/modules/algebra_linearSystem.html +31 -37
- package/docs/modules/algebra_monom.html +33 -39
- package/docs/modules/algebra_polynom.html +35 -41
- package/docs/modules/coefficients_fraction.html +33 -39
- package/docs/modules/geometry_circle.html +31 -37
- package/docs/modules/geometry_line.html +33 -39
- package/docs/modules/geometry_triangle.html +33 -39
- package/docs/modules/numeric.html +31 -37
- package/docs/modules/shutingyard.html +41 -47
- package/docs/types/algebra_monom.literalType.html +33 -37
- package/docs/types/algebra_polynom.PolynomParsingType.html +33 -37
- package/docs/types/coefficients_fraction.FractionParsingType.html +32 -36
- package/docs/types/shutingyard.Token.html +38 -42
- package/docs/types/shutingyard.tokenType.html +40 -44
- package/docs/variables/shutingyard.tokenConstant.html +37 -41
- 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 +142 -142
- package/esm/maths/algebra/study.js +377 -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 -169
- package/esm/maths/numeric.js.map +1 -1
- 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 +2 -5
- package/src/maths/algebra/equation.ts +16 -0
- package/src/maths/algebra/linearSystem.ts +20 -0
- package/src/maths/algebra/study.ts +1 -1
- package/src/maths/numeric.ts +49 -48
- 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 +1 -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,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>tokenConstant | pimath</title><meta name="description" content="Documentation for pimath"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css" integrity="sha384-R4558gYOUz8mP9YWpZJjofhk+zx0AS11p36HnD2ZKj/6JR5z27gSSULCNHIRReVs" crossorigin="anonymous"><script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.js" integrity="sha384-z1fJDqw8ZApjGO3/unPWUPsIymfsJmyrDVWC8Tv/a1HeOtGmkwNd/7xUS0Xcnvsx" crossorigin="anonymous"></script><script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script></link>}); }</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>tokenConstant | pimath</title><meta name="description" content="Documentation for pimath"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.css" integrity="sha384-R4558gYOUz8mP9YWpZJjofhk+zx0AS11p36HnD2ZKj/6JR5z27gSSULCNHIRReVs" crossorigin="anonymous"><script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/katex.min.js" integrity="sha384-z1fJDqw8ZApjGO3/unPWUPsIymfsJmyrDVWC8Tv/a1HeOtGmkwNd/7xUS0Xcnvsx" crossorigin="anonymous"></script><script defer src="https://cdn.jsdelivr.net/npm/katex@0.15.1/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script></link>}); }</head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
2
2
|
<div class="tsd-toolbar-contents container">
|
|
3
3
|
<div class="table-cell" id="tsd-search" data-base="..">
|
|
4
4
|
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
@@ -9,25 +9,26 @@
|
|
|
9
9
|
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">pimath</a></div>
|
|
10
10
|
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
11
11
|
<div class="container container-main">
|
|
12
|
-
<div class="col-
|
|
12
|
+
<div class="col-content">
|
|
13
13
|
<div class="tsd-page-title">
|
|
14
14
|
<ul class="tsd-breadcrumb">
|
|
15
|
-
<li><a href="../
|
|
15
|
+
<li><a href="../index.html">pimath</a></li>
|
|
16
16
|
<li><a href="../modules/shutingyard.html">shutingyard</a></li>
|
|
17
17
|
<li><a href="shutingyard.tokenConstant.html">tokenConstant</a></li></ul>
|
|
18
18
|
<h1>Variable tokenConstant<code class="tsd-tag ts-flagConst">Const</code> </h1></div>
|
|
19
|
-
<div class="tsd-signature">token<wbr/>Constant
|
|
19
|
+
<div class="tsd-signature"><span class="tsd-kind-variable">token<wbr/>Constant</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span>[<span class="tsd-kind-index-signature">Key</span>: <span class="tsd-signature-type">string</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = ...</span></div>
|
|
20
20
|
<div class="tsd-type-declaration">
|
|
21
21
|
<h4>Type declaration</h4>
|
|
22
22
|
<ul class="tsd-parameters">
|
|
23
23
|
<li class="tsd-parameter-index-signature">
|
|
24
|
-
<h5><span class="tsd-signature-symbol">[</span>Key
|
|
24
|
+
<h5><span class="tsd-signature-symbol">[</span><span class="tsd-kind-parameter">Key</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">number</span></h5></li></ul></div><aside class="tsd-sources">
|
|
25
25
|
<ul>
|
|
26
|
-
<li>Defined in <a href="https://github.com/basilgass/
|
|
27
|
-
<div class="col-
|
|
26
|
+
<li>Defined in <a href="https://github.com/basilgass/PiMath/blob/e13554f/src/maths/shutingyard.ts#L9">shutingyard.ts:9</a></li></ul></aside></div>
|
|
27
|
+
<div class="col-sidebar">
|
|
28
|
+
<div class="page-menu">
|
|
28
29
|
<div class="tsd-navigation settings">
|
|
29
30
|
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
30
|
-
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>
|
|
31
|
+
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)" id="icon-chevronDown"></path></svg>Settings</h3></summary>
|
|
31
32
|
<div class="tsd-accordion-details">
|
|
32
33
|
<div class="tsd-filter-visibility">
|
|
33
34
|
<h4 class="uppercase">Member Visibility</h4><form>
|
|
@@ -37,38 +38,33 @@
|
|
|
37
38
|
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
38
39
|
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
39
40
|
<div class="tsd-theme-toggle">
|
|
40
|
-
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
41
|
-
<
|
|
42
|
-
<
|
|
43
|
-
<
|
|
41
|
+
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
|
|
42
|
+
<div class="site-menu">
|
|
43
|
+
<nav class="tsd-navigation"><a href="../index.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g></svg><span>pimath</span></a>
|
|
44
|
+
<ul class="tsd-small-nested-navigation">
|
|
45
|
+
<li><a href="../modules/Logicalset.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>Logicalset</span></a></li>
|
|
46
|
+
<li><a href="../modules/Polynom.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>Polynom</span></a></li>
|
|
47
|
+
<li><a href="../modules/Vector.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>Vector</span></a></li>
|
|
48
|
+
<li><a href="../modules/Vector-1.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>Vector</span></a></li>
|
|
49
|
+
<li><a href="../modules/algebra_equation.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>algebra/equation</span></a></li>
|
|
50
|
+
<li><a href="../modules/algebra_linearSystem.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>algebra/linear<wbr/>System</span></a></li>
|
|
51
|
+
<li><a href="../modules/algebra_monom.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>algebra/monom</span></a></li>
|
|
52
|
+
<li><a href="../modules/algebra_polynom.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>algebra/polynom</span></a></li>
|
|
53
|
+
<li><a href="../modules/coefficients_fraction.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>coefficients/fraction</span></a></li>
|
|
54
|
+
<li><a href="../modules/geometry_circle.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>geometry/circle</span></a></li>
|
|
55
|
+
<li><a href="../modules/geometry_line.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>geometry/line</span></a></li>
|
|
56
|
+
<li><a href="../modules/geometry_triangle.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>geometry/triangle</span></a></li>
|
|
57
|
+
<li><a href="../modules/numeric.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>numeric</span></a></li>
|
|
58
|
+
<li>
|
|
59
|
+
<details class="tsd-index-accordion" open data-key="shutingyard"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg><a href="../modules/shutingyard.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4"></use></svg><span>shutingyard</span></a></summary>
|
|
44
60
|
<div class="tsd-accordion-details">
|
|
45
|
-
<ul>
|
|
46
|
-
<li class="
|
|
47
|
-
<
|
|
48
|
-
<li class="tsd-kind-
|
|
49
|
-
<li class="tsd-kind-
|
|
50
|
-
<li class="tsd-kind-
|
|
51
|
-
<li class="tsd-kind-
|
|
52
|
-
<
|
|
53
|
-
<li class="tsd-kind-module"><a href="../modules/algebra_linearSystem.html">algebra/linear<wbr/>System</a></li>
|
|
54
|
-
<li class="tsd-kind-module"><a href="../modules/algebra_monom.html">algebra/monom</a></li>
|
|
55
|
-
<li class="tsd-kind-module"><a href="../modules/algebra_polynom.html">algebra/polynom</a></li>
|
|
56
|
-
<li class="tsd-kind-module"><a href="../modules/coefficients_fraction.html">coefficients/fraction</a></li>
|
|
57
|
-
<li class="tsd-kind-module"><a href="../modules/expressions_numexp.html">expressions/numexp</a></li>
|
|
58
|
-
<li class="tsd-kind-module"><a href="../modules/expressions_polynomexp.html">expressions/polynomexp</a></li>
|
|
59
|
-
<li class="tsd-kind-module"><a href="../modules/geometry_circle.html">geometry/circle</a></li>
|
|
60
|
-
<li class="tsd-kind-module"><a href="../modules/geometry_line.html">geometry/line</a></li>
|
|
61
|
-
<li class="tsd-kind-module"><a href="../modules/geometry_triangle.html">geometry/triangle</a></li>
|
|
62
|
-
<li class="tsd-kind-module"><a href="../modules/numeric.html">numeric</a></li>
|
|
63
|
-
<li class="current tsd-kind-module"><a href="../modules/shutingyard.html">shutingyard</a></li></ul></li></ul></div></details></nav>
|
|
64
|
-
<nav class="tsd-navigation secondary menu-sticky">
|
|
65
|
-
<ul>
|
|
66
|
-
<li class="tsd-kind-enum tsd-parent-kind-module"><a href="../enums/shutingyard.ShutingyardMode.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-8-path"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)" id="icon-8-text"></path></svg>Shutingyard<wbr/>Mode</a></li>
|
|
67
|
-
<li class="tsd-kind-enum tsd-parent-kind-module"><a href="../enums/shutingyard.ShutingyardType.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-8-path"></use><use href="#icon-8-text"></use></svg>Shutingyard<wbr/>Type</a></li>
|
|
68
|
-
<li class="tsd-kind-class tsd-parent-kind-module"><a href="../classes/shutingyard.Shutingyard.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg>Shutingyard</a></li>
|
|
69
|
-
<li class="tsd-kind-type-alias tsd-parent-kind-module"><a href="../types/shutingyard.Token.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg>Token</a></li>
|
|
70
|
-
<li class="tsd-kind-type-alias tsd-parent-kind-module"><a href="../types/shutingyard.tokenType.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>token<wbr/>Type</a></li>
|
|
71
|
-
<li class="current tsd-kind-variable tsd-parent-kind-module"><a href="shutingyard.tokenConstant.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-32-path"></rect><path d="M11.106 16L8.85 7.24H9.966L11.454 13.192C11.558 13.608 11.646 13.996 11.718 14.356C11.79 14.708 11.842 14.976 11.874 15.16C11.906 14.976 11.954 14.708 12.018 14.356C12.09 13.996 12.178 13.608 12.282 13.192L13.758 7.24H14.85L12.582 16H11.106Z" fill="var(--color-text)" id="icon-32-text"></path></svg>token<wbr/>Constant</a></li></ul></nav></div></div>
|
|
72
|
-
<div class="container tsd-generator">
|
|
61
|
+
<ul class="tsd-nested-navigation">
|
|
62
|
+
<li><a href="../enums/shutingyard.ShutingyardMode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g></svg><span>Shutingyard<wbr/>Mode</span></a></li>
|
|
63
|
+
<li><a href="../enums/shutingyard.ShutingyardType.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Shutingyard<wbr/>Type</span></a></li>
|
|
64
|
+
<li><a href="../classes/shutingyard.Shutingyard.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>Shutingyard</span></a></li>
|
|
65
|
+
<li><a href="../types/shutingyard.Token.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>Token</span></a></li>
|
|
66
|
+
<li><a href="../types/shutingyard.tokenType.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>token<wbr/>Type</span></a></li>
|
|
67
|
+
<li><a href="shutingyard.tokenConstant.html" class="current"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-32"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.106 16L8.85 7.24H9.966L11.454 13.192C11.558 13.608 11.646 13.996 11.718 14.356C11.79 14.708 11.842 14.976 11.874 15.16C11.906 14.976 11.954 14.708 12.018 14.356C12.09 13.996 12.178 13.608 12.282 13.192L13.758 7.24H14.85L12.582 16H11.106Z" fill="var(--color-text)"></path></g></svg><span>token<wbr/>Constant</span></a></li></ul></div></details></li></ul></nav></div></div></div>
|
|
68
|
+
<div class="tsd-generator">
|
|
73
69
|
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
74
|
-
<div class="overlay"></div
|
|
70
|
+
<div class="overlay"></div></body></html>
|
package/esm/index.d.ts
CHANGED
|
@@ -1,41 +1,38 @@
|
|
|
1
|
-
import { Numeric } from "./maths/numeric";
|
|
2
|
-
import { NumExp } from "./maths/
|
|
3
|
-
import { Shutingyard } from "./maths/shutingyard";
|
|
4
|
-
import { Random } from "./maths/randomization/random";
|
|
5
|
-
import { Fraction } from "./maths/coefficients/fraction";
|
|
6
|
-
import { NthRoot } from "./maths/coefficients/nthRoot";
|
|
7
|
-
import { Monom } from "./maths/algebra/monom";
|
|
8
|
-
import { Polynom } from "./maths/algebra/polynom";
|
|
9
|
-
import { Equation } from "./maths/algebra/equation";
|
|
10
|
-
import { LinearSystem } from "./maths/algebra/linearSystem";
|
|
11
|
-
import { Rational } from "./maths/algebra/rational";
|
|
12
|
-
import { Logicalset } from "./maths/algebra/logicalset";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Circle: typeof Circle;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
1
|
+
import { Numeric } from "./maths/numeric";
|
|
2
|
+
import { NumExp } from "./maths/numexp";
|
|
3
|
+
import { Shutingyard } from "./maths/shutingyard";
|
|
4
|
+
import { Random } from "./maths/randomization/random";
|
|
5
|
+
import { Fraction } from "./maths/coefficients/fraction";
|
|
6
|
+
import { NthRoot } from "./maths/coefficients/nthRoot";
|
|
7
|
+
import { Monom } from "./maths/algebra/monom";
|
|
8
|
+
import { Polynom } from "./maths/algebra/polynom";
|
|
9
|
+
import { Equation } from "./maths/algebra/equation";
|
|
10
|
+
import { LinearSystem } from "./maths/algebra/linearSystem";
|
|
11
|
+
import { Rational } from "./maths/algebra/rational";
|
|
12
|
+
import { Logicalset } from "./maths/algebra/logicalset";
|
|
13
|
+
import { Vector } from "./maths/geometry/vector";
|
|
14
|
+
import { Line } from "./maths/geometry/line";
|
|
15
|
+
import { Triangle } from "./maths/geometry/triangle";
|
|
16
|
+
import { Circle } from "./maths/geometry/circle";
|
|
17
|
+
import { Point } from "./maths/geometry/point";
|
|
18
|
+
export declare const PiMath: {
|
|
19
|
+
ShutingYard: typeof Shutingyard;
|
|
20
|
+
Numeric: typeof Numeric;
|
|
21
|
+
NumExp: typeof NumExp;
|
|
22
|
+
Fraction: typeof Fraction;
|
|
23
|
+
Root: typeof NthRoot;
|
|
24
|
+
Monom: typeof Monom;
|
|
25
|
+
Polynom: typeof Polynom;
|
|
26
|
+
Equation: typeof Equation;
|
|
27
|
+
LinearSystem: typeof LinearSystem;
|
|
28
|
+
Rational: typeof Rational;
|
|
29
|
+
Logicalset: typeof Logicalset;
|
|
30
|
+
Random: typeof Random;
|
|
31
|
+
Geometry: {
|
|
32
|
+
Vector: typeof Vector;
|
|
33
|
+
Point: typeof Point;
|
|
34
|
+
Line: typeof Line;
|
|
35
|
+
Triangle: typeof Triangle;
|
|
36
|
+
Circle: typeof Circle;
|
|
37
|
+
};
|
|
38
|
+
};
|
package/esm/index.js
CHANGED
|
@@ -1,47 +1,44 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PiMath = void 0;
|
|
4
|
-
const numeric_1 = require("./maths/numeric");
|
|
5
|
-
const numexp_1 = require("./maths/
|
|
6
|
-
const shutingyard_1 = require("./maths/shutingyard");
|
|
7
|
-
const random_1 = require("./maths/randomization/random");
|
|
8
|
-
const fraction_1 = require("./maths/coefficients/fraction");
|
|
9
|
-
const nthRoot_1 = require("./maths/coefficients/nthRoot");
|
|
10
|
-
const monom_1 = require("./maths/algebra/monom");
|
|
11
|
-
const polynom_1 = require("./maths/algebra/polynom");
|
|
12
|
-
const equation_1 = require("./maths/algebra/equation");
|
|
13
|
-
const linearSystem_1 = require("./maths/algebra/linearSystem");
|
|
14
|
-
const rational_1 = require("./maths/algebra/rational");
|
|
15
|
-
const logicalset_1 = require("./maths/algebra/logicalset");
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
window.Pi = exports.PiMath;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PiMath = void 0;
|
|
4
|
+
const numeric_1 = require("./maths/numeric");
|
|
5
|
+
const numexp_1 = require("./maths/numexp");
|
|
6
|
+
const shutingyard_1 = require("./maths/shutingyard");
|
|
7
|
+
const random_1 = require("./maths/randomization/random");
|
|
8
|
+
const fraction_1 = require("./maths/coefficients/fraction");
|
|
9
|
+
const nthRoot_1 = require("./maths/coefficients/nthRoot");
|
|
10
|
+
const monom_1 = require("./maths/algebra/monom");
|
|
11
|
+
const polynom_1 = require("./maths/algebra/polynom");
|
|
12
|
+
const equation_1 = require("./maths/algebra/equation");
|
|
13
|
+
const linearSystem_1 = require("./maths/algebra/linearSystem");
|
|
14
|
+
const rational_1 = require("./maths/algebra/rational");
|
|
15
|
+
const logicalset_1 = require("./maths/algebra/logicalset");
|
|
16
|
+
const vector_1 = require("./maths/geometry/vector");
|
|
17
|
+
const line_1 = require("./maths/geometry/line");
|
|
18
|
+
const triangle_1 = require("./maths/geometry/triangle");
|
|
19
|
+
const circle_1 = require("./maths/geometry/circle");
|
|
20
|
+
const point_1 = require("./maths/geometry/point");
|
|
21
|
+
// Expose as global
|
|
22
|
+
exports.PiMath = {
|
|
23
|
+
ShutingYard: shutingyard_1.Shutingyard,
|
|
24
|
+
Numeric: numeric_1.Numeric,
|
|
25
|
+
NumExp: numexp_1.NumExp,
|
|
26
|
+
Fraction: fraction_1.Fraction,
|
|
27
|
+
Root: nthRoot_1.NthRoot,
|
|
28
|
+
Monom: monom_1.Monom,
|
|
29
|
+
Polynom: polynom_1.Polynom,
|
|
30
|
+
Equation: equation_1.Equation,
|
|
31
|
+
LinearSystem: linearSystem_1.LinearSystem,
|
|
32
|
+
Rational: rational_1.Rational,
|
|
33
|
+
Logicalset: logicalset_1.Logicalset,
|
|
34
|
+
Random: random_1.Random,
|
|
35
|
+
Geometry: {
|
|
36
|
+
Vector: vector_1.Vector,
|
|
37
|
+
Point: point_1.Point,
|
|
38
|
+
Line: line_1.Line,
|
|
39
|
+
Triangle: triangle_1.Triangle,
|
|
40
|
+
Circle: circle_1.Circle
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
window.PiMath = exports.PiMath;
|
|
47
44
|
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;AACxC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,6CAAwC;AACxC,2CAAsC;AACtC,qDAAgD;AAChD,yDAAoD;AACpD,4DAAuD;AACvD,0DAAqD;AACrD,iDAA4C;AAC5C,qDAAgD;AAChD,uDAAkD;AAClD,+DAA0D;AAC1D,uDAAkD;AAClD,2DAAsD;AACtD,oDAA+C;AAC/C,gDAA2C;AAC3C,wDAAmD;AACnD,oDAA+C;AAC/C,kDAA6C;AAE7C,mBAAmB;AACN,QAAA,MAAM,GAAG;IAClB,WAAW,EAAE,yBAAW;IACxB,OAAO,EAAE,iBAAO;IAChB,MAAM,EAAE,eAAM;IACd,QAAQ,EAAE,mBAAQ;IAClB,IAAI,EAAE,iBAAO;IACb,KAAK,EAAE,aAAK;IACZ,OAAO,EAAE,iBAAO;IAChB,QAAQ,EAAE,mBAAQ;IAClB,YAAY,EAAE,2BAAY;IAC1B,QAAQ,EAAE,mBAAQ;IAClB,UAAU,EAAE,uBAAU;IACtB,MAAM,EAAE,eAAM;IACd,QAAQ,EAAE;QACN,MAAM,EAAE,eAAM;QACd,KAAK,EAAE,aAAK;QACZ,IAAI,EAAE,WAAI;QACV,QAAQ,EAAE,mBAAQ;QAClB,MAAM,EAAE,eAAM;KACjB;CACJ,CAAC;AAEI,MAAO,CAAC,MAAM,GAAG,cAAM,CAAA"}
|
|
@@ -1,117 +1,119 @@
|
|
|
1
|
-
import { Polynom } from "./polynom";
|
|
2
|
-
import { literalType } from "./monom";
|
|
3
|
-
import { Fraction } from "../coefficients/fraction";
|
|
4
|
-
/**
|
|
5
|
-
* Equation is a class to manage equations...
|
|
6
|
-
*/
|
|
7
|
-
export interface ISolution {
|
|
8
|
-
tex: string;
|
|
9
|
-
display: string;
|
|
10
|
-
value: number;
|
|
11
|
-
exact: unknown;
|
|
12
|
-
}
|
|
13
|
-
export declare enum PARTICULAR_SOLUTION {
|
|
14
|
-
real = "\\mathbb{R}",
|
|
15
|
-
varnothing = "\\varnothing"
|
|
16
|
-
}
|
|
17
|
-
export declare class Equation {
|
|
18
|
-
private _polynom;
|
|
19
|
-
private _varnothing;
|
|
20
|
-
private _real;
|
|
21
|
-
/**
|
|
22
|
-
* Create an Equation using two polynoms.
|
|
23
|
-
* Markdown *support* is cool
|
|
24
|
-
* @param equations
|
|
25
|
-
*/
|
|
26
|
-
constructor(...equations: unknown[]);
|
|
27
|
-
private _left;
|
|
28
|
-
get left(): Polynom;
|
|
29
|
-
set left(value: Polynom);
|
|
30
|
-
private _right;
|
|
31
|
-
get right(): Polynom;
|
|
32
|
-
set right(value: Polynom);
|
|
33
|
-
private _sign;
|
|
34
|
-
get sign(): string;
|
|
35
|
-
set sign(value: string);
|
|
36
|
-
private _solutions;
|
|
37
|
-
get solutions(): ISolution[];
|
|
38
|
-
get isEquation(): boolean;
|
|
39
|
-
get solution(): string;
|
|
40
|
-
get isReal(): boolean;
|
|
41
|
-
get isVarnothing(): boolean;
|
|
42
|
-
get signAsTex(): string;
|
|
43
|
-
get tex(): string;
|
|
44
|
-
get display(): string;
|
|
45
|
-
get raw(): string;
|
|
46
|
-
get variables(): string[];
|
|
47
|
-
get numberOfVars(): number;
|
|
48
|
-
hasVariable: (letter: string) => boolean;
|
|
49
|
-
private _randomizeDefaults;
|
|
50
|
-
get randomizeDefaults(): {
|
|
51
|
-
[key: string]: number | string | boolean;
|
|
52
|
-
};
|
|
53
|
-
set randomizeDefaults(value: {
|
|
54
|
-
[key: string]: number | string | boolean;
|
|
55
|
-
});
|
|
56
|
-
parse: (equationString: string) => Equation;
|
|
57
|
-
create: (left: Polynom, right: Polynom, sign?: string) => Equation;
|
|
58
|
-
clone: () => Equation;
|
|
59
|
-
randomize: (opts?: {}, sign?: string) => Equation;
|
|
60
|
-
/**
|
|
61
|
-
* Reorder will move all monoms containing a letter on the left, all the other on the right.
|
|
62
|
-
*/
|
|
63
|
-
moveLeft: () => Equation;
|
|
64
|
-
reorder: (allLeft?: boolean) => Equation;
|
|
65
|
-
/**
|
|
66
|
-
* Multiply by the lcm denominator and divide by the gcm numerators.
|
|
67
|
-
*/
|
|
68
|
-
simplify: () => Equation;
|
|
69
|
-
/**
|
|
70
|
-
* Reorder the polynom to have only one letter on the left, the rest on the right.
|
|
71
|
-
* @param letter
|
|
72
|
-
*/
|
|
73
|
-
isolate: (letter?: string) => Equation | false;
|
|
74
|
-
replaceBy: (letter: string, P: Polynom) => Equation;
|
|
75
|
-
/**
|
|
76
|
-
* Multiple an equation by a fraction value.
|
|
77
|
-
* @param value
|
|
78
|
-
*/
|
|
79
|
-
multiply: (value: unknown) => Equation;
|
|
80
|
-
/**
|
|
81
|
-
* divide an equation by a given value (transformed as a fraction)
|
|
82
|
-
*
|
|
83
|
-
* ```
|
|
84
|
-
* 8x+10=6x \vert 2
|
|
85
|
-
* 4x+5=3x
|
|
86
|
-
* ```
|
|
87
|
-
*
|
|
88
|
-
* |>Alternatively with $3x-4$ maybe it's working ?
|
|
89
|
-
* $$\frac{3x}{5}$$
|
|
90
|
-
*
|
|
91
|
-
* @param value
|
|
92
|
-
* @returns {Equation}
|
|
93
|
-
*/
|
|
94
|
-
divide: (value: unknown) => Equation;
|
|
95
|
-
/**
|
|
96
|
-
* Get the degree of the equation
|
|
97
|
-
* @param letter
|
|
98
|
-
*/
|
|
99
|
-
degree: (letter?: string) => Fraction;
|
|
100
|
-
/**
|
|
101
|
-
* Determine if the equation contains more than one letter/variable.
|
|
102
|
-
*/
|
|
103
|
-
isMultiVariable: () => boolean;
|
|
104
|
-
letters: () => string[];
|
|
105
|
-
solve: () => Equation;
|
|
106
|
-
static makeSolutionsUnique(solutions: ISolution[], sorted?: boolean): ISolution[];
|
|
107
|
-
test: (values: literalType) => Boolean;
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
private
|
|
111
|
-
private
|
|
112
|
-
private
|
|
113
|
-
private
|
|
114
|
-
private
|
|
115
|
-
private
|
|
116
|
-
private
|
|
117
|
-
|
|
1
|
+
import { Polynom } from "./polynom";
|
|
2
|
+
import { literalType } from "./monom";
|
|
3
|
+
import { Fraction } from "../coefficients/fraction";
|
|
4
|
+
/**
|
|
5
|
+
* Equation is a class to manage equations...
|
|
6
|
+
*/
|
|
7
|
+
export interface ISolution {
|
|
8
|
+
tex: string;
|
|
9
|
+
display: string;
|
|
10
|
+
value: number;
|
|
11
|
+
exact: unknown;
|
|
12
|
+
}
|
|
13
|
+
export declare enum PARTICULAR_SOLUTION {
|
|
14
|
+
real = "\\mathbb{R}",
|
|
15
|
+
varnothing = "\\varnothing"
|
|
16
|
+
}
|
|
17
|
+
export declare class Equation {
|
|
18
|
+
private _polynom;
|
|
19
|
+
private _varnothing;
|
|
20
|
+
private _real;
|
|
21
|
+
/**
|
|
22
|
+
* Create an Equation using two polynoms.
|
|
23
|
+
* Markdown *support* is cool
|
|
24
|
+
* @param equations
|
|
25
|
+
*/
|
|
26
|
+
constructor(...equations: unknown[]);
|
|
27
|
+
private _left;
|
|
28
|
+
get left(): Polynom;
|
|
29
|
+
set left(value: Polynom);
|
|
30
|
+
private _right;
|
|
31
|
+
get right(): Polynom;
|
|
32
|
+
set right(value: Polynom);
|
|
33
|
+
private _sign;
|
|
34
|
+
get sign(): string;
|
|
35
|
+
set sign(value: string);
|
|
36
|
+
private _solutions;
|
|
37
|
+
get solutions(): ISolution[];
|
|
38
|
+
get isEquation(): boolean;
|
|
39
|
+
get solution(): string;
|
|
40
|
+
get isReal(): boolean;
|
|
41
|
+
get isVarnothing(): boolean;
|
|
42
|
+
get signAsTex(): string;
|
|
43
|
+
get tex(): string;
|
|
44
|
+
get display(): string;
|
|
45
|
+
get raw(): string;
|
|
46
|
+
get variables(): string[];
|
|
47
|
+
get numberOfVars(): number;
|
|
48
|
+
hasVariable: (letter: string) => boolean;
|
|
49
|
+
private _randomizeDefaults;
|
|
50
|
+
get randomizeDefaults(): {
|
|
51
|
+
[key: string]: number | string | boolean;
|
|
52
|
+
};
|
|
53
|
+
set randomizeDefaults(value: {
|
|
54
|
+
[key: string]: number | string | boolean;
|
|
55
|
+
});
|
|
56
|
+
parse: (equationString: string) => Equation;
|
|
57
|
+
create: (left: Polynom, right: Polynom, sign?: string) => Equation;
|
|
58
|
+
clone: () => Equation;
|
|
59
|
+
randomize: (opts?: {}, sign?: string) => Equation;
|
|
60
|
+
/**
|
|
61
|
+
* Reorder will move all monoms containing a letter on the left, all the other on the right.
|
|
62
|
+
*/
|
|
63
|
+
moveLeft: () => Equation;
|
|
64
|
+
reorder: (allLeft?: boolean) => Equation;
|
|
65
|
+
/**
|
|
66
|
+
* Multiply by the lcm denominator and divide by the gcm numerators.
|
|
67
|
+
*/
|
|
68
|
+
simplify: () => Equation;
|
|
69
|
+
/**
|
|
70
|
+
* Reorder the polynom to have only one letter on the left, the rest on the right.
|
|
71
|
+
* @param letter
|
|
72
|
+
*/
|
|
73
|
+
isolate: (letter?: string) => Equation | false;
|
|
74
|
+
replaceBy: (letter: string, P: Polynom) => Equation;
|
|
75
|
+
/**
|
|
76
|
+
* Multiple an equation by a fraction value.
|
|
77
|
+
* @param value
|
|
78
|
+
*/
|
|
79
|
+
multiply: (value: unknown) => Equation;
|
|
80
|
+
/**
|
|
81
|
+
* divide an equation by a given value (transformed as a fraction)
|
|
82
|
+
*
|
|
83
|
+
* ```
|
|
84
|
+
* 8x+10=6x \vert 2
|
|
85
|
+
* 4x+5=3x
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* |>Alternatively with $3x-4$ maybe it's working ?
|
|
89
|
+
* $$\frac{3x}{5}$$
|
|
90
|
+
*
|
|
91
|
+
* @param value
|
|
92
|
+
* @returns {Equation}
|
|
93
|
+
*/
|
|
94
|
+
divide: (value: unknown) => Equation;
|
|
95
|
+
/**
|
|
96
|
+
* Get the degree of the equation
|
|
97
|
+
* @param letter
|
|
98
|
+
*/
|
|
99
|
+
degree: (letter?: string) => Fraction;
|
|
100
|
+
/**
|
|
101
|
+
* Determine if the equation contains more than one letter/variable.
|
|
102
|
+
*/
|
|
103
|
+
isMultiVariable: () => boolean;
|
|
104
|
+
letters: () => string[];
|
|
105
|
+
solve: () => Equation;
|
|
106
|
+
static makeSolutionsUnique(solutions: ISolution[], sorted?: boolean): ISolution[];
|
|
107
|
+
test: (values: literalType) => Boolean;
|
|
108
|
+
isSameAs: (equ: Equation) => Boolean;
|
|
109
|
+
isLinearTo: (equ: Equation) => Boolean;
|
|
110
|
+
private _findSign;
|
|
111
|
+
private _formatSign;
|
|
112
|
+
private _reverseSign;
|
|
113
|
+
private isGreater;
|
|
114
|
+
private isStrictEqual;
|
|
115
|
+
private isAlsoEqual;
|
|
116
|
+
private _solveDegree1;
|
|
117
|
+
private _solveDegree2;
|
|
118
|
+
private _solveDegree3plus;
|
|
119
|
+
}
|