pimath 0.2.8 → 0.2.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.
- package/dist/pimath.js +5596 -5042
- package/dist/pimath.js.map +1 -1
- package/package.json +16 -16
- package/src/algebra/equation.ts +21 -22
- package/src/algebra/matrix.ts +45 -8
- package/src/algebra/polynom.ts +19 -16
- package/src/randomization/algebra/rndMonom.ts +16 -10
- package/src/randomization/geometry/rndCircle.ts +5 -5
- package/src/randomization/geometry/{rndVector.ts → rndPoint.ts} +6 -6
- package/src/randomization/random.ts +4 -4
- package/types/algebra/equation.d.ts +6 -58
- package/types/algebra/equation.d.ts.map +1 -1
- package/types/algebra/equationSolver.d.ts +4 -3
- package/types/algebra/factor.d.ts +4 -3
- package/types/algebra/index.d.ts +1 -0
- package/types/algebra/linearSystem.d.ts +6 -5
- package/types/algebra/logicalset.d.ts +1 -7
- package/types/algebra/matrix.d.ts +9 -3
- package/types/algebra/matrix.d.ts.map +1 -1
- package/types/algebra/monom.d.ts +3 -115
- package/types/algebra/operations.d.ts +2 -1
- package/types/algebra/polyFactor.d.ts +6 -14
- package/types/algebra/polynom.d.ts +6 -36
- package/types/algebra/polynom.d.ts.map +1 -1
- package/types/analyze/index.d.ts +3 -2
- package/types/analyze/solution.d.ts +4 -3
- package/types/analyze/tableOfSigns.d.ts +4 -3
- package/types/coefficients/fraction.d.ts +2 -14
- package/types/coefficients/index.d.ts +1 -0
- package/types/coefficients/root.d.ts +3 -5
- package/types/geometry/TupleN.d.ts +3 -2
- package/types/geometry/circle.d.ts +6 -15
- package/types/geometry/geomMath.d.ts +4 -3
- package/types/geometry/index.d.ts +1 -0
- package/types/geometry/line.d.ts +7 -16
- package/types/geometry/line3.d.ts +5 -9
- package/types/geometry/plane3.d.ts +6 -5
- package/types/geometry/point.d.ts +6 -5
- package/types/geometry/sphere3.d.ts +5 -4
- package/types/geometry/triangle.d.ts +6 -12
- package/types/geometry/vector.d.ts +5 -4
- package/types/helpers.d.ts +1 -0
- package/types/index.d.ts +22 -21
- package/types/numeric.d.ts +1 -16
- package/types/pimath.interface.d.ts +5 -4
- package/types/randomization/algebra/rndEquation.d.ts +3 -2
- package/types/randomization/algebra/rndMonom.d.ts +3 -2
- package/types/randomization/algebra/rndMonom.d.ts.map +1 -1
- package/types/randomization/algebra/rndPolynom.d.ts +3 -2
- package/types/randomization/coefficient/rndFraction.d.ts +3 -2
- package/types/randomization/geometry/rndCircle.d.ts +3 -2
- package/types/randomization/geometry/rndCircle.d.ts.map +1 -1
- package/types/randomization/geometry/rndLine.d.ts +3 -2
- package/types/randomization/geometry/rndLine3.d.ts +3 -2
- package/types/randomization/geometry/rndPoint.d.ts +4 -0
- package/types/randomization/geometry/rndPoint.d.ts.map +1 -0
- package/types/randomization/geometry/rndVector.d.ts +3 -2
- package/types/randomization/random.d.ts +13 -12
- package/types/randomization/random.d.ts.map +1 -1
- package/types/randomization/rndHelpers.d.ts +1 -14
- package/types/randomization/rndTypes.d.ts +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IExpressionMultiply, InputAlgebra, InputValue, IPiMathObject } from
|
|
2
|
-
import { Polynom } from
|
|
3
|
-
import { Vector } from
|
|
1
|
+
import type { IExpressionMultiply, InputAlgebra, InputValue, IPiMathObject } from "../pimath.interface";
|
|
2
|
+
import { Polynom } from "./polynom";
|
|
3
|
+
import type { Vector } from "../geometry";
|
|
4
4
|
export type IMatrixValues = InputAlgebra<Polynom>[][];
|
|
5
5
|
export declare class Matrix implements IPiMathObject<Matrix>, IExpressionMultiply<Matrix> {
|
|
6
6
|
#private;
|
|
@@ -8,10 +8,13 @@ export declare class Matrix implements IPiMathObject<Matrix>, IExpressionMultipl
|
|
|
8
8
|
parse(values: IMatrixValues): this;
|
|
9
9
|
clone(): Matrix;
|
|
10
10
|
get tex(): string;
|
|
11
|
+
resolveWrapper(): [string, string];
|
|
12
|
+
resolveTeXwrapper(): string;
|
|
11
13
|
get display(): string;
|
|
12
14
|
add(value: Matrix): this;
|
|
13
15
|
aij(i: number, j: number): Polynom | null;
|
|
14
16
|
get bmatrix(): this;
|
|
17
|
+
get Bmatrix(): this;
|
|
15
18
|
canBeAdded(matrix: Matrix): boolean;
|
|
16
19
|
canBeInverted(): boolean;
|
|
17
20
|
canBeMultiplied(matrix: Matrix): boolean;
|
|
@@ -39,6 +42,8 @@ export declare class Matrix implements IPiMathObject<Matrix>, IExpressionMultipl
|
|
|
39
42
|
one(): this;
|
|
40
43
|
opposite(): this;
|
|
41
44
|
get pmatrix(): this;
|
|
45
|
+
get vmatrix(): this;
|
|
46
|
+
get Vmatrix(): this;
|
|
42
47
|
pow(value: number): this;
|
|
43
48
|
reduce(): Matrix;
|
|
44
49
|
get rows(): Polynom[][];
|
|
@@ -49,3 +54,4 @@ export declare class Matrix implements IPiMathObject<Matrix>, IExpressionMultipl
|
|
|
49
54
|
get values(): Polynom[][];
|
|
50
55
|
zero(): this;
|
|
51
56
|
}
|
|
57
|
+
//# sourceMappingURL=matrix.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../../src/algebra/matrix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAA;AACrG,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAA;AAGvC,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC,OAAO,CAAC,EAAE,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"matrix.d.ts","sourceRoot":"","sources":["../../src/algebra/matrix.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAC,MAAM,qBAAqB,CAAA;AACrG,OAAO,EAAC,OAAO,EAAC,MAAM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AAO,EAAE,EAAE,CAExB;IAEM,IAAI,IAAI,IAAI;CAItB"}
|
package/types/algebra/monom.d.ts
CHANGED
|
@@ -1,162 +1,50 @@
|
|
|
1
|
-
import { IAlgebra, IAnalyse, IExpression, InputAlgebra, InputValue, IPiMathObject, literalType } from
|
|
2
|
-
import { Fraction } from
|
|
1
|
+
import type { IAlgebra, IAnalyse, IExpression, InputAlgebra, InputValue, IPiMathObject, literalType } from "../pimath.interface";
|
|
2
|
+
import { Fraction } from "../coefficients";
|
|
3
3
|
export declare class Monom implements IPiMathObject<Monom>, IExpression<Monom>, IAnalyse<Monom>, IAlgebra<Monom> {
|
|
4
4
|
#private;
|
|
5
5
|
constructor(value?: InputValue<Fraction>);
|
|
6
6
|
constructor(value?: Monom);
|
|
7
|
-
/**
|
|
8
|
-
* Parse a string to a monom. The string may include fraction.
|
|
9
|
-
* @param inputStr
|
|
10
|
-
*/
|
|
11
7
|
parse(inputStr: InputAlgebra<Monom>): this;
|
|
12
|
-
/**
|
|
13
|
-
* Clone the current Monom.
|
|
14
|
-
*/
|
|
15
8
|
clone: () => Monom;
|
|
16
|
-
/**
|
|
17
|
-
* Get the tex output of the monom
|
|
18
|
-
*/
|
|
19
9
|
get tex(): string;
|
|
20
|
-
/**
|
|
21
|
-
* This display getter is to be used in the polynom display getter
|
|
22
|
-
*/
|
|
23
10
|
get display(): string;
|
|
24
11
|
static gcd: (...monoms: Monom[]) => Monom;
|
|
25
|
-
/**
|
|
26
|
-
* Multiply two monoms and return a NEW monom.
|
|
27
|
-
* @param monoms
|
|
28
|
-
*/
|
|
29
12
|
static xMultiply: (...monoms: Monom[]) => Monom;
|
|
30
|
-
/**
|
|
31
|
-
* Add all similar monoms. If they aren't similar, they are simply skipped.
|
|
32
|
-
* @param M (Monom[]) The monoms to add.
|
|
33
|
-
*/
|
|
34
13
|
add: (...M: InputAlgebra<Fraction>[]) => this;
|
|
35
|
-
/**
|
|
36
|
-
* Get the coefficient \\(k\\) of the Monom \\(k\\cdot x^{n}\\)
|
|
37
|
-
* @returns {Fraction}
|
|
38
|
-
*/
|
|
39
14
|
get coefficient(): Fraction;
|
|
40
|
-
/**
|
|
41
|
-
* Set the coefficient \\(k\\) value of the monom
|
|
42
|
-
* @param {Fraction | number | string} F
|
|
43
|
-
*/
|
|
44
15
|
set coefficient(F: InputValue<Fraction>);
|
|
45
16
|
containsRationalPower: () => boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Get the degree of a monom. If no setLetter is given, the result will be the global degree.
|
|
48
|
-
* @param letter (string) Letter to get to degree (power)
|
|
49
|
-
*/
|
|
50
17
|
degree: (letter?: string) => Fraction;
|
|
51
|
-
/**
|
|
52
|
-
* Derivative the monom
|
|
53
|
-
* @param letter
|
|
54
|
-
*/
|
|
55
18
|
derivative: (letter?: string) => Monom;
|
|
56
|
-
/**
|
|
57
|
-
* Divide the current monoms by multiple monoms
|
|
58
|
-
* @param M (Monom[])
|
|
59
|
-
*/
|
|
60
19
|
divide: (...M: InputAlgebra<Fraction>[]) => this;
|
|
61
20
|
get dividers(): Monom[];
|
|
62
|
-
/**
|
|
63
|
-
* Evaluate a monom. Each setLetter must be assigned to a Fraction.
|
|
64
|
-
* @param values Dictionary of <setLetter: Fraction>
|
|
65
|
-
* @param asNumeric
|
|
66
|
-
*/
|
|
67
21
|
evaluate: (values: literalType<number | Fraction> | InputValue<Fraction>, asNumeric?: boolean) => Fraction | number;
|
|
68
|
-
/**
|
|
69
|
-
* Determine if a monom contains a setLetter in it's literal part
|
|
70
|
-
* @param letter
|
|
71
|
-
*/
|
|
72
22
|
hasVariable: (letter?: string) => boolean;
|
|
73
23
|
integrate(a: InputValue<Fraction>, b: InputValue<Fraction>, letter?: string): Fraction;
|
|
74
24
|
inverse: () => this;
|
|
75
25
|
isDivisible: (div: Monom) => boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Determine if two monoms are equals
|
|
78
|
-
* @param M
|
|
79
|
-
*/
|
|
80
26
|
isEqual: (M: Monom) => boolean;
|
|
81
27
|
isLiteralSquare: () => boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Determine if the monom is one
|
|
84
|
-
*/
|
|
85
28
|
isOne: () => boolean;
|
|
86
|
-
/**
|
|
87
|
-
* Determine if two monoms are similar
|
|
88
|
-
* @param M
|
|
89
|
-
*/
|
|
90
29
|
isSameAs: (M: Monom) => boolean;
|
|
91
30
|
isSquare: () => boolean;
|
|
92
|
-
/**
|
|
93
|
-
* Determine if the monom is null
|
|
94
|
-
*/
|
|
95
31
|
isZero: () => boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Get the literal part of \\(x^{n_1}y^{n_2}\\) as dictionary \\[\\begin{array}{ll}x&=n_1\\\\y&=n_2\\end{array}\\]
|
|
98
|
-
* @returns {literalType}
|
|
99
|
-
*/
|
|
100
32
|
get literal(): literalType<Fraction>;
|
|
101
|
-
/**
|
|
102
|
-
* Set the literal part of the monom. Must be a dictionary {x: Fraction, y: Fraction, ...}
|
|
103
|
-
* @param {literalType<Fraction>} L
|
|
104
|
-
*/
|
|
105
33
|
set literal(L: literalType<Fraction>);
|
|
106
|
-
/**
|
|
107
|
-
* Set the literal part of the monom from a string
|
|
108
|
-
* @param inputStr String like x^2y^3
|
|
109
|
-
*/
|
|
110
34
|
set literalStr(inputStr: string);
|
|
111
|
-
/**
|
|
112
|
-
* Multiple multiple monoms to the current monom
|
|
113
|
-
* @param M (Monom[]) The monoms to multiply to.
|
|
114
|
-
*/
|
|
115
35
|
multiply: (...M: InputAlgebra<Fraction>[]) => this;
|
|
116
|
-
/**
|
|
117
|
-
* Create a one value monom
|
|
118
|
-
*/
|
|
119
36
|
one: () => this;
|
|
120
|
-
/**
|
|
121
|
-
* Get the opposite
|
|
122
|
-
* Returns a monom.
|
|
123
|
-
*/
|
|
124
37
|
opposite: () => this;
|
|
125
38
|
get plotFunction(): string;
|
|
126
|
-
/**
|
|
127
|
-
* Get the pow of a monom.
|
|
128
|
-
* @param nb (number) : Mathematical pow
|
|
129
|
-
*/
|
|
130
39
|
pow: (nb: number | Fraction) => this;
|
|
131
40
|
primitive: (letter?: string) => Monom;
|
|
132
41
|
reduce: () => this;
|
|
133
42
|
removeVariable(letter: string): void;
|
|
134
|
-
/**
|
|
135
|
-
* Get the nth-root of the monom
|
|
136
|
-
* @todo Not yet implemented
|
|
137
|
-
*/
|
|
138
43
|
root: () => this;
|
|
139
|
-
/**
|
|
140
|
-
* Set the power of a particular setLetter
|
|
141
|
-
* @param letter (string) Letter to change
|
|
142
|
-
* @param pow (number) Power of the setLetter (must be positive integer.
|
|
143
|
-
*/
|
|
144
44
|
setLetter: (letter: string, pow: InputValue<Fraction>) => this;
|
|
145
|
-
/**
|
|
146
|
-
* Return the square root of a monom
|
|
147
|
-
*/
|
|
148
45
|
sqrt: () => this;
|
|
149
|
-
/**
|
|
150
|
-
* Subtract multiple monoms
|
|
151
|
-
* @param M (Monom[]) The monoms to subtract
|
|
152
|
-
*/
|
|
153
46
|
subtract: (...M: InputAlgebra<Fraction>[]) => this;
|
|
154
|
-
/**
|
|
155
|
-
* Get the variables letters
|
|
156
|
-
*/
|
|
157
47
|
get variables(): string[];
|
|
158
|
-
/**
|
|
159
|
-
* Create a zero value monom
|
|
160
|
-
*/
|
|
161
48
|
zero: () => this;
|
|
162
49
|
}
|
|
50
|
+
//# sourceMappingURL=monom.d.ts.map
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { IExpressionMultiply, IPiMathObject } from
|
|
1
|
+
import type { IExpressionMultiply, IPiMathObject } from "../pimath.interface";
|
|
2
2
|
export declare function operation_pow<T extends IPiMathObject<T> & IExpressionMultiply<T>>(item: T, value: number): T;
|
|
3
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IAlgebra, IExpression, InputAlgebra, InputValue, IPiMathObject, literalType, POLYFACTOR_TABLE_OF_SIGNS } from
|
|
2
|
-
import { Fraction } from
|
|
3
|
-
import { Factor } from
|
|
4
|
-
import { Polynom } from
|
|
5
|
-
import { Solution } from
|
|
1
|
+
import type { IAlgebra, IExpression, InputAlgebra, InputValue, IPiMathObject, literalType, POLYFACTOR_TABLE_OF_SIGNS } from "../pimath.interface";
|
|
2
|
+
import { Fraction } from "../coefficients";
|
|
3
|
+
import { Factor } from "./factor";
|
|
4
|
+
import { Polynom } from "./polynom";
|
|
5
|
+
import type { Solution } from "../analyze";
|
|
6
6
|
export declare class PolyFactor implements IPiMathObject<PolyFactor>, IExpression<PolyFactor>, IAlgebra<PolyFactor> {
|
|
7
7
|
#private;
|
|
8
8
|
constructor(...values: (InputAlgebra<Polynom> | Factor | PolyFactor)[]);
|
|
@@ -26,9 +26,6 @@ export declare class PolyFactor implements IPiMathObject<PolyFactor>, IExpressio
|
|
|
26
26
|
set factors(value: Factor[]);
|
|
27
27
|
fromPolynom(numerator: InputAlgebra<Polynom>, denominator?: InputAlgebra<Polynom>): this;
|
|
28
28
|
fromString(value: string): this;
|
|
29
|
-
/**
|
|
30
|
-
* Get the roots of the PolyFactor.
|
|
31
|
-
*/
|
|
32
29
|
getRoots(): Solution[];
|
|
33
30
|
getZeroes(): Solution[];
|
|
34
31
|
hasVariable(letter: string): boolean;
|
|
@@ -44,12 +41,6 @@ export declare class PolyFactor implements IPiMathObject<PolyFactor>, IExpressio
|
|
|
44
41
|
primitive(): PolyFactor;
|
|
45
42
|
reduce(): this;
|
|
46
43
|
root(value: number): this;
|
|
47
|
-
/**
|
|
48
|
-
* Reoarder the factors using :
|
|
49
|
-
* 1. number of monoms
|
|
50
|
-
* 2. degree of polynom
|
|
51
|
-
* 3. power of polyfactor
|
|
52
|
-
*/
|
|
53
44
|
sort(letter?: string): this;
|
|
54
45
|
sqrt(): this;
|
|
55
46
|
subtract(...values: PolyFactor[]): this;
|
|
@@ -57,3 +48,4 @@ export declare class PolyFactor implements IPiMathObject<PolyFactor>, IExpressio
|
|
|
57
48
|
get variables(): string[];
|
|
58
49
|
zero(): this;
|
|
59
50
|
}
|
|
51
|
+
//# sourceMappingURL=polyFactor.d.ts.map
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
import { IAlgebra, IAnalyse, IExpression, InputAlgebra, InputValue, IPiMathObject, literalType, TABLE_OF_SIGNS } from
|
|
2
|
-
import { Fraction } from
|
|
1
|
+
import type { IAlgebra, IAnalyse, IExpression, InputAlgebra, InputValue, IPiMathObject, literalType, TABLE_OF_SIGNS } from "../pimath.interface";
|
|
2
|
+
import { Fraction } from "../coefficients";
|
|
3
3
|
import { Monom } from './monom';
|
|
4
|
-
import { Solution } from
|
|
4
|
+
import { Solution } from "../analyze/solution";
|
|
5
5
|
export type PolynomParsingType = InputValue<Polynom> | Monom;
|
|
6
6
|
export interface IEuclidean {
|
|
7
7
|
quotient: Polynom;
|
|
8
8
|
reminder: Polynom;
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
11
|
-
* Polynom class can handle polynoms, reorder, resolve, ...
|
|
12
|
-
* ```
|
|
13
|
-
* let P = new Polynom('3x-4')
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
10
|
export declare class Polynom implements IPiMathObject<Polynom>, IExpression<Polynom>, IAnalyse<Polynom>, IAlgebra<Polynom> {
|
|
17
11
|
#private;
|
|
18
12
|
constructor(value: InputValue<Fraction>);
|
|
@@ -21,15 +15,7 @@ export declare class Polynom implements IPiMathObject<Polynom>, IExpression<Poly
|
|
|
21
15
|
constructor(value: Polynom);
|
|
22
16
|
constructor(...values: InputValue<Fraction>[]);
|
|
23
17
|
constructor(...values: InputAlgebra<Polynom>[]);
|
|
24
|
-
/**
|
|
25
|
-
* Parse a string to a polynom.
|
|
26
|
-
* @param inputStr
|
|
27
|
-
* @param values
|
|
28
|
-
*/
|
|
29
18
|
parse(inputStr: PolynomParsingType, ...values: InputAlgebra<Monom>[]): this;
|
|
30
|
-
/**
|
|
31
|
-
* Clone the polynom
|
|
32
|
-
*/
|
|
33
19
|
clone(): Polynom;
|
|
34
20
|
get tex(): string;
|
|
35
21
|
get display(): string;
|
|
@@ -40,18 +26,10 @@ export declare class Polynom implements IPiMathObject<Polynom>, IExpression<Poly
|
|
|
40
26
|
derivative(letter?: string): Polynom;
|
|
41
27
|
divide(value: InputAlgebra<Polynom>): this;
|
|
42
28
|
empty(): this;
|
|
43
|
-
/**
|
|
44
|
-
* Divide the current polynom by another polynom.
|
|
45
|
-
* @param P
|
|
46
|
-
* returns {quotient: Polynom, reminder: Polynom}
|
|
47
|
-
*/
|
|
48
29
|
euclidean(P: Polynom): IEuclidean;
|
|
30
|
+
evaluate(values: literalType<Fraction | number> | InputValue<Fraction>, asNumeric: true): number;
|
|
31
|
+
evaluate(values: literalType<Fraction | number> | InputValue<Fraction>, asNumeric?: false): Fraction;
|
|
49
32
|
evaluate(values: literalType<Fraction | number> | InputValue<Fraction>, asNumeric?: boolean): Fraction | number;
|
|
50
|
-
/**
|
|
51
|
-
* Factorize a polynom and store the best results in factors.
|
|
52
|
-
* @param _letter
|
|
53
|
-
* TODO: Handle other letter than 'x'.
|
|
54
|
-
*/
|
|
55
33
|
factorize(_letter?: string): Polynom[];
|
|
56
34
|
get factors(): Polynom[];
|
|
57
35
|
fromCoefficients(...values: InputValue<Fraction>[]): this;
|
|
@@ -90,11 +68,6 @@ export declare class Polynom implements IPiMathObject<Polynom>, IExpression<Poly
|
|
|
90
68
|
primitive(letter?: string): Polynom;
|
|
91
69
|
reduce(): this;
|
|
92
70
|
reorder(letter?: string, revert?: boolean): this;
|
|
93
|
-
/**
|
|
94
|
-
* Replace a variable (letter) by a polynom.
|
|
95
|
-
* @param letter
|
|
96
|
-
* @param P
|
|
97
|
-
*/
|
|
98
71
|
replaceBy(letter: string, P: Polynom): this;
|
|
99
72
|
root(): Polynom;
|
|
100
73
|
get roots(): Solution[];
|
|
@@ -105,10 +78,7 @@ export declare class Polynom implements IPiMathObject<Polynom>, IExpression<Poly
|
|
|
105
78
|
tableOfSigns(): TABLE_OF_SIGNS;
|
|
106
79
|
get value(): number | undefined;
|
|
107
80
|
get variables(): string[];
|
|
108
|
-
/**
|
|
109
|
-
* Set the polynom to zero.
|
|
110
|
-
* @returns {this}
|
|
111
|
-
*/
|
|
112
81
|
zero(): this;
|
|
113
82
|
get zeroes(): Solution[];
|
|
114
83
|
}
|
|
84
|
+
//# sourceMappingURL=polynom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polynom.d.ts","sourceRoot":"","sources":["../../src/algebra/polynom.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,UAAU,EACV,aAAa,EACb,WAAW,EACX,cAAc,EAEjB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAA;AAGxC,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAA;AAG7B,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAA;AAG5C,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,KAAK,CAAA;AAE5D,MAAM,WAAW,UAAU;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAA;CACpB;AAQD,qBAAa,OAAQ,YAAW,aAAa,CAAC,OAAO,CAAC,EAClD,WAAW,CAAC,OAAO,CAAC,EACpB,QAAQ,CAAC,OAAO,CAAC,EACjB,QAAQ,CAAC,OAAO,CAAC;;gBAQL,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;IAkBvC,KAAK,CAAC,QAAQ,EAAE,kBAAkB,EAAE,GAAG,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI;IA+B3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cAAc;IA8CrC,IAAW,KAAK,IAAI,MAAM,GAAG,SAAS,CAMrC;IAED,IAAW,SAAS,IAAI,MAAM,EAAE,CAE/B;IAMM,IAAI,IAAI,IAAI;IAOnB,IAAW,MAAM,IAAI,QAAQ,EAAE,CAE9B;CA6SJ"}
|
package/types/analyze/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from "./solution";
|
|
2
|
+
export * from "./tableOfSigns";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InputValue } from
|
|
2
|
-
import { Fraction } from
|
|
3
|
-
import { Root } from
|
|
1
|
+
import type { InputValue } from "../pimath.interface";
|
|
2
|
+
import { Fraction } from "../coefficients";
|
|
3
|
+
import { Root } from "../coefficients/root";
|
|
4
4
|
export declare class Solution {
|
|
5
5
|
#private;
|
|
6
6
|
constructor();
|
|
@@ -25,3 +25,4 @@ export declare class Solution {
|
|
|
25
25
|
get variable(): string;
|
|
26
26
|
set variable(value: string | undefined);
|
|
27
27
|
}
|
|
28
|
+
//# sourceMappingURL=solution.d.ts.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Factor, PolyFactor, Polynom } from
|
|
2
|
-
import { InputAlgebra } from
|
|
3
|
-
import { Solution } from
|
|
1
|
+
import { Factor, PolyFactor, Polynom } from "../algebra";
|
|
2
|
+
import type { InputAlgebra } from "../pimath.interface";
|
|
3
|
+
import type { Solution } from "./solution";
|
|
4
4
|
export declare class TableOfSigns {
|
|
5
5
|
#private;
|
|
6
6
|
constructor(value: InputAlgebra<PolyFactor | Factor | Polynom>);
|
|
7
7
|
get fx(): PolyFactor;
|
|
8
8
|
get roots(): Solution[];
|
|
9
9
|
}
|
|
10
|
+
//# sourceMappingURL=tableOfSigns.d.ts.map
|
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
import { compareSign, IExpression, InputValue, IPiMathObject } from
|
|
1
|
+
import type { compareSign, IExpression, InputValue, IPiMathObject } from "../pimath.interface";
|
|
2
2
|
export declare enum FRAC_TYPE {
|
|
3
3
|
frac = "frac",
|
|
4
4
|
dfrac = "dfrac",
|
|
5
5
|
tfrac = "tfrac"
|
|
6
6
|
}
|
|
7
|
-
/**
|
|
8
|
-
* The fraction class make possible to handle
|
|
9
|
-
* \\(\frac{a}{b}\\) or \\[\frac{a}{b}\\] values.
|
|
10
|
-
*/
|
|
11
7
|
export declare class Fraction implements IPiMathObject<Fraction>, IExpression<Fraction> {
|
|
12
8
|
#private;
|
|
13
9
|
constructor();
|
|
14
10
|
constructor(value: InputValue<Fraction>);
|
|
15
11
|
constructor(numerator: number, denominator: number);
|
|
16
|
-
/**
|
|
17
|
-
* Parse the value to get the numerator and denominator
|
|
18
|
-
* @param value : number or string to parse to get the fraction
|
|
19
|
-
*/
|
|
20
12
|
parse: (value: InputValue<Fraction>, denominator?: number) => this;
|
|
21
13
|
clone: () => Fraction;
|
|
22
14
|
copy(value: Fraction): this;
|
|
@@ -34,11 +26,6 @@ export declare class Fraction implements IPiMathObject<Fraction>, IExpression<Fr
|
|
|
34
26
|
abs: () => this;
|
|
35
27
|
add: (F: InputValue<Fraction>) => this;
|
|
36
28
|
amplify: (k: number) => this;
|
|
37
|
-
/**
|
|
38
|
-
* Compare the current coefficient with another coefficient
|
|
39
|
-
* @param F (Coefficient) The coefficient to _compare
|
|
40
|
-
* @param sign (string| default is =): authorized values: =, <, <=, >, >= with some variations.
|
|
41
|
-
*/
|
|
42
29
|
compare: (F: InputValue<Fraction>, sign?: compareSign) => boolean;
|
|
43
30
|
get denominator(): number;
|
|
44
31
|
set denominator(value: number);
|
|
@@ -96,3 +83,4 @@ export declare class Fraction implements IPiMathObject<Fraction>, IExpression<Fr
|
|
|
96
83
|
get withoutSign(): this;
|
|
97
84
|
zero: () => this;
|
|
98
85
|
}
|
|
86
|
+
//# sourceMappingURL=fraction.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Fraction } from
|
|
2
|
-
import { IExpression, InputValue, IPiMathObject } from
|
|
1
|
+
import { Fraction } from "./fraction";
|
|
2
|
+
import type { IExpression, InputValue, IPiMathObject } from "../pimath.interface";
|
|
3
3
|
export declare class Root implements IPiMathObject<Root>, IExpression<Root> {
|
|
4
4
|
#private;
|
|
5
5
|
constructor(value?: InputValue<Root | Fraction>);
|
|
@@ -12,9 +12,6 @@ export declare class Root implements IPiMathObject<Root>, IExpression<Root> {
|
|
|
12
12
|
get factor(): Fraction;
|
|
13
13
|
set factor(value: Fraction);
|
|
14
14
|
from(index: number, radical: InputValue<Fraction>, factor?: InputValue<Fraction>): this;
|
|
15
|
-
/**
|
|
16
|
-
* convert to root(index)(radical), without factor
|
|
17
|
-
*/
|
|
18
15
|
group(): this;
|
|
19
16
|
get index(): number;
|
|
20
17
|
set index(value: number);
|
|
@@ -39,3 +36,4 @@ export declare class Root implements IPiMathObject<Root>, IExpression<Root> {
|
|
|
39
36
|
get withoutSign(): this;
|
|
40
37
|
zero(): this;
|
|
41
38
|
}
|
|
39
|
+
//# sourceMappingURL=root.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Fraction } from
|
|
2
|
-
import { InputValue } from
|
|
1
|
+
import { Fraction } from "../coefficients";
|
|
2
|
+
import type { InputValue } from "../pimath.interface";
|
|
3
3
|
export declare abstract class TupleN {
|
|
4
4
|
#private;
|
|
5
5
|
constructor(...values: InputValue<Fraction>[]);
|
|
@@ -22,3 +22,4 @@ export declare abstract class TupleN {
|
|
|
22
22
|
set z(value: Fraction | number | string);
|
|
23
23
|
zero: () => this;
|
|
24
24
|
}
|
|
25
|
+
//# sourceMappingURL=TupleN.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Line } from
|
|
2
|
-
import { Fraction, Root } from
|
|
3
|
-
import { Equation } from
|
|
4
|
-
import { IPiMathObject } from
|
|
5
|
-
import { Point } from
|
|
1
|
+
import { Line } from "./line";
|
|
2
|
+
import { Fraction, Root } from "../coefficients";
|
|
3
|
+
import { Equation } from "../algebra";
|
|
4
|
+
import { type IPiMathObject } from "../pimath.interface";
|
|
5
|
+
import { Point } from "./point";
|
|
6
6
|
export declare class Circle implements IPiMathObject<Circle> {
|
|
7
7
|
#private;
|
|
8
8
|
constructor();
|
|
@@ -28,20 +28,11 @@ export declare class Circle implements IPiMathObject<Circle> {
|
|
|
28
28
|
getPointsOnCircle(): Point[];
|
|
29
29
|
isPointOnCircle: (P: Point) => boolean;
|
|
30
30
|
isSame(circ: Circle): boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Find the intersection points between the circle and a line. It can be 0, 1 or 2 points.
|
|
33
|
-
* The points are sorted depending on the direction vector of the line.
|
|
34
|
-
* @param L
|
|
35
|
-
*/
|
|
36
31
|
lineIntersection(L: Line): Point[];
|
|
37
32
|
get radius(): Root;
|
|
38
|
-
/**
|
|
39
|
-
* Get the relative position between circle and line. It corresponds to the number of intersection.
|
|
40
|
-
* @param {Line} L
|
|
41
|
-
* @returns {number}
|
|
42
|
-
*/
|
|
43
33
|
relativePosition(L: Line): number;
|
|
44
34
|
setRadius(radius: Fraction | number, square?: boolean): this;
|
|
45
35
|
get squareRadius(): Fraction;
|
|
46
36
|
tangents: (P: Point | Fraction) => Line[];
|
|
47
37
|
}
|
|
38
|
+
//# sourceMappingURL=circle.d.ts.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Fraction } from
|
|
2
|
-
import { Vector } from
|
|
3
|
-
import { Point } from
|
|
1
|
+
import { Fraction } from "../coefficients";
|
|
2
|
+
import type { Vector } from "./vector";
|
|
3
|
+
import type { Point } from "./point";
|
|
4
4
|
type V = Vector | Point;
|
|
5
5
|
export declare function areVectorsEquals(v1: V, v2: V): boolean;
|
|
6
6
|
export declare function areVectorsColinears(v1: V, v2: V): boolean;
|
|
7
7
|
export declare function dotProduct(v1: V, v2: V): Fraction;
|
|
8
8
|
export declare function determinantFromVectors(...values: V[]): Fraction;
|
|
9
9
|
export {};
|
|
10
|
+
//# sourceMappingURL=geomMath.d.ts.map
|
package/types/geometry/line.d.ts
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
import { Fraction } from
|
|
2
|
-
import { Equation } from
|
|
3
|
-
import { Vector } from
|
|
4
|
-
import { InputValue, IPiMathObject, LinePropriety } from
|
|
5
|
-
import { Point } from
|
|
6
|
-
import { Root } from
|
|
1
|
+
import { Fraction } from "../coefficients";
|
|
2
|
+
import { Equation } from "../algebra";
|
|
3
|
+
import { Vector } from "./vector";
|
|
4
|
+
import { type InputValue, type IPiMathObject, LinePropriety } from "../pimath.interface";
|
|
5
|
+
import { Point } from "./point";
|
|
6
|
+
import { Root } from "../coefficients/root";
|
|
7
7
|
export declare class Line implements IPiMathObject<Line> {
|
|
8
8
|
#private;
|
|
9
9
|
static PARALLEL: LinePropriety;
|
|
10
10
|
static PERPENDICULAR: LinePropriety;
|
|
11
|
-
/**
|
|
12
|
-
* Value can be a mix of:
|
|
13
|
-
*
|
|
14
|
-
* @param values
|
|
15
|
-
*/
|
|
16
11
|
constructor(...values: unknown[]);
|
|
17
|
-
/**
|
|
18
|
-
* Parse data to a line
|
|
19
|
-
* @param {any} values
|
|
20
|
-
* @returns {Line}
|
|
21
|
-
*/
|
|
22
12
|
parse: (...values: unknown[]) => this;
|
|
23
13
|
clone: () => Line;
|
|
24
14
|
get tex(): string;
|
|
@@ -73,3 +63,4 @@ export declare class Line implements IPiMathObject<Line> {
|
|
|
73
63
|
simplify: () => this;
|
|
74
64
|
get slope(): Fraction;
|
|
75
65
|
}
|
|
66
|
+
//# sourceMappingURL=line.d.ts.map
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { Fraction } from
|
|
2
|
-
import { Vector } from
|
|
3
|
-
import { Point } from
|
|
4
|
-
import { Line3Propriety } from
|
|
1
|
+
import { Fraction } from "../coefficients/fraction";
|
|
2
|
+
import { Vector } from "./vector";
|
|
3
|
+
import { Point } from "./point";
|
|
4
|
+
import { Line3Propriety } from "../pimath.interface";
|
|
5
5
|
export declare class Line3 {
|
|
6
6
|
#private;
|
|
7
7
|
static PARALLEL: Line3Propriety;
|
|
8
8
|
static PERPENDICULAR: Line3Propriety;
|
|
9
|
-
/**
|
|
10
|
-
* Value can be a mix of:
|
|
11
|
-
*
|
|
12
|
-
* @param values
|
|
13
|
-
*/
|
|
14
9
|
constructor(A: Point, B: Point);
|
|
15
10
|
constructor(A: Point, d: Vector);
|
|
16
11
|
clone: () => this;
|
|
@@ -50,3 +45,4 @@ export declare class Line3 {
|
|
|
50
45
|
randomPoint: (max?: number) => Point;
|
|
51
46
|
simplify: () => this;
|
|
52
47
|
}
|
|
48
|
+
//# sourceMappingURL=line3.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Fraction } from
|
|
2
|
-
import { Line3 } from
|
|
3
|
-
import { Point } from
|
|
4
|
-
import { Vector } from
|
|
5
|
-
import { Plane3Config } from
|
|
1
|
+
import { Fraction } from "../coefficients/fraction";
|
|
2
|
+
import { Line3 } from "./line3";
|
|
3
|
+
import { Point } from "./point";
|
|
4
|
+
import { Vector } from "./vector";
|
|
5
|
+
import type { Plane3Config } from "../pimath.interface";
|
|
6
6
|
export declare class Plane3 {
|
|
7
7
|
#private;
|
|
8
8
|
constructor(config?: Plane3Config);
|
|
@@ -25,3 +25,4 @@ export declare class Plane3 {
|
|
|
25
25
|
get point(): Point;
|
|
26
26
|
set point(value: Point | Vector);
|
|
27
27
|
}
|
|
28
|
+
//# sourceMappingURL=plane3.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Fraction } from
|
|
2
|
-
import { InputValue } from
|
|
3
|
-
import { Root } from
|
|
4
|
-
import { TupleN } from
|
|
5
|
-
import { Vector } from
|
|
1
|
+
import { Fraction } from "../coefficients";
|
|
2
|
+
import type { InputValue } from "../pimath.interface";
|
|
3
|
+
import { Root } from "../coefficients/root";
|
|
4
|
+
import { TupleN } from "./TupleN";
|
|
5
|
+
import type { Vector } from "./vector";
|
|
6
6
|
export declare class Point extends TupleN {
|
|
7
7
|
constructor(...values: (Point | Vector)[] | InputValue<Fraction>[]);
|
|
8
8
|
parse(...values: (Point | Vector)[] | InputValue<Fraction>[]): this;
|
|
@@ -14,3 +14,4 @@ export declare class Point extends TupleN {
|
|
|
14
14
|
isEqualXY(x: InputValue<Fraction>, y: InputValue<Fraction>): boolean;
|
|
15
15
|
middleOf(V1: Point, V2: Point): this;
|
|
16
16
|
}
|
|
17
|
+
//# sourceMappingURL=point.d.ts.map
|