math-exercises 1.3.6 → 1.3.7
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/lib/exercises/calcul/addAndSub.d.ts +7 -0
- package/lib/exercises/calcul/addAndSub.d.ts.map +1 -0
- package/lib/exercises/calcul/addAndSub.js +3 -3
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts +4 -0
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -0
- package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.js +6 -6
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts +4 -0
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -0
- package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.js +5 -5
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts +4 -0
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts.map +1 -0
- package/lib/exercises/calcul/fractions/fractionAndIntegerSum.js +5 -5
- package/lib/exercises/calcul/fractions/fractionsDivision.d.ts +4 -0
- package/lib/exercises/calcul/fractions/fractionsDivision.d.ts.map +1 -0
- package/lib/exercises/calcul/fractions/fractionsDivision.js +3 -3
- package/lib/exercises/calcul/fractions/fractionsProduct.d.ts +4 -0
- package/lib/exercises/calcul/fractions/fractionsProduct.d.ts.map +1 -0
- package/lib/exercises/calcul/fractions/fractionsProduct.js +3 -3
- package/lib/exercises/calcul/fractions/fractionsSum.d.ts +4 -0
- package/lib/exercises/calcul/fractions/fractionsSum.d.ts.map +1 -0
- package/lib/exercises/calcul/fractions/fractionsSum.js +3 -3
- package/lib/exercises/calcul/fractions/simplifyFraction.d.ts +4 -0
- package/lib/exercises/calcul/fractions/simplifyFraction.d.ts.map +1 -0
- package/lib/exercises/calcul/fractions/simplifyFraction.js +2 -2
- package/lib/exercises/calcul/operations/operationsPriorities.d.ts +11 -0
- package/lib/exercises/calcul/operations/operationsPriorities.d.ts.map +1 -0
- package/lib/exercises/calcul/operations/operationsPriorities.js +7 -7
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts +1 -0
- package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -0
- package/lib/exercises/calcul/rounding/rounding.d.ts +20 -0
- package/lib/exercises/calcul/rounding/rounding.d.ts.map +1 -0
- package/lib/exercises/calcul/rounding/rounding.js +3 -3
- package/lib/exercises/calculLitteral/distributivity/allIdentities.d.ts +4 -0
- package/lib/exercises/calculLitteral/distributivity/allIdentities.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/distributivity/allIdentities.js +2 -2
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts +4 -0
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.js +6 -6
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts +4 -0
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/distributivity/firstIdentity.js +7 -7
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts +4 -0
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/distributivity/secondIdentity.js +7 -7
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts +4 -0
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.js +7 -7
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts +4 -0
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/distributivity/thirdIdentity.js +6 -6
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts +7 -0
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/equation/equationType1Exercise.js +6 -6
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts +7 -0
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +8 -8
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts +7 -0
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/equation/equationType3Exercise.js +8 -8
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts +7 -0
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/equation/equationType4Exercise.js +8 -8
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts +7 -0
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -0
- package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.js +7 -7
- package/lib/exercises/exercise.d.ts +16 -0
- package/lib/exercises/exercise.d.ts.map +1 -0
- package/lib/exercises/exercises.d.ts +3 -0
- package/lib/exercises/exercises.d.ts.map +1 -0
- package/lib/exercises/geometry/cartesian/midpoint.d.ts +4 -0
- package/lib/exercises/geometry/cartesian/midpoint.d.ts.map +1 -0
- package/lib/exercises/geometry/cartesian/midpoint.js +4 -4
- package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts +4 -0
- package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -0
- package/lib/exercises/geometry/vectors/scalarProductViaCoords.js +4 -4
- package/lib/exercises/geometry/vectors/scalarProductViaNorms.d.ts +1 -0
- package/lib/exercises/geometry/vectors/scalarProductViaNorms.d.ts.map +1 -0
- package/lib/exercises/powers/powersDivision.d.ts +8 -0
- package/lib/exercises/powers/powersDivision.d.ts.map +1 -0
- package/lib/exercises/powers/powersDivision.js +5 -5
- package/lib/exercises/powers/powersOfTenToDecimal.d.ts +7 -0
- package/lib/exercises/powers/powersOfTenToDecimal.d.ts.map +1 -0
- package/lib/exercises/powers/powersOfTenToDecimal.js +4 -4
- package/lib/exercises/powers/powersPower.d.ts +8 -0
- package/lib/exercises/powers/powersPower.d.ts.map +1 -0
- package/lib/exercises/powers/powersPower.js +4 -4
- package/lib/exercises/powers/powersProduct.d.ts +8 -0
- package/lib/exercises/powers/powersProduct.d.ts.map +1 -0
- package/lib/exercises/powers/powersProduct.js +5 -5
- package/lib/exercises/powers/scientificToDecimal.d.ts +7 -0
- package/lib/exercises/powers/scientificToDecimal.d.ts.map +1 -0
- package/lib/exercises/powers/scientificToDecimal.js +6 -6
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts +1 -0
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -0
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.js +3 -3
- package/lib/exercises/sequences/geometric/geometricFindReason.d.ts +1 -0
- package/lib/exercises/sequences/geometric/geometricFindReason.d.ts.map +1 -0
- package/lib/exercises/sequences/geometric/geometricFindReason.js +3 -3
- package/lib/exercises/squareRoots/simpifySquareRoot.d.ts +4 -0
- package/lib/exercises/squareRoots/simpifySquareRoot.d.ts.map +1 -0
- package/lib/exercises/squareRoots/simpifySquareRoot.js +1 -1
- package/lib/exercises/trigonometry/mainRemarkableValues.d.ts +4 -0
- package/lib/exercises/trigonometry/mainRemarkableValues.d.ts.map +1 -0
- package/lib/exercises/trigonometry/mainRemarkableValues.js +2 -2
- package/lib/exercises/trigonometry/remarkableValues.d.ts +4 -0
- package/lib/exercises/trigonometry/remarkableValues.d.ts.map +1 -0
- package/lib/exercises/trigonometry/remarkableValues.js +2 -2
- package/lib/exercises/utils/getDistinctQuestions.d.ts +3 -0
- package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +4 -3
- package/lib/math/geometry/point.d.ts +13 -0
- package/lib/math/geometry/point.d.ts.map +1 -0
- package/lib/math/geometry/point.js +4 -4
- package/lib/math/geometry/vector.d.ts +16 -0
- package/lib/math/geometry/vector.d.ts.map +1 -0
- package/lib/math/geometry/vector.js +4 -4
- package/lib/math/numbers/decimals/decimal.d.ts +25 -0
- package/lib/math/numbers/decimals/decimal.d.ts.map +1 -0
- package/lib/math/numbers/decimals/decimal.js +2 -2
- package/lib/math/numbers/epsilon.d.ts +2 -0
- package/lib/math/numbers/epsilon.d.ts.map +1 -0
- package/lib/math/numbers/integer/integer.d.ts +15 -0
- package/lib/math/numbers/integer/integer.d.ts.map +1 -0
- package/lib/math/numbers/integer/integer.js +2 -2
- package/lib/math/numbers/integer/power.d.ts +14 -0
- package/lib/math/numbers/integer/power.d.ts.map +1 -0
- package/lib/math/numbers/integer/power.js +2 -2
- package/lib/math/numbers/nombre.d.ts +14 -0
- package/lib/math/numbers/nombre.d.ts.map +1 -0
- package/lib/math/numbers/rationals/rational.d.ts +26 -0
- package/lib/math/numbers/rationals/rational.d.ts.map +1 -0
- package/lib/math/numbers/rationals/rational.js +8 -8
- package/lib/math/numbers/reals/real.d.ts +10 -0
- package/lib/math/numbers/reals/real.d.ts.map +1 -0
- package/lib/math/numbers/reals/real.js +1 -1
- package/lib/math/numbers/reals/squareRoot.d.ts +19 -0
- package/lib/math/numbers/reals/squareRoot.d.ts.map +1 -0
- package/lib/math/numbers/reals/squareRoot.js +6 -6
- package/lib/math/polynomials/affine.d.ts +16 -0
- package/lib/math/polynomials/affine.d.ts.map +1 -0
- package/lib/math/polynomials/polynomial.d.ts +25 -0
- package/lib/math/polynomials/polynomial.d.ts.map +1 -0
- package/lib/math/sequences/arithmeticSequence.d.ts +1 -0
- package/lib/math/sequences/arithmeticSequence.d.ts.map +1 -0
- package/lib/math/sequences/geometricSequence.d.ts +4 -0
- package/lib/math/sequences/geometricSequence.d.ts.map +1 -0
- package/lib/math/sequences/sequence.d.ts +15 -0
- package/lib/math/sequences/sequence.d.ts.map +1 -0
- package/lib/math/sets/discreteSet.d.ts +11 -0
- package/lib/math/sets/discreteSet.d.ts.map +1 -0
- package/lib/math/sets/discreteSet.js +1 -1
- package/lib/math/sets/emptySet.d.ts +1 -0
- package/lib/math/sets/emptySet.d.ts.map +1 -0
- package/lib/math/sets/intervals/intervals.d.ts +27 -0
- package/lib/math/sets/intervals/intervals.d.ts.map +1 -0
- package/lib/math/sets/intervals/intervals.js +5 -5
- package/lib/math/sets/mathSet.d.ts +8 -0
- package/lib/math/sets/mathSet.d.ts.map +1 -0
- package/lib/math/sets/mathSetInterface.d.ts +6 -0
- package/lib/math/sets/mathSetInterface.d.ts.map +1 -0
- package/lib/math/trigonometry/remarkableValue.d.ts +11 -0
- package/lib/math/trigonometry/remarkableValue.d.ts.map +1 -0
- package/lib/math/trigonometry/remarkableValue.js +6 -6
- package/lib/math/trigonometry/remarkableValues.d.ts +3 -0
- package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -0
- package/lib/math/trigonometry/remarkableValues.js +6 -6
- package/lib/math/utils/arithmetic/coprimesOf.d.ts +2 -0
- package/lib/math/utils/arithmetic/coprimesOf.d.ts.map +1 -0
- package/lib/math/utils/arithmetic/dividersOf.d.ts +2 -0
- package/lib/math/utils/arithmetic/dividersOf.d.ts.map +1 -0
- package/lib/math/utils/arithmetic/gcd.d.ts +2 -0
- package/lib/math/utils/arithmetic/gcd.d.ts.map +1 -0
- package/lib/math/utils/arithmetic/isSquare.d.ts +2 -0
- package/lib/math/utils/arithmetic/isSquare.d.ts.map +1 -0
- package/lib/math/utils/arithmetic/lcd.d.ts +2 -0
- package/lib/math/utils/arithmetic/lcd.d.ts.map +1 -0
- package/lib/math/utils/arithmetic/nonCoprimesOf.d.ts +2 -0
- package/lib/math/utils/arithmetic/nonCoprimesOf.d.ts.map +1 -0
- package/lib/math/utils/arithmetic/nonDividersOf.d.ts +2 -0
- package/lib/math/utils/arithmetic/nonDividersOf.d.ts.map +1 -0
- package/lib/math/utils/arithmetic/primeFactors.d.ts +6 -0
- package/lib/math/utils/arithmetic/primeFactors.d.ts.map +1 -0
- package/lib/math/utils/decimals/decimalPartLengthOf.d.ts +2 -0
- package/lib/math/utils/decimals/decimalPartLengthOf.d.ts.map +1 -0
- package/lib/math/utils/random/randTupleInt.d.ts +14 -0
- package/lib/math/utils/random/randTupleInt.d.ts.map +1 -0
- package/lib/math/utils/random/randTupleInt.js +1 -1
- package/lib/math/utils/random/randint.d.ts +5 -0
- package/lib/math/utils/random/randint.d.ts.map +1 -0
- package/lib/math/utils/round.d.ts +2 -0
- package/lib/math/utils/round.d.ts.map +1 -0
- package/lib/tree/nodes/functions/cosNode.d.ts +10 -0
- package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -0
- package/lib/tree/nodes/functions/functionNode.d.ts +15 -0
- package/lib/tree/nodes/functions/functionNode.d.ts.map +1 -0
- package/lib/tree/nodes/functions/oppositeNode.d.ts +8 -0
- package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -0
- package/lib/tree/nodes/functions/sinNode.d.ts +1 -0
- package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -0
- package/lib/tree/nodes/functions/sqrtNode.d.ts +9 -0
- package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -0
- package/lib/tree/nodes/node.d.ts +13 -0
- package/lib/tree/nodes/node.d.ts.map +1 -0
- package/lib/tree/nodes/numbers/constantNode.d.ts +10 -0
- package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -0
- package/lib/tree/nodes/numbers/numberNode.d.ts +11 -0
- package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -0
- package/lib/tree/nodes/numbers/piNode.d.ts +3 -0
- package/lib/tree/nodes/numbers/piNode.d.ts.map +1 -0
- package/lib/tree/nodes/operators/addNode.d.ts +8 -0
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -0
- package/lib/tree/nodes/operators/divideNode.d.ts +12 -0
- package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -0
- package/lib/tree/nodes/operators/equalNode.d.ts +8 -0
- package/lib/tree/nodes/operators/equalNode.d.ts.map +1 -0
- package/lib/tree/nodes/operators/fractionNode.d.ts +12 -0
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -0
- package/lib/tree/nodes/operators/multiplyNode.d.ts +8 -0
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -0
- package/lib/tree/nodes/operators/operatorNode.d.ts +22 -0
- package/lib/tree/nodes/operators/operatorNode.d.ts.map +1 -0
- package/lib/tree/nodes/operators/powerNode.d.ts +8 -0
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -0
- package/lib/tree/nodes/operators/substractNode.d.ts +8 -0
- package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -0
- package/lib/tree/nodes/variables/variableNode.d.ts +9 -0
- package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -0
- package/lib/tree/parsers/derivateParser.d.ts +1 -0
- package/lib/tree/parsers/derivateParser.d.ts.map +1 -0
- package/lib/tree/parsers/simplify.d.ts +3 -0
- package/lib/tree/parsers/simplify.d.ts.map +1 -0
- package/lib/utils/arrayEqual.d.ts +2 -0
- package/lib/utils/arrayEqual.d.ts.map +1 -0
- package/lib/utils/coinFlip.d.ts +2 -0
- package/lib/utils/coinFlip.d.ts.map +1 -0
- package/lib/utils/random.d.ts +2 -0
- package/lib/utils/random.d.ts.map +1 -0
- package/lib/utils/shuffle.d.ts +2 -0
- package/lib/utils/shuffle.d.ts.map +1 -0
- package/package.json +6 -8
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Node, NodeType } from '../node';
|
|
2
|
+
export declare enum FunctionsIds {
|
|
3
|
+
opposite = 0,
|
|
4
|
+
sqrt = 1,
|
|
5
|
+
cos = 2,
|
|
6
|
+
sin = 3
|
|
7
|
+
}
|
|
8
|
+
export declare abstract class FunctionNode {
|
|
9
|
+
id: FunctionsIds;
|
|
10
|
+
child: Node;
|
|
11
|
+
type: NodeType;
|
|
12
|
+
tex: string;
|
|
13
|
+
constructor(id: FunctionsIds, child: Node, tex: string);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=functionNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functionNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/functionNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEzC,oBAAY,YAAY;IACtB,QAAQ,IAAA;IACR,IAAI,IAAA;IACJ,GAAG,IAAA;IACH,GAAG,IAAA;CACJ;AAED,8BAAsB,YAAY;IAChC,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,IAAI,CAAC;IACZ,IAAI,WAAqB;IACzB,GAAG,EAAE,MAAM,CAAC;gBACA,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM;CAKvD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Node } from '../node';
|
|
2
|
+
import { FunctionNode } from './functionNode';
|
|
3
|
+
export declare class OppositeNode extends FunctionNode implements Node {
|
|
4
|
+
constructor(child: Node);
|
|
5
|
+
toMathString(): string;
|
|
6
|
+
toTex(): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=oppositeNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oppositeNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/oppositeNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAE5D,qBAAa,YAAa,SAAQ,YAAa,YAAW,IAAI;gBAChD,KAAK,EAAE,IAAI;IAGvB,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;CAUhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=sinNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sinNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/sinNode.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Node, NodeType } from '../node';
|
|
2
|
+
import { FunctionNode } from './functionNode';
|
|
3
|
+
export declare class SqrtNode extends FunctionNode implements Node {
|
|
4
|
+
type: NodeType;
|
|
5
|
+
constructor(child: Node);
|
|
6
|
+
toMathString(): string;
|
|
7
|
+
toTex(): string;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=sqrtNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqrtNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/sqrtNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAE5D,qBAAa,QAAS,SAAQ,YAAa,YAAW,IAAI;IACxD,IAAI,EAAE,QAAQ,CAAqB;gBACvB,KAAK,EAAE,IAAI;IAGvB,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;CAGhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/tree/nodes/node.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,MAAM,IAAA;IACN,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;CACT;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,MAAM,CAAC;CAErB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Node, NodeType } from '../node';
|
|
2
|
+
export declare class ConstantNode implements Node {
|
|
3
|
+
tex: string;
|
|
4
|
+
mathString: string;
|
|
5
|
+
type: NodeType;
|
|
6
|
+
constructor(tex: string, mathString: string);
|
|
7
|
+
toMathString(): string;
|
|
8
|
+
toTex(): string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=constantNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constantNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/numbers/constantNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,YAAa,YAAW,IAAI;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAqB;gBAEvB,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAK3C,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;CAGhB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Node, NodeType } from '../node';
|
|
2
|
+
export declare class NumberNode implements Node {
|
|
3
|
+
tex: string;
|
|
4
|
+
mathString: string;
|
|
5
|
+
value: number;
|
|
6
|
+
type: NodeType;
|
|
7
|
+
constructor(value: number, tex?: string, mathString?: string);
|
|
8
|
+
toMathString(): string;
|
|
9
|
+
toTex(): string;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=numberNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numberNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/numbers/numberNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,UAAW,YAAW,IAAI;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAmB;gBAErB,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;IAM5D,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;CAMhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"piNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/numbers/piNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,eAAO,MAAM,MAAM,cAAiC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Node } from '../node';
|
|
2
|
+
import { OperatorNode } from './operatorNode';
|
|
3
|
+
export declare class AddNode extends OperatorNode implements Node {
|
|
4
|
+
constructor(leftChild: Node, rightChild: Node);
|
|
5
|
+
toMathString(): string;
|
|
6
|
+
toTex(): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=addNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/addNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AACzC,OAAO,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3D,qBAAa,OAAQ,SAAQ,YAAa,YAAW,IAAI;gBAC3C,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;IAK7C,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;CAIhB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Node } from '../node';
|
|
2
|
+
import { OperatorNode } from './operatorNode';
|
|
3
|
+
export declare class DivideNode extends OperatorNode implements Node {
|
|
4
|
+
/**
|
|
5
|
+
* @param leftChild num
|
|
6
|
+
* @param rightChild denum
|
|
7
|
+
*/
|
|
8
|
+
constructor(leftChild: Node, rightChild: Node);
|
|
9
|
+
toMathString(): string;
|
|
10
|
+
toTex(): string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=divideNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divideNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/divideNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AACzC,OAAO,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3D,qBAAa,UAAW,SAAQ,YAAa,YAAW,IAAI;IAC1D;;;OAGG;gBACS,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;IAI7C,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;CAqBhB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Node } from '../node';
|
|
2
|
+
import { OperatorNode } from './operatorNode';
|
|
3
|
+
export declare class EqualNode extends OperatorNode implements Node {
|
|
4
|
+
constructor(leftChild: Node, rightChild: Node);
|
|
5
|
+
toMathString(): string;
|
|
6
|
+
toTex(): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=equalNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equalNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/equalNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AACzC,OAAO,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3D,qBAAa,SAAU,SAAQ,YAAa,YAAW,IAAI;gBAC7C,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;IAG7C,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;CAGhB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Node } from '../node';
|
|
2
|
+
import { OperatorNode } from './operatorNode';
|
|
3
|
+
export declare class FractionNode extends OperatorNode implements Node {
|
|
4
|
+
/**
|
|
5
|
+
* @param leftChild num
|
|
6
|
+
* @param rightChild denum
|
|
7
|
+
*/
|
|
8
|
+
constructor(leftChild: Node, rightChild: Node);
|
|
9
|
+
toMathString(): string;
|
|
10
|
+
toTex(): string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=fractionNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fractionNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/fractionNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AACzC,OAAO,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3D,qBAAa,YAAa,SAAQ,YAAa,YAAW,IAAI;IAC5D;;;OAGG;gBACS,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;IAI7C,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;CAGhB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Node } from '../node';
|
|
2
|
+
import { OperatorNode } from './operatorNode';
|
|
3
|
+
export declare class MultiplyNode extends OperatorNode implements Node {
|
|
4
|
+
constructor(leftChild: Node, rightChild: Node);
|
|
5
|
+
toMathString(): string;
|
|
6
|
+
toTex(): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=multiplyNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multiplyNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/multiplyNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AACzC,OAAO,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3D,qBAAa,YAAa,SAAQ,YAAa,YAAW,IAAI;gBAChD,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;IAY7C,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;CA6BhB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Node, NodeType } from '../node';
|
|
2
|
+
export declare enum OperatorIds {
|
|
3
|
+
add = 0,
|
|
4
|
+
substract = 1,
|
|
5
|
+
multiply = 2,
|
|
6
|
+
fraction = 3,
|
|
7
|
+
divide = 4,
|
|
8
|
+
power = 5,
|
|
9
|
+
equal = 6
|
|
10
|
+
}
|
|
11
|
+
export declare abstract class OperatorNode {
|
|
12
|
+
id: OperatorIds;
|
|
13
|
+
leftChild: Node;
|
|
14
|
+
rightChild: Node;
|
|
15
|
+
isCommutative: boolean;
|
|
16
|
+
type: NodeType;
|
|
17
|
+
tex: string;
|
|
18
|
+
constructor(id: OperatorIds, leftChild: Node, rightChild: Node, isCommutative: boolean, tex: string);
|
|
19
|
+
/**shuffles in place */
|
|
20
|
+
shuffle(): void;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=operatorNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operatorNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/operatorNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEzC,oBAAY,WAAW;IACrB,GAAG,IAAA;IACH,SAAS,IAAA;IACT,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,MAAM,IAAA;IACN,KAAK,IAAA;IACL,KAAK,IAAA;CACN;AAED,8BAAsB,YAAY;IAChC,EAAE,EAAE,WAAW,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,WAAqB;IACzB,GAAG,EAAE,MAAM,CAAC;gBACA,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM;IAQnG,uBAAuB;IACvB,OAAO,IAAI,IAAI;CAMhB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Node } from '../node';
|
|
2
|
+
import { OperatorNode } from './operatorNode';
|
|
3
|
+
export declare class PowerNode extends OperatorNode implements Node {
|
|
4
|
+
constructor(leftChild: Node, rightChild: Node);
|
|
5
|
+
toMathString(): string;
|
|
6
|
+
toTex(): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=powerNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"powerNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/powerNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AACzC,OAAO,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3D,qBAAa,SAAU,SAAQ,YAAa,YAAW,IAAI;gBAC7C,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;IAI7C,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;CAkBhB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Node } from '../node';
|
|
2
|
+
import { OperatorNode } from './operatorNode';
|
|
3
|
+
export declare class SubstractNode extends OperatorNode implements Node {
|
|
4
|
+
constructor(leftChild: Node, rightChild: Node);
|
|
5
|
+
toMathString(): string;
|
|
6
|
+
toTex(): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=substractNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"substractNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/substractNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AACzC,OAAO,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3D,qBAAa,aAAc,SAAQ,YAAa,YAAW,IAAI;gBACjD,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;IAG7C,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;CAahB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variableNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/variables/variableNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,YAAa,YAAW,IAAI;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,WAAqB;gBAEb,IAAI,EAAE,MAAM;IAKxB,KAAK,IAAI,MAAM;IAGf,YAAY,IAAI,MAAM;CAMvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=derivateParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"derivateParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/derivateParser.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simplify.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/simplify.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAqBrC,eAAO,MAAM,YAAY,SAAU,IAAI,KAAG,IAEzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrayEqual.d.ts","sourceRoot":"","sources":["../../src/utils/arrayEqual.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,OAAO,CAO3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coinFlip.d.ts","sourceRoot":"","sources":["../../src/utils/coinFlip.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,QAAO,OAE3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../../src/utils/random.ts"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAEnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shuffle.d.ts","sourceRoot":"","sources":["../../src/utils/shuffle.ts"],"names":[],"mappings":"AACA,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAS1C"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "math-exercises",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"description": "Math exercises generator for middle school and high school",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"lib/**/*"
|
|
8
8
|
],
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"start": "ts-node -r tsconfig-paths/register src/index.ts",
|
|
12
12
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
13
13
|
"start:dev": "nodemon",
|
|
14
|
-
"build": "tsc",
|
|
14
|
+
"build": "tsc && tsc-alias",
|
|
15
15
|
"prepublish": "tsc"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [],
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
"nodemon": "^2.0.20",
|
|
23
23
|
"prettier": "^2.8.4",
|
|
24
24
|
"ts-node": "^10.9.1",
|
|
25
|
+
"tsc-alias": "^1.8.2",
|
|
26
|
+
"tsconfig-paths": "^4.1.2",
|
|
25
27
|
"tslint": "^6.1.3",
|
|
26
28
|
"tslint-config-prettier": "^1.18.0",
|
|
27
29
|
"typescript": "^4.9.3"
|
|
@@ -35,11 +37,7 @@
|
|
|
35
37
|
},
|
|
36
38
|
"homepage": "https://github.com/krirkrirk/math-exercises#readme",
|
|
37
39
|
"dependencies": {
|
|
38
|
-
"mathjs": "^11.5.1"
|
|
39
|
-
"tsconfig-paths": "^4.1.2"
|
|
40
|
-
},
|
|
41
|
-
"imports": {
|
|
42
|
-
"#root/*": "./lib/*"
|
|
40
|
+
"mathjs": "^11.5.1"
|
|
43
41
|
},
|
|
44
42
|
"exports": {
|
|
45
43
|
".": "./lib/index.js"
|