pimath 0.0.133 → 0.1.0

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 (94) hide show
  1. package/dist/pimath.js +2888 -3590
  2. package/package.json +38 -20
  3. package/types/algebra/equation.d.ts +102 -0
  4. package/types/algebra/equation.d.ts.map +1 -0
  5. package/types/algebra/equationSolver.d.ts +10 -0
  6. package/types/algebra/equationSolver.d.ts.map +1 -0
  7. package/types/algebra/factor.d.ts +46 -0
  8. package/types/algebra/factor.d.ts.map +1 -0
  9. package/types/algebra/linearSystem.d.ts +37 -0
  10. package/types/algebra/linearSystem.d.ts.map +1 -0
  11. package/{dist/maths → types}/algebra/monom.d.ts +95 -133
  12. package/types/algebra/monom.d.ts.map +1 -0
  13. package/types/algebra/polyFactor.d.ts +43 -0
  14. package/types/algebra/polyFactor.d.ts.map +1 -0
  15. package/types/algebra/polynom.d.ts +107 -0
  16. package/types/algebra/polynom.d.ts.map +1 -0
  17. package/types/algebra/rational.d.ts +41 -0
  18. package/types/algebra/rational.d.ts.map +1 -0
  19. package/{dist/maths → types}/coefficients/fraction.d.ts +69 -67
  20. package/types/coefficients/fraction.d.ts.map +1 -0
  21. package/{dist/maths → types}/coefficients/nthRoot.d.ts +4 -7
  22. package/types/coefficients/nthRoot.d.ts.map +1 -0
  23. package/{dist/maths → types}/geometry/circle.d.ts +14 -21
  24. package/types/geometry/circle.d.ts.map +1 -0
  25. package/types/geometry/geomMath.d.ts +9 -0
  26. package/types/geometry/geomMath.d.ts.map +1 -0
  27. package/types/geometry/line.d.ts +83 -0
  28. package/types/geometry/line.d.ts.map +1 -0
  29. package/types/geometry/line3.d.ts +58 -0
  30. package/types/geometry/line3.d.ts.map +1 -0
  31. package/types/geometry/matrix.d.ts +12 -0
  32. package/types/geometry/matrix.d.ts.map +1 -0
  33. package/types/geometry/plane3.d.ts +36 -0
  34. package/types/geometry/plane3.d.ts.map +1 -0
  35. package/types/geometry/point.d.ts +12 -0
  36. package/types/geometry/point.d.ts.map +1 -0
  37. package/{dist/maths → types}/geometry/triangle.d.ts +11 -34
  38. package/types/geometry/triangle.d.ts.map +1 -0
  39. package/types/geometry/vector.d.ts +55 -0
  40. package/types/geometry/vector.d.ts.map +1 -0
  41. package/types/geometry/vector3d.d.ts +37 -0
  42. package/types/geometry/vector3d.d.ts.map +1 -0
  43. package/types/helpers.d.ts +3 -0
  44. package/types/helpers.d.ts.map +1 -0
  45. package/types/index.d.ts +59 -0
  46. package/types/index.d.ts.map +1 -0
  47. package/types/numeric.d.ts +39 -0
  48. package/types/pimath.interface.d.ts +57 -0
  49. package/types/pimath.interface.d.ts.map +1 -0
  50. package/types/randomization/algebra/rndEquation.d.ts +4 -0
  51. package/types/randomization/algebra/rndEquation.d.ts.map +1 -0
  52. package/types/randomization/algebra/rndMonom.d.ts +4 -0
  53. package/types/randomization/algebra/rndMonom.d.ts.map +1 -0
  54. package/types/randomization/algebra/rndPolynom.d.ts +5 -0
  55. package/types/randomization/algebra/rndPolynom.d.ts.map +1 -0
  56. package/types/randomization/coefficient/rndFraction.d.ts +4 -0
  57. package/types/randomization/coefficient/rndFraction.d.ts.map +1 -0
  58. package/types/randomization/geometry/rndCircle.d.ts +4 -0
  59. package/types/randomization/geometry/rndCircle.d.ts.map +1 -0
  60. package/types/randomization/geometry/rndLine.d.ts +4 -0
  61. package/types/randomization/geometry/rndLine.d.ts.map +1 -0
  62. package/types/randomization/geometry/rndLine3.d.ts +4 -0
  63. package/types/randomization/geometry/rndLine3.d.ts.map +1 -0
  64. package/types/randomization/geometry/rndPoint.d.ts +4 -0
  65. package/types/randomization/geometry/rndPoint.d.ts.map +1 -0
  66. package/types/randomization/random.d.ts +20 -0
  67. package/types/randomization/random.d.ts.map +1 -0
  68. package/types/randomization/rndHelpers.d.ts +21 -0
  69. package/types/randomization/rndTypes.d.ts +64 -0
  70. package/types/randomization/rndTypes.d.ts.map +1 -0
  71. package/dist/main.d.ts +0 -39
  72. package/dist/maths/algebra/equation.d.ts +0 -120
  73. package/dist/maths/algebra/linearSystem.d.ts +0 -40
  74. package/dist/maths/algebra/logicalset.d.ts +0 -28
  75. package/dist/maths/algebra/polynom.d.ts +0 -155
  76. package/dist/maths/algebra/rational.d.ts +0 -44
  77. package/dist/maths/algebra/study/rationalStudy.d.ts +0 -14
  78. package/dist/maths/algebra/study.d.ts +0 -140
  79. package/dist/maths/geometry/line.d.ts +0 -102
  80. package/dist/maths/geometry/point.d.ts +0 -36
  81. package/dist/maths/geometry/vector.d.ts +0 -38
  82. package/dist/maths/numeric.d.ts +0 -28
  83. package/dist/maths/numexp.d.ts +0 -19
  84. package/dist/maths/randomization/random.d.ts +0 -26
  85. package/dist/maths/randomization/randomCore.d.ts +0 -7
  86. package/dist/maths/randomization/rndFraction.d.ts +0 -13
  87. package/dist/maths/randomization/rndGeometryCircle.d.ts +0 -13
  88. package/dist/maths/randomization/rndGeometryLine.d.ts +0 -13
  89. package/dist/maths/randomization/rndGeometryPoint.d.ts +0 -13
  90. package/dist/maths/randomization/rndHelpers.d.ts +0 -23
  91. package/dist/maths/randomization/rndMonom.d.ts +0 -13
  92. package/dist/maths/randomization/rndPolynom.d.ts +0 -14
  93. package/dist/maths/randomization/rndTypes.d.ts +0 -40
  94. package/dist/maths/shutingyard.d.ts +0 -59
@@ -1,120 +0,0 @@
1
- import { Fraction } from '../coefficients/fraction';
2
- import { literalType } from './monom';
3
- import { Polynom } from './polynom';
4
-
5
- /**
6
- * Equation is a class to manage equations...
7
- */
8
- export interface ISolution {
9
- tex: string;
10
- display: string;
11
- value: number;
12
- exact: unknown;
13
- }
14
- export declare enum PARTICULAR_SOLUTION {
15
- real = "\\mathbb{R}",
16
- varnothing = "\\varnothing"
17
- }
18
- export declare class Equation {
19
- private _polynom;
20
- private _varnothing;
21
- private _real;
22
- private _left;
23
- private _right;
24
- private _sign;
25
- private _solutions;
26
- private _randomizeDefaults;
27
- /**
28
- * Create an Equation using two polynoms.
29
- * Markdown *support* is cool
30
- * @param equations
31
- */
32
- constructor(...equations: unknown[]);
33
- get left(): Polynom;
34
- set left(value: Polynom);
35
- get right(): Polynom;
36
- set right(value: Polynom);
37
- get sign(): string;
38
- set sign(value: string);
39
- get solutions(): ISolution[];
40
- get isEquation(): boolean;
41
- get solution(): string;
42
- get isReal(): boolean;
43
- get isVarnothing(): boolean;
44
- get signAsTex(): string;
45
- get tex(): string;
46
- get display(): string;
47
- get raw(): string;
48
- get variables(): string[];
49
- get numberOfVars(): number;
50
- get randomizeDefaults(): {
51
- [key: string]: number | string | boolean;
52
- };
53
- set randomizeDefaults(value: {
54
- [key: string]: number | string | boolean;
55
- });
56
- static makeSolutionsUnique(solutions: ISolution[], sorted?: boolean): ISolution[];
57
- hasVariable: (letter: string) => boolean;
58
- parse: (equationString: string) => Equation;
59
- create: (left: Polynom, right: Polynom, sign?: string) => Equation;
60
- clone: () => Equation;
61
- randomize: (opts?: {}, sign?: string) => Equation;
62
- /**
63
- * Reorder will move all monoms containing a letter on the left, all the other on the right.
64
- */
65
- moveLeft: () => Equation;
66
- reorder: (allLeft?: boolean) => Equation;
67
- /**
68
- * Multiply by the lcm denominator and divide by the gcm numerators.
69
- */
70
- simplify: () => Equation;
71
- /**
72
- * Reorder the polynom to have only one letter on the left, the rest on the right.
73
- * @param letter
74
- */
75
- isolate: (letter?: string) => Equation | false;
76
- replaceBy: (letter: string, P: Polynom) => Equation;
77
- /**
78
- * Multiple an equation by a fraction value.
79
- * @param value
80
- */
81
- multiply: (value: unknown) => Equation;
82
- /**
83
- * divide an equation by a given value (transformed as a fraction)
84
- *
85
- * ```
86
- * 8x+10=6x \vert 2
87
- * 4x+5=3x
88
- * ```
89
- *
90
- * |>Alternatively with $3x-4$ maybe it's working ?
91
- * $$\frac{3x}{5}$$
92
- *
93
- * @param value
94
- * @returns {Equation}
95
- */
96
- divide: (value: unknown) => Equation;
97
- /**
98
- * Get the degree of the equation
99
- * @param letter
100
- */
101
- degree: (letter?: string) => Fraction;
102
- /**
103
- * Determine if the equation contains more than one letter/variable.
104
- */
105
- isMultiVariable: () => boolean;
106
- letters: () => string[];
107
- solve: () => Equation;
108
- test: (values: literalType) => Boolean;
109
- isSameAs: (equ: Equation) => Boolean;
110
- isLinearTo: (equ: Equation) => Boolean;
111
- private _findSign;
112
- private _formatSign;
113
- private _reverseSign;
114
- private isGreater;
115
- private isStrictEqual;
116
- private isAlsoEqual;
117
- private _solveDegree1;
118
- private _solveDegree2;
119
- private _solveDegree3plus;
120
- }
@@ -1,40 +0,0 @@
1
- import { Fraction } from '../coefficients/fraction';
2
- import { Equation } from './equation';
3
-
4
- export declare class LinearSystem {
5
- private _equations;
6
- private _letters;
7
- private _resolutionSteps;
8
- private _solutions;
9
- constructor(...equationStrings: (string | Equation)[]);
10
- get equations(): Equation[];
11
- set equations(value: Equation[]);
12
- get letters(): string;
13
- set letters(value: string);
14
- get isSolvable(): boolean;
15
- get variables(): string[];
16
- get tex(): string;
17
- get solution(): string;
18
- get solutionAsDisplay(): string;
19
- get resolutionSteps(): {
20
- [p: string]: {
21
- equations: Equation[];
22
- operations: string[][];
23
- }[];
24
- };
25
- buildTex: (equations: Equation[], operators?: (string[])[]) => string;
26
- stepTex: (letter: string) => string;
27
- parse: (...equations: (string | Equation)[]) => LinearSystem;
28
- clone: () => LinearSystem;
29
- reorder: () => LinearSystem;
30
- solve: (withResolution?: boolean) => LinearSystem;
31
- mergeEquations: (eq1: Equation, eq2: Equation, factor1: Fraction, factor2: Fraction) => Equation;
32
- private _findLetters;
33
- private _linearReduction;
34
- /**
35
- * Linear reduction of the equations to have only one letter
36
- * @param letter letter to isolate
37
- * @private
38
- */
39
- private _solveOneLetter;
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,102 +0,0 @@
1
- import { Equation } from '../algebra/equation';
2
- import { Fraction } from '../coefficients/fraction';
3
- import { Point } from './point';
4
- import { Vector } from './vector';
5
-
6
- export declare enum LinePropriety {
7
- None = 0,
8
- Parallel = "parallel",
9
- Perpendicular = "perpendicular",
10
- Tangent = "tangent"
11
- }
12
- export declare class Line {
13
- static PERPENDICULAR: LinePropriety;
14
- static PARALLEL: LinePropriety;
15
- private _referencePropriety;
16
- private _referenceLine;
17
- private _reduceBeforeDisplay;
18
- private _a;
19
- private _b;
20
- private _c;
21
- private _OA;
22
- private _d;
23
- private _n;
24
- private _exists;
25
- /**
26
- * Value can be a mix of:
27
- *
28
- * @param values
29
- */
30
- constructor(...values: unknown[]);
31
- get a(): Fraction;
32
- set a(value: Fraction);
33
- get b(): Fraction;
34
- set b(value: Fraction);
35
- get c(): Fraction;
36
- set c(value: Fraction);
37
- get OA(): Point;
38
- set OA(value: Point);
39
- get d(): Vector;
40
- set d(value: Vector);
41
- get n(): Vector;
42
- get exists(): boolean;
43
- get equation(): Equation;
44
- get system(): {
45
- x: Equation;
46
- y: Equation;
47
- };
48
- get tex(): {
49
- canonical: string;
50
- mxh: string;
51
- parametric: string;
52
- equation: string;
53
- system: string;
54
- };
55
- get reduceBeforeDisplay(): boolean;
56
- set reduceBeforeDisplay(value: boolean);
57
- get display(): {
58
- canonical: string;
59
- mxh: string;
60
- parametric: string;
61
- };
62
- get normal(): Vector;
63
- get director(): Vector;
64
- get slope(): Fraction;
65
- get height(): Fraction;
66
- randomPoint: (k?: number) => Point;
67
- randomNearPoint: (k?: number) => Point;
68
- /**
69
- * Parse data to a line
70
- * @param {any} values
71
- * @returns {Line}
72
- */
73
- parse: (...values: unknown[]) => Line;
74
- parseEquation: (equ: Equation) => Line;
75
- parseByCoefficient: (a: Fraction | number, b: Fraction | number, c: Fraction | number) => Line;
76
- parseByPointAndVector: (P: Point, d: Vector) => Line;
77
- parseByPointAndNormal: (P: Point, n: Vector) => Line;
78
- parseByPointAndLine: (P: Point, L: Line, orientation?: LinePropriety) => Line;
79
- clone: () => Line;
80
- isOnLine: (pt: Point) => Boolean;
81
- isParallelTo: (line: Line) => Boolean;
82
- isSameAs: (line: Line) => Boolean;
83
- isPerpendicularTo: (line: Line) => Boolean;
84
- isVertical: () => Boolean;
85
- simplify: () => Line;
86
- simplifyDirection: () => Line;
87
- intersection: (line: Line) => {
88
- point: Point;
89
- hasIntersection: boolean;
90
- isParallel: boolean;
91
- isSame: boolean;
92
- };
93
- distanceTo(pt: Point): {
94
- value: number;
95
- fraction: Fraction;
96
- tex: string;
97
- };
98
- hitSegment(A: Point, B: Point): boolean;
99
- getValueAtX: (value: Fraction | number) => Fraction;
100
- getValueAtY: (value: Fraction | number) => Fraction;
101
- canonicalAsFloatCoefficient(decimals: number): string;
102
- }
@@ -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
- }