math-exercises 2.2.6 → 2.2.8
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/math/calcul/addAndSub.js +1 -1
- package/lib/exercises/math/calcul/addAndSubWithoutRelatives.js +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisorsList.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisorsList.js +10 -7
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/primeNumbers.js +0 -1
- package/lib/exercises/math/calcul/digitDecimalRank.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitDecimalRank.js +2 -3
- package/lib/exercises/math/calcul/digitDecimalRankNumber.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitDecimalRankNumber.js +2 -3
- package/lib/exercises/math/calcul/digitRank.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitRank.js +2 -3
- package/lib/exercises/math/calcul/digitRankNumber.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitRankNumber.js +2 -3
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +0 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +0 -1
- package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +0 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts +10 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +61 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts +10 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +56 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts +9 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +57 -0
- package/lib/exercises/math/calcul/fractions/index.d.ts +3 -0
- package/lib/exercises/math/calcul/fractions/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/index.js +3 -0
- package/lib/exercises/math/calcul/fractions/simplifyFraction.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/simplifyFraction.js +0 -1
- package/lib/exercises/math/calcul/mentalCaluls/index.d.ts +2 -0
- package/lib/exercises/math/calcul/mentalCaluls/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/index.js +2 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.js +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.d.ts +7 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.d.ts.map +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSubNoRelative.js +71 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +25 -17
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.d.ts +7 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.d.ts.map +1 -0
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.js +93 -0
- package/lib/exercises/math/calcul/operations/expressionNature.d.ts +1 -0
- package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -0
- package/lib/exercises/math/calcul/operations/expressionNature.js +81 -0
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +0 -1
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +0 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +0 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +0 -1
- package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.js +0 -1
- package/lib/exercises/math/complex/addComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/addComplex.js +0 -1
- package/lib/exercises/math/complex/conjugateComplex.ts.d.ts.map +1 -1
- package/lib/exercises/math/complex/conjugateComplex.ts.js +0 -1
- package/lib/exercises/math/complex/conjugateDivideComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/conjugateDivideComplex.js +0 -1
- package/lib/exercises/math/complex/inverseComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/inverseComplex.js +0 -1
- package/lib/exercises/math/complex/moduloFromAlgebraicComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/moduloFromAlgebraicComplex.js +0 -1
- package/lib/exercises/math/complex/mutiplyComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/mutiplyComplex.js +0 -1
- package/lib/exercises/math/conversion/aeraConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/aeraConversion.js +0 -2
- package/lib/exercises/math/conversion/capacityConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/capacityConversion.js +0 -1
- package/lib/exercises/math/conversion/lengthConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/lengthConversion.js +0 -2
- package/lib/exercises/math/conversion/massConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/massConversion.js +0 -2
- package/lib/exercises/math/conversion/volumeCapacityConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/volumeCapacityConversion.js +0 -2
- package/lib/exercises/math/conversion/volumeConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/volumeConversion.js +0 -2
- package/lib/exercises/math/derivation/derivative/expDerivativeOne.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/expDerivativeOne.js +0 -1
- package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeOne.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeOne.js +0 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeThree.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/lnDerivativeThree.js +0 -1
- package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/powerCompositionDerivation.js +0 -2
- package/lib/exercises/math/derivation/derivative/powerFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/powerFunctionDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/quotientDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeDerivative.js +0 -1
- package/lib/exercises/math/derivation/derivativeNumberReading.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivativeNumberReading.js +0 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +0 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +0 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +0 -1
- package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/graphicInequation.js +12 -3
- package/lib/exercises/math/functions/cube/cubicEquation.js +0 -1
- package/lib/exercises/math/functions/exponential/expEquation.js +0 -1
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +3 -4
- package/lib/exercises/math/functions/trinoms/rootsFromFactorizedForm.js +0 -1
- package/lib/exercises/math/functions/trinoms/secondDegreeInequation.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/secondDegreeInequation.js +0 -1
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +1 -1
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.js +1 -1
- package/lib/exercises/math/functions/trinoms/summitAbscissFromRoots.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAbscissFromRoots.js +0 -2
- package/lib/exercises/math/geometry/areas/triangleAreaV2.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/triangleAreaV2.js +0 -1
- package/lib/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.js +0 -1
- package/lib/exercises/math/geometry/cartesian/midpoint.js +0 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts +4 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.js +1 -1
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +0 -1
- package/lib/exercises/math/geometry/thales/thales.js +0 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.js +0 -1
- package/lib/exercises/math/geometry/vectors/alignementViaColinearity.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +0 -2
- package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +0 -2
- package/lib/exercises/math/percent/averageEvolutionRate.d.ts.map +1 -1
- package/lib/exercises/math/percent/averageEvolutionRate.js +16 -0
- package/lib/exercises/math/percent/cmToEvolution.d.ts +7 -0
- package/lib/exercises/math/percent/cmToEvolution.d.ts.map +1 -0
- package/lib/exercises/math/percent/cmToEvolution.js +70 -0
- package/lib/exercises/math/percent/evolutionToCM.d.ts +0 -1
- package/lib/exercises/math/percent/evolutionToCM.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutionToCM.js +20 -24
- package/lib/exercises/math/percent/findProportion.d.ts.map +1 -1
- package/lib/exercises/math/percent/findProportion.js +16 -1
- package/lib/exercises/math/percent/globalPercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/globalPercent.js +14 -0
- package/lib/exercises/math/percent/index.d.ts +1 -0
- package/lib/exercises/math/percent/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/index.js +1 -0
- package/lib/exercises/math/percent/isTableProportional.d.ts.map +1 -1
- package/lib/exercises/math/percent/isTableProportional.js +35 -33
- package/lib/exercises/math/percent/percentToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/percent/percentToDecimal.js +14 -1
- package/lib/exercises/math/percent/reciprocalPercentage.d.ts.map +1 -1
- package/lib/exercises/math/percent/reciprocalPercentage.js +18 -0
- package/lib/exercises/math/percent/valuePercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/valuePercent.js +7 -0
- package/lib/exercises/math/powers/calculateNegativePower.js +0 -1
- package/lib/exercises/math/powers/decimalToScientific.d.ts.map +1 -1
- package/lib/exercises/math/powers/decimalToScientific.js +0 -1
- package/lib/exercises/math/powers/powersPower.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersPower.js +0 -1
- package/lib/exercises/math/powers/powersProduct.d.ts.map +1 -1
- package/lib/exercises/math/powers/powersProduct.js +22 -0
- package/lib/exercises/math/powers/scientificToDecimal.d.ts.map +1 -1
- package/lib/exercises/math/powers/scientificToDecimal.js +0 -2
- package/lib/exercises/math/primitive/expUPrimitive.js +0 -1
- package/lib/exercises/math/primitive/exponentialPrimitive.js +0 -1
- package/lib/exercises/math/primitive/logarithmePrimitive.js +0 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.js +0 -1
- package/lib/exercises/math/primitive/sinCosPrimitive.js +0 -1
- package/lib/exercises/math/primitive/sinUCosUPrimitive.js +0 -1
- package/lib/exercises/math/probaStat/cardBasicProbas.js +0 -1
- package/lib/exercises/math/probaStat/diceBasicProbas.js +0 -1
- package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.js +14 -2
- package/lib/exercises/math/probaStat/probabilityTree.js +0 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +13 -4
- package/lib/exercises/math/probaStat/varianceOfBinomialProba.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/varianceOfBinomialProba.js +21 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +15 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +17 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js +0 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts +10 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts.map +1 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +48 -0
- package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -0
- package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/index.js +1 -0
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +14 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +15 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +0 -1
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts +10 -0
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +48 -0
- package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.d.ts +8 -0
- package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricRecognizeReasonFromFirstTerms.js +46 -0
- package/lib/exercises/math/sequences/geometric/index.d.ts +2 -0
- package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/index.js +2 -0
- package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts +2 -3
- package/lib/exercises/math/sets/intervals/inequalityToInterval.d.ts.map +1 -1
- package/lib/exercises/math/sets/intervals/inequalityToInterval.js +23 -91
- package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts +10 -0
- package/lib/exercises/math/sets/intervals/intervalToInequality.d.ts.map +1 -0
- package/lib/exercises/math/sets/intervals/intervalToInequality.js +112 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +15 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +26 -1
- package/lib/exercises/math/squareRoots/squareRootsSum.d.ts.map +1 -1
- package/lib/exercises/math/squareRoots/squareRootsSum.js +0 -1
- package/lib/exercises/math/suites/sequenceEvaluation.js +1 -1
- package/lib/exercises/math/suites/sequencePlot.d.ts.map +1 -1
- package/lib/exercises/math/suites/sequencePlot.js +10 -3
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +0 -1
- package/lib/exercises/pc/energy/energyTransfer.d.ts.map +1 -1
- package/lib/exercises/pc/energy/energyTransfer.js +0 -1
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts.map +1 -1
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +0 -1
- package/lib/exercises/pc/mecanicalWaves/elongationReading.d.ts.map +1 -1
- package/lib/exercises/pc/mecanicalWaves/elongationReading.js +0 -1
- package/lib/index.d.ts +72 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +0 -2
- package/lib/math/geometry/spaceVector.d.ts +1 -0
- package/lib/math/geometry/spaceVector.d.ts.map +1 -1
- package/lib/math/geometry/spaceVector.js +3 -0
- package/lib/math/polynomials/trinom.js +2 -2
- package/lib/pc/constants/molecularChemistry/reaction.js +3 -1
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +2 -14
- package/lib/server.d.ts +1 -0
- package/lib/server.d.ts.map +1 -1
- package/lib/server.js +4 -1
- package/lib/tree/nodes/sets/closure.d.ts +2 -0
- package/lib/tree/nodes/sets/closure.d.ts.map +1 -1
- package/lib/tree/nodes/sets/closure.js +24 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts +3 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/intervalNode.js +13 -0
- package/lib/tree/parsers/latexParser.js +6 -6
- package/lib/utils/numberPrototype/toSeparatedThousands.d.ts +2 -0
- package/lib/utils/numberPrototype/toSeparatedThousands.d.ts.map +1 -0
- package/lib/utils/numberPrototype/toSeparatedThousands.js +12 -0
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ declare global {
|
|
|
7
7
|
}
|
|
8
8
|
interface String {
|
|
9
9
|
toTree: () => AlgebraicNode;
|
|
10
|
+
unfrenchify: () => number;
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
@@ -92,6 +93,20 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
92
93
|
num: number;
|
|
93
94
|
denum: number;
|
|
94
95
|
leadingPart: number;
|
|
96
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
97
|
+
denom: number;
|
|
98
|
+
num1: number;
|
|
99
|
+
num2: number;
|
|
100
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
101
|
+
num1: number;
|
|
102
|
+
num2: number;
|
|
103
|
+
denom1: number;
|
|
104
|
+
denom2: number;
|
|
105
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
106
|
+
num1: number;
|
|
107
|
+
num2: number;
|
|
108
|
+
denom1: number;
|
|
109
|
+
denom2: number;
|
|
95
110
|
}> | import("./exercises/exercise").Exercise<{
|
|
96
111
|
numbers: number[];
|
|
97
112
|
}> | import("./exercises/exercise").Exercise<{
|
|
@@ -105,6 +120,10 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
105
120
|
rand: number;
|
|
106
121
|
a: number;
|
|
107
122
|
b: number;
|
|
123
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
124
|
+
numbers: number[];
|
|
125
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
126
|
+
numbers: number[];
|
|
108
127
|
}> | import("./exercises/exercise").Exercise<{
|
|
109
128
|
type: number;
|
|
110
129
|
a: number;
|
|
@@ -594,6 +613,38 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
594
613
|
ineqSymbol: import("./math/inequations/inequation").InegalitySymbols;
|
|
595
614
|
intervals: {
|
|
596
615
|
a: number;
|
|
616
|
+
/**
|
|
617
|
+
* TODO
|
|
618
|
+
* Décimal : permettre facilement -0.xxx
|
|
619
|
+
* Tree shaking export
|
|
620
|
+
*
|
|
621
|
+
* VEA:
|
|
622
|
+
* -> -3x est bien transofmré en -3*x, x*(-3) mais pas en -x*3
|
|
623
|
+
* ->> faire le meme delire que pour les power mais pour les opposite ?
|
|
624
|
+
* c'est à dire créer toutes les permuts en déplacant le moins qquepart
|
|
625
|
+
* -> faire des nodes pour les Ensembles de nombre
|
|
626
|
+
*
|
|
627
|
+
* !-> choses pour lesquelles la v1 ne marchera pas :
|
|
628
|
+
* !-- fractions non réduites
|
|
629
|
+
* !-- nbs décimaux avec des 0
|
|
630
|
+
* !-- nb quelconque de moins, genre -3*-4 ou -x/-y
|
|
631
|
+
* !-> pour ces choses là il faut obligatoirement parser la rpéonse élève ?
|
|
632
|
+
*
|
|
633
|
+
* Passer les sqrtNode en tree-iable
|
|
634
|
+
*
|
|
635
|
+
*
|
|
636
|
+
*
|
|
637
|
+
* !!!à fix :
|
|
638
|
+
* ! fraction réductible
|
|
639
|
+
* ! 0,20 au lieu de 0,2
|
|
640
|
+
* ! moins partout dans fraction
|
|
641
|
+
* !puissances négatives vers inverse fraction
|
|
642
|
+
* ! simplification du ln
|
|
643
|
+
* ! meileure gestion des [] : le clavier devriat pouvoir produire des left/right ;
|
|
644
|
+
* !aussi en tapant [ puis diviser, le crochet passe en numérateur
|
|
645
|
+
* ! espace tous les 3 chiffres dans un nb (le clavier doit le fournir aussi!)
|
|
646
|
+
|
|
647
|
+
*/
|
|
597
648
|
b: number;
|
|
598
649
|
closure: import("./tree/nodes/sets/closure").ClosureType;
|
|
599
650
|
}[];
|
|
@@ -800,7 +851,10 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
800
851
|
}> | import("./exercises/exercise").Exercise<{
|
|
801
852
|
correctA: number;
|
|
802
853
|
correctB: number;
|
|
803
|
-
}> | import("./exercises/exercise").Exercise<{
|
|
854
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
855
|
+
x: number;
|
|
856
|
+
y: number;
|
|
857
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
804
858
|
coin: boolean;
|
|
805
859
|
radius: number;
|
|
806
860
|
diametre: number;
|
|
@@ -999,7 +1053,6 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
999
1053
|
rate: number;
|
|
1000
1054
|
nbMois: number;
|
|
1001
1055
|
}> | import("./exercises/exercise").Exercise<{
|
|
1002
|
-
isFromEvolutionToCM: boolean;
|
|
1003
1056
|
evolution: number;
|
|
1004
1057
|
}> | import("./exercises/exercise").Exercise<{
|
|
1005
1058
|
evolutions: string[];
|
|
@@ -1016,6 +1069,8 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
1016
1069
|
total: number;
|
|
1017
1070
|
lefties: number;
|
|
1018
1071
|
}> | import("./exercises/exercise").Exercise<{}> | import("./exercises/exercise").Exercise<{
|
|
1072
|
+
evolution: number;
|
|
1073
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
1019
1074
|
int: number;
|
|
1020
1075
|
power: number;
|
|
1021
1076
|
}> | import("./exercises/exercise").Exercise<{
|
|
@@ -1206,6 +1261,11 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
1206
1261
|
rank2: number;
|
|
1207
1262
|
value2: number;
|
|
1208
1263
|
rankAsked: number;
|
|
1264
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
1265
|
+
firstRank: number;
|
|
1266
|
+
firstTerm: number;
|
|
1267
|
+
reason: number;
|
|
1268
|
+
askedRank: number;
|
|
1209
1269
|
}> | import("./exercises/exercise").Exercise<{
|
|
1210
1270
|
firstValue: number;
|
|
1211
1271
|
reason: number;
|
|
@@ -1232,6 +1292,14 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
1232
1292
|
reason: number;
|
|
1233
1293
|
firstValue: number;
|
|
1234
1294
|
firstRank: number;
|
|
1295
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
1296
|
+
firstRank: number;
|
|
1297
|
+
firstTerm: number;
|
|
1298
|
+
reason: number;
|
|
1299
|
+
askedRank: number;
|
|
1300
|
+
}> | import("./exercises/exercise").Exercise<{
|
|
1301
|
+
sequence: number[];
|
|
1302
|
+
reason: number;
|
|
1235
1303
|
}> | import("./exercises/exercise").Exercise<{
|
|
1236
1304
|
rank: number;
|
|
1237
1305
|
coeffs: number[];
|
|
@@ -1242,9 +1310,8 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
|
|
|
1242
1310
|
u0: number;
|
|
1243
1311
|
coeffs: number[];
|
|
1244
1312
|
}> | import("./exercises/exercise").Exercise<{
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
intervalMax: number;
|
|
1313
|
+
intervalMin: string | number;
|
|
1314
|
+
intervalMax: string | number;
|
|
1248
1315
|
intervalClosure: import("./tree/nodes/sets/closure").ClosureType;
|
|
1249
1316
|
}> | import("./exercises/exercise").Exercise<{
|
|
1250
1317
|
int1Min: number;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OA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;;;;;;;;;;KAEgD,CAAC;AACnD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -31,6 +31,9 @@ const PCExercises = __importStar(require("./exercises/pc"));
|
|
|
31
31
|
const infiniteNode_1 = require("./tree/nodes/numbers/infiniteNode");
|
|
32
32
|
const toScientific_1 = require("./utils/numberPrototype/toScientific");
|
|
33
33
|
const variableNode_1 = require("./tree/nodes/variables/variableNode");
|
|
34
|
+
String.prototype.unfrenchify = function () {
|
|
35
|
+
return Number(this.valueOf().replace(",", "."));
|
|
36
|
+
};
|
|
34
37
|
String.prototype.toTree = function () {
|
|
35
38
|
return new variableNode_1.VariableNode(this.valueOf());
|
|
36
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAQjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,qBAAa,IAAI;IACf,MAAM,EAAE,KAAK,CAAC;IACd,MAAM,EAAE,KAAK,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC7B,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;gBACjB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK;IAkBxC,YAAY,CAAC,KAAK,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAQjE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,qBAAa,IAAI;IACf,MAAM,EAAE,KAAK,CAAC;IACd,MAAM,EAAE,KAAK,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;IACpB,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IAC7B,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;gBACjB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK;IAkBxC,YAAY,CAAC,KAAK,EAAE,KAAK;IASzB,QAAQ,CAAC,KAAK,EAAE,KAAK;IAarB,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM;IAa5B,WAAW,MAAO,MAAM,KAAK,KAAK,KAAG,SAAS,CAmB5C;IAEF,oBAAoB,IAAI,SAAS;CAsBlC"}
|
|
@@ -40,7 +40,6 @@ class Line {
|
|
|
40
40
|
}
|
|
41
41
|
getParallele(point) {
|
|
42
42
|
if (this.isVertical) {
|
|
43
|
-
console.log(this.pointA.toTexWithCoords(), this.pointB.toTexWithCoords());
|
|
44
43
|
throw Error("Parallel vertical lines not implemented");
|
|
45
44
|
}
|
|
46
45
|
const x = new addNode_1.AddNode(point.x, new numberNode_1.NumberNode(1)).simplify();
|
|
@@ -61,7 +60,6 @@ class Line {
|
|
|
61
60
|
}
|
|
62
61
|
const x = new numberNode_1.NumberNode((0, randint_1.randint)(-10, 10));
|
|
63
62
|
const y = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(this.a, x), this.b).simplify();
|
|
64
|
-
console.log(y.toTex(), this.a.toTex(), x.toTex(), this.b?.toTex());
|
|
65
63
|
return new point_1.Point(name ?? "A", x, y);
|
|
66
64
|
}
|
|
67
65
|
getCartesianEquation() {
|
|
@@ -14,6 +14,7 @@ export declare class SpaceVector {
|
|
|
14
14
|
z: AlgebraicNode;
|
|
15
15
|
constructor(name: string, x: AlgebraicNode, y: AlgebraicNode, z: AlgebraicNode);
|
|
16
16
|
toTex(): string;
|
|
17
|
+
toCoordsTex(): string;
|
|
17
18
|
toInlineCoordsTex(): string;
|
|
18
19
|
toTexWithCoords(): string;
|
|
19
20
|
isColinear(v: SpaceVector): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spaceVector.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/spaceVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,IAAI,EAAY,MAAM,uBAAuB,CAAC;AAQvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,8BAAsB,sBAAsB;IAC1C,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,GAAG,WAAW;IAQnE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,UAAO,GAAG,WAAW;IAY1D,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,SAAS,UAAO,GAAG,WAAW,EAAE;CAW1E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,EAAE,SAAS,UAAO,GAAG,WAAW,EAAE;CAW1E;AAED,qBAAa,WAAW;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,EAAE,aAAa,CAAC;IACjB,CAAC,EAAE,aAAa,CAAC;IACjB,CAAC,EAAE,aAAa,CAAC;gBAEf,IAAI,EAAE,MAAM,EACZ,CAAC,EAAE,aAAa,EAChB,CAAC,EAAE,aAAa,EAChB,CAAC,EAAE,aAAa;IASlB,KAAK,IAAI,MAAM;IAIf,WAAW,IAAI,MAAM;IAGrB,iBAAiB,IAAI,MAAM;IAK3B,eAAe,IAAI,MAAM;IAMzB,UAAU,CAAC,CAAC,EAAE,WAAW,GAAG,OAAO;IAGnC,WAAW,CAAC,CAAC,EAAE,WAAW,GAAG,aAAa;IAI1C,KAAK,CAAC,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,MAAM;IAQrC,aAAa,CAAC,CAAC,EAAE,WAAW,GAAG,IAAI;IAInC,GAAG,CAAC,CAAC,EAAE,WAAW,GAAG,WAAW;IAShC,OAAO,IAAI,aAAa;IAYxB,WAAW,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,MAAM;IAQjD,MAAM,CAAC,CAAC,EAAE,WAAW;CAGtB"}
|
|
@@ -47,6 +47,9 @@ class SpaceVector {
|
|
|
47
47
|
toTex() {
|
|
48
48
|
return `\\overrightarrow{${this.name}}`;
|
|
49
49
|
}
|
|
50
|
+
toCoordsTex() {
|
|
51
|
+
return `\\begin{pmatrix}${this.x.toTex()} \\\\ ${this.y.toTex()} \\\\ ${this.z.toTex()} \\end{pmatrix}`;
|
|
52
|
+
}
|
|
50
53
|
toInlineCoordsTex() {
|
|
51
54
|
return `\\left(${this.x.simplify().toTex()};${this.y
|
|
52
55
|
.simplify()
|
|
@@ -179,14 +179,14 @@ class Trinom extends polynomial_1.Polynomial {
|
|
|
179
179
|
const alpha = this.getAlpha();
|
|
180
180
|
let square;
|
|
181
181
|
if (alpha !== 0) {
|
|
182
|
-
square = new powerNode_1.SquareNode(new addNode_1.AddNode(new variableNode_1.VariableNode(this.variable), new oppositeNode_1.OppositeNode(this.getAlphaNode())));
|
|
182
|
+
square = new powerNode_1.SquareNode(new addNode_1.AddNode(new variableNode_1.VariableNode(this.variable), new oppositeNode_1.OppositeNode(this.getAlphaNode()).simplify()));
|
|
183
183
|
}
|
|
184
184
|
else {
|
|
185
185
|
square = new powerNode_1.SquareNode(new variableNode_1.VariableNode(this.variable));
|
|
186
186
|
}
|
|
187
187
|
const beta = this.getBeta();
|
|
188
188
|
return beta !== 0
|
|
189
|
-
? new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(this.a), square),
|
|
189
|
+
? new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(this.a), square), this.getBetaNode())
|
|
190
190
|
: new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(this.a), square);
|
|
191
191
|
}
|
|
192
192
|
getSommet() {
|
|
@@ -324,7 +324,9 @@ class ReactionConstructor {
|
|
|
324
324
|
for (const reactionSpecies of reaction) {
|
|
325
325
|
const foundMolecule = molecule_1.molecules.find((molecule) => molecule.formula === reactionSpecies.species);
|
|
326
326
|
if (!foundMolecule) {
|
|
327
|
-
console.log(
|
|
327
|
+
// console.log(
|
|
328
|
+
// `La species '${reactionSpecies.species}' n'a pas été trouvée dans molecules.`,
|
|
329
|
+
// );
|
|
328
330
|
}
|
|
329
331
|
}
|
|
330
332
|
}
|
package/lib/playground.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../src/playground.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../src/playground.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,UAAU,YAEtB,CAAC"}
|
package/lib/playground.js
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.playground = void 0;
|
|
4
|
-
const
|
|
5
|
-
const randTupleInt_1 = require("./math/utils/random/randTupleInt");
|
|
6
|
-
const addNode_1 = require("./tree/nodes/operators/addNode");
|
|
7
|
-
const multiplyNode_1 = require("./tree/nodes/operators/multiplyNode");
|
|
8
|
-
const random_1 = require("./utils/random");
|
|
9
|
-
const shuffle_1 = require("./utils/shuffle");
|
|
4
|
+
const infiniteNode_1 = require("./tree/nodes/numbers/infiniteNode");
|
|
10
5
|
const playground = () => {
|
|
11
|
-
|
|
12
|
-
const permut = [
|
|
13
|
-
(0, shuffle_1.shuffle)([affines[0], affines[1]]),
|
|
14
|
-
(0, shuffle_1.shuffle)([affines[0], affines[2]]),
|
|
15
|
-
];
|
|
16
|
-
const operation = (0, random_1.random)(["add", "substract"]);
|
|
17
|
-
const statementTree = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(permut[0][0].toTree(), permut[0][1].toTree()), new multiplyNode_1.MultiplyNode(permut[1][0].toTree(), permut[1][1].toTree()));
|
|
18
|
-
console.log((0, randTupleInt_1.distinctRandTupleInt)(3, 2, { from: 1, to: 10 }));
|
|
6
|
+
console.log(infiniteNode_1.MinusInfinityNode.evaluate({}));
|
|
19
7
|
};
|
|
20
8
|
exports.playground = playground;
|
package/lib/server.d.ts
CHANGED
package/lib/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAuC3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,SAAS,EAAE,MAAM,MAAM,CAAC;QACxB,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,aAAa,CAAC;KACpD;IACD,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAuC3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,SAAS,EAAE,MAAM,MAAM,CAAC;QACxB,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,aAAa,CAAC;KACpD;IACD,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,WAAW,EAAE,MAAM,MAAM,CAAC;KAC3B;CACF"}
|
package/lib/server.js
CHANGED
|
@@ -45,6 +45,9 @@ const allExercises = [...mathExercises, ...pcExercises];
|
|
|
45
45
|
String.prototype.toTree = function () {
|
|
46
46
|
return new variableNode_1.VariableNode(this.valueOf());
|
|
47
47
|
};
|
|
48
|
+
String.prototype.unfrenchify = function () {
|
|
49
|
+
return Number(this.valueOf().replace(",", "."));
|
|
50
|
+
};
|
|
48
51
|
Number.prototype.toTree = function () {
|
|
49
52
|
const value = this.valueOf();
|
|
50
53
|
if (value === Infinity)
|
|
@@ -65,7 +68,7 @@ const runServer = () => {
|
|
|
65
68
|
app.use((0, cors_1.default)());
|
|
66
69
|
console.log("math exos", mathExercises.length);
|
|
67
70
|
console.log("math hints", mathExercises.filter((exo) => exo.hasHintAndCorrection).length);
|
|
68
|
-
console.log("pc exos", pcExercises.length);
|
|
71
|
+
console.log("pc exos", `${pcExercises.length}`);
|
|
69
72
|
(0, playground_1.playground)();
|
|
70
73
|
app.get("/", (req, res) => {
|
|
71
74
|
res.json(allExercises);
|
|
@@ -7,6 +7,8 @@ export declare enum ClosureType {
|
|
|
7
7
|
export declare abstract class Closure {
|
|
8
8
|
static random(): ClosureType;
|
|
9
9
|
static reverse(closure: ClosureType): ClosureType;
|
|
10
|
+
static leftReverse(closure: ClosureType): ClosureType;
|
|
11
|
+
static rightReverse(closure: ClosureType): ClosureType;
|
|
10
12
|
static switch(closure: ClosureType): ClosureType;
|
|
11
13
|
static fromBrackets(left: "[" | "]", right: "]" | "["): ClosureType;
|
|
12
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"closure.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/closure.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACrB,EAAE,IAAA;IACF,EAAE,IAAA;IACF,EAAE,IAAA;IACF,EAAE,IAAA;CACH;AAED,8BAAsB,OAAO;IAC3B,MAAM,CAAC,MAAM;IAcb,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,WAAW;IAYnC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW;IAYlC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG;CAOtD"}
|
|
1
|
+
{"version":3,"file":"closure.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/closure.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACrB,EAAE,IAAA;IACF,EAAE,IAAA;IACF,EAAE,IAAA;IACF,EAAE,IAAA;CACH;AAED,8BAAsB,OAAO;IAC3B,MAAM,CAAC,MAAM;IAcb,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,WAAW;IAYnC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW;IAYvC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,WAAW;IAYxC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW;IAYlC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG;CAOtD"}
|
|
@@ -36,6 +36,30 @@ class Closure {
|
|
|
36
36
|
return ClosureType.FO;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
+
static leftReverse(closure) {
|
|
40
|
+
switch (closure) {
|
|
41
|
+
case ClosureType.FF:
|
|
42
|
+
return ClosureType.OF;
|
|
43
|
+
case ClosureType.OO:
|
|
44
|
+
return ClosureType.FO;
|
|
45
|
+
case ClosureType.FO:
|
|
46
|
+
return ClosureType.OO;
|
|
47
|
+
case ClosureType.OF:
|
|
48
|
+
return ClosureType.FF;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
static rightReverse(closure) {
|
|
52
|
+
switch (closure) {
|
|
53
|
+
case ClosureType.OF:
|
|
54
|
+
return ClosureType.OO;
|
|
55
|
+
case ClosureType.OO:
|
|
56
|
+
return ClosureType.OF;
|
|
57
|
+
case ClosureType.FO:
|
|
58
|
+
return ClosureType.FF;
|
|
59
|
+
case ClosureType.FF:
|
|
60
|
+
return ClosureType.FO;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
39
63
|
static switch(closure) {
|
|
40
64
|
switch (closure) {
|
|
41
65
|
case ClosureType.FF:
|
|
@@ -18,6 +18,9 @@ export declare class IntervalNode implements SetNode {
|
|
|
18
18
|
toMathString(): string;
|
|
19
19
|
toMathjs(): string;
|
|
20
20
|
toReversedClosure(): IntervalNode;
|
|
21
|
+
toLeftReversedClosure(): IntervalNode;
|
|
22
|
+
toRightReversedClosure(): IntervalNode;
|
|
23
|
+
toRandomDifferentClosure(): IntervalNode;
|
|
21
24
|
toComplement(): IntervalNode | UnionIntervalNode;
|
|
22
25
|
toTex(): string;
|
|
23
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intervalNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/intervalNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAQtD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AC1C,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,OAAO,EAAE,WAAW,CAAC;IACrB,CAAC,EAAE,IAAI,CAAC;IACR,CAAC,EAAE,IAAI,CAAC;gBACI,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW;IAStE,cAAc,CAAC,IAAI,CAAC,EAAE,WAAW;IAMjC,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW;IAoBpC,YAAY,CAAC,WAAW,CAAC,EAAE,IAAI;IA4B/B,YAAY;IAIZ,QAAQ;IAIR,iBAAiB;IAGjB,qBAAqB;IAGrB,sBAAsB;IAGtB,wBAAwB;IAWxB,YAAY;IAkCZ,KAAK;CAWN"}
|
|
@@ -63,6 +63,19 @@ class IntervalNode {
|
|
|
63
63
|
toReversedClosure() {
|
|
64
64
|
return new IntervalNode(this.a, this.b, closure_1.Closure.reverse(this.closure));
|
|
65
65
|
}
|
|
66
|
+
toLeftReversedClosure() {
|
|
67
|
+
return new IntervalNode(this.a, this.b, closure_1.Closure.leftReverse(this.closure));
|
|
68
|
+
}
|
|
69
|
+
toRightReversedClosure() {
|
|
70
|
+
return new IntervalNode(this.a, this.b, closure_1.Closure.rightReverse(this.closure));
|
|
71
|
+
}
|
|
72
|
+
toRandomDifferentClosure() {
|
|
73
|
+
return new IntervalNode(this.a, this.b, Math.random() < 0.3
|
|
74
|
+
? closure_1.Closure.leftReverse(this.closure)
|
|
75
|
+
: Math.random() < 0.3
|
|
76
|
+
? closure_1.Closure.reverse(this.closure)
|
|
77
|
+
: closure_1.Closure.rightReverse(this.closure));
|
|
78
|
+
}
|
|
66
79
|
toComplement() {
|
|
67
80
|
if ((0, infiniteNode_1.isInfiniteNode)(this.a) && (0, infiniteNode_1.isInfiniteNode)(this.b))
|
|
68
81
|
return this;
|
|
@@ -101,7 +101,7 @@ const buildTree = (tokens) => {
|
|
|
101
101
|
if (token === ")" || token === "}")
|
|
102
102
|
currentDepth--;
|
|
103
103
|
}
|
|
104
|
-
console.log("depthed: ", depthedTokens);
|
|
104
|
+
// console.log("depthed: ", depthedTokens);
|
|
105
105
|
while (true) {
|
|
106
106
|
if (maxDepth === 0) {
|
|
107
107
|
const tree = buildTreeForSameDepthTokens(depthedTokens.map((el) => el.token));
|
|
@@ -119,13 +119,13 @@ const buildTree = (tokens) => {
|
|
|
119
119
|
token: tree,
|
|
120
120
|
depth: token.depth - 1,
|
|
121
121
|
});
|
|
122
|
-
console.log(`depthed after iter ${i}`, depthedTokens);
|
|
122
|
+
// console.log(`depthed after iter ${i}`, depthedTokens);
|
|
123
123
|
}
|
|
124
124
|
maxDepth--;
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
const buildTreeForSameDepthTokens = (tokens) => {
|
|
128
|
-
console.log("start: ", tokens);
|
|
128
|
+
// console.log("start: ", tokens);
|
|
129
129
|
let tempTokens = [];
|
|
130
130
|
for (let i = 0; i < tokens.length; i++) {
|
|
131
131
|
const token = tokens[i];
|
|
@@ -148,7 +148,7 @@ const buildTreeForSameDepthTokens = (tokens) => {
|
|
|
148
148
|
else
|
|
149
149
|
throw Error(`token not implemented: ${token}`);
|
|
150
150
|
}
|
|
151
|
-
console.log("after parses : ", tempTokens);
|
|
151
|
+
// console.log("after parses : ", tempTokens);
|
|
152
152
|
//1 build les fct
|
|
153
153
|
for (let i = 0; i < tempTokens.length; i++) {
|
|
154
154
|
if (typeof tempTokens[i] !== "string")
|
|
@@ -210,7 +210,7 @@ const buildTreeForSameDepthTokens = (tokens) => {
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
console.log("after fcts: ", tempTokens);
|
|
213
|
+
// console.log("after fcts: ", tempTokens);
|
|
214
214
|
//3 build les *
|
|
215
215
|
let currentProduct;
|
|
216
216
|
let currentProductStartIndex;
|
|
@@ -251,7 +251,7 @@ const buildTreeForSameDepthTokens = (tokens) => {
|
|
|
251
251
|
}
|
|
252
252
|
//4 build les +
|
|
253
253
|
let currentAdd;
|
|
254
|
-
console.log("beforeAdd", tempTokens);
|
|
254
|
+
// console.log("beforeAdd", tempTokens);
|
|
255
255
|
for (let i = 0; i < tempTokens.length; i++) {
|
|
256
256
|
const token = tempTokens[i];
|
|
257
257
|
if (!currentAdd) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toSeparatedThousands.d.ts","sourceRoot":"","sources":["../../../src/utils/numberPrototype/toSeparatedThousands.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,MAAO,MAAM,WAQ7C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toSeperatedThousands = void 0;
|
|
4
|
+
const toSeperatedThousands = (t) => {
|
|
5
|
+
const n = t.unfrenchify();
|
|
6
|
+
if (isNaN(n))
|
|
7
|
+
throw Error("NaN passed to toSeperatedThousands");
|
|
8
|
+
const [intPart, fracPart] = t.split(",");
|
|
9
|
+
return (intPart.replace(/\B(?=(\d{3})+(?!\d))/g, "\\ ") +
|
|
10
|
+
(fracPart !== undefined ? "," + fracPart : ""));
|
|
11
|
+
};
|
|
12
|
+
exports.toSeperatedThousands = toSeperatedThousands;
|