Skip to content

Commit bd8cdb7

Browse files
committed
Tests -> ok
Dependency check -> ok Build -> ok
1 parent 7e96c2e commit bd8cdb7

10 files changed

+1784
-1727
lines changed

dependencies.svg

Lines changed: 695 additions & 717 deletions
Loading

dist/algebra/factor.d.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import { IAlgebra, IExpression, InputAlgebra, InputValue, IPiMathObject, ISolution, literalType, TABLE_OF_SIGNS } from '../pimath.interface';
1+
import { IAlgebra, IExpression, InputAlgebra, InputValue, IPiMathObject, literalType, TABLE_OF_SIGNS } from '../pimath.interface';
22
import { Fraction } from '../coefficients/fraction';
33
import { Polynom } from './polynom';
44
export declare class Factor implements IPiMathObject<Factor>, IExpression<Factor>, IAlgebra<Factor> {
55
#private;
6-
constructor(value: InputAlgebra<Polynom> | Factor, power?: InputValue<Fraction>);
6+
constructor(value?: InputAlgebra<Polynom> | Factor, power?: InputValue<Fraction>);
77
parse(): Factor;
88
clone(): Factor;
9+
fromPolynom(polynom: InputValue<Polynom>): this;
910
get tex(): string;
1011
get display(): string;
1112
add(): Factor;
@@ -34,7 +35,7 @@ export declare class Factor implements IPiMathObject<Factor>, IExpression<Factor
3435
root(value: number): this;
3536
sqrt(): this;
3637
subtract(): Factor;
37-
tableOfSigns(roots?: ISolution[]): TABLE_OF_SIGNS;
38+
tableOfSigns(): TABLE_OF_SIGNS;
3839
get variables(): string[];
3940
get withPower(): this;
4041
get withRoot(): this;

dist/algebra/monom.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ export declare class Monom implements IPiMathObject<Monom>, IExpression<Monom>,
101101
set literal(L: literalType<Fraction>);
102102
/**
103103
* Get the literal square roots of the Monom.
104-
* TODO: remove this getter ? Is it used and is it correct ?
105104
* @returns {literalType<Fraction>}
106105
*/
107106
get literalSqrt(): literalType<Fraction>;

dist/algebra/polyFactor.d.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { Factor } from './factor';
44
import { Polynom } from './polynom';
55
export declare class PolyFactor implements IPiMathObject<PolyFactor>, IExpression<PolyFactor>, IAlgebra<PolyFactor> {
66
#private;
7-
constructor(...values: (Factor | InputAlgebra<Polynom> | PolyFactor)[]);
8-
parse(...values: (Factor | InputAlgebra<Polynom> | PolyFactor)[]): this;
7+
constructor(...values: (Factor | PolyFactor)[]);
8+
parse(...values: (Factor | PolyFactor)[]): this;
99
clone(): PolyFactor;
1010
get tex(): string;
1111
get display(): string;
@@ -38,7 +38,13 @@ export declare class PolyFactor implements IPiMathObject<PolyFactor>, IExpressio
3838
primitive(): PolyFactor;
3939
reduce(): this;
4040
root(value: number): this;
41-
sort(): this;
41+
/**
42+
* Reoarder the factors using :
43+
* 1. number of monoms
44+
* 2. degree of polynom
45+
* 3. power of polyfactor
46+
*/
47+
sort(letter?: string): this;
4248
sqrt(): this;
4349
subtract(...values: PolyFactor[]): this;
4450
tableOfSigns(): POLYFACTOR_TABLE_OF_SIGNS;

dist/algebra/polynom.d.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IAlgebra, IAnalyse, IExpression, InputAlgebra, InputValue, IPiMathObject, ISolution, literalType, TABLE_OF_SIGNS } from '../pimath.interface';
2-
import { Fraction } from '../coefficients/fraction';
2+
import { Fraction } from '../coefficients';
33
import { Monom } from './monom';
44
export type PolynomParsingType = InputValue<Polynom> | Monom;
55
export interface IEuclidean {
@@ -30,11 +30,12 @@ export declare class Polynom implements IPiMathObject<Polynom>, IExpression<Poly
3030
* Clone the polynom
3131
*/
3232
clone: () => Polynom;
33+
get tex(): string;
34+
get display(): string;
3335
add: (...values: InputAlgebra<Polynom>[]) => Polynom;
3436
commonMonom: () => Monom;
3537
degree: (letter?: string) => Fraction;
3638
derivative: (letter?: string) => Polynom;
37-
get display(): string;
3839
divide: (value: InputAlgebra<Polynom>) => Polynom;
3940
empty: () => this;
4041
/**
@@ -49,8 +50,10 @@ export declare class Polynom implements IPiMathObject<Polynom>, IExpression<Poly
4950
* @param letter
5051
*/
5152
factorize: (letter?: string) => Polynom[];
53+
fromCoefficients(...values: InputValue<Fraction>[]): this;
5254
gcdDenominator: () => number;
5355
gcdNumerator: () => number;
56+
getCoefficients(): Fraction[];
5457
getDenominators: () => number[];
5558
getNumerators: () => number[];
5659
getZeroes: () => ISolution[];
@@ -97,8 +100,7 @@ export declare class Polynom implements IPiMathObject<Polynom>, IExpression<Poly
97100
set roots(value: ISolution[]);
98101
sqrt(): Polynom;
99102
subtract: (...values: InputAlgebra<Polynom>[]) => Polynom;
100-
tableOfSigns(rootsArray?: ISolution[]): TABLE_OF_SIGNS;
101-
get tex(): string;
103+
tableOfSigns(): TABLE_OF_SIGNS;
102104
get variables(): string[];
103105
/**
104106
* Set the polynom to zero.

dist/geometry/triangle.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export declare class Triangle {
2727
* Parse values to a triangle. Supported formats:
2828
* Vector2D, Vector2D, Vector2D
2929
* x1, y1, x2, y2, x3, y3
30-
* TODO: Something else ?
3130
* @param values
3231
*/
3332
parse: (...values: unknown[]) => Triangle;

dist/pimath.interface.d.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
import { Fraction } from './coefficients/fraction';
2-
import { NthRoot } from './coefficients/nthRoot';
3-
import { Monom } from './algebra/monom';
4-
import { Factor } from './algebra/factor';
1+
import { Fraction, NthRoot } from './coefficients';
2+
import { Monom, Factor, Equation } from './algebra';
53
import { Line, Point, Vector } from './geometry';
6-
import { Equation } from './algebra';
74
export type InputValue<T> = T | string | number | Fraction | NthRoot;
85
export type InputAlgebra<T> = InputValue<T> | Monom;
96
export type literalType<T> = Record<string, T>;

0 commit comments

Comments
 (0)