pimath 0.1.9 → 0.1.10

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 (75) hide show
  1. package/dist/index.js +47 -0
  2. package/dist/index.js.map +1 -0
  3. package/package.json +13 -13
  4. package/types/index.d.ts +36 -36
  5. package/types/index.d.ts.map +1 -1
  6. package/dist/pimath.js +0 -4160
  7. package/types/algebra/equation.d.ts +0 -102
  8. package/types/algebra/equation.d.ts.map +0 -1
  9. package/types/algebra/equationSolver.d.ts +0 -10
  10. package/types/algebra/equationSolver.d.ts.map +0 -1
  11. package/types/algebra/factor.d.ts +0 -46
  12. package/types/algebra/factor.d.ts.map +0 -1
  13. package/types/algebra/linearSystem.d.ts +0 -37
  14. package/types/algebra/linearSystem.d.ts.map +0 -1
  15. package/types/algebra/logicalset.d.ts +0 -25
  16. package/types/algebra/logicalset.d.ts.map +0 -1
  17. package/types/algebra/monom.d.ts +0 -169
  18. package/types/algebra/monom.d.ts.map +0 -1
  19. package/types/algebra/polyFactor.d.ts +0 -44
  20. package/types/algebra/polyFactor.d.ts.map +0 -1
  21. package/types/algebra/polynom.d.ts +0 -107
  22. package/types/algebra/polynom.d.ts.map +0 -1
  23. package/types/algebra/rational.d.ts +0 -41
  24. package/types/algebra/rational.d.ts.map +0 -1
  25. package/types/coefficients/fraction.d.ts +0 -92
  26. package/types/coefficients/fraction.d.ts.map +0 -1
  27. package/types/coefficients/nthRoot.d.ts +0 -20
  28. package/types/coefficients/nthRoot.d.ts.map +0 -1
  29. package/types/geometry/circle.d.ts +0 -39
  30. package/types/geometry/circle.d.ts.map +0 -1
  31. package/types/geometry/geomMath.d.ts +0 -9
  32. package/types/geometry/geomMath.d.ts.map +0 -1
  33. package/types/geometry/line.d.ts +0 -91
  34. package/types/geometry/line.d.ts.map +0 -1
  35. package/types/geometry/line3.d.ts +0 -58
  36. package/types/geometry/line3.d.ts.map +0 -1
  37. package/types/geometry/matrix.d.ts +0 -12
  38. package/types/geometry/matrix.d.ts.map +0 -1
  39. package/types/geometry/plane3.d.ts +0 -36
  40. package/types/geometry/plane3.d.ts.map +0 -1
  41. package/types/geometry/point.d.ts +0 -12
  42. package/types/geometry/point.d.ts.map +0 -1
  43. package/types/geometry/triangle.d.ts +0 -70
  44. package/types/geometry/triangle.d.ts.map +0 -1
  45. package/types/geometry/vector.d.ts +0 -56
  46. package/types/geometry/vector.d.ts.map +0 -1
  47. package/types/geometry/vector3d.d.ts +0 -37
  48. package/types/geometry/vector3d.d.ts.map +0 -1
  49. package/types/helpers.d.ts +0 -3
  50. package/types/helpers.d.ts.map +0 -1
  51. package/types/numeric.d.ts +0 -39
  52. package/types/numeric.d.ts.map +0 -1
  53. package/types/pimath.interface.d.ts +0 -57
  54. package/types/pimath.interface.d.ts.map +0 -1
  55. package/types/randomization/algebra/rndEquation.d.ts +0 -4
  56. package/types/randomization/algebra/rndEquation.d.ts.map +0 -1
  57. package/types/randomization/algebra/rndMonom.d.ts +0 -4
  58. package/types/randomization/algebra/rndMonom.d.ts.map +0 -1
  59. package/types/randomization/algebra/rndPolynom.d.ts +0 -5
  60. package/types/randomization/algebra/rndPolynom.d.ts.map +0 -1
  61. package/types/randomization/coefficient/rndFraction.d.ts +0 -4
  62. package/types/randomization/coefficient/rndFraction.d.ts.map +0 -1
  63. package/types/randomization/geometry/rndCircle.d.ts +0 -4
  64. package/types/randomization/geometry/rndCircle.d.ts.map +0 -1
  65. package/types/randomization/geometry/rndLine.d.ts +0 -4
  66. package/types/randomization/geometry/rndLine.d.ts.map +0 -1
  67. package/types/randomization/geometry/rndLine3.d.ts +0 -4
  68. package/types/randomization/geometry/rndLine3.d.ts.map +0 -1
  69. package/types/randomization/geometry/rndPoint.d.ts +0 -4
  70. package/types/randomization/geometry/rndPoint.d.ts.map +0 -1
  71. package/types/randomization/random.d.ts +0 -20
  72. package/types/randomization/random.d.ts.map +0 -1
  73. package/types/randomization/rndHelpers.d.ts +0 -21
  74. package/types/randomization/rndTypes.d.ts +0 -64
  75. package/types/randomization/rndTypes.d.ts.map +0 -1
@@ -1,102 +0,0 @@
1
- import { IAlgebra, IEquation, InputAlgebra, InputValue, IPiMathObject, ISolution, literalType } from '../pimath.interface';
2
- import { Fraction } from '../coefficients/fraction';
3
- import { Polynom } from './polynom';
4
-
5
- export type EQUATION_SIGN = "=" | "<=" | ">=" | "<" | ">";
6
- export declare class Equation implements IPiMathObject<Equation>, IEquation<Equation>, IAlgebra<Equation> {
7
- #private;
8
- constructor(equation: InputAlgebra<Polynom> | Equation);
9
- constructor(left: InputAlgebra<Polynom>, right: InputAlgebra<Polynom>, sign?: EQUATION_SIGN);
10
- parse: (equationString: string) => this;
11
- create: (left: Polynom, right: Polynom, sign?: string) => this;
12
- clone: () => Equation;
13
- /**
14
- * Add a value to the equation
15
- * if value is an equation, add the left part to the left part of the equation
16
- * and the right part to the right part of the equation
17
- * if value is a string, try to create an equation
18
- * if it fails, create a polynom and add it to the left and right part of the equation
19
- * @param value | Polynom | Monom | Fraction | string | monom
20
- */
21
- add(value: InputValue<Equation | Polynom>): this;
22
- /**
23
- * Get the degree of the equation
24
- * @param letter
25
- */
26
- degree: (letter?: string) => Fraction;
27
- /**
28
- * divide an equation by a given value (transformed as a fraction)
29
- *
30
- * ```
31
- * 8x+10=6x \vert 2
32
- * 4x+5=3x
33
- * ```
34
- *
35
- * |>Alternatively with $3x-4$ maybe it's working ?
36
- * $$\frac{3x}{5}$$
37
- *
38
- * @param value
39
- * @returns {Equation}
40
- */
41
- divide: (value: InputValue<Fraction>) => this;
42
- /**
43
- * Create an Equation using two polynoms.
44
- * Markdown *support* is cool
45
- * @param values
46
- * @param asNumeric
47
- */
48
- evaluate(values: InputValue<Fraction> | literalType<number | Fraction>, asNumeric?: boolean | undefined): boolean;
49
- /**
50
- * Determine if the equation contains a variable.
51
- * @param letter
52
- */
53
- hasVariable: (letter: string) => boolean;
54
- isEqual(value: InputValue<Equation>): boolean;
55
- isLinearTo: (equ: Equation) => boolean;
56
- /**
57
- * Determine if the equation contains more than one letter/variable.
58
- */
59
- isMultiVariable: () => boolean;
60
- isEqualTo: (equ: Equation) => boolean;
61
- /**
62
- * Reorder the polynom to have only one letter on the left, the rest on the right.
63
- * @param letter
64
- */
65
- isolate: (letter?: string) => this | false;
66
- letters: () => string[];
67
- /**
68
- * Reorder will move all monoms containing a letter on the left, all the other on the right.
69
- */
70
- moveLeft: () => this;
71
- /**
72
- * Multiple an equation by a fraction value.
73
- * @param value
74
- */
75
- multiply: (value: InputValue<Fraction>) => this;
76
- pow(value: number): this;
77
- opposite: () => this;
78
- reduce(): this;
79
- reorder: (allLeft?: boolean) => this;
80
- replaceBy: (letter: string, P: Polynom) => this;
81
- /**
82
- * Multiply by the lcm denominator and divide by the gcm numerators.
83
- */
84
- simplify: () => this;
85
- solve: () => ISolution[];
86
- split(): [Polynom, Polynom];
87
- subtract(value: InputValue<Equation | Polynom>): this;
88
- test: (values: literalType<Fraction>) => boolean;
89
- static isEquationString(equationString: string): boolean;
90
- static makeSolutionsUnique(solutions: ISolution[], sorted?: boolean): ISolution[];
91
- get display(): string;
92
- get left(): Polynom;
93
- set left(value: Polynom);
94
- get numberOfVars(): number;
95
- get right(): Polynom;
96
- set right(value: Polynom);
97
- get sign(): string;
98
- set sign(value: string);
99
- get signAsTex(): string;
100
- get tex(): string;
101
- get variables(): string[];
102
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"equation.d.ts","sourceRoot":"","sources":["../../src/algebra/equation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,UAAU,EACV,aAAa,EACb,SAAS,EACT,WAAW,EACd,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAInD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAInC,MAAM,MAAM,aAAa,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,GAA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,EAAE,MAAM,GAAG,IAAI;IAKxB,QAAQ,QAAO,IAAI,CAIzB;IAEM,MAAM,IAAI,IAAI;IAwBd,OAAO,aAAc,OAAO,KAAG,IAAI,CAyBzC;IAGM,SAAS,WAAY,MAAM,KAAK,OAAO,KAAG,IAAI,CAIpD;IAKM,QAAQ,QAAO,IAAI,CAIzB;IAGM,KAAK,QAAO,SAAS,EAAE,CAG7B;IAEM,KAAK,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;IAI3B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,GAAG,OAAO,CAAC,GAAG,IAAI;IAoBrD,IAAI,WAAY,YAAY,QAAQ,CAAC,KAAG,OAAO,CAErD;WAEa,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO;WAWjD,mBAAmB,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,EAAE;IAsBxF,IAAW,OAAO,IAAI,MAAM,CAE3B;IAGD,IAAW,IAAI,IAAI,OAAO,CAEzB;IAED,IAAW,IAAI,CAAC,KAAK,EAAE,OAAO,EAE7B;IAED,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,IAAW,KAAK,IAAI,OAAO,CAE1B;IAED,IAAW,KAAK,CAAC,KAAK,EAAE,OAAO,EAE9B;IAGD,IAAW,IAAI,IAAI,MAAM,CAExB;IAED,IAAW,IAAI,CAAC,KAAK,EAAE,MAAM,EAG5B;IAED,IAAW,SAAS,IAAI,MAAM,CAU7B;IAED,IAAW,GAAG,IAAI,MAAM,CAEvB;IAED,IAAW,SAAS,IAAI,MAAM,EAAE,CAE/B;CA2EJ"}
@@ -1,10 +0,0 @@
1
- import { ISolution } from '../pimath.interface';
2
- import { Polynom } from './polynom';
3
- import { Equation } from './equation';
4
-
5
- export declare class EquationSolver {
6
- #private;
7
- constructor(left: Polynom | Equation, right?: Polynom, variable?: string);
8
- solve(): ISolution[];
9
- solveAsCardan(): ISolution[];
10
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"equationSolver.d.ts","sourceRoot":"","sources":["../../src/algebra/equationSolver.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAE1C,qBAAa,cAAc;;gBAIX,IAAI,EAAE,OAAO,GAAG,QAAQ,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,QAAQ,SAAM;IAW9D,KAAK,IAAI,SAAS,EAAE;IAuBpB,aAAa,IAAI,SAAS,EAAE;CAkUtC"}
@@ -1,46 +0,0 @@
1
- import { IAlgebra, IExpression, InputAlgebra, InputValue, IPiMathObject, literalType } from '../pimath.interface';
2
- import { Fraction } from '../coefficients/fraction';
3
- import { Polynom } from './polynom';
4
-
5
- export declare class Factor implements IPiMathObject<Factor>, IExpression<Factor>, IAlgebra<Factor> {
6
- #private;
7
- constructor(value: InputAlgebra<Polynom> | Factor, power?: InputValue<Fraction>);
8
- parse(): Factor;
9
- clone(): Factor;
10
- add(): Factor;
11
- get withPower(): this;
12
- get withRoot(): this;
13
- get asSingle(): this;
14
- degree(letter?: string): Fraction;
15
- derivative(): Factor[];
16
- develop(): Polynom;
17
- get display(): string;
18
- divide(value: InputAlgebra<Factor | Polynom>): this;
19
- evaluate(values: InputValue<Fraction> | literalType<number | Fraction>, asNumeric?: boolean): number | Fraction;
20
- hasVariable(letter: string): boolean;
21
- inverse(): this;
22
- isEqual(value: Factor): boolean;
23
- isOne(): boolean;
24
- isSameAs(value: InputAlgebra<Factor | Polynom>): boolean;
25
- isZero(): boolean;
26
- multiply(value: InputAlgebra<Factor | Polynom>): this;
27
- one(): this;
28
- opposite(): Factor;
29
- get polynom(): Polynom;
30
- set polynom(value: Polynom);
31
- pow(value: number | Fraction): this;
32
- get power(): Fraction;
33
- set power(value: InputValue<Fraction>);
34
- primitive(): Factor;
35
- reduce(): Factor;
36
- root(value: number): this;
37
- sqrt(): this;
38
- subtract(): Factor;
39
- get tex(): string;
40
- get variables(): string[];
41
- zero(): this;
42
- }
43
- export declare enum FACTOR_DISPLAY {
44
- ROOT = 0,
45
- POWER = 1
46
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"factor.d.ts","sourceRoot":"","sources":["../../src/algebra/factor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtH,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGnC,qBAAa,MAAO,YAChB,aAAa,CAAC,MAAM,CAAC,EACrB,WAAW,CAAC,MAAM,CAAC,EACnB,QAAQ,CAAC,MAAM,CAAC;;gBAMJ,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC;IAmBxE,KAAK,IAAiC,MAAM;IAI5C,KAAK,IAAI,MAAM;IAIf,GAAG,IAAI,MAAM;IAIpB,IAAW,SAAS,IAAI,IAAI,CAG3B;IAED,IAAW,QAAQ,IAAI,IAAI,CAG1B;IACD,IAAW,QAAQ,IAAI,IAAI,CAG1B;IAEM,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ;IAIjC,UAAU,IAAI,MAAM,EAAE;IAoBtB,OAAO,IAAI,OAAO;IAQzB,IAAW,OAAO,IAAI,MAAM,CAyB3B;IAEM,MAAM,CAAC,KAAK,EAAE,YAAY,CAAC,MAAM,GAAG,OAAO,CAAC,GAAG,IAAI;IAkBnD,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC,MAAM,GAAG,QAAQ,CAAC,EAAE,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ;IAS/G,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAIpC,OAAO,IAAI,IAAI;IAKf,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAO/B,KAAK,IAAI,OAAO;IAIhB,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC,MAAM,GAAG,OAAO,CAAC;IAc9C,MAAM,IAAI,OAAO;IAIjB,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC,MAAM,GAAG,OAAO,CAAC,GAAG,IAAI;IAkBrD,GAAG,IAAI,IAAI;IAMX,QAAQ,IAAI,MAAM;IAIzB,IAAW,OAAO,IAAI,OAAO,CAE5B;IAED,IAAW,OAAO,CAAC,KAAK,EAAE,OAAO,EAEhC;IAEM,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI;IAK1C,IAAW,KAAK,IAAI,QAAQ,CAE3B;IAED,IAAW,KAAK,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC,EAE3C;IAEM,SAAS,IAAI,MAAM;IAInB,MAAM,IAAI,MAAM;IAIhB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKzB,IAAI,IAAI,IAAI;IAIZ,QAAQ,IAAI,MAAM;IAIzB,IAAW,GAAG,IAAI,MAAM,CAyBvB;IAED,IAAW,SAAS,IAAI,MAAM,EAAE,CAE/B;IAEM,IAAI,IAAI,IAAI;CAMtB;AAED,oBAAY,cAAc;IACtB,IAAI,IAAA;IACJ,KAAK,IAAA;CACR"}
@@ -1,37 +0,0 @@
1
- import { IAlgebra, IEquation, InputValue, IPiMathObject, ISolution, literalType } from '../pimath.interface';
2
- import { Fraction } from '../coefficients/fraction';
3
- import { Equation } from './equation';
4
- import { Polynom } from './polynom';
5
-
6
- /**
7
- * Linear system of equations
8
- * @class LinearSystem
9
- */
10
- export declare class LinearSystem implements IPiMathObject<LinearSystem>, IEquation<LinearSystem>, IAlgebra<LinearSystem> {
11
- #private;
12
- constructor(...values: (string | Equation)[]);
13
- parse: (...equations: (string | Equation)[]) => this;
14
- clone: () => LinearSystem;
15
- static fromMatrix(matrix: InputValue<Fraction>[][], letters?: string): LinearSystem;
16
- add(value: InputValue<LinearSystem | Equation | Polynom>, index?: number): this;
17
- buildTex: (equations: Equation[], operators?: (string[])[]) => string;
18
- degree(letter?: string | undefined): Fraction;
19
- get display(): string;
20
- get equations(): Equation[];
21
- set equations(value: Equation[]);
22
- evaluate(values: InputValue<Fraction> | literalType<number | Fraction>, asNumeric?: boolean | undefined): number | Fraction;
23
- hasVariable(letter: string): boolean;
24
- isEqual(value: LinearSystem): boolean;
25
- get isSolvable(): boolean;
26
- get matrix(): [Fraction[][], Fraction[]];
27
- mergeEquations: (eq1: Equation, eq2: Equation, factor1: Fraction, factor2: Fraction) => Equation;
28
- multiply(value: InputValue<Fraction> | InputValue<Fraction>[], index?: number): this;
29
- reduce(): LinearSystem;
30
- reorder: () => this;
31
- solve(): ISolution[];
32
- solveMatrix: () => Fraction[];
33
- subtract(value: InputValue<LinearSystem | Equation | Polynom>, index?: number): this;
34
- get tex(): string;
35
- get variables(): string[];
36
- set variables(value: string | string[]);
37
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"linearSystem.d.ts","sourceRoot":"","sources":["../../src/algebra/linearSystem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAC,MAAM,qBAAqB,CAAA;AAC/G,OAAO,EAAC,QAAQ,EAAC,MAAM,0BAA0B,CAAA;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAA;AAEnC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AASjC,qBAAa,YAAa,YAAW,aAAa,CAAC,YAAY,CAAC,EAC5D,SAAS,CAA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,CAAC,QAAQ,CAAC,GAAG,UAAU,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAwBpF,MAAM,IAAI,YAAY;IAKtB,OAAO,QAAO,IAAI,CAMxB;IAED,KAAK,IAAI,SAAS,EAAE;IAIb,WAAW,QAAO,QAAQ,EAAE,CA0ClC;IAEM,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAqB3F,IAAW,GAAG,IAAI,MAAM,CAQvB;IAED,IAAW,SAAS,IAAI,MAAM,EAAE,CAE/B;IAED,IAAW,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAI5C;CA2CJ"}
@@ -1,25 +0,0 @@
1
- /**
2
- * Polynom module contains everything necessary to handle polynoms.
3
- * @module Logicalset
4
- */
5
- /**
6
- * Polynom class can handle polynoms, reorder, resolve, ...
7
- */
8
- export declare class LogicalSet {
9
- #private;
10
- /**
11
- *
12
- * @param {string} value (optional) Default polynom to parse on class creation
13
- */
14
- constructor(value?: string);
15
- parse: (value: string) => this;
16
- evaluate(values: Record<string, boolean>): boolean;
17
- get rpn(): {
18
- token: string;
19
- tokenType: string;
20
- }[];
21
- get tex(): string;
22
- get variables(): string[];
23
- vennAB(): string[];
24
- vennABC(): string[];
25
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"logicalset.d.ts","sourceRoot":"","sources":["../../src/algebra/logicalset.ts"],"names":[],"mappings":"AAWA,qBAAa,UAAU;;gBAOP,KAAK,CAAC,EAAE,MAAM;IAU1B,KAAK,UAAW,MAAM,KAAG,IAAI,CAO5B;IAED,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO;IAgDlD,IAAI,GAAG,IAAI;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE,CAEhD;IAED,IAAI,GAAG,IAAI,MAAM,CAsEhB;IAED,IAAI,SAAS,IAAI,MAAM,EAAE,CAIxB;IAED,MAAM,IAAI,MAAM,EAAE;IASlB,OAAO,IAAI,MAAM,EAAE;CAiFtB"}
@@ -1,169 +0,0 @@
1
- import { IAlgebra, IAnalyse, IExpression, InputAlgebra, InputValue, IPiMathObject, literalType } from '../pimath.interface';
2
- import { Fraction } from '../coefficients/fraction';
3
-
4
- export declare class Monom implements IPiMathObject<Monom>, IExpression<Monom>, IAnalyse<Monom>, IAlgebra<Monom> {
5
- #private;
6
- constructor(value?: InputValue<Fraction>);
7
- constructor(value?: Monom);
8
- /**
9
- * Parse a string to a monom. The string may include fraction.
10
- * @param inputStr
11
- */
12
- parse(inputStr: InputAlgebra<Monom>): this;
13
- /**
14
- * Clone the current Monom.
15
- */
16
- clone: () => Monom;
17
- static gcd: (...monoms: Monom[]) => Monom;
18
- /**
19
- * Multiply two monoms and return a NEW monom.
20
- * @param monoms
21
- */
22
- static xMultiply: (...monoms: Monom[]) => Monom;
23
- /**
24
- * Add all similar monoms. If they aren't similar, they are simply skipped.
25
- * @param M (Monom[]) The monoms to add.
26
- */
27
- add: (...M: InputAlgebra<Fraction>[]) => this;
28
- /**
29
- * Get the coefficient \\(k\\) of the Monom \\(k\\cdot x^{n}\\)
30
- * @returns {Fraction}
31
- */
32
- get coefficient(): Fraction;
33
- /**
34
- * Set the coefficient \\(k\\) value of the monom
35
- * @param {Fraction | number | string} F
36
- */
37
- set coefficient(F: InputValue<Fraction>);
38
- containsRationalPower: () => boolean;
39
- /**
40
- * Get the degree of a monom. If no setLetter is given, the result will be the global degree.
41
- * @param letter (string) Letter to get to degree (power)
42
- */
43
- degree: (letter?: string) => Fraction;
44
- /**
45
- * Derivative the monom
46
- * @param letter
47
- */
48
- derivative: (letter?: string) => Monom;
49
- /**
50
- * This display getter is to be used in the polynom display getter
51
- */
52
- get display(): string;
53
- /**
54
- * Divide the current monoms by multiple monoms
55
- * @param M (Monom[])
56
- */
57
- divide: (...M: InputAlgebra<Fraction>[]) => this;
58
- get dividers(): Monom[];
59
- /**
60
- * Evaluate a monom. Each setLetter must be assigned to a Fraction.
61
- * @param values Dictionary of <setLetter: Fraction>
62
- * @param asNumeric
63
- */
64
- evaluate: (values: literalType<number | Fraction> | InputValue<Fraction>, asNumeric?: boolean) => Fraction | number;
65
- /**
66
- * Determine if a monom contains a setLetter in it's literal part
67
- * @param letter
68
- */
69
- hasVariable: (letter?: string) => boolean;
70
- integrate(a: InputValue<Fraction>, b: InputValue<Fraction>, letter?: string | undefined): Fraction;
71
- inverse: () => this;
72
- isDivisible: (div: Monom) => boolean;
73
- /**
74
- * Determine if two monoms are equals
75
- * @param M
76
- */
77
- isEqual: (M: Monom) => boolean;
78
- isLiteralSquare: () => boolean;
79
- /**
80
- * Determine if the monom is one
81
- */
82
- isOne: () => boolean;
83
- /**
84
- * Determine if two monoms are similar
85
- * @param M
86
- */
87
- isSameAs: (M: Monom) => boolean;
88
- isSquare: () => boolean;
89
- /**
90
- * Determine if the monom is null
91
- */
92
- isZero: () => boolean;
93
- /**
94
- * Get the literal part of \\(x^{n_1}y^{n_2}\\) as dictionary \\[\\begin{array}{ll}x&=n_1\\\\y&=n_2\\end{array}\\]
95
- * @returns {literalType}
96
- */
97
- get literal(): literalType<Fraction>;
98
- /**
99
- * Set the literal part of the monom. Must be a dictionary {x: Fraction, y: Fraction, ...}
100
- * @param {literalType<Fraction>} L
101
- */
102
- set literal(L: literalType<Fraction>);
103
- /**
104
- * Get the literal square roots of the Monom.
105
- * TODO: remove this getter ? Is it used and is it correct ?
106
- * @returns {literalType<Fraction>}
107
- */
108
- get literalSqrt(): literalType<Fraction>;
109
- /**
110
- * Set the literal part of the monom from a string
111
- * @param inputStr String like x^2y^3
112
- */
113
- set literalStr(inputStr: string);
114
- /**
115
- * Multiple multiple monoms to the current monom
116
- * @param M (Monom[]) The monoms to multiply to.
117
- */
118
- multiply: (...M: InputAlgebra<Fraction>[]) => this;
119
- /**
120
- * Create a one value monom
121
- */
122
- one: () => this;
123
- /**
124
- * Get the opposite
125
- * Returns a monom.
126
- */
127
- opposite: () => this;
128
- get plotFunction(): string;
129
- /**
130
- * Get the pow of a monom.
131
- * @param nb (number) : Mathematical pow
132
- */
133
- pow: (nb: number | Fraction) => this;
134
- primitive: (letter?: string) => Monom;
135
- reduce: () => this;
136
- removeVariable(letter: string): void;
137
- /**
138
- * Get the nth-root of the monom
139
- */
140
- root: () => this;
141
- /**
142
- * Set the power of a particular setLetter
143
- * @param letter (string) Letter to change
144
- * @param pow (number) Power of the setLetter (must be positive integer.
145
- */
146
- setLetter: (letter: string, pow: InputValue<Fraction>) => this;
147
- /**
148
- * Return the square root of a monom
149
- */
150
- sqrt: () => this;
151
- /**
152
- * Subtract multiple monoms
153
- * @param M (Monom[]) The monoms to subtract
154
- */
155
- subtract: (...M: InputAlgebra<Fraction>[]) => this;
156
- /**
157
- * Get the tex output of the monom
158
- */
159
- get tex(): string;
160
- /**
161
- * Get the variables letters
162
- */
163
- get variables(): string[];
164
- /**
165
- * Create a zero value monom
166
- */
167
- zero: () => this;
168
- private _getLiteralDividers;
169
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"monom.d.ts","sourceRoot":"","sources":["../../src/algebra/monom.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,UAAU,EACV,aAAa,EACb,WAAW,EACd,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAMnD,qBAAa,KAAM,YAAW,aAAa,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC;;gBAIxF,KAAK,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC;gBAC5B,KAAK,CAAC,EAAE,K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CAK5B;IAKM,MAAM,QAAO,OAAO,CAE1B;IAMD,IAAW,OAAO,IAAI,WAAW,CAAC,QAAQ,CAAC,CAE1C;IAMD,IAAW,OAAO,CAAC,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,EAE1C;IAOD,IAAW,WAAW,IAAI,WAAW,CAAC,QAAQ,CAAC,CAW9C;IAMD,IAAW,UAAU,CAAC,QAAQ,EAAE,MAAM,EAyBrC;IAMM,QAAQ,SAAU,aAAa,QAAQ,CAAC,EAAE,KAAG,IAAI,CAkBvD;IAKM,GAAG,QAAO,IAAI,CAIpB;IAMM,QAAQ,QAAO,IAAI,CAGzB;IAED,IAAW,YAAY,IAAI,MAAM,CAgChC;IAMM,GAAG,OAAQ,MAAM,GAAG,QAAQ,KAAG,IAAI,CAMzC;IAMM,SAAS,YAAa,MAAM,KAAG,KAAK,CAyB1C;IAEM,MAAM,QAAO,IAAI,CAWvB;IAEM,cAAc,CAAC,MAAM,EAAE,MAAM;IAS7B,IAAI,QAAO,IAAI,CAErB;IAOM,SAAS,WAAY,MAAM,OAAO,WAAW,QAAQ,CAAC,KAAG,IAAI,CAcnE;IAKM,IAAI,QAAO,IAAI,CASrB;IAMM,QAAQ,SAAU,aAAa,QAAQ,CAAC,EAAE,KAAG,IAAI,CAgBvD;IAKD,IAAW,GAAG,IAAI,MAAM,CAiCvB;IAMD,IAAW,SAAS,IAAI,MAAM,EAAE,CAa/B;IAKM,IAAI,QAAO,IAAI,CAIrB;IAgDD,OAAO,CAAC,mBAAmB;CA+G9B"}
@@ -1,44 +0,0 @@
1
- import { IAlgebra, IExpression, InputAlgebra, InputValue, IPiMathObject, literalType } from '../pimath.interface';
2
- import { Fraction } from '../coefficients/fraction';
3
- import { Factor } from './factor';
4
- import { Polynom } from './polynom';
5
-
6
- export declare class PolyFactor implements IPiMathObject<PolyFactor>, IExpression<PolyFactor>, IAlgebra<PolyFactor> {
7
- #private;
8
- constructor(...values: (Factor | InputAlgebra<Polynom> | PolyFactor)[]);
9
- parse(...values: (Factor | InputAlgebra<Polynom> | PolyFactor)[]): this;
10
- fromPolynom(polynom: InputAlgebra<Polynom>, letter?: string): this;
11
- clone(): PolyFactor;
12
- add(...values: PolyFactor[]): this;
13
- degree(letter?: string): Fraction;
14
- derivative(): this;
15
- develop(): Polynom;
16
- divide(value: PolyFactor): this;
17
- evaluate(values: InputValue<Fraction> | literalType<number | Fraction>, asNumeric?: boolean): number | Fraction;
18
- hasVariable(letter: string): boolean;
19
- inverse(): this;
20
- isEqual(value: PolyFactor): boolean;
21
- isOne(): boolean;
22
- isZero(): boolean;
23
- multiply(...values: PolyFactor[]): this;
24
- one(): this;
25
- opposite(): this;
26
- pow(value: number | Fraction): this;
27
- primitive(): PolyFactor;
28
- reduce(): this;
29
- root(value: number): this;
30
- sort(): this;
31
- sqrt(): this;
32
- subtract(...values: PolyFactor[]): this;
33
- zero(): this;
34
- static gcd(...values: PolyFactor[]): PolyFactor;
35
- get factors(): Factor[];
36
- set factors(value: Factor[]);
37
- get variables(): string[];
38
- get asRoot(): this;
39
- get asPower(): this;
40
- get numerator(): Factor[];
41
- get denominator(): Factor[];
42
- get display(): string;
43
- get tex(): string;
44
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"polyFactor.d.ts","sourceRoot":"","sources":["../../src/algebra/polyFactor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtH,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACnD,OAAO,EAAE,MAAM,EAAkB,MAAM,UAAU,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAMnC,qBAAa,UAAW,YACpB,aAAa,CAAC,UAAU,CAAC,EACzB,WAAW,CAAC,UAAU,CAAC,EACvB,QAAQ,CAAC,UAAU,CAAC;;gBAUR,GAAG,MAAM,EA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E,GAAG,IAAI;IAIvC,IAAI,IAAI,IAAI;WAKL,GAAG,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU;IAiBtD,IAAW,OAAO,IAAI,MAAM,EAAE,CAE7B;IAED,IAAW,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAEjC;IAED,IAAW,SAAS,IAAI,MAAM,EAAE,CAG/B;IAED,IAAI,MAAM,IAAI,IAAI,CAGjB;IACD,IAAI,OAAO,IAAI,IAAI,CAGlB;IAED,IAAI,SAAS,IAAI,MAAM,EAAE,CAExB;IACD,IAAI,WAAW,IAAI,MAAM,EAAE,CAE1B;IAED,IAAW,OAAO,IAAI,MAAM,CA+B3B;IAED,IAAW,GAAG,IAAI,MAAM,CA+BvB;CA0BJ"}
@@ -1,107 +0,0 @@
1
- import { IAlgebra, IAnalyse, IExpression, InputAlgebra, InputValue, IPiMathObject, ISolution, literalType } from '../pimath.interface';
2
- import { Fraction } from '../coefficients/fraction';
3
- import { Monom } from './monom';
4
-
5
- export type PolynomParsingType = InputValue<Polynom> | Monom;
6
- export interface IEuclidean {
7
- quotient: Polynom;
8
- reminder: Polynom;
9
- }
10
- /**
11
- * Polynom class can handle polynoms, reorder, resolve, ...
12
- * ```
13
- * let P = new Polynom('3x-4')
14
- * ```
15
- */
16
- export declare class Polynom implements IPiMathObject<Polynom>, IExpression<Polynom>, IAnalyse<Polynom>, IAlgebra<Polynom> {
17
- #private;
18
- constructor(value: InputValue<Fraction>);
19
- constructor(value: string);
20
- constructor(value: Monom);
21
- constructor(value: Polynom);
22
- constructor(...values: InputValue<Fraction>[]);
23
- constructor(...values: InputAlgebra<Polynom>[]);
24
- /**
25
- * Parse a string to a polynom.
26
- * @param inputStr
27
- * @param values
28
- */
29
- parse: (inputStr: PolynomParsingType, ...values: InputAlgebra<Monom>[]) => this;
30
- /**
31
- * Clone the polynom
32
- */
33
- clone: () => Polynom;
34
- add: (...values: InputAlgebra<Polynom>[]) => Polynom;
35
- commonMonom: () => Monom;
36
- degree: (letter?: string) => Fraction;
37
- derivative: (letter?: string) => Polynom;
38
- divide: (value: InputAlgebra<Polynom>) => Polynom;
39
- empty: () => this;
40
- /**
41
- * Divide the current polynom by another polynom.
42
- * @param P
43
- * returns {quotient: Polynom, reminder: Polynom}
44
- */
45
- euclidean: (P: Polynom) => IEuclidean;
46
- evaluate: (values: literalType<Fraction | number> | InputValue<Fraction>, asNumeric?: boolean) => Fraction | number;
47
- /**
48
- * Factorize a polynom and store the best results in factors.
49
- * @param letter
50
- */
51
- factorize: (letter?: string) => Polynom[];
52
- gcdDenominator: () => number;
53
- gcdNumerator: () => number;
54
- getDenominators: () => number[];
55
- getNumerators: () => number[];
56
- getZeroes: () => ISolution[];
57
- hasVariable(letter: string): boolean;
58
- integrate: (a: InputValue<Fraction>, b: InputValue<Fraction>, letter?: string) => Fraction;
59
- inverse(): Polynom | undefined;
60
- isDeveloped: (polynomString: string) => boolean;
61
- isDividableBy: (div: Polynom) => boolean;
62
- isEqual: (P: Polynom) => boolean;
63
- isOne(): boolean;
64
- isOppositeAt: (P: Polynom) => boolean;
65
- isReduced: (polynomString: string) => boolean;
66
- isSameAs: (P: Polynom) => boolean;
67
- isZero(): boolean;
68
- lcmDenominator: () => number;
69
- lcmNumerator: () => number;
70
- letters: () => string[];
71
- limitToInfinity: (letter?: string) => Fraction;
72
- limitToNegativeInfinity: (letter?: string) => Fraction;
73
- monomByDegree: (degree?: Fraction | number, letter?: string) => Monom;
74
- monomByLetter: (letter: string) => Monom;
75
- monomsByDegree: (degree?: number | Fraction, letter?: string) => Monom[];
76
- multiply: (value: unknown) => Polynom;
77
- one: () => this;
78
- opposite: () => this;
79
- pow: (nb: number) => Polynom;
80
- primitive: (letter?: string) => Polynom;
81
- reduce: () => Polynom;
82
- reorder: (letter?: string, revert?: boolean) => this;
83
- /**
84
- * Replace a variable (letter) by a polynom.
85
- * @param letter
86
- * @param P
87
- */
88
- replaceBy: (letter: string, P: Polynom) => this;
89
- root(): Polynom;
90
- sqrt(): Polynom;
91
- subtract: (...values: InputAlgebra<Polynom>[]) => Polynom;
92
- /**
93
- * Set the polynom to zero.
94
- * @returns {this}
95
- */
96
- zero: () => this;
97
- get display(): string;
98
- get isMultiVariable(): boolean;
99
- get length(): number;
100
- get monoms(): Monom[];
101
- set monoms(M: Monom[]);
102
- get numberOfVars(): number;
103
- get plotFunction(): string;
104
- get tex(): string;
105
- get variables(): string[];
106
- get zeroes(): ISolution[];
107
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"polynom.d.ts","sourceRoot":"","sources":["../../src/algebra/polynom.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAC3I,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAGnD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAI/B,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,KAAK,CAAA;AAM5D,MAAM,WAAW,UAAU;IAGvB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAA;CAGpB;AAYD,qBAAa,OAAQ,YACjB,aAAa,CAAC,OAAO,CAAC,EACtB,WAAW,CAAC,OAAO,CAAC,EACpB,QAAQ,CAAC,OAAO,CAAC,EACjB,QAAQ,CAAC,OAAO,CAAC;;gBAUL,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;gBAC3B,KAAK,EAAE,MAAM;gBACb,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,OAAO;gBACd,GAAG,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE;gBACjC,GAAG,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE;IAoBvC,KAAK,aAAc,kBAAkB,aAAa,aAAa,KAAK,CAAC,E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 +0,0 @@
1
- import { IAlgebra, IAnalyse, IExpression, InputAlgebra, InputValue, IPiMathObject, literalType } from '../pimath.interface';
2
- import { Fraction } from '../coefficients/fraction';
3
- import { Polynom } from './polynom';
4
-
5
- /**
6
- * Rational class can handle rational polynoms
7
- */
8
- export declare class Rational implements IPiMathObject<Rational>, IExpression<Rational>, IAnalyse<Rational>, IAlgebra<Rational> {
9
- #private;
10
- constructor();
11
- constructor(value: Rational);
12
- constructor(numerator: InputAlgebra<Polynom>, denominator?: InputAlgebra<Polynom>);
13
- get tex(): string;
14
- get display(): string;
15
- get numerator(): Polynom;
16
- get denominator(): Polynom;
17
- clone(): Rational;
18
- parse(): Rational;
19
- zero(): this;
20
- one(): this;
21
- add(value: InputValue<Rational>): Rational;
22
- subtract(value: InputValue<Rational>): Rational;
23
- opposite(): this;
24
- multiply(value: InputValue<Rational>): this;
25
- divide(value: InputValue<Rational>): this;
26
- reduce(): Rational;
27
- isEqual(value: InputValue<Rational>): boolean;
28
- isZero(): boolean;
29
- isOne(): boolean;
30
- inverse(): this;
31
- pow(value: number): Rational;
32
- sqrt(): Rational | undefined;
33
- root(): Rational | undefined;
34
- derivative(): Rational | Rational[];
35
- primitive(): Rational;
36
- integrate(a: InputValue<Fraction>, b: InputValue<Rational>, letter?: string): Fraction;
37
- get variables(): string[];
38
- hasVariable(letter: string): boolean;
39
- degree(): Fraction;
40
- evaluate(values: literalType<Fraction | number> | InputValue<Fraction>, asNumeric?: boolean): Fraction | number | boolean;
41
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"rational.d.ts","sourceRoot":"","sources":["../../src/algebra/rational.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAChI,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,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