pimath 0.0.132 → 0.0.134
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 +2444 -3566
- package/package.json +37 -20
- package/types/algebra/equation.d.ts +109 -0
- package/types/algebra/equation.d.ts.map +1 -0
- package/types/algebra/equationSolver.d.ts +16 -0
- package/types/algebra/equationSolver.d.ts.map +1 -0
- package/types/algebra/factor.d.ts +47 -0
- package/types/algebra/factor.d.ts.map +1 -0
- package/{dist/maths → types}/algebra/monom.d.ts +98 -131
- package/types/algebra/monom.d.ts.map +1 -0
- package/types/algebra/polyFactor.d.ts +41 -0
- package/types/algebra/polyFactor.d.ts.map +1 -0
- package/types/algebra/polynom.d.ts +126 -0
- package/types/algebra/polynom.d.ts.map +1 -0
- package/types/algebra/rational.d.ts +41 -0
- package/types/algebra/rational.d.ts.map +1 -0
- package/{dist/maths → types}/coefficients/fraction.d.ts +69 -66
- package/types/coefficients/fraction.d.ts.map +1 -0
- package/{dist/maths → types}/coefficients/nthRoot.d.ts +3 -3
- package/{dist/maths → types}/geometry/circle.d.ts +10 -15
- package/types/geometry/circle.d.ts.map +1 -0
- package/types/geometry/geomMath.d.ts +10 -0
- package/types/geometry/geomMath.d.ts.map +1 -0
- package/{dist/maths → types}/geometry/line.d.ts +25 -35
- package/types/geometry/line.d.ts.map +1 -0
- package/types/geometry/line3.d.ts +50 -0
- package/types/geometry/line3.d.ts.map +1 -0
- package/types/geometry/plane3.d.ts +29 -0
- package/types/geometry/plane3.d.ts.map +1 -0
- package/types/geometry/vector.d.ts +70 -0
- package/types/geometry/vector.d.ts.map +1 -0
- package/types/geometry/vector3d.d.ts +37 -0
- package/types/geometry/vector3d.d.ts.map +1 -0
- package/types/index.d.ts +57 -0
- package/types/index.d.ts.map +1 -0
- package/types/numeric.d.ts +39 -0
- package/types/pimath.interface.d.ts +57 -0
- package/types/pimath.interface.d.ts.map +1 -0
- package/types/randomization/algebra/rndEquation.d.ts +4 -0
- package/types/randomization/algebra/rndEquation.d.ts.map +1 -0
- package/types/randomization/algebra/rndMonom.d.ts +4 -0
- package/types/randomization/algebra/rndMonom.d.ts.map +1 -0
- package/types/randomization/algebra/rndPolynom.d.ts +5 -0
- package/types/randomization/algebra/rndPolynom.d.ts.map +1 -0
- package/types/randomization/coefficient/rndFraction.d.ts +4 -0
- package/types/randomization/coefficient/rndFraction.d.ts.map +1 -0
- package/types/randomization/geometry/rndCircle.d.ts +4 -0
- package/types/randomization/geometry/rndCircle.d.ts.map +1 -0
- package/types/randomization/geometry/rndLine.d.ts +4 -0
- package/types/randomization/geometry/rndLine.d.ts.map +1 -0
- package/types/randomization/geometry/rndLine3.d.ts +4 -0
- package/types/randomization/geometry/rndLine3.d.ts.map +1 -0
- package/types/randomization/geometry/rndPoint.d.ts +4 -0
- package/types/randomization/geometry/rndPoint.d.ts.map +1 -0
- package/types/randomization/random.d.ts +20 -0
- package/types/randomization/random.d.ts.map +1 -0
- package/types/randomization/rndHelpers.d.ts +21 -0
- package/types/randomization/rndTypes.d.ts +64 -0
- package/types/randomization/rndTypes.d.ts.map +1 -0
- package/dist/main.d.ts +0 -1
- package/dist/maths/algebra/equation.d.ts +0 -120
- package/dist/maths/algebra/linearSystem.d.ts +0 -40
- package/dist/maths/algebra/logicalset.d.ts +0 -28
- package/dist/maths/algebra/polynom.d.ts +0 -155
- package/dist/maths/algebra/rational.d.ts +0 -44
- package/dist/maths/algebra/study/rationalStudy.d.ts +0 -14
- package/dist/maths/algebra/study.d.ts +0 -140
- package/dist/maths/geometry/point.d.ts +0 -36
- package/dist/maths/geometry/triangle.d.ts +0 -92
- package/dist/maths/geometry/vector.d.ts +0 -38
- package/dist/maths/numeric.d.ts +0 -28
- package/dist/maths/numexp.d.ts +0 -19
- package/dist/maths/randomization/random.d.ts +0 -26
- package/dist/maths/randomization/randomCore.d.ts +0 -7
- package/dist/maths/randomization/rndFraction.d.ts +0 -13
- package/dist/maths/randomization/rndGeometryCircle.d.ts +0 -13
- package/dist/maths/randomization/rndGeometryLine.d.ts +0 -13
- package/dist/maths/randomization/rndGeometryPoint.d.ts +0 -13
- package/dist/maths/randomization/rndHelpers.d.ts +0 -23
- package/dist/maths/randomization/rndMonom.d.ts +0 -13
- package/dist/maths/randomization/rndPolynom.d.ts +0 -14
- package/dist/maths/randomization/rndTypes.d.ts +0 -40
- package/dist/maths/shutingyard.d.ts +0 -59
- package/dist/pimath.d.ts +0 -39
- package/lib/main.ts +0 -1
- package/lib/maths/algebra/equation.ts +0 -891
- package/lib/maths/algebra/linearSystem.ts +0 -369
- package/lib/maths/algebra/logicalset.ts +0 -183
- package/lib/maths/algebra/monom.ts +0 -1027
- package/lib/maths/algebra/polynom.ts +0 -1537
- package/lib/maths/algebra/rational.ts +0 -244
- package/lib/maths/algebra/study/rationalStudy.ts +0 -287
- package/lib/maths/algebra/study.ts +0 -506
- package/lib/maths/coefficients/fraction.ts +0 -593
- package/lib/maths/coefficients/nthRoot.ts +0 -148
- package/lib/maths/geometry/circle.ts +0 -379
- package/lib/maths/geometry/line.ts +0 -604
- package/lib/maths/geometry/point.ts +0 -215
- package/lib/maths/geometry/triangle.ts +0 -368
- package/lib/maths/geometry/vector.ts +0 -243
- package/lib/maths/numeric.ts +0 -162
- package/lib/maths/numexp.ts +0 -198
- package/lib/maths/randomization/random.ts +0 -80
- package/lib/maths/randomization/randomCore.ts +0 -19
- package/lib/maths/randomization/rndFraction.ts +0 -47
- package/lib/maths/randomization/rndGeometryCircle.ts +0 -50
- package/lib/maths/randomization/rndGeometryLine.ts +0 -53
- package/lib/maths/randomization/rndGeometryPoint.ts +0 -69
- package/lib/maths/randomization/rndHelpers.ts +0 -107
- package/lib/maths/randomization/rndMonom.ts +0 -57
- package/lib/maths/randomization/rndPolynom.ts +0 -90
- package/lib/maths/randomization/rndTypes.ts +0 -43
- package/lib/maths/shutingyard.ts +0 -496
- package/lib/pimath.ts +0 -40
|
@@ -1,28 +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 _rawString;
|
|
10
|
-
private _rpn;
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
* @param {string} value (optional) Default polynom to parse on class creation
|
|
14
|
-
*/
|
|
15
|
-
constructor(value: string);
|
|
16
|
-
get isLogicalset(): boolean;
|
|
17
|
-
get rpn(): {
|
|
18
|
-
token: string;
|
|
19
|
-
tokenType: string;
|
|
20
|
-
}[];
|
|
21
|
-
get tex(): string;
|
|
22
|
-
evaluate(tokenSets: {
|
|
23
|
-
[key: string]: unknown[];
|
|
24
|
-
}, reference?: unknown[]): unknown[];
|
|
25
|
-
vennAB(): any[];
|
|
26
|
-
vennABC(): any[];
|
|
27
|
-
private parse;
|
|
28
|
-
}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { ISolution } from './equation';
|
|
2
|
-
import { Fraction } from '../coefficients/fraction';
|
|
3
|
-
import { Token } from '../shutingyard.ts';
|
|
4
|
-
import { literalType, Monom } from './monom';
|
|
5
|
-
|
|
6
|
-
export type PolynomParsingType = string | Polynom | number | Fraction | Monom;
|
|
7
|
-
export interface IEuclidian {
|
|
8
|
-
quotient: Polynom;
|
|
9
|
-
reminder: Polynom;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Polynom class can handle polynoms, reorder, resolve, ...
|
|
13
|
-
* ```
|
|
14
|
-
* let P = new Polynom('3x-4')
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export declare class Polynom {
|
|
18
|
-
private _rawString;
|
|
19
|
-
private _dirty_factors;
|
|
20
|
-
private _dirty_zeroes;
|
|
21
|
-
private _euclidianCache;
|
|
22
|
-
private _factors;
|
|
23
|
-
private _monoms;
|
|
24
|
-
private _texString;
|
|
25
|
-
private _zeroes;
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @param {string} polynomString (optional) Default polynom to parse on class creation
|
|
29
|
-
* @param values
|
|
30
|
-
*/
|
|
31
|
-
constructor(polynomString?: PolynomParsingType, ...values: unknown[]);
|
|
32
|
-
get dirty_factors(): boolean;
|
|
33
|
-
set dirty_factors(value: boolean);
|
|
34
|
-
get dirty_zeroes(): boolean;
|
|
35
|
-
set dirty_zeroes(value: boolean);
|
|
36
|
-
get euclidianCache(): {
|
|
37
|
-
[p: string]: IEuclidian;
|
|
38
|
-
};
|
|
39
|
-
set euclidianCache(value: {
|
|
40
|
-
[p: string]: IEuclidian;
|
|
41
|
-
});
|
|
42
|
-
get factors(): Polynom[];
|
|
43
|
-
set factors(value: Polynom[]);
|
|
44
|
-
get monoms(): Monom[];
|
|
45
|
-
set monoms(M: Monom[]);
|
|
46
|
-
get texString(): string;
|
|
47
|
-
get zeroes(): ISolution[];
|
|
48
|
-
get texFactors(): string;
|
|
49
|
-
get displayFactors(): string;
|
|
50
|
-
get length(): number;
|
|
51
|
-
get display(): string;
|
|
52
|
-
get raw(): string;
|
|
53
|
-
get tex(): string;
|
|
54
|
-
get isMultiVariable(): boolean;
|
|
55
|
-
get variables(): string[];
|
|
56
|
-
get numberOfVars(): number;
|
|
57
|
-
get plotFunction(): string;
|
|
58
|
-
mark_as_dirty: () => void;
|
|
59
|
-
addToken: (stack: Polynom[], element: Token) => void;
|
|
60
|
-
/**
|
|
61
|
-
* Parse a string to a polynom.
|
|
62
|
-
* @param inputStr
|
|
63
|
-
* @param values: as string, numbers or fractions
|
|
64
|
-
*/
|
|
65
|
-
parse: (inputStr: PolynomParsingType, ...values: unknown[]) => Polynom;
|
|
66
|
-
/**
|
|
67
|
-
* Clone the polynom
|
|
68
|
-
*/
|
|
69
|
-
clone: () => Polynom;
|
|
70
|
-
/**
|
|
71
|
-
* Set the polynom to zero.
|
|
72
|
-
* @returns {this}
|
|
73
|
-
*/
|
|
74
|
-
zero: () => Polynom;
|
|
75
|
-
one: () => Polynom;
|
|
76
|
-
empty: () => Polynom;
|
|
77
|
-
opposed: () => Polynom;
|
|
78
|
-
add: (...values: unknown[]) => Polynom;
|
|
79
|
-
subtract: (...values: unknown[]) => Polynom;
|
|
80
|
-
multiply: (value: unknown) => Polynom;
|
|
81
|
-
/**
|
|
82
|
-
* Divide the current polynom by another polynom.
|
|
83
|
-
* @param P
|
|
84
|
-
* returns {quotient: Polynom, reminder: Polynom}
|
|
85
|
-
*/
|
|
86
|
-
euclidian: (P: Polynom) => IEuclidian;
|
|
87
|
-
divide: (value: unknown) => Polynom;
|
|
88
|
-
pow: (nb: number) => Polynom;
|
|
89
|
-
/**
|
|
90
|
-
* Compare the current coefficient with another coefficient
|
|
91
|
-
* @param P
|
|
92
|
-
* @param sign (string| default is =): authorized values: =, <, <=, >, >= with some variations.
|
|
93
|
-
*/
|
|
94
|
-
compare: (P: Polynom, sign?: string) => boolean;
|
|
95
|
-
isZero(): boolean;
|
|
96
|
-
isOne(): boolean;
|
|
97
|
-
isEqual: (P: Polynom) => boolean;
|
|
98
|
-
isSameAs: (P: Polynom) => boolean;
|
|
99
|
-
isOpposedAt: (P: Polynom) => boolean;
|
|
100
|
-
isFactorized: (polynomString: string, soft?: boolean) => boolean;
|
|
101
|
-
isReduced: (polynomString: string) => Boolean;
|
|
102
|
-
isDeveloped: (polynomString: string) => Boolean;
|
|
103
|
-
reduce: () => Polynom;
|
|
104
|
-
reorder: (letter?: string, revert?: boolean) => Polynom;
|
|
105
|
-
degree: (letter?: string) => Fraction;
|
|
106
|
-
letters: () => string[];
|
|
107
|
-
/**
|
|
108
|
-
* Replace a variable (letter) by a polynom.
|
|
109
|
-
* @param letter
|
|
110
|
-
* @param P
|
|
111
|
-
*/
|
|
112
|
-
replaceBy: (letter: string, P: Polynom) => Polynom;
|
|
113
|
-
evaluate: (values: literalType | Fraction | number) => Fraction;
|
|
114
|
-
evaluateAsNumeric: (values: number | {
|
|
115
|
-
[Key: string]: number;
|
|
116
|
-
}) => number;
|
|
117
|
-
derivative: (letter?: string) => Polynom;
|
|
118
|
-
primitive: (letter?: string) => Polynom;
|
|
119
|
-
integrate: (a: Fraction | number, b: Fraction | number, letter?: string) => Fraction;
|
|
120
|
-
/**
|
|
121
|
-
* Factorize a polynom and store the best results in factors.
|
|
122
|
-
* @param maxValue Defines the greatest value to search to (default is 20).
|
|
123
|
-
*/
|
|
124
|
-
factorize: (letter?: string) => Polynom[];
|
|
125
|
-
isDividableBy: (div: Polynom) => boolean;
|
|
126
|
-
getZeroes: () => ISolution[];
|
|
127
|
-
monomByDegree: (degree?: Fraction | number, letter?: string) => Monom;
|
|
128
|
-
monomsByDegree: (degree?: number | Fraction, letter?: string) => Monom[];
|
|
129
|
-
monomByLetter: (letter: string) => Monom;
|
|
130
|
-
getDenominators: () => number[];
|
|
131
|
-
getNumerators: () => number[];
|
|
132
|
-
lcmDenominator: () => number;
|
|
133
|
-
gcdDenominator: () => number;
|
|
134
|
-
lcmNumerator: () => number;
|
|
135
|
-
gcdNumerator: () => number;
|
|
136
|
-
commonMonom: () => Monom;
|
|
137
|
-
limitToInfinity: (letter?: string) => Fraction;
|
|
138
|
-
limitToNegativeInfinity: (letter?: string) => Fraction;
|
|
139
|
-
private _getAllPotentialFactors;
|
|
140
|
-
private _parseString;
|
|
141
|
-
private genDisplay;
|
|
142
|
-
/**
|
|
143
|
-
* Main parse using a shutting yard class
|
|
144
|
-
* @param inputStr
|
|
145
|
-
*/
|
|
146
|
-
private shutingYardToReducedPolynom;
|
|
147
|
-
private multiplyByPolynom;
|
|
148
|
-
private multiplyByFraction;
|
|
149
|
-
private multiplyByInteger;
|
|
150
|
-
private multiplyByMonom;
|
|
151
|
-
private divideByInteger;
|
|
152
|
-
private divideByFraction;
|
|
153
|
-
private _factorize2ndDegree;
|
|
154
|
-
private _factorizeByGroups;
|
|
155
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { StudyConfig } from './study';
|
|
2
|
-
import { RationalStudy } from './study/rationalStudy';
|
|
3
|
-
import { literalType } from './monom';
|
|
4
|
-
import { Fraction } from '../coefficients/fraction';
|
|
5
|
-
import { IEuclidian, Polynom } from './polynom';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Rational class can handle rational polynoms
|
|
9
|
-
*/
|
|
10
|
-
export declare class Rational {
|
|
11
|
-
private _denominator;
|
|
12
|
-
private _numerator;
|
|
13
|
-
private _rawString;
|
|
14
|
-
/**
|
|
15
|
-
*
|
|
16
|
-
* @param numerator
|
|
17
|
-
* @param denominator
|
|
18
|
-
*/
|
|
19
|
-
constructor(numerator?: Polynom | string, denominator?: Polynom | string);
|
|
20
|
-
get numerator(): Polynom;
|
|
21
|
-
get denominator(): Polynom;
|
|
22
|
-
get tex(): string;
|
|
23
|
-
get display(): string;
|
|
24
|
-
get texFactors(): string;
|
|
25
|
-
get displayFactors(): string;
|
|
26
|
-
get plotFunction(): string;
|
|
27
|
-
clone: () => Rational;
|
|
28
|
-
domain: () => string;
|
|
29
|
-
amplify: (P: Polynom) => Rational;
|
|
30
|
-
derivative: (letter?: string) => Rational;
|
|
31
|
-
factorize: (letter?: string) => Rational;
|
|
32
|
-
simplify: (P: Polynom) => Rational;
|
|
33
|
-
reduce: () => Rational;
|
|
34
|
-
opposed: () => Rational;
|
|
35
|
-
add: (R: Rational) => Rational;
|
|
36
|
-
subtract: (R: Rational) => Rational;
|
|
37
|
-
euclidian: () => IEuclidian;
|
|
38
|
-
limits: (value: Fraction | number, offset?: string, letter?: string) => Fraction;
|
|
39
|
-
evaluate: (values: literalType | Fraction | number) => Fraction;
|
|
40
|
-
evaluateAsNumeric: (values: number | {
|
|
41
|
-
[Key: string]: number;
|
|
42
|
-
}) => number;
|
|
43
|
-
study: (config?: StudyConfig | string) => RationalStudy;
|
|
44
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Rational } from '../rational';
|
|
2
|
-
import { ASYMPTOTE_POSITION, IAsymptote, ITableOfSigns, IZero, Study, StudyableFunction, StudyConfig } from '../study';
|
|
3
|
-
|
|
4
|
-
export declare class RationalStudy extends Study {
|
|
5
|
-
constructor(fx: StudyableFunction, config?: StudyConfig | string);
|
|
6
|
-
makeZeroes(): IZero[];
|
|
7
|
-
makeSigns(): ITableOfSigns;
|
|
8
|
-
makeAsymptotes(): IAsymptote[];
|
|
9
|
-
_getHorizontalAsymptoteRelativePositon(deltaX: Rational, delta?: number): ASYMPTOTE_POSITION[];
|
|
10
|
-
makeDerivative(): ITableOfSigns;
|
|
11
|
-
makeVariation(): ITableOfSigns;
|
|
12
|
-
private _getZeroes;
|
|
13
|
-
private _getSigns;
|
|
14
|
-
}
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { Polynom } from './polynom';
|
|
2
|
-
import { ISolution } from './equation';
|
|
3
|
-
import { Rational } from './rational';
|
|
4
|
-
|
|
5
|
-
export type StudyableFunction = Rational;
|
|
6
|
-
export declare enum ZEROTYPE {
|
|
7
|
-
ZERO = "z",
|
|
8
|
-
DEFENCE = "d",
|
|
9
|
-
NOTHING = "t"
|
|
10
|
-
}
|
|
11
|
-
export interface IZero extends ISolution {
|
|
12
|
-
extrema: FUNCTION_EXTREMA;
|
|
13
|
-
type: ZEROTYPE;
|
|
14
|
-
}
|
|
15
|
-
export declare enum ASYMPTOTE {
|
|
16
|
-
VERTICAL = "av",
|
|
17
|
-
HORIZONTAL = "ah",
|
|
18
|
-
SLOPE = "ao",
|
|
19
|
-
HOLE = "hole"
|
|
20
|
-
}
|
|
21
|
-
export declare enum ASYMPTOTE_POSITION {
|
|
22
|
-
"LT" = "LT",
|
|
23
|
-
"RT" = "RT",
|
|
24
|
-
"LB" = "LB",
|
|
25
|
-
"RB" = "RB"
|
|
26
|
-
}
|
|
27
|
-
export interface IAsymptote {
|
|
28
|
-
deltaX: StudyableFunction;
|
|
29
|
-
display: string;
|
|
30
|
-
fx: Polynom;
|
|
31
|
-
limits: string;
|
|
32
|
-
position: ASYMPTOTE_POSITION[];
|
|
33
|
-
tableOfSign: ITableOfSigns;
|
|
34
|
-
tex: string;
|
|
35
|
-
type: ASYMPTOTE;
|
|
36
|
-
zero: IZero;
|
|
37
|
-
}
|
|
38
|
-
export declare enum FUNCTION_EXTREMA {
|
|
39
|
-
MIN = "min",
|
|
40
|
-
MAX = "max",
|
|
41
|
-
FLAT = "flat",
|
|
42
|
-
NOTHING = ""
|
|
43
|
-
}
|
|
44
|
-
export interface IExtrema {
|
|
45
|
-
tex: {
|
|
46
|
-
x: string;
|
|
47
|
-
y: string;
|
|
48
|
-
};
|
|
49
|
-
type: FUNCTION_EXTREMA;
|
|
50
|
-
value: {
|
|
51
|
-
x: number;
|
|
52
|
-
y: number;
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
export interface ITableOfSigns {
|
|
56
|
-
extremes: {
|
|
57
|
-
[Key: string]: IExtrema;
|
|
58
|
-
};
|
|
59
|
-
factors: Polynom[];
|
|
60
|
-
fx: StudyableFunction;
|
|
61
|
-
signs: (string[])[];
|
|
62
|
-
tex: string;
|
|
63
|
-
type: TABLE_OF_SIGNS;
|
|
64
|
-
zeroes: IZero[];
|
|
65
|
-
}
|
|
66
|
-
export declare enum TABLE_OF_SIGNS {
|
|
67
|
-
SIGNS = "signs",
|
|
68
|
-
GROWS = "grows",
|
|
69
|
-
VARIATIONS = "variatins"
|
|
70
|
-
}
|
|
71
|
-
export interface StudyConfig {
|
|
72
|
-
asymptotes?: boolean;
|
|
73
|
-
derivative?: boolean;
|
|
74
|
-
domain?: boolean;
|
|
75
|
-
name?: string;
|
|
76
|
-
variable?: string;
|
|
77
|
-
signs?: boolean;
|
|
78
|
-
variations?: boolean;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* The study class is a "function study" class that will get:
|
|
82
|
-
* fx : get the function
|
|
83
|
-
* domain : string
|
|
84
|
-
* zeroes : Object (tex, IZero)
|
|
85
|
-
* signs : table of signs + tex output using tkz-tab
|
|
86
|
-
* av : vertical asymptotic
|
|
87
|
-
* ah : horizontal asymptotic
|
|
88
|
-
* ao : obliques
|
|
89
|
-
* deltaX : position relative
|
|
90
|
-
* dx : derivative
|
|
91
|
-
* grows : growing table + tex output using tkz-tab
|
|
92
|
-
* ddx : dérivée seconde
|
|
93
|
-
* variations : variation table + tex output using tkz-tab
|
|
94
|
-
*/
|
|
95
|
-
export declare class Study {
|
|
96
|
-
fx: StudyableFunction;
|
|
97
|
-
private _asymptotes;
|
|
98
|
-
private _derivative;
|
|
99
|
-
private _signs;
|
|
100
|
-
private _variations;
|
|
101
|
-
private _zeroes;
|
|
102
|
-
private _config;
|
|
103
|
-
private _name;
|
|
104
|
-
constructor(fx: StudyableFunction, config?: StudyConfig | string);
|
|
105
|
-
get name(): string;
|
|
106
|
-
set name(value: string);
|
|
107
|
-
get config(): StudyConfig;
|
|
108
|
-
set config(value: StudyConfig);
|
|
109
|
-
get zeroes(): IZero[];
|
|
110
|
-
get domain(): string;
|
|
111
|
-
get signs(): ITableOfSigns;
|
|
112
|
-
get asymptotes(): IAsymptote[];
|
|
113
|
-
get derivative(): ITableOfSigns;
|
|
114
|
-
get texSigns(): string;
|
|
115
|
-
get texGrows(): string;
|
|
116
|
-
get texVariations(): string;
|
|
117
|
-
makeStudy: () => void;
|
|
118
|
-
indexOfZero: (zeroes: IZero[], zero: IZero | ISolution) => number;
|
|
119
|
-
makeOneLineForSigns: (factor: Polynom, zeroes: IZero[], zeroSign: ZEROTYPE) => string[];
|
|
120
|
-
makeSignsResult: (signs: (string[])[]) => string[];
|
|
121
|
-
makeGrowsResult: (tos: ITableOfSigns) => {
|
|
122
|
-
growsLine: string[];
|
|
123
|
-
extremes: {
|
|
124
|
-
[Key: string]: IExtrema;
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
makeVariationsResult: (tos: ITableOfSigns) => {
|
|
128
|
-
varsLine: string[];
|
|
129
|
-
extremes: {
|
|
130
|
-
[Key: string]: IExtrema;
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
makeZeroes(): IZero[];
|
|
134
|
-
makeSigns(): ITableOfSigns;
|
|
135
|
-
makeAsymptotes(): IAsymptote[];
|
|
136
|
-
makeDerivative(): ITableOfSigns;
|
|
137
|
-
makeVariation(): ITableOfSigns;
|
|
138
|
-
drawCode: () => string;
|
|
139
|
-
private _makeTexFromTableOfSigns;
|
|
140
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Fraction } from '../coefficients/fraction';
|
|
2
|
-
import { Vector } from './vector';
|
|
3
|
-
import { Line } from './line';
|
|
4
|
-
|
|
5
|
-
export declare class Point {
|
|
6
|
-
private _x;
|
|
7
|
-
private _y;
|
|
8
|
-
private _exist;
|
|
9
|
-
constructor(...values: unknown[]);
|
|
10
|
-
get x(): Fraction;
|
|
11
|
-
set x(value: Fraction);
|
|
12
|
-
get y(): Fraction;
|
|
13
|
-
set y(value: Fraction);
|
|
14
|
-
get tex(): string;
|
|
15
|
-
get display(): string;
|
|
16
|
-
get asVector(): Vector;
|
|
17
|
-
get key(): string;
|
|
18
|
-
static pmatrix: (a: any, b: any, c?: any) => string;
|
|
19
|
-
parse: (...values: unknown[]) => Point;
|
|
20
|
-
clone: () => Point;
|
|
21
|
-
zero: () => Point;
|
|
22
|
-
origin: () => Point;
|
|
23
|
-
middleOf: (P1: Point, P2: Point) => Point;
|
|
24
|
-
translate: (value: {
|
|
25
|
-
x: number | Fraction;
|
|
26
|
-
y: number | Fraction;
|
|
27
|
-
}) => Point;
|
|
28
|
-
texValues: (numberOfDigits: number) => string;
|
|
29
|
-
distanceTo: (item: Point | Line) => {
|
|
30
|
-
value: number;
|
|
31
|
-
fraction: Fraction;
|
|
32
|
-
tex: string;
|
|
33
|
-
};
|
|
34
|
-
isInListOfPoints: (list: Point[]) => boolean;
|
|
35
|
-
isEqual: (pt: Point) => boolean;
|
|
36
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { Line } from './line';
|
|
2
|
-
import { Vector } from './vector';
|
|
3
|
-
import { Point } from './point';
|
|
4
|
-
|
|
5
|
-
export interface remarquableLines {
|
|
6
|
-
'medians': {
|
|
7
|
-
'A': Line;
|
|
8
|
-
'B': Line;
|
|
9
|
-
'C': Line;
|
|
10
|
-
'intersection': Point;
|
|
11
|
-
};
|
|
12
|
-
'mediators': {
|
|
13
|
-
'AB': Line;
|
|
14
|
-
'AC': Line;
|
|
15
|
-
'BC': Line;
|
|
16
|
-
'intersection': Point;
|
|
17
|
-
};
|
|
18
|
-
'heights': {
|
|
19
|
-
'A': Line;
|
|
20
|
-
'B': Line;
|
|
21
|
-
'C': Line;
|
|
22
|
-
'intersection': Point;
|
|
23
|
-
};
|
|
24
|
-
'bisectors': {
|
|
25
|
-
'A': Line;
|
|
26
|
-
'B': Line;
|
|
27
|
-
'C': Line;
|
|
28
|
-
'intersection': Point;
|
|
29
|
-
};
|
|
30
|
-
externalBisectors: {
|
|
31
|
-
'A': Line;
|
|
32
|
-
'B': Line;
|
|
33
|
-
'C': Line;
|
|
34
|
-
'intersection': Point;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export declare class Triangle {
|
|
38
|
-
private _A;
|
|
39
|
-
private _B;
|
|
40
|
-
private _C;
|
|
41
|
-
private _lines;
|
|
42
|
-
private _middles;
|
|
43
|
-
private _remarquables;
|
|
44
|
-
constructor(...values: unknown[]);
|
|
45
|
-
get A(): Point;
|
|
46
|
-
get B(): Point;
|
|
47
|
-
get C(): Point;
|
|
48
|
-
get AB(): Vector;
|
|
49
|
-
get BA(): Vector;
|
|
50
|
-
get BC(): Vector;
|
|
51
|
-
get CB(): Vector;
|
|
52
|
-
get AC(): Vector;
|
|
53
|
-
get CA(): Vector;
|
|
54
|
-
get isRectangle(): boolean;
|
|
55
|
-
get isEquilateral(): boolean;
|
|
56
|
-
get isIsocele(): boolean;
|
|
57
|
-
get lines(): {
|
|
58
|
-
'AB': Line;
|
|
59
|
-
'BC': Line;
|
|
60
|
-
'AC': Line;
|
|
61
|
-
};
|
|
62
|
-
get remarquables(): remarquableLines;
|
|
63
|
-
/**
|
|
64
|
-
* Parse values to a triangle. Supported formats:
|
|
65
|
-
* Point, Point, Point
|
|
66
|
-
* x1, y1, x2, y2, x3, y3
|
|
67
|
-
* TODO: Something else ?
|
|
68
|
-
* @param values
|
|
69
|
-
*/
|
|
70
|
-
parse: (...values: any) => Triangle;
|
|
71
|
-
/**
|
|
72
|
-
* Clone the Triangle class
|
|
73
|
-
*/
|
|
74
|
-
clone: () => Triangle;
|
|
75
|
-
/**
|
|
76
|
-
* Generate the Line object for the three segments of the triangle
|
|
77
|
-
*/
|
|
78
|
-
private _updateTriangle;
|
|
79
|
-
/**
|
|
80
|
-
* Get the Point class for the given name
|
|
81
|
-
* @param ptName
|
|
82
|
-
*/
|
|
83
|
-
private getPointByName;
|
|
84
|
-
/**
|
|
85
|
-
* Get the vector for the segment given by name.
|
|
86
|
-
* @param ptName1
|
|
87
|
-
* @param ptName2
|
|
88
|
-
*/
|
|
89
|
-
private getSegment;
|
|
90
|
-
private _calculateRemarquableLines;
|
|
91
|
-
private _calculateBisectors;
|
|
92
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Point } from './point';
|
|
2
|
-
import { Fraction } from '../coefficients/fraction';
|
|
3
|
-
|
|
4
|
-
export declare class Vector {
|
|
5
|
-
private _x;
|
|
6
|
-
private _y;
|
|
7
|
-
constructor(...values: unknown[]);
|
|
8
|
-
get x(): Fraction;
|
|
9
|
-
set x(value: Fraction | number | string);
|
|
10
|
-
get y(): Fraction;
|
|
11
|
-
set y(value: Fraction | number | string);
|
|
12
|
-
get normSquare(): Fraction;
|
|
13
|
-
get norm(): number;
|
|
14
|
-
get tex(): string;
|
|
15
|
-
get asPoint(): Point;
|
|
16
|
-
get isNull(): boolean;
|
|
17
|
-
static scalarProduct: (v1: Vector, v2: Vector) => Fraction;
|
|
18
|
-
static determinant: (v1: Vector, v2: Vector) => Fraction;
|
|
19
|
-
parse: (...values: any) => Vector;
|
|
20
|
-
clone: () => Vector;
|
|
21
|
-
reset: () => Vector;
|
|
22
|
-
zero: () => Vector;
|
|
23
|
-
one: () => Vector;
|
|
24
|
-
opposed: () => Vector;
|
|
25
|
-
add: (V: Vector) => Vector;
|
|
26
|
-
subtract: (V: Vector) => Vector;
|
|
27
|
-
scalarProductWithVector: (V: Vector) => Fraction;
|
|
28
|
-
determinantWithVector: (V: Vector) => Fraction;
|
|
29
|
-
normal: () => Vector;
|
|
30
|
-
isColinearTo: (v: Vector) => boolean;
|
|
31
|
-
isNormalTo: (v: Vector) => boolean;
|
|
32
|
-
multiplyByScalar: (k: any) => Vector;
|
|
33
|
-
divideByScalar: (k: any) => Vector;
|
|
34
|
-
simplify: () => Vector;
|
|
35
|
-
simplifyDirection: () => Vector;
|
|
36
|
-
angleWith: (V: Vector, sharp?: Boolean, radian?: Boolean) => number;
|
|
37
|
-
private _parseString;
|
|
38
|
-
}
|
package/dist/maths/numeric.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export declare class Numeric {
|
|
2
|
-
static round(value: number, decimals?: number): number;
|
|
3
|
-
/**
|
|
4
|
-
* Get the list of the nth first prime numbers.
|
|
5
|
-
* @param nb : number of primes to choose from
|
|
6
|
-
*/
|
|
7
|
-
static primes(nb?: number): number[];
|
|
8
|
-
/**
|
|
9
|
-
* Get the list of all dividers of a number.
|
|
10
|
-
* @param value
|
|
11
|
-
*/
|
|
12
|
-
static dividers(value: number): number[];
|
|
13
|
-
/**
|
|
14
|
-
* Great Common Divisor
|
|
15
|
-
* @param values : number values
|
|
16
|
-
*/
|
|
17
|
-
static gcd(...values: number[]): number;
|
|
18
|
-
static divideNumbersByGCD(...values: number[]): number[];
|
|
19
|
-
/**
|
|
20
|
-
* Least Common Multiple
|
|
21
|
-
* @param values: list of numbers
|
|
22
|
-
*/
|
|
23
|
-
static lcm(...values: number[]): number;
|
|
24
|
-
static pythagoricianTripletsWithTarget(target: number, targetIsSquare?: boolean): number[][];
|
|
25
|
-
static numberCorrection(value: number, epsilonDigit?: number, epsilonNumberOfDigits?: number, number_of_digits?: number): number;
|
|
26
|
-
static periodic(value: number): number;
|
|
27
|
-
static decompose(value: number): number[][];
|
|
28
|
-
}
|
package/dist/maths/numexp.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare class NumExp {
|
|
2
|
-
private _rpn;
|
|
3
|
-
private _expression;
|
|
4
|
-
private _isValid;
|
|
5
|
-
constructor(value: string, uniformize?: boolean);
|
|
6
|
-
get rpn(): {
|
|
7
|
-
token: string;
|
|
8
|
-
tokenType: string;
|
|
9
|
-
}[];
|
|
10
|
-
get isValid(): boolean;
|
|
11
|
-
set isValid(value: boolean);
|
|
12
|
-
get expression(): string;
|
|
13
|
-
evaluate(values?: {
|
|
14
|
-
[Key: string]: number;
|
|
15
|
-
}): number;
|
|
16
|
-
private _extractDecimalPart;
|
|
17
|
-
private _numberCorrection;
|
|
18
|
-
private _addToStack;
|
|
19
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Circle } from '../geometry/circle';
|
|
2
|
-
import { Point } from '../geometry/point';
|
|
3
|
-
import { Line } from '../geometry/line';
|
|
4
|
-
import { Fraction } from '../coefficients/fraction';
|
|
5
|
-
import { Monom } from '../algebra/monom';
|
|
6
|
-
import { Polynom } from '../algebra/polynom';
|
|
7
|
-
import { randomCoefficientConfig, randomGeometryCircleConfig, randomGeometryLineConfig, randomGeometryPointConfig, randomMonomConfig, randomPolynomConfig } from './rndTypes';
|
|
8
|
-
|
|
9
|
-
export * from './rndTypes';
|
|
10
|
-
export declare namespace Random {
|
|
11
|
-
function polynom(config?: randomPolynomConfig): Polynom;
|
|
12
|
-
function monom(config?: randomMonomConfig): Monom;
|
|
13
|
-
function fraction(config?: randomCoefficientConfig): Fraction;
|
|
14
|
-
function number(from: number, to: number, exclude?: number[]): number;
|
|
15
|
-
function numberSym(max: number, allowZero?: boolean): number;
|
|
16
|
-
function prime(max: number): number;
|
|
17
|
-
function bool(percent?: number): boolean;
|
|
18
|
-
function array(arr: any[], number?: number): any[];
|
|
19
|
-
function item(arr: any[]): any;
|
|
20
|
-
function shuffle(arr: any[]): any[];
|
|
21
|
-
namespace Geometry {
|
|
22
|
-
function line(config?: randomGeometryLineConfig): Line;
|
|
23
|
-
function point(config?: randomGeometryPointConfig): Point;
|
|
24
|
-
function circle(config?: randomGeometryCircleConfig): Circle;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Fraction } from '../coefficients/fraction';
|
|
2
|
-
import { randomCoefficientConfig } from './rndTypes';
|
|
3
|
-
import { randomCore } from './randomCore';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Create a random monom based on a based configuration
|
|
7
|
-
*/
|
|
8
|
-
export declare class rndFraction extends randomCore {
|
|
9
|
-
protected _config: randomCoefficientConfig;
|
|
10
|
-
protected _defaultConfig: randomCoefficientConfig;
|
|
11
|
-
constructor(userConfig?: randomCoefficientConfig);
|
|
12
|
-
generate: () => Fraction;
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Circle } from '../geometry/circle';
|
|
2
|
-
import { randomGeometryCircleConfig } from './random';
|
|
3
|
-
import { randomCore } from './randomCore';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Create a random monom based on a based configuration
|
|
7
|
-
*/
|
|
8
|
-
export declare class rndGeometryCircle extends randomCore {
|
|
9
|
-
protected _config: randomGeometryCircleConfig;
|
|
10
|
-
protected _defaultConfig: randomGeometryCircleConfig;
|
|
11
|
-
generate: () => Circle;
|
|
12
|
-
constructor(userConfig?: randomGeometryCircleConfig);
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Line } from '../geometry/line';
|
|
2
|
-
import { randomGeometryLineConfig } from './random';
|
|
3
|
-
import { randomCore } from './randomCore';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Create a random monom based on a based configuration
|
|
7
|
-
*/
|
|
8
|
-
export declare class rndGeometryLine extends randomCore {
|
|
9
|
-
protected _config: randomGeometryLineConfig;
|
|
10
|
-
protected _defaultConfig: randomGeometryLineConfig;
|
|
11
|
-
constructor(userConfig?: randomGeometryLineConfig);
|
|
12
|
-
generate: () => Line;
|
|
13
|
-
}
|