math-exercises 3.0.199 → 3.0.201
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/exercise.d.ts +14 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/_debug/debugReorder1.d.ts +8 -0
- package/lib/exercises/math/_debug/debugReorder1.d.ts.map +1 -0
- package/lib/exercises/math/_debug/debugReorder1.js +81 -0
- package/lib/exercises/math/_debug/debugReorder2.d.ts +10 -0
- package/lib/exercises/math/_debug/debugReorder2.d.ts.map +1 -0
- package/lib/exercises/math/_debug/debugReorder2.js +88 -0
- package/lib/exercises/math/_debug/debugReorder3.d.ts +10 -0
- package/lib/exercises/math/_debug/debugReorder3.d.ts.map +1 -0
- package/lib/exercises/math/_debug/debugReorder3.js +81 -0
- package/lib/exercises/math/_debug/index.d.ts +3 -1
- package/lib/exercises/math/_debug/index.d.ts.map +1 -1
- package/lib/exercises/math/_debug/index.js +3 -1
- package/lib/exercises/math/calcul/factorial/index.d.ts +2 -0
- package/lib/exercises/math/calcul/factorial/index.d.ts.map +1 -0
- package/lib/exercises/math/calcul/factorial/index.js +1 -0
- package/lib/exercises/math/calcul/factorial/simplifyQuotientOfFactorialToProduct.d.ts +8 -0
- package/lib/exercises/math/calcul/factorial/simplifyQuotientOfFactorialToProduct.d.ts.map +1 -0
- package/lib/exercises/math/calcul/factorial/simplifyQuotientOfFactorialToProduct.js +199 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +1 -1
- package/lib/exercises/math/calcul/index.d.ts +1 -0
- package/lib/exercises/math/calcul/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/index.js +1 -0
- package/lib/exercises/math/calculLitteral/inequations/index.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/inequations/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/index.js +1 -0
- package/lib/exercises/math/calculLitteral/inequations/inequationCenteredInterval.d.ts +14 -0
- package/lib/exercises/math/calculLitteral/inequations/inequationCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/inequations/inequationCenteredInterval.js +263 -0
- package/lib/exercises/math/combinatory/anagrams.d.ts.map +1 -1
- package/lib/exercises/math/combinatory/anagrams.js +89 -68
- package/lib/exercises/math/combinatory/combination/index.d.ts +3 -0
- package/lib/exercises/math/combinatory/combination/index.d.ts.map +1 -0
- package/lib/exercises/math/combinatory/combination/index.js +2 -0
- package/lib/exercises/math/combinatory/combination/mentalCalculateCombination.d.ts +11 -0
- package/lib/exercises/math/combinatory/combination/mentalCalculateCombination.d.ts.map +1 -0
- package/lib/exercises/math/combinatory/combination/mentalCalculateCombination.js +225 -0
- package/lib/exercises/math/combinatory/combination/writeCombinationFormulaUsingFactorial.d.ts +13 -0
- package/lib/exercises/math/combinatory/combination/writeCombinationFormulaUsingFactorial.d.ts.map +1 -0
- package/lib/exercises/math/combinatory/combination/writeCombinationFormulaUsingFactorial.js +285 -0
- package/lib/exercises/math/combinatory/index.d.ts +1 -0
- package/lib/exercises/math/combinatory/index.d.ts.map +1 -1
- package/lib/exercises/math/combinatory/index.js +1 -0
- package/lib/exercises/math/dataRepresentations/index.d.ts +1 -1
- package/lib/exercises/math/dataRepresentations/index.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/index.js +5 -1
- package/lib/exercises/math/dataRepresentations/scatterPlot/index.d.ts +0 -2
- package/lib/exercises/math/dataRepresentations/scatterPlot/index.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/scatterPlot/index.js +2 -2
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotInterpreting.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/scatterPlot/scatterPlotInterpreting.js +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/index.d.ts +2 -0
- package/lib/exercises/math/derivation/derivative/trigo/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/index.js +3 -0
- package/lib/exercises/math/derivation/derivative/trigo/productOfSinAXPlusBCosCXPlusDDerivative.d.ts +9 -0
- package/lib/exercises/math/derivation/derivative/trigo/productOfSinAXPlusBCosCXPlusDDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/productOfSinAXPlusBCosCXPlusDDerivative.js +209 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinAndCosMixedWithSquareDerivative.d.ts +9 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinAndCosMixedWithSquareDerivative.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinAndCosMixedWithSquareDerivative.js +359 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.d.ts +11 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.js +445 -0
- package/lib/exercises/math/derivation/problems/index.d.ts +0 -1
- package/lib/exercises/math/derivation/problems/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/problems/index.js +1 -1
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts.map +1 -1
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.js +5 -2
- package/lib/exercises/math/derivation/tangent/index.d.ts +0 -1
- package/lib/exercises/math/derivation/tangent/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/index.js +1 -1
- package/lib/exercises/math/derivation/variations/index.d.ts +1 -1
- package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/index.js +2 -1
- package/lib/exercises/math/derivation/variations/signVarTableAffinePlusCXLogX.d.ts +10 -0
- package/lib/exercises/math/derivation/variations/signVarTableAffinePlusCXLogX.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/signVarTableAffinePlusCXLogX.js +222 -0
- package/lib/exercises/math/derivation/variations/signVarTableProductFExp.js +1 -1
- package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.js +1 -1
- package/lib/exercises/math/functions/affines/affineVarTableOnBoundedInterval.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineVarTableOnBoundedInterval.js +2 -3
- package/lib/exercises/math/functions/affines/index.d.ts +5 -0
- package/lib/exercises/math/functions/affines/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/index.js +5 -0
- package/lib/exercises/math/functions/integral/index.d.ts +1 -0
- package/lib/exercises/math/functions/integral/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/index.js +1 -0
- package/lib/exercises/math/functions/integral/integralTrinomialOverX2.d.ts +12 -0
- package/lib/exercises/math/functions/integral/integralTrinomialOverX2.d.ts.map +1 -0
- package/lib/exercises/math/functions/integral/integralTrinomialOverX2.js +280 -0
- package/lib/exercises/math/functions/logarithm/findLargestPossibleDomainOfLogF.d.ts +13 -0
- package/lib/exercises/math/functions/logarithm/findLargestPossibleDomainOfLogF.d.ts.map +1 -0
- package/lib/exercises/math/functions/logarithm/findLargestPossibleDomainOfLogF.js +622 -0
- package/lib/exercises/math/functions/logarithm/index.d.ts +5 -0
- package/lib/exercises/math/functions/logarithm/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/index.js +5 -0
- package/lib/exercises/math/functions/logarithm/logEquationLnAXPlusBEqualsK.d.ts +10 -0
- package/lib/exercises/math/functions/logarithm/logEquationLnAXPlusBEqualsK.d.ts.map +1 -0
- package/lib/exercises/math/functions/logarithm/logEquationLnAXPlusBEqualsK.js +172 -0
- package/lib/exercises/math/functions/logarithm/logInequationIntegerSolutions.d.ts +11 -0
- package/lib/exercises/math/functions/logarithm/logInequationIntegerSolutions.d.ts.map +1 -0
- package/lib/exercises/math/functions/logarithm/logInequationIntegerSolutions.js +163 -0
- package/lib/exercises/math/functions/logarithm/logInequationLnAXPlusBInfK.d.ts +18 -0
- package/lib/exercises/math/functions/logarithm/logInequationLnAXPlusBInfK.d.ts.map +1 -0
- package/lib/exercises/math/functions/logarithm/logInequationLnAXPlusBInfK.js +330 -0
- package/lib/exercises/math/functions/logarithm/logLinearCombinationSimplifiying.d.ts +11 -0
- package/lib/exercises/math/functions/logarithm/logLinearCombinationSimplifiying.d.ts.map +1 -0
- package/lib/exercises/math/functions/logarithm/logLinearCombinationSimplifiying.js +185 -0
- package/lib/exercises/math/index.d.ts +1 -0
- package/lib/exercises/math/index.d.ts.map +1 -1
- package/lib/exercises/math/index.js +1 -0
- package/lib/exercises/math/integration/fromExpr/areaBetweenCrossingCurvesFixedPosFromExpr.d.ts +15 -0
- package/lib/exercises/math/integration/fromExpr/areaBetweenCrossingCurvesFixedPosFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/areaBetweenCrossingCurvesFixedPosFromExpr.js +505 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByBoundingFunctionWithAffinesFromExpr.d.ts +16 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByBoundingFunctionWithAffinesFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByBoundingFunctionWithAffinesFromExpr.js +433 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByManualRectanglesMethodFromExpr.d.ts +15 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByManualRectanglesMethodFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/boundIntegralByManualRectanglesMethodFromExpr.js +436 -0
- package/lib/exercises/math/integration/fromExpr/byParts/index.d.ts +3 -0
- package/lib/exercises/math/integration/fromExpr/byParts/index.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/byParts/index.js +2 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfAXPlusBTimesExpKXByParts.d.ts +9 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfAXPlusBTimesExpKXByParts.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfAXPlusBTimesExpKXByParts.js +234 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfPolynomialTimesLogXByParts.d.ts +12 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfPolynomialTimesLogXByParts.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/byParts/integralOfPolynomialTimesLogXByParts.js +330 -0
- package/lib/exercises/math/integration/fromExpr/checkIsPrimitiveFromExpr.d.ts +15 -0
- package/lib/exercises/math/integration/fromExpr/checkIsPrimitiveFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/checkIsPrimitiveFromExpr.js +450 -0
- package/lib/exercises/math/integration/fromExpr/derivativeOfPrimitive.d.ts +10 -0
- package/lib/exercises/math/integration/fromExpr/derivativeOfPrimitive.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/derivativeOfPrimitive.js +261 -0
- package/lib/exercises/math/integration/fromExpr/index.d.ts +8 -0
- package/lib/exercises/math/integration/fromExpr/index.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/index.js +8 -0
- package/lib/exercises/math/integration/fromExpr/integralFromExpr.d.ts +13 -0
- package/lib/exercises/math/integration/fromExpr/integralFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/integralFromExpr.js +359 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/index.d.ts +2 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/index.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/index.js +1 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/meanValueOfTrinomFromIntegralFromExpr.d.ts +14 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/meanValueOfTrinomFromIntegralFromExpr.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromExpr/meanValue/meanValueOfTrinomFromIntegralFromExpr.js +429 -0
- package/lib/exercises/math/integration/fromGraph/boundIntegralByManipulatingAutomaticRectanglesMethodFromGraph.d.ts +10 -0
- package/lib/exercises/math/integration/fromGraph/boundIntegralByManipulatingAutomaticRectanglesMethodFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/boundIntegralByManipulatingAutomaticRectanglesMethodFromGraph.js +286 -0
- package/lib/exercises/math/integration/fromGraph/imageOfPrimitiveByManipulatingIntegralBoundsFromGraph.d.ts +9 -0
- package/lib/exercises/math/integration/fromGraph/imageOfPrimitiveByManipulatingIntegralBoundsFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/imageOfPrimitiveByManipulatingIntegralBoundsFromGraph.js +231 -0
- package/lib/exercises/math/integration/fromGraph/index.d.ts +7 -0
- package/lib/exercises/math/integration/fromGraph/index.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/index.js +6 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromExprByComputingArea.d.ts +15 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromExprByComputingArea.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromExprByComputingArea.js +464 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromGraph.d.ts +15 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/integralOfAffineFromGraph.js +493 -0
- package/lib/exercises/math/integration/fromGraph/integralOfPiecewiseAffineFromGraph.d.ts +18 -0
- package/lib/exercises/math/integration/fromGraph/integralOfPiecewiseAffineFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/integralOfPiecewiseAffineFromGraph.js +466 -0
- package/lib/exercises/math/integration/fromGraph/varTableOfPrimitiveFromGraph.d.ts +10 -0
- package/lib/exercises/math/integration/fromGraph/varTableOfPrimitiveFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/integration/fromGraph/varTableOfPrimitiveFromGraph.js +192 -0
- package/lib/exercises/math/integration/index.d.ts +4 -0
- package/lib/exercises/math/integration/index.d.ts.map +1 -0
- package/lib/exercises/math/integration/index.js +3 -0
- package/lib/exercises/math/integration/integralOfPiecewiseFunctionByUsingComputedIntegrals.d.ts +14 -0
- package/lib/exercises/math/integration/integralOfPiecewiseFunctionByUsingComputedIntegrals.d.ts.map +1 -0
- package/lib/exercises/math/integration/integralOfPiecewiseFunctionByUsingComputedIntegrals.js +222 -0
- package/lib/exercises/math/limits/frac1XTimesALogXPlusBLimit.d.ts +8 -0
- package/lib/exercises/math/limits/frac1XTimesALogXPlusBLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/frac1XTimesALogXPlusBLimit.js +121 -0
- package/lib/exercises/math/limits/index.d.ts +3 -0
- package/lib/exercises/math/limits/index.d.ts.map +1 -1
- package/lib/exercises/math/limits/index.js +3 -0
- package/lib/exercises/math/limits/kLogXPlusTrinomLimit.d.ts +12 -0
- package/lib/exercises/math/limits/kLogXPlusTrinomLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/kLogXPlusTrinomLimit.js +224 -0
- package/lib/exercises/math/limits/logOfPolynomialLimit.d.ts +10 -0
- package/lib/exercises/math/limits/logOfPolynomialLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/logOfPolynomialLimit.js +154 -0
- package/lib/exercises/math/limits/sequenceGeometricLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequenceGeometricLimit.js +9 -0
- package/lib/exercises/math/primitive/constantPrimitive.d.ts +8 -5
- package/lib/exercises/math/primitive/constantPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/constantPrimitive.js +40 -21
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfLinearCombination.d.ts +12 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfLinearCombination.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfLinearCombination.js +170 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromDice.d.ts +7 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromDice.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromDice.js +163 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromProbaLaw.d.ts +14 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromProbaLaw.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/expectedValueOfSumFromProbaLaw.js +150 -0
- package/lib/exercises/math/probaStat/basicProbas/index.d.ts +5 -0
- package/lib/exercises/math/probaStat/basicProbas/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/basicProbas/index.js +5 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfLinearCombination.d.ts +12 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfLinearCombination.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfLinearCombination.js +193 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfMean.d.ts +13 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfMean.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/basicProbas/varianceOfMean.js +171 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialExpectedValueFromSituation.d.ts +9 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialExpectedValueFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialExpectedValueFromSituation.js +125 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindParamsFromSituation.d.ts +9 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindParamsFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindParamsFromSituation.js +126 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfAtLeastOneSuccessFromSituation.d.ts +8 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfAtLeastOneSuccessFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfAtLeastOneSuccessFromSituation.js +150 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfXCompKFromSituation.d.ts +15 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfXCompKFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindProbaOfXCompKFromSituation.js +386 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindThresholdForNFromSituation.d.ts +14 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindThresholdForNFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialFindThresholdForNFromSituation.js +248 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialSituations.d.ts +47 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialSituations.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/binomialSituations.js +184 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/buildTreeBernoulliFromSituation.d.ts +9 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/buildTreeBernoulliFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/buildTreeBernoulliFromSituation.js +120 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/index.d.ts +7 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/fromSituation/index.js +6 -0
- package/lib/exercises/math/probaStat/binomial/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/binomial/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/binomial/index.js +1 -0
- package/lib/exercises/math/probaStat/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/index.js +1 -0
- package/lib/exercises/math/probaStat/stats2var/averagePoint.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats2var/averagePoint.js +34 -2
- package/lib/exercises/math/probaStat/tchebychev/index.d.ts +5 -0
- package/lib/exercises/math/probaStat/tchebychev/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/index.js +4 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/index.d.ts +4 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/index.js +3 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevFindRadiusToMinorizeProbaOfMeanInCenteredInterval.d.ts +11 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevFindRadiusToMinorizeProbaOfMeanInCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevFindRadiusToMinorizeProbaOfMeanInCenteredInterval.js +273 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMajorizeProbaOfMeanOutOfCenteredInterval.d.ts +14 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMajorizeProbaOfMeanOutOfCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMajorizeProbaOfMeanOutOfCenteredInterval.js +219 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMinorizeProbaOfMeanInCenteredInterval.d.ts +14 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMinorizeProbaOfMeanInCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/mean/tchebychevMinorizeProbaOfMeanInCenteredInterval.js +245 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevFindRadiusToMajorizeProbaOfXOutOfCenteredInterval.d.ts +10 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevFindRadiusToMajorizeProbaOfXOutOfCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevFindRadiusToMajorizeProbaOfXOutOfCenteredInterval.js +191 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMajorizeProbaOfXOutOfCenteredInterval.d.ts +10 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMajorizeProbaOfXOutOfCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMajorizeProbaOfXOutOfCenteredInterval.js +135 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMinorizeProbaOfXInCenteredInterval.d.ts +10 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMinorizeProbaOfXInCenteredInterval.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/tchebychev/tchebychevMinorizeProbaOfXInCenteredInterval.js +155 -0
- package/lib/exercises/math/probaStat/trees/buildTreeBernoulli.d.ts +9 -0
- package/lib/exercises/math/probaStat/trees/buildTreeBernoulli.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/trees/buildTreeBernoulli.js +124 -0
- package/lib/exercises/math/probaStat/trees/index.d.ts +1 -0
- package/lib/exercises/math/probaStat/trees/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/trees/index.js +1 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricFindThresholdFromGraph.d.ts +15 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricFindThresholdFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricFindThresholdFromGraph.js +255 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricFindThresholdUsingCalculator.d.ts +15 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricFindThresholdUsingCalculator.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricFindThresholdUsingCalculator.js +242 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricPlaceFirstPoints.js +4 -4
- package/lib/exercises/math/sequences/geometric/graph/geometricSignOfReasonFromGraph.d.ts +12 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricSignOfReasonFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/graph/geometricSignOfReasonFromGraph.js +161 -0
- package/lib/exercises/math/sequences/geometric/graph/index.d.ts +4 -0
- package/lib/exercises/math/sequences/geometric/graph/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/graph/index.js +4 -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/sequences/geometric/situations/geometricFindRankFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/situations/geometricFindRankFromSituation.js +71 -48
- package/lib/exercises/math/sequences/geometric/situations/index.d.ts +2 -1
- package/lib/exercises/math/sequences/geometric/situations/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/situations/index.js +2 -2
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfCartesianProductOfFiniteSets.d.ts +10 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfCartesianProductOfFiniteSets.d.ts.map +1 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfCartesianProductOfFiniteSets.js +224 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfCartesianProductOfFiniteSetsFromSituation.d.ts +18 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfCartesianProductOfFiniteSetsFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfCartesianProductOfFiniteSetsFromSituation.js +198 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfPowEK.d.ts +10 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfPowEK.d.ts.map +1 -0
- package/lib/exercises/math/sets/cartesianProduct/findCardinalOfPowEK.js +231 -0
- package/lib/exercises/math/sets/cartesianProduct/findNumberOfPasswordsWithLettersAndNumbers.d.ts +19 -0
- package/lib/exercises/math/sets/cartesianProduct/findNumberOfPasswordsWithLettersAndNumbers.d.ts.map +1 -0
- package/lib/exercises/math/sets/cartesianProduct/findNumberOfPasswordsWithLettersAndNumbers.js +187 -0
- package/lib/exercises/math/sets/cartesianProduct/index.d.ts +7 -0
- package/lib/exercises/math/sets/cartesianProduct/index.d.ts.map +1 -0
- package/lib/exercises/math/sets/cartesianProduct/index.js +6 -0
- package/lib/exercises/math/sets/cartesianProduct/proposeElementInCartesianProductOfFiniteSets.d.ts +15 -0
- package/lib/exercises/math/sets/cartesianProduct/proposeElementInCartesianProductOfFiniteSets.d.ts.map +1 -0
- package/lib/exercises/math/sets/cartesianProduct/proposeElementInCartesianProductOfFiniteSets.js +291 -0
- package/lib/exercises/math/sets/cartesianProduct/proposeElementInPowEK.d.ts +15 -0
- package/lib/exercises/math/sets/cartesianProduct/proposeElementInPowEK.d.ts.map +1 -0
- package/lib/exercises/math/sets/cartesianProduct/proposeElementInPowEK.js +274 -0
- package/lib/exercises/math/sets/combinations/findNumberOfCombinationsFromSituation.d.ts +17 -0
- package/lib/exercises/math/sets/combinations/findNumberOfCombinationsFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/sets/combinations/findNumberOfCombinationsFromSituation.js +228 -0
- package/lib/exercises/math/sets/combinations/findNumberOfProductsOfCombinationsFromSituation.d.ts +17 -0
- package/lib/exercises/math/sets/combinations/findNumberOfProductsOfCombinationsFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/sets/combinations/findNumberOfProductsOfCombinationsFromSituation.js +388 -0
- package/lib/exercises/math/sets/combinations/index.d.ts +4 -0
- package/lib/exercises/math/sets/combinations/index.d.ts.map +1 -0
- package/lib/exercises/math/sets/combinations/index.js +3 -0
- package/lib/exercises/math/sets/combinations/proposeCombination.d.ts +15 -0
- package/lib/exercises/math/sets/combinations/proposeCombination.d.ts.map +1 -0
- package/lib/exercises/math/sets/combinations/proposeCombination.js +347 -0
- package/lib/exercises/math/sets/index.d.ts +3 -0
- package/lib/exercises/math/sets/index.d.ts.map +1 -1
- package/lib/exercises/math/sets/index.js +3 -0
- package/lib/exercises/math/sets/partialPermutations/findNumberOfPartialPermutationsFromSituation.d.ts +16 -0
- package/lib/exercises/math/sets/partialPermutations/findNumberOfPartialPermutationsFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/sets/partialPermutations/findNumberOfPartialPermutationsFromSituation.js +186 -0
- package/lib/exercises/math/sets/partialPermutations/findNumberOfPermutationsFromSituation.d.ts +17 -0
- package/lib/exercises/math/sets/partialPermutations/findNumberOfPermutationsFromSituation.d.ts.map +1 -0
- package/lib/exercises/math/sets/partialPermutations/findNumberOfPermutationsFromSituation.js +232 -0
- package/lib/exercises/math/sets/partialPermutations/index.d.ts +4 -0
- package/lib/exercises/math/sets/partialPermutations/index.d.ts.map +1 -0
- package/lib/exercises/math/sets/partialPermutations/index.js +3 -0
- package/lib/exercises/math/sets/partialPermutations/proposePartialPermutation.d.ts +15 -0
- package/lib/exercises/math/sets/partialPermutations/proposePartialPermutation.d.ts.map +1 -0
- package/lib/exercises/math/sets/partialPermutations/proposePartialPermutation.js +343 -0
- package/lib/exercises/math/spaceGeometry/basis/index.d.ts +6 -0
- package/lib/exercises/math/spaceGeometry/basis/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/basis/index.js +6 -0
- package/lib/exercises/math/spaceGeometry/basis/lineLineRelativePositionsFromCubeOuterPoints.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/basis/lineLineRelativePositionsFromCubeOuterPoints.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/lineLineRelativePositionsFromCubeOuterPoints.js +576 -0
- package/lib/exercises/math/spaceGeometry/basis/linePlaneRelativePositionsFromCubeOuterPoints.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/basis/linePlaneRelativePositionsFromCubeOuterPoints.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/linePlaneRelativePositionsFromCubeOuterPoints.js +595 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystem.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystem.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystem.js +501 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystemFromVecPath.d.ts +16 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystemFromVecPath.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfPointInCubeCoordSystemFromVecPath.js +753 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfVectorInCubeCoordSystem.d.ts +12 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfVectorInCubeCoordSystem.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceCoordinatesOfVectorInCubeCoordSystem.js +546 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceVectorLinearCombinationFromCoords.d.ts +13 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceVectorLinearCombinationFromCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/basis/spaceVectorLinearCombinationFromCoords.js +233 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromCoords.d.ts +11 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromCoords.js +192 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromVecPathsFromCubeOuterPoints.d.ts +15 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromVecPathsFromCubeOuterPoints.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/collinearity/checkAlignedSpacePointsFromVecPathsFromCubeOuterPoints.js +511 -0
- package/lib/exercises/math/spaceGeometry/collinearity/index.d.ts +3 -0
- package/lib/exercises/math/spaceGeometry/collinearity/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/collinearity/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts +5 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/index.js +5 -1
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/findOrthogonalProjectionOfPointOnPlane.d.ts +22 -0
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/findOrthogonalProjectionOfPointOnPlane.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/findOrthogonalProjectionOfPointOnPlane.js +366 -0
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/orthogonalProjection/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/index.d.ts +3 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/lineLineRelativePositionsFromParametricLines.d.ts +14 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/lineLineRelativePositionsFromParametricLines.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/lineLineRelativePositionsFromParametricLines.js +325 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/parametricLineFromPointAndDirectionVector.d.ts +13 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/parametricLineFromPointAndDirectionVector.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/parametricLine/parametricLineFromPointAndDirectionVector.js +181 -0
- package/lib/exercises/math/spaceGeometry/planes/checkIsPointBelongingToPlane.d.ts +10 -0
- package/lib/exercises/math/spaceGeometry/planes/checkIsPointBelongingToPlane.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/checkIsPointBelongingToPlane.js +208 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlaneEquation.d.ts +8 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlaneEquation.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlaneEquation.js +255 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlanePointsCoords.d.ts +10 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlanePointsCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/findNormalVectorFromPlanePointsCoords.js +232 -0
- package/lib/exercises/math/spaceGeometry/planes/index.d.ts +5 -1
- package/lib/exercises/math/spaceGeometry/planes/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/planes/index.js +6 -2
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromNormalVectorAndContainedPoint.d.ts +10 -0
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromNormalVectorAndContainedPoint.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromNormalVectorAndContainedPoint.js +273 -0
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromOrthogonalLineAndContainedPoint.d.ts +12 -0
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromOrthogonalLineAndContainedPoint.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/planeEquationFromOrthogonalLineAndContainedPoint.js +398 -0
- package/lib/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.d.ts +22 -0
- package/lib/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/planes/planePlaneRelativePositions.js +509 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.d.ts +8 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/angleFromScalarProductFromSpacePointCoords.js +229 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalLinesFromParametricReps.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalLinesFromParametricReps.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalLinesFromParametricReps.js +200 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalSpaceVecsFromCoords.d.ts +8 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalSpaceVecsFromCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsOrthogonalSpaceVecsFromCoords.js +176 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsSpaceVecOrthogonalToPlaneFromCoords.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsSpaceVecOrthogonalToPlaneFromCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/checkIsSpaceVecOrthogonalToPlaneFromCoords.js +263 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/index.d.ts +6 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/index.js +6 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromCubeOuterPoints.d.ts +14 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromCubeOuterPoints.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromCubeOuterPoints.js +497 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromSpacePointCoords.d.ts +8 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromSpacePointCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/scalarProduct/scalarProductFromSpacePointCoords.js +173 -0
- package/lib/exercises/math/spaceGeometry/vectors/findLinearDecompositionWrtCoplanarUVFromCoords.d.ts +10 -0
- package/lib/exercises/math/spaceGeometry/vectors/findLinearDecompositionWrtCoplanarUVFromCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/findLinearDecompositionWrtCoplanarUVFromCoords.js +236 -0
- package/lib/exercises/math/spaceGeometry/vectors/index.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/vectors/index.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/index.js +2 -0
- package/lib/exercises/math/spaceGeometry/vectors/spacePointsDistanceCalculation.d.ts +8 -0
- package/lib/exercises/math/spaceGeometry/vectors/spacePointsDistanceCalculation.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/spacePointsDistanceCalculation.js +156 -0
- package/lib/exercises/math/trigonometry/functions/index.d.ts +1 -0
- package/lib/exercises/math/trigonometry/functions/index.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/functions/index.js +1 -0
- package/lib/exercises/math/trigonometry/functions/parityOfCosAXTimesSinBX.d.ts +8 -0
- package/lib/exercises/math/trigonometry/functions/parityOfCosAXTimesSinBX.d.ts.map +1 -0
- package/lib/exercises/math/trigonometry/functions/parityOfCosAXTimesSinBX.js +193 -0
- package/lib/exercises/utils/data/randomDataTable.d.ts +4 -1
- package/lib/exercises/utils/data/randomDataTable.d.ts.map +1 -1
- package/lib/exercises/utils/data/randomDataTable.js +1 -2
- package/lib/exercises/vea/varLineVEA.d.ts.map +1 -1
- package/lib/exercises/vea/varLineVEA.js +15 -2
- package/lib/exercises/vea/xTableLineVEA.d.ts.map +1 -1
- package/lib/exercises/vea/xTableLineVEA.js +13 -2
- package/lib/index.d.ts +545 -26
- package/lib/index.d.ts.map +1 -1
- package/lib/latexTester.d.ts.map +1 -1
- package/lib/latexTester.js +9 -7
- package/lib/math/geometry/parametricLine.d.ts +1 -1
- package/lib/math/geometry/parametricLine.d.ts.map +1 -1
- package/lib/math/geometry/parametricLine.js +2 -2
- package/lib/math/geometry/spaceVector.d.ts +11 -1
- package/lib/math/geometry/spaceVector.d.ts.map +1 -1
- package/lib/math/geometry/spaceVector.js +18 -4
- package/lib/math/probability/randomVariable.d.ts +3 -2
- package/lib/math/probability/randomVariable.d.ts.map +1 -1
- package/lib/math/probability/randomVariable.js +14 -8
- package/lib/math/sets/setOperations.d.ts +9 -0
- package/lib/math/sets/setOperations.d.ts.map +1 -0
- package/lib/math/sets/setOperations.js +84 -0
- package/lib/math/sets/tuple.d.ts +12 -0
- package/lib/math/sets/tuple.d.ts.map +1 -0
- package/lib/math/sets/tuple.js +17 -0
- package/lib/math/systems/generalSystem.d.ts +3 -3
- package/lib/math/systems/generalSystem.d.ts.map +1 -1
- package/lib/math/systems/generalSystem.js +20 -17
- package/lib/math/utils/functions/functionComparison.d.ts.map +1 -1
- package/lib/math/utils/functions/functionComparison.js +2 -45
- package/lib/math/utils/functions/functionComposition.d.ts +3 -1
- package/lib/math/utils/functions/functionComposition.d.ts.map +1 -1
- package/lib/math/utils/functions/functionComposition.js +17 -17
- package/lib/math/utils/integration/rectanglesMethod.d.ts +6 -0
- package/lib/math/utils/integration/rectanglesMethod.d.ts.map +1 -0
- package/lib/math/utils/integration/rectanglesMethod.js +66 -0
- package/lib/math/utils/polynomial/polynomialUtils.d.ts +9 -1
- package/lib/math/utils/polynomial/polynomialUtils.d.ts.map +1 -1
- package/lib/math/utils/polynomial/polynomialUtils.js +66 -7
- package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts +34 -2
- package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqGeometricSituations.js +288 -47
- package/lib/server.js +25 -0
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +5 -2
- package/lib/tests/singleExo.test.js +2 -2
- package/lib/tree/nodes/functions/cosNode.d.ts +1 -1
- package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/cosNode.js +5 -2
- package/lib/tree/nodes/functions/factorialNode.d.ts +1 -0
- package/lib/tree/nodes/functions/factorialNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/factorialNode.js +16 -1
- package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/logNode.js +2 -1
- package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts +2 -0
- package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/binomialCoefficientNode.js +34 -0
- package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/discreteSetNode.js +1 -0
- package/lib/tree/utilities/nodeComparator.d.ts +7 -0
- package/lib/tree/utilities/nodeComparator.d.ts.map +1 -1
- package/lib/tree/utilities/nodeComparator.js +59 -0
- package/lib/tree/utilities/nodeInspector.d.ts +2 -0
- package/lib/tree/utilities/nodeInspector.d.ts.map +1 -1
- package/lib/tree/utilities/nodeInspector.js +23 -1
- package/lib/tree/utilities/nodePrinter.d.ts +7 -0
- package/lib/tree/utilities/nodePrinter.d.ts.map +1 -0
- package/lib/tree/utilities/nodePrinter.js +36 -0
- package/lib/tree/utilities/nodeRewriter.d.ts.map +1 -1
- package/lib/tree/utilities/nodeRewriter.js +4 -1
- package/lib/types/keyIds.d.ts +1 -1
- package/lib/types/keyIds.d.ts.map +1 -1
- package/lib/utils/strings/splitAndKeep.d.ts +2 -0
- package/lib/utils/strings/splitAndKeep.d.ts.map +1 -0
- package/lib/utils/strings/splitAndKeep.js +13 -0
- package/package.json +1 -1
|
@@ -3,6 +3,8 @@ import { NodeIds, NodeType } from "../node.js";
|
|
|
3
3
|
import { FunctionsIds, isFunctionNode } from "./functionNode.js";
|
|
4
4
|
import { isNumberNode } from "../numbers/numberNode.js";
|
|
5
5
|
import { factorial } from "../../../math/utils/arithmetic/factorial.js";
|
|
6
|
+
import { multiply } from "../operators/multiplyNode.js";
|
|
7
|
+
import { isOperatorNode } from "../operators/operatorNode.js";
|
|
6
8
|
export function isFactorialNode(a) {
|
|
7
9
|
return isFunctionNode(a) && a.id === FunctionsIds.factorial;
|
|
8
10
|
}
|
|
@@ -41,7 +43,13 @@ export class FactorialNode {
|
|
|
41
43
|
throw new Error("unimplemented");
|
|
42
44
|
}
|
|
43
45
|
toTex(opts) {
|
|
44
|
-
|
|
46
|
+
const child = this.child;
|
|
47
|
+
if (isOperatorNode(child)) {
|
|
48
|
+
return `(${this.child.toTex(opts)})!`;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
return `${this.child.toTex(opts)}!`;
|
|
52
|
+
}
|
|
45
53
|
}
|
|
46
54
|
// toMathjs() {
|
|
47
55
|
// return abs(this.child.toMathjs());
|
|
@@ -54,6 +62,13 @@ export class FactorialNode {
|
|
|
54
62
|
});
|
|
55
63
|
return res;
|
|
56
64
|
}
|
|
65
|
+
toMultiplyNode() {
|
|
66
|
+
const valueChild = this.child.evaluate();
|
|
67
|
+
return [...Array(valueChild).keys()]
|
|
68
|
+
.map((i) => i + 1)
|
|
69
|
+
.map((v) => v.toTree())
|
|
70
|
+
.reduce((acc, x) => multiply(acc, x));
|
|
71
|
+
}
|
|
57
72
|
toAllValidTexs() {
|
|
58
73
|
return this.toEquivalentNodes().map((node) => node.toTex());
|
|
59
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/logNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"logNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/logNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAQrE,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,OAAO,CAE/C;AACD,qBAAa,OAAQ,YAAW,YAAY;IAC1C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,WAAW;IAOpD,aAAa;;;;;;IAMb,YAAY,IAAI,MAAM;IAGtB,mBAAmB,IAAI,MAAM;IAG7B,KAAK,IAAI,MAAM;IAaf,iBAAiB,IAAI,aAAa,EAAE;IAQpC,mBAAmB;IAOnB,cAAc,IAAI,MAAM,EAAE;IAG1B,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,GAAG,aAAa;IAoC/C,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGtC,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO;IAGpC,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAGxD,UAAU,IAAI,aAAa;CAG5B"}
|
|
@@ -7,6 +7,7 @@ import { NumberNode, isNumberNode } from "../numbers/numberNode.js";
|
|
|
7
7
|
import { isInt } from "../../../utils/isInt.js";
|
|
8
8
|
import { isExpNode } from "./expNode.js";
|
|
9
9
|
import { maxPowerDecomposition } from "../../../math/utils/arithmetic/maxPowerDecomposition.js";
|
|
10
|
+
import { frac } from "../operators/fractionNode.js";
|
|
10
11
|
export function isLogNode(a) {
|
|
11
12
|
return isFunctionNode(a) && a.id === FunctionsIds.log;
|
|
12
13
|
}
|
|
@@ -110,6 +111,6 @@ export class LogNode {
|
|
|
110
111
|
return new LogNode(this.child.toDetailedEvaluation(vars));
|
|
111
112
|
}
|
|
112
113
|
derivative() {
|
|
113
|
-
|
|
114
|
+
return frac(this.child.derivative(), this.child);
|
|
114
115
|
}
|
|
115
116
|
}
|
|
@@ -35,5 +35,7 @@ export declare class BinomialCoefficientNode implements OperatorNode {
|
|
|
35
35
|
toTex(): string;
|
|
36
36
|
derivative(): AlgebraicNode;
|
|
37
37
|
toSimplificationTex(opts?: SimplifyOptions): string;
|
|
38
|
+
toFormulaWithFactoFractionNode(isSimplifySubstract?: boolean): import("./fractionNode.js").FractionNode;
|
|
39
|
+
toFormulaWithoutFacto(): import("./fractionNode.js").FractionNode;
|
|
38
40
|
}
|
|
39
41
|
//# sourceMappingURL=binomialCoefficientNode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binomialCoefficientNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/binomialCoefficientNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"binomialCoefficientNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/binomialCoefficientNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAIlE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAkB,MAAM,mBAAmB,CAAC;AAG9E,eAAO,MAAM,yBAAyB,GACpC,GAAG,IAAI,KACN,CAAC,IAAI,uBACuD,CAAC;AAEhE,eAAO,MAAM,KAAK,GAChB,GAAG,aAAa,GAAG,MAAM,GAAG,MAAM,EAClC,GAAG,aAAa,GAAG,MAAM,GAAG,MAAM,4BAOnC,CAAC;AACF,qBAAa,uBAAwB,YAAW,YAAY;IAC1D,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,EAAE,EAAE,WAAW,CAAC;IAChB,SAAS,EAAE,aAAa,CAAC;IACzB,UAAU,EAAE,aAAa,CAAC;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBAEjB,SAAS,EAAE,aAAa,EACxB,UAAU,EAAE,aAAa,EACzB,IAAI,CAAC,EAAE,WAAW;IASpB,MAAM,CAAC,IAAI,EAAE,aAAa;IAO1B,QAAQ;IAGR,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe;IAoBhC,cAAc;IAGd,mBAAmB;IAOnB,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAMxD,iBAAiB;IAGjB,aAAa;;;;;;;;;IAOb,YAAY;IAGZ,KAAK;IAGL,UAAU,IAAI,aAAa;IAG3B,mBAAmB,CAAC,IAAI,CAAC,EAAE,eAAe,GAAG,MAAM;IAMnD,8BAA8B,CAAC,mBAAmB,GAAE,OAAc;IA0BlE,qBAAqB;CAmBtB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { combinations } from "../../../math/utils/combinatorics/combination.js";
|
|
2
2
|
import { facto } from "../functions/factorialNode.js";
|
|
3
3
|
import { NodeIds, NodeType } from "../node.js";
|
|
4
|
+
import { isNumberNode } from "../numbers/numberNode.js";
|
|
4
5
|
import { frac } from "./fractionNode.js";
|
|
5
6
|
import { multiply } from "./multiplyNode.js";
|
|
6
7
|
import { OperatorIds, isOperatorNode } from "./operatorNode.js";
|
|
@@ -84,4 +85,37 @@ export class BinomialCoefficientNode {
|
|
|
84
85
|
return this.toTex() + "=" + simp.toTex();
|
|
85
86
|
return this.toTex();
|
|
86
87
|
}
|
|
88
|
+
toFormulaWithFactoFractionNode(isSimplifySubstract = true) {
|
|
89
|
+
return frac(facto(this.leftChild), multiply(facto(this.rightChild), facto((() => {
|
|
90
|
+
const nodeSubRaw = substract(this.leftChild, this.rightChild);
|
|
91
|
+
if (isSimplifySubstract) {
|
|
92
|
+
const nodeSubSimplified = nodeSubRaw.simplify({
|
|
93
|
+
towardsDistribute: true,
|
|
94
|
+
});
|
|
95
|
+
if (isNumberNode(nodeSubSimplified)) {
|
|
96
|
+
return nodeSubSimplified;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
return nodeSubRaw;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
return nodeSubRaw;
|
|
104
|
+
}
|
|
105
|
+
})())));
|
|
106
|
+
}
|
|
107
|
+
toFormulaWithoutFacto() {
|
|
108
|
+
const isCanBeTransformed = isNumberNode(this.leftChild) && isNumberNode(this.rightChild);
|
|
109
|
+
if (!isCanBeTransformed) {
|
|
110
|
+
throw new Error("The node cannot be transformed via toFormulaWithoutFacto()");
|
|
111
|
+
}
|
|
112
|
+
const [vNum, vDenum] = [this.leftChild, this.rightChild].map((node) => node.evaluate());
|
|
113
|
+
const nbFactors = vNum - vDenum;
|
|
114
|
+
const nodeNum = [...Array(nbFactors).keys()]
|
|
115
|
+
.map((i) => (i === 0 ? vNum : vNum - i))
|
|
116
|
+
.map((v) => v.toTree())
|
|
117
|
+
.reduce((acc, node) => multiply(acc, node));
|
|
118
|
+
const nodeDenum = facto(nbFactors).toMultiplyNode();
|
|
119
|
+
return frac(nodeNum, nodeDenum);
|
|
120
|
+
}
|
|
87
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discreteSetNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/discreteSetNode.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EACb,eAAe,EACf,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAa,MAAM,cAAc,CAAC;AAC1D,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,eAAe,CAE/D;AAED,eAAO,MAAM,GAAG,GAAI,OAAO,aAAa,EAAE,EAAE,OAAO,WAAW,oBAE7D,CAAC;AACF,qBAAa,eAAgB,YAAW,OAAO;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;gBACP,QAAQ,EAAE,aAAa,EAAE,EAAE,IAAI,CAAC,EAAE,WAAW;IAQzD,UAAU;IAGV,mBAAmB,IAAI,MAAM;IAG7B,YAAY;IAGZ,cAAc;IAGd,aAAa;;;;;;IAMb,mBAAmB;IAOnB,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW;IAyBpC,YAAY;IAIZ,KAAK;
|
|
1
|
+
{"version":3,"file":"discreteSetNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/discreteSetNode.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,aAAa,EACb,eAAe,EACf,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAa,MAAM,cAAc,CAAC;AAC1D,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,eAAe,CAE/D;AAED,eAAO,MAAM,GAAG,GAAI,OAAO,aAAa,EAAE,EAAE,OAAO,WAAW,oBAE7D,CAAC;AACF,qBAAa,eAAgB,YAAW,OAAO;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;gBACP,QAAQ,EAAE,aAAa,EAAE,EAAE,IAAI,CAAC,EAAE,WAAW;IAQzD,UAAU;IAGV,mBAAmB,IAAI,MAAM;IAG7B,YAAY;IAGZ,cAAc;IAGd,aAAa;;;;;;IAMb,mBAAmB;IAOnB,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW;IAyBpC,YAAY;IAIZ,KAAK;IASL,qBAAqB;IAMrB,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe;IAO/B,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,aAAa;IAG5C,MAAM,CAAC,IAAI,EAAE,aAAa;IAQ1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,CAAC,EAAE,eAAe;IAGhE,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;CAMzD;AAED,eAAO,MAAM,QAAQ,iBAA0B,CAAC"}
|
|
@@ -80,6 +80,7 @@ export class DiscreteSetNode {
|
|
|
80
80
|
return `\\left\\{${this.elements
|
|
81
81
|
.map((el) => el.toTex())
|
|
82
82
|
.join(";")}\\right\\}`;
|
|
83
|
+
//TODO: `\\left\\{${this.elements -> `\\left\\{ ${this.elements to avoid creating commands like \\lbracea \\lbraceb \\lbracec ...
|
|
83
84
|
}
|
|
84
85
|
toDeleteRandomElement() {
|
|
85
86
|
const index = Math.floor(Math.random() * this.elements.length);
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
import { Tuple } from "../../math/sets/tuple.js";
|
|
1
2
|
import { AlgebraicNode } from "../nodes/algebraicNode.js";
|
|
3
|
+
import { DiscreteSetNode } from "../nodes/sets/discreteSetNode.js";
|
|
2
4
|
export declare abstract class NodeComparator {
|
|
3
5
|
static compareViaSub: <T extends AlgebraicNode>(node1: T, node2: T) => -1 | 0 | 1;
|
|
4
6
|
static isEqualViaSub: (node1: AlgebraicNode, node2: AlgebraicNode) => boolean;
|
|
5
7
|
static isEqualViaFrac: (node1: AlgebraicNode, node2: AlgebraicNode) => boolean;
|
|
8
|
+
static isEqualViaRandomEvaluations(node1: AlgebraicNode, node2: AlgebraicNode, nbRandomEvaluations: number): boolean;
|
|
9
|
+
static isNodeInDiscreteSet: (node: AlgebraicNode, nodeDiscreteSet: DiscreteSetNode) => boolean;
|
|
10
|
+
static isTupleInCartesianProductOfDiscreteSets: (tuple: Tuple, arrDiscreteSet: DiscreteSetNode[]) => boolean;
|
|
11
|
+
static isEqualTuple: (tuple1: Tuple, tuple2: Tuple) => boolean;
|
|
12
|
+
static isTupleInArrTuple: (tuple: Tuple, arrTuple: Tuple[]) => boolean;
|
|
6
13
|
}
|
|
7
14
|
//# sourceMappingURL=nodeComparator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeComparator.d.ts","sourceRoot":"","sources":["../../../src/tree/utilities/nodeComparator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"nodeComparator.d.ts","sourceRoot":"","sources":["../../../src/tree/utilities/nodeComparator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAGjD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAI1D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAInE,8BAAsB,cAAc;IAGlC,MAAM,CAAC,aAAa,GAAI,CAAC,SAAS,aAAa,EAC7C,OAAO,CAAC,EACR,OAAO,CAAC,KACP,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CA4DX;IAEF,MAAM,CAAC,aAAa,GAClB,OAAO,aAAa,EACpB,OAAO,aAAa,KACnB,OAAO,CAER;IAIF,MAAM,CAAC,cAAc,GACnB,OAAO,aAAa,EACpB,OAAO,aAAa,KACnB,OAAO,CAgBR;IAIF,MAAM,CAAC,2BAA2B,CAChC,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,aAAa,EACpB,mBAAmB,EAAE,MAAM;IA+D7B,MAAM,CAAC,mBAAmB,GACxB,MAAM,aAAa,EACnB,iBAAiB,eAAe,aAI9B;IAEJ,MAAM,CAAC,uCAAuC,GAC5C,OAAO,KAAK,EACZ,gBAAgB,eAAe,EAAE,aAQjC;IAIF,MAAM,CAAC,YAAY,GAAI,QAAQ,KAAK,EAAE,QAAQ,KAAK,aAIjD;IAEF,MAAM,CAAC,iBAAiB,GAAI,OAAO,KAAK,EAAE,UAAU,KAAK,EAAE,aAMzD;CACH"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { randfloat } from "../../math/utils/random/randfloat.js";
|
|
2
|
+
import { zip } from "../../utils/arrays/arrayZip.js";
|
|
3
|
+
import { isInfiniteNode } from "../nodes/numbers/constantNode.js";
|
|
1
4
|
import { frac } from "../nodes/operators/fractionNode.js";
|
|
2
5
|
import { substract } from "../nodes/operators/substractNode.js";
|
|
3
6
|
import { NodeRewriter } from "./nodeRewriter.js";
|
|
@@ -85,4 +88,60 @@ export class NodeComparator {
|
|
|
85
88
|
});
|
|
86
89
|
});
|
|
87
90
|
};
|
|
91
|
+
//via random evaluations
|
|
92
|
+
static isEqualViaRandomEvaluations(node1, node2, nbRandomEvaluations) {
|
|
93
|
+
const getSafeEvaluationDictForEqualityCheck = (node1, node2, nbSafeX = 4) => {
|
|
94
|
+
const dict = {};
|
|
95
|
+
let counter = -1;
|
|
96
|
+
while (Object.keys(dict).length < nbSafeX && counter < 1000) {
|
|
97
|
+
counter++;
|
|
98
|
+
const x = randfloat(-20, 100, 3);
|
|
99
|
+
let value1;
|
|
100
|
+
let value2;
|
|
101
|
+
try {
|
|
102
|
+
value1 = node1.evaluate({ x });
|
|
103
|
+
}
|
|
104
|
+
catch (_) {
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
try {
|
|
108
|
+
value2 = node2.evaluate({ x });
|
|
109
|
+
}
|
|
110
|
+
catch (_) {
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
const [isValidValue1, isValidValue2] = [value1, value2].map((value) => value !== undefined &&
|
|
114
|
+
!isNaN(value) &&
|
|
115
|
+
!isInfiniteNode(value.toTree()));
|
|
116
|
+
if (isValidValue1 && isValidValue2) {
|
|
117
|
+
dict[x] = [value1, value2].map((value) => {
|
|
118
|
+
return {
|
|
119
|
+
x,
|
|
120
|
+
value,
|
|
121
|
+
};
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return dict;
|
|
126
|
+
};
|
|
127
|
+
return Object.values(getSafeEvaluationDictForEqualityCheck(node1, node2, nbRandomEvaluations)).every((arrSafeEval) => {
|
|
128
|
+
return arrSafeEval
|
|
129
|
+
.slice(1)
|
|
130
|
+
.every((safeEval) => substract(arrSafeEval[0].value, safeEval.value).evaluate() === 0);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
//discreteSets, etc.
|
|
134
|
+
static isNodeInDiscreteSet = (node, nodeDiscreteSet) => nodeDiscreteSet.elements.some((nodeInSet) => NodeComparator.isEqualViaSub(node, nodeInSet));
|
|
135
|
+
static isTupleInCartesianProductOfDiscreteSets = (tuple, arrDiscreteSet) => {
|
|
136
|
+
return zip(tuple.components, arrDiscreteSet).reduce((acc, [nodeComponent, nodeDiscreteSet]) => {
|
|
137
|
+
return acc && this.isNodeInDiscreteSet(nodeComponent, nodeDiscreteSet);
|
|
138
|
+
}, true);
|
|
139
|
+
};
|
|
140
|
+
//tuples
|
|
141
|
+
static isEqualTuple = (tuple1, tuple2) => {
|
|
142
|
+
return zip(tuple1.components, tuple2.components).every(([node1, node2]) => this.isEqualViaSub(node1, node2));
|
|
143
|
+
};
|
|
144
|
+
static isTupleInArrTuple = (tuple, arrTuple) => {
|
|
145
|
+
return arrTuple.some((tupleOfArr) => zip(tuple.components, tupleOfArr.components).every(([node1, node2]) => this.isEqualViaSub(node1, node2)));
|
|
146
|
+
};
|
|
88
147
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { AlgebraicNode } from "../nodes/algebraicNode.js";
|
|
2
|
+
import { FunctionNode } from "../nodes/functions/functionNode.js";
|
|
2
3
|
export declare abstract class NodeInspector {
|
|
3
4
|
static getChildren(algebraicNode: AlgebraicNode): AlgebraicNode[];
|
|
5
|
+
static isContainingFunctionNode(algebraicNode: AlgebraicNode, nodeFunc: FunctionNode): boolean;
|
|
4
6
|
}
|
|
5
7
|
//# sourceMappingURL=nodeInspector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeInspector.d.ts","sourceRoot":"","sources":["../../../src/tree/utilities/nodeInspector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"nodeInspector.d.ts","sourceRoot":"","sources":["../../../src/tree/utilities/nodeInspector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EACL,YAAY,EAEb,MAAM,oCAAoC,CAAC;AAG5C,8BAAsB,aAAa;IACjC,MAAM,CAAC,WAAW,CAAC,aAAa,EAAE,aAAa;IAU/C,MAAM,CAAC,wBAAwB,CAC7B,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,YAAY,GACrB,OAAO;CAyBX"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isFunctionNode } from "../nodes/functions/functionNode.js";
|
|
1
|
+
import { isFunctionNode, } from "../nodes/functions/functionNode.js";
|
|
2
2
|
import { isOperatorNode } from "../nodes/operators/operatorNode.js";
|
|
3
3
|
export class NodeInspector {
|
|
4
4
|
static getChildren(algebraicNode) {
|
|
@@ -12,4 +12,26 @@ export class NodeInspector {
|
|
|
12
12
|
return [];
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
+
static isContainingFunctionNode(algebraicNode, nodeFunc) {
|
|
16
|
+
function checkChildren(algebraicNode, nodeFunc) {
|
|
17
|
+
const arrNodeChildren = NodeInspector.getChildren(algebraicNode);
|
|
18
|
+
if (arrNodeChildren.length > 0) {
|
|
19
|
+
return arrNodeChildren.some((nodeChild) => NodeInspector.isContainingFunctionNode(nodeChild, nodeFunc));
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (isFunctionNode(algebraicNode)) {
|
|
26
|
+
if (algebraicNode.id === nodeFunc.id) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
return checkChildren(algebraicNode, nodeFunc);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
return checkChildren(algebraicNode, nodeFunc);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
15
37
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AlgebraicNode } from "../nodes/algebraicNode.js";
|
|
2
|
+
import { OperatorNode } from "../nodes/operators/operatorNode.js";
|
|
3
|
+
export declare abstract class NodePrinter {
|
|
4
|
+
static toTexWithMaxWidth(node: AlgebraicNode, maxWidth: number): string;
|
|
5
|
+
static strSymbolForOperatorNode(operatorNode: OperatorNode): string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=nodePrinter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodePrinter.d.ts","sourceRoot":"","sources":["../../../src/tree/utilities/nodePrinter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAGL,YAAY,EACb,MAAM,oCAAoC,CAAC;AAG5C,8BAAsB,WAAW;IAC/B,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;IAsBvE,MAAM,CAAC,wBAAwB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM;CAcpE"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { isOperatorNode, OperatorIds, } from "../nodes/operators/operatorNode.js";
|
|
2
|
+
import { alignTex } from "../../utils/latex/alignTex.js";
|
|
3
|
+
export class NodePrinter {
|
|
4
|
+
static toTexWithMaxWidth(node, maxWidth) {
|
|
5
|
+
const texRaw = node.toTex();
|
|
6
|
+
if (texRaw.length < maxWidth) {
|
|
7
|
+
return texRaw;
|
|
8
|
+
}
|
|
9
|
+
if (isOperatorNode(node)) {
|
|
10
|
+
return alignTex([
|
|
11
|
+
["", this.toTexWithMaxWidth(node.leftChild, maxWidth)],
|
|
12
|
+
[
|
|
13
|
+
this.strSymbolForOperatorNode(node),
|
|
14
|
+
`( ${this.toTexWithMaxWidth(node.rightChild, maxWidth - 2)} )`,
|
|
15
|
+
],
|
|
16
|
+
], true);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
return texRaw;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
static strSymbolForOperatorNode(operatorNode) {
|
|
23
|
+
switch (operatorNode.id) {
|
|
24
|
+
case OperatorIds.add:
|
|
25
|
+
return ` + `;
|
|
26
|
+
case OperatorIds.substract:
|
|
27
|
+
return ` - `;
|
|
28
|
+
case OperatorIds.multiply:
|
|
29
|
+
return ` \\times `;
|
|
30
|
+
case OperatorIds.divide:
|
|
31
|
+
return ` \\div `;
|
|
32
|
+
default:
|
|
33
|
+
throw new Error("Unimplemented operatorNode.id: " + operatorNode.id);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeRewriter.d.ts","sourceRoot":"","sources":["../../../src/tree/utilities/nodeRewriter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAkC1D,8BAAsB,YAAY;IAChC,MAAM,CAAC,eAAe,GAAI,CAAC,SAAS,aAAa,EAC/C,eAAe,CAAC,EAChB,UAAU,MAAM,EAChB,iBAAiB,MAAM,EAAE,KACxB,aAAa,CAUd;IAEF,MAAM,CAAC,iCAAiC,GAAI,CAAC,SAAS,aAAa,EACjE,eAAe,CAAC,EAChB,UAAU,MAAM,gBAgBH,aAAa,EAAE,KAAK,aAAa,CAP9C;IAKF,MAAM,CAAC,oCAAoC,GACzC,eAAe,aAAa,KAC3B,CAAC,CAAC,QAAQ,EAAE,aAAa,EAAE,KAAK,aAAa,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"nodeRewriter.d.ts","sourceRoot":"","sources":["../../../src/tree/utilities/nodeRewriter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAkC1D,8BAAsB,YAAY;IAChC,MAAM,CAAC,eAAe,GAAI,CAAC,SAAS,aAAa,EAC/C,eAAe,CAAC,EAChB,UAAU,MAAM,EAChB,iBAAiB,MAAM,EAAE,KACxB,aAAa,CAUd;IAEF,MAAM,CAAC,iCAAiC,GAAI,CAAC,SAAS,aAAa,EACjE,eAAe,CAAC,EAChB,UAAU,MAAM,gBAgBH,aAAa,EAAE,KAAK,aAAa,CAP9C;IAKF,MAAM,CAAC,oCAAoC,GACzC,eAAe,aAAa,KAC3B,CAAC,CAAC,QAAQ,EAAE,aAAa,EAAE,KAAK,aAAa,CAAC,EAAE,CA8HjD;IAEF,MAAM,CAAC,qBAAqB,CAAC,aAAa,EAAE,aAAa,GAAG,aAAa,EAAE;IAW3E,MAAM,CAAC,oBAAoB,CACzB,aAAa,EAAE,aAAa,EAC5B,aAAa,GAAE,OAAc,GAC5B,aAAa,EAAE;CAwCnB"}
|
|
@@ -126,7 +126,10 @@ export class NodeRewriter {
|
|
|
126
126
|
case FunctionsIds.abs:
|
|
127
127
|
return [(children) => abs(children[0])];
|
|
128
128
|
case FunctionsIds.factorial:
|
|
129
|
-
return [
|
|
129
|
+
return [
|
|
130
|
+
(children) => facto(children[0]),
|
|
131
|
+
(children) => facto(children[0]).toMultiplyNode(),
|
|
132
|
+
];
|
|
130
133
|
}
|
|
131
134
|
}
|
|
132
135
|
else {
|
package/lib/types/keyIds.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type KeyId =
|
|
|
10
10
|
/**geometry */
|
|
11
11
|
| "overrightarrow" | "degree" | "vectorU" | "vectorV" | "vectorW" | "vectorZ" | "vectorNul" | "widehat"
|
|
12
12
|
/**operations */
|
|
13
|
-
| "plus" | "minus" | "times" | "frac" | "obelus" | "sqrt" | "sqrtCub" | "square" | "cube" | "power" | "percent" | "leftParenthesis" | "leftParenthesisNoLeft" | "rightParenthesis" | "rightParenthesisNoRight" | "equal" | "comma" | "semicolon" | "colon" | "dot" | "sup" | "inf" | "geq" | "leq" | "approx" | "xsquare" | "xcube" | "equivalent"
|
|
13
|
+
| "plus" | "minus" | "times" | "frac" | "obelus" | "sqrt" | "sqrtCub" | "square" | "cube" | "power" | "percent" | "leftParenthesis" | "leftParenthesisNoLeft" | "rightParenthesis" | "rightParenthesisNoRight" | "equal" | "comma" | "semicolon" | "colon" | "dot" | "sup" | "inf" | "geq" | "leq" | "approx" | "xsquare" | "xcube" | "equivalent" | "facto"
|
|
14
14
|
/**sets */
|
|
15
15
|
| "belongs" | "notin" | "cap" | "cup" | "lbrace" | "rbrace" | "lbracket" | "lbracketNoSpace" | "rbracket" | "rbracketNoSpace" | "varnothing" | "naturals" | "integers" | "rationals" | "decimals" | "reals" | "complex" | "ast" | "del" | "right" | "left" | "rightarrow" | "overrightarrow" | "infty"
|
|
16
16
|
/**fcts */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyIds.d.ts","sourceRoot":"","sources":["../../src/types/keyIds.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK;AACf,gBAAgB;AACd,YAAY,GACZ,aAAa,GACb,mBAAmB,GACnB,oBAAoB;AACtB,WAAW;GACT,IAAI,GACJ,KAAK,GACL,SAAS,GACT,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,SAAS,GACT,SAAS,GACT,OAAO,GACP,eAAe;AAEjB,aAAa;GACX,QAAQ,GACR,OAAO,GACP,MAAM,GACN,YAAY,GACZ,KAAK,GACL,OAAO,GACP,QAAQ,GACR,KAAK;AAEP,WAAW;GACT,IAAI,GACJ,IAAI,GACJ,OAAO;AAET,cAAc;GACZ,gBAAgB,GAChB,QAAQ,GACR,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,WAAW,GACX,SAAS;AAEX,gBAAgB;GACd,MAAM,GACN,OAAO,GACP,OAAO,GACP,MAAM,GACN,QAAQ,GACR,MAAM,GACN,SAAS,GACT,QAAQ,GACR,MAAM,GACN,OAAO,GACP,SAAS,GACT,iBAAiB,GACjB,uBAAuB,GACvB,kBAAkB,GAClB,yBAAyB,GACzB,OAAO,GACP,OAAO,GACP,WAAW,GACX,OAAO,GACP,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,QAAQ,GACR,SAAS,GACT,OAAO,GACP,YAAY;
|
|
1
|
+
{"version":3,"file":"keyIds.d.ts","sourceRoot":"","sources":["../../src/types/keyIds.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK;AACf,gBAAgB;AACd,YAAY,GACZ,aAAa,GACb,mBAAmB,GACnB,oBAAoB;AACtB,WAAW;GACT,IAAI,GACJ,KAAK,GACL,SAAS,GACT,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,SAAS,GACT,SAAS,GACT,OAAO,GACP,eAAe;AAEjB,aAAa;GACX,QAAQ,GACR,OAAO,GACP,MAAM,GACN,YAAY,GACZ,KAAK,GACL,OAAO,GACP,QAAQ,GACR,KAAK;AAEP,WAAW;GACT,IAAI,GACJ,IAAI,GACJ,OAAO;AAET,cAAc;GACZ,gBAAgB,GAChB,QAAQ,GACR,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,WAAW,GACX,SAAS;AAEX,gBAAgB;GACd,MAAM,GACN,OAAO,GACP,OAAO,GACP,MAAM,GACN,QAAQ,GACR,MAAM,GACN,SAAS,GACT,QAAQ,GACR,MAAM,GACN,OAAO,GACP,SAAS,GACT,iBAAiB,GACjB,uBAAuB,GACvB,kBAAkB,GAClB,yBAAyB,GACzB,OAAO,GACP,OAAO,GACP,WAAW,GACX,OAAO,GACP,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,QAAQ,GACR,SAAS,GACT,OAAO,GACP,YAAY,GACZ,OAAO;AAET,UAAU;GACR,SAAS,GACT,OAAO,GACP,KAAK,GACL,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,iBAAiB,GACjB,UAAU,GACV,iBAAiB,GACjB,YAAY,GACZ,UAAU,GACV,UAAU,GACV,WAAW,GACX,UAAU,GACV,OAAO,GACP,SAAS,GACT,KAAK,GACL,KAAK,GACL,OAAO,GACP,MAAM,GACN,YAAY,GACZ,gBAAgB,GAChB,OAAO;AAET,UAAU;GACR,KAAK,GACL,IAAI,GACJ,KAAK,GACL,QAAQ,GACR,KAAK,GACL,KAAK,GACL,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,IAAI,GACJ,cAAc,GACd,YAAY,GACZ,aAAa;AAEf,eAAe;GACb,IAAI,GACJ,SAAS;AAEX,YAAY;GACV,eAAe,GACf,UAAU,GACV,UAAU,GACV,OAAO,GACP,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW;AAEb,aAAa;GACX,UAAU;AAEZ,WAAW;GACT,OAAO,GACP,MAAM,GACN,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,KAAK,GACL,IAAI,GACJ,KAAK,GACL,OAAO,GACP,QAAQ,GACR,IAAI,GACJ,OAAO,GACP,OAAO;AAET,cAAc;GACZ,WAAW,GACX,OAAO,GACP,QAAQ,GACR,MAAM,GACN,OAAO,GACP,YAAY,GACZ,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG;AAEL,aAAa;GACX,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG,GACH,GAAG;AAEL,WAAW;GACT,WAAW,GACX,QAAQ,GACR,SAAS,GACT,WAAW,GACX,MAAM,GACN,SAAS,GACT,OAAO,GACP,SAAS,GACT,OAAO,GACP,MAAM,GACN,QAAQ,GACR,WAAW,GACX,WAAW,GACX,UAAU,GACV,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,WAAW,GACX,SAAS,GACT,UAAU,GACV,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,WAAW,GACX,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,SAAS,GACT,WAAW,GACX,SAAS,GACT,UAAU,GACV,OAAO,GACP,SAAS,GACT,UAAU,GACV,WAAW,GACX,SAAS,GACT,WAAW,GACX,SAAS,GACT,WAAW,GACX,YAAY,GACZ,WAAW,GACX,SAAS,GACT,WAAW,GACX,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,OAAO,GACP,WAAW,GACX,SAAS,GACT,MAAM,GACN,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,YAAY,GACZ,SAAS,GACT,YAAY,GACZ,UAAU,GACV,UAAU,GACV,YAAY,GACZ,SAAS,GACT,YAAY,GACZ,SAAS,GACT,QAAQ,GACR,SAAS,GACT,WAAW,GACX,UAAU,GACV,SAAS,GACT,SAAS,GACT,WAAW,GACX,SAAS,GACT,QAAQ,GACR,SAAS,GACT,SAAS,GACT,IAAI,GACJ,SAAS,GACT,UAAU,GACV,OAAO,GACP,SAAS,GACT,UAAU,GACV,QAAQ,GACR,OAAO,GACP,UAAU,GACV,QAAQ,GACR,UAAU,GACV,SAAS,GACT,cAAc,GACd,SAAS,GACT,WAAW,GACX,WAAW,GACX,WAAW,GACX,QAAQ,GACR,WAAW,GACX,aAAa,GACb,aAAa,GACb,SAAS,GACT,aAAa,GACb,UAAU,GACV,YAAY,GACZ,eAAe,GACf,SAAS,GACT,YAAY,GACZ,SAAS,GACT,SAAS,GACT,YAAY,GACZ,cAAc,GACd,aAAa,GACb,aAAa,GACb,UAAU,GACV,WAAW,GACX,WAAW,GACX,aAAa,GACb,YAAY,GACZ,WAAW;AAEb,eAAe;GACb,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,YAAY,GACZ,aAAa,GACb,WAAW,GACX,UAAU,GACV,WAAW,GACX,WAAW,GACX,UAAU,GACV,UAAU,GACV,WAAW,GACX,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,eAAe,GACf,aAAa,GACb,UAAU,GACV,aAAa,GACb,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,WAAW,GACX,UAAU,GACV,UAAU,GACV,WAAW,GACX,UAAU,GACV,YAAY,GACZ,UAAU,GACV,WAAW,GACX,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,WAAW,GACX,WAAW,GACX,WAAW,GACX,YAAY,GACZ,WAAW,GACX,eAAe,GACf,SAAS,GACT,UAAU,GACV,WAAW,GACX,UAAU,GACV,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,WAAW,GACX,YAAY,GACZ,QAAQ,GACR,WAAW,GACX,SAAS,GACT,WAAW,GACX,UAAU,GACV,WAAW,GACX,QAAQ,GACR,UAAU,GACV,SAAS,GACT,cAAc,GACd,OAAO,GACP,YAAY,GACZ,WAAW,GACX,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,aAAa,GACb,UAAU,GACV,QAAQ,GACR,YAAY,GACZ,WAAW,GACX,SAAS,GACT,WAAW,GACX,WAAW,GACX,SAAS,GACT,SAAS,GACT,UAAU,GACV,SAAS,GACT,WAAW,GACX,WAAW,GACX,WAAW,GACX,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,UAAU,GACV,UAAU,GACV,UAAU,GACV,WAAW,GACX,UAAU,GACV,SAAS,GACT,SAAS,GACT,WAAW,GACX,YAAY,GACZ,UAAU,GACV,aAAa,GACb,WAAW,GACX,QAAQ,GACR,WAAW,GACX,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"splitAndKeep.d.ts","sourceRoot":"","sources":["../../../src/utils/strings/splitAndKeep.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,WAAW,MAAM,aAkB3D,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const splitAndKeep = (text, delimiter) => {
|
|
2
|
+
const strEscapedDelimiter = delimiter.replace(/\\/g, "\\\\");
|
|
3
|
+
const delimiterPATTERN = `(${strEscapedDelimiter})`;
|
|
4
|
+
const regexDelimiter = new RegExp(delimiterPATTERN, "g");
|
|
5
|
+
//we need this protection mechanism because of situations like splitAndKeep(nodeInequation.toTex(), "\\le")
|
|
6
|
+
const arrProtection = [["left", "ukfng"]];
|
|
7
|
+
const protect = (str) => arrProtection.reduce((acc, [from, to]) => acc.replaceAll(from, to), str);
|
|
8
|
+
const unprotect = (str) => arrProtection.reduce((acc, [to, from]) => acc.replaceAll(from, to), str);
|
|
9
|
+
const arrWithDelimiters = protect(text)
|
|
10
|
+
.split(regexDelimiter)
|
|
11
|
+
.map((str) => unprotect(str));
|
|
12
|
+
return arrWithDelimiters;
|
|
13
|
+
};
|