math-exercises 3.0.200 → 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/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/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/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/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/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 -1
- package/lib/exercises/math/index.d.ts.map +1 -1
- package/lib/exercises/math/index.js +2 -1
- 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/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/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/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/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/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/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 +539 -34
- 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/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/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/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
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAE3D,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,QAAA,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAE3D,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC"}
|
package/lib/latexTester.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"latexTester.d.ts","sourceRoot":"","sources":["../src/latexTester.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,6BAA2B,
|
|
1
|
+
{"version":3,"file":"latexTester.d.ts","sourceRoot":"","sources":["../src/latexTester.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,6BAA2B,YA6LrE,CAAC"}
|
package/lib/latexTester.js
CHANGED
|
@@ -3,7 +3,8 @@ export const latexTester = (latex, isDefaultInMathMode = false) => {
|
|
|
3
3
|
let inDoubleDollarMode = isDefaultInMathMode ?? false;
|
|
4
4
|
let commandModeCount = 0;
|
|
5
5
|
let leftRightCount = 0;
|
|
6
|
-
let inArray = false;
|
|
6
|
+
// let inArray = false;
|
|
7
|
+
let nbOpenArrays = 0;
|
|
7
8
|
let inPython = false;
|
|
8
9
|
let inInlinePython = false;
|
|
9
10
|
const formated = latex
|
|
@@ -128,9 +129,7 @@ export const latexTester = (latex, isDefaultInMathMode = false) => {
|
|
|
128
129
|
}
|
|
129
130
|
else if (substring.startsWith("\\begin{array}") ||
|
|
130
131
|
substring.startsWith("\\begin{tabular}")) {
|
|
131
|
-
|
|
132
|
-
throw new Error("Array not closed" + " char " + char + " latex " + latex);
|
|
133
|
-
inArray = true;
|
|
132
|
+
nbOpenArrays += 1;
|
|
134
133
|
}
|
|
135
134
|
}
|
|
136
135
|
if (cmd === "\\end") {
|
|
@@ -141,9 +140,9 @@ export const latexTester = (latex, isDefaultInMathMode = false) => {
|
|
|
141
140
|
}
|
|
142
141
|
else if (substring.startsWith("\\end{array}") ||
|
|
143
142
|
substring.startsWith("\\end{tabular}")) {
|
|
144
|
-
if (
|
|
143
|
+
if (nbOpenArrays === 0)
|
|
145
144
|
throw new Error("Array not opened");
|
|
146
|
-
|
|
145
|
+
nbOpenArrays -= 1;
|
|
147
146
|
}
|
|
148
147
|
}
|
|
149
148
|
}
|
|
@@ -158,7 +157,7 @@ export const latexTester = (latex, isDefaultInMathMode = false) => {
|
|
|
158
157
|
throw new Error("Left right not balanced");
|
|
159
158
|
if (commandModeCount !== 0)
|
|
160
159
|
throw new Error(`Command not closed : ${latex}`);
|
|
161
|
-
if (
|
|
160
|
+
if (nbOpenArrays !== 0)
|
|
162
161
|
throw new Error("Array not closed");
|
|
163
162
|
if (inPython)
|
|
164
163
|
throw new Error("Python not closed");
|
|
@@ -202,6 +201,8 @@ const validCmds = [
|
|
|
202
201
|
"\\right",
|
|
203
202
|
"\\alpha",
|
|
204
203
|
"\\beta",
|
|
204
|
+
"\\gamma",
|
|
205
|
+
"\\Gamma",
|
|
205
206
|
"\\Delta",
|
|
206
207
|
"\\delta",
|
|
207
208
|
"\\theta",
|
|
@@ -270,4 +271,5 @@ const validCmds = [
|
|
|
270
271
|
"\\searrow",
|
|
271
272
|
"\\mapsto",
|
|
272
273
|
"\\color",
|
|
274
|
+
"\\wedge",
|
|
273
275
|
];
|
|
@@ -5,7 +5,7 @@ export declare class ParametricLine {
|
|
|
5
5
|
startPoint: SpacePoint;
|
|
6
6
|
vector: SpaceVector;
|
|
7
7
|
equations: AlgebraicNode[];
|
|
8
|
-
constructor(startPoint: SpacePoint, vector: SpaceVector);
|
|
8
|
+
constructor(startPoint: SpacePoint, vector: SpaceVector, varName?: string);
|
|
9
9
|
toDetailedEvaluation(t: AlgebraicNode): AlgebraicNode[];
|
|
10
10
|
getPointCoords(t: AlgebraicNode): AlgebraicNode[];
|
|
11
11
|
getPoint(t: AlgebraicNode): SpacePoint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parametricLine.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/parametricLine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAIlE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAA0B,MAAM,kBAAkB,CAAC;AAEvE,qBAAa,cAAc;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,aAAa,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"parametricLine.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/parametricLine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAIlE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAA0B,MAAM,kBAAkB,CAAC;AAEvE,qBAAa,cAAc;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,aAAa,EAAE,CAAC;gBAEzB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,WAAW,EACnB,OAAO,GAAE,MAAY;IAcvB,oBAAoB,CAAC,CAAC,EAAE,aAAa;IAIrC,cAAc,CAAC,CAAC,EAAE,aAAa;IAG/B,QAAQ,CAAC,CAAC,EAAE,aAAa;IAKzB,QAAQ,CAAC,CAAC,EAAE,UAAU;IAYtB,KAAK;CAQN"}
|
|
@@ -7,12 +7,12 @@ export class ParametricLine {
|
|
|
7
7
|
startPoint;
|
|
8
8
|
vector;
|
|
9
9
|
equations;
|
|
10
|
-
constructor(startPoint, vector) {
|
|
10
|
+
constructor(startPoint, vector, varName = "t") {
|
|
11
11
|
this.startPoint = startPoint;
|
|
12
12
|
this.vector = vector;
|
|
13
13
|
const pointCoords = this.startPoint.getCoords();
|
|
14
14
|
const vectorCoords = this.vector.getCoords();
|
|
15
|
-
this.equations = [0, 1, 2].map((i) => new AddNode(pointCoords[i], new MultiplyNode(vectorCoords[i], new VariableNode(
|
|
15
|
+
this.equations = [0, 1, 2].map((i) => new AddNode(pointCoords[i], new MultiplyNode(vectorCoords[i], new VariableNode(varName))).simplify({ forbidFactorize: true }));
|
|
16
16
|
}
|
|
17
17
|
toDetailedEvaluation(t) {
|
|
18
18
|
return this.equations.map((e) => e.toDetailedEvaluation({ t: t }));
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { AlgebraicNode } from "../../tree/nodes/algebraicNode.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../tree/nodes/nodeConstructor.js";
|
|
2
3
|
import { SpacePoint } from "./spacePoint.js";
|
|
4
|
+
export type SpaceVectorIdentifiers = {
|
|
5
|
+
id: "spaceVector";
|
|
6
|
+
name: string;
|
|
7
|
+
x: NodeIdentifiers;
|
|
8
|
+
y: NodeIdentifiers;
|
|
9
|
+
z: NodeIdentifiers;
|
|
10
|
+
};
|
|
3
11
|
export declare abstract class SpaceVectorConstructor {
|
|
12
|
+
static fromIdentifiers(identifiers: SpaceVectorIdentifiers): SpaceVector;
|
|
4
13
|
static fromPoints(origin: SpacePoint, end: SpacePoint): SpaceVector;
|
|
5
14
|
static random(name: string, allowNull?: boolean): SpaceVector;
|
|
6
15
|
static randomDifferents(names: string[], allowNull?: boolean): SpaceVector[];
|
|
@@ -13,6 +22,7 @@ export declare class SpaceVector {
|
|
|
13
22
|
y: AlgebraicNode;
|
|
14
23
|
z: AlgebraicNode;
|
|
15
24
|
constructor(name: string, x: AlgebraicNode, y: AlgebraicNode, z: AlgebraicNode);
|
|
25
|
+
toIdentifiers(): SpaceVectorIdentifiers;
|
|
16
26
|
getCoords(): AlgebraicNode[];
|
|
17
27
|
getEvaluatedCoords(): number[];
|
|
18
28
|
toTex(): string;
|
|
@@ -24,7 +34,7 @@ export declare class SpaceVector {
|
|
|
24
34
|
isCoplanar(): boolean;
|
|
25
35
|
determinant(): AlgebraicNode;
|
|
26
36
|
times(k: AlgebraicNode, name?: string): SpaceVector;
|
|
27
|
-
scalarProduct(): AlgebraicNode;
|
|
37
|
+
scalarProduct(v2: SpaceVector): AlgebraicNode;
|
|
28
38
|
add(v: SpaceVector): SpaceVector;
|
|
29
39
|
getNorm(): AlgebraicNode;
|
|
30
40
|
getEndPoint(startPoint: SpacePoint, name?: string): SpacePoint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spaceVector.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/spaceVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"spaceVector.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/spaceVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAW7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,aAAa,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,CAA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AC,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"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { SqrtNode } from "../../tree/nodes/functions/sqrtNode.js";
|
|
2
|
+
import { NodeConstructor, } from "../../tree/nodes/nodeConstructor.js";
|
|
2
3
|
import { NumberNode } from "../../tree/nodes/numbers/numberNode.js";
|
|
3
|
-
import { AddNode } from "../../tree/nodes/operators/addNode.js";
|
|
4
|
-
import { MultiplyNode } from "../../tree/nodes/operators/multiplyNode.js";
|
|
4
|
+
import { add, AddNode } from "../../tree/nodes/operators/addNode.js";
|
|
5
|
+
import { multiply, MultiplyNode, } from "../../tree/nodes/operators/multiplyNode.js";
|
|
5
6
|
import { SquareNode } from "../../tree/nodes/operators/powerNode.js";
|
|
6
7
|
import { SubstractNode } from "../../tree/nodes/operators/substractNode.js";
|
|
8
|
+
import { zip } from "../../utils/arrays/arrayZip.js";
|
|
7
9
|
import { randint } from "../utils/random/randint.js";
|
|
8
10
|
import { SpacePoint } from "./spacePoint.js";
|
|
9
11
|
export class SpaceVectorConstructor {
|
|
12
|
+
static fromIdentifiers(identifiers) {
|
|
13
|
+
return new SpaceVector(identifiers.name, NodeConstructor.fromIdentifiers(identifiers.x), NodeConstructor.fromIdentifiers(identifiers.y), NodeConstructor.fromIdentifiers(identifiers.z));
|
|
14
|
+
}
|
|
10
15
|
static fromPoints(origin, end) {
|
|
11
16
|
return new SpaceVector(`${origin.name}${end.name}`, new SubstractNode(end.x, origin.x).simplify(), new SubstractNode(end.y, origin.y).simplify(), new SubstractNode(end.z, origin.z).simplify());
|
|
12
17
|
}
|
|
@@ -60,6 +65,15 @@ export class SpaceVector {
|
|
|
60
65
|
this.y = y;
|
|
61
66
|
this.z = z;
|
|
62
67
|
}
|
|
68
|
+
toIdentifiers() {
|
|
69
|
+
return {
|
|
70
|
+
id: "spaceVector",
|
|
71
|
+
name: this.name,
|
|
72
|
+
x: this.x.toIdentifiers(),
|
|
73
|
+
y: this.y.toIdentifiers(),
|
|
74
|
+
z: this.z.toIdentifiers(),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
63
77
|
getCoords() {
|
|
64
78
|
return [this.x, this.y, this.z];
|
|
65
79
|
}
|
|
@@ -96,8 +110,8 @@ export class SpaceVector {
|
|
|
96
110
|
times(k, name) {
|
|
97
111
|
return new SpaceVector(name ?? "v", new MultiplyNode(this.x, k).simplify(), new MultiplyNode(this.y, k).simplify(), new MultiplyNode(this.z, k).simplify());
|
|
98
112
|
}
|
|
99
|
-
scalarProduct() {
|
|
100
|
-
|
|
113
|
+
scalarProduct(v2) {
|
|
114
|
+
return zip([this.y, this.z], [v2.y, v2.z]).reduce((acc, [node1, node2]) => add(acc, multiply(node1, node2)), multiply(this.x, v2.x));
|
|
101
115
|
}
|
|
102
116
|
add(v) {
|
|
103
117
|
return new SpaceVector(`${this.name}+${v.name}`, new AddNode(this.x, v.x).simplify(), new AddNode(this.y, v.y).simplify(), new AddNode(this.z, v.z).simplify());
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { AlgebraicNode } from "../../tree/nodes/algebraicNode.js";
|
|
2
2
|
import { AddNode } from "../../tree/nodes/operators/addNode.js";
|
|
3
3
|
export declare abstract class RandomVariableConstructor {
|
|
4
|
-
static random(): RandomVariable;
|
|
4
|
+
static random(name?: string, nbIssues?: number): RandomVariable;
|
|
5
5
|
}
|
|
6
6
|
export declare class RandomVariable {
|
|
7
7
|
xValues: AlgebraicNode[];
|
|
8
8
|
yValues: AlgebraicNode[];
|
|
9
|
-
|
|
9
|
+
name: string;
|
|
10
|
+
constructor(xValues: (AlgebraicNode | number)[], yValues: (AlgebraicNode | number)[], name?: string);
|
|
10
11
|
getLawMdTable(): string;
|
|
11
12
|
getLawTable(): string[][];
|
|
12
13
|
getAverage(): AddNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"randomVariable.d.ts","sourceRoot":"","sources":["../../../src/math/probability/randomVariable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAWhE,8BAAsB,yBAAyB;IAC7C,MAAM,CAAC,MAAM;
|
|
1
|
+
{"version":3,"file":"randomVariable.d.ts","sourceRoot":"","sources":["../../../src/math/probability/randomVariable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAWhE,8BAAsB,yBAAyB;IAC7C,MAAM,CAAC,MAAM,CAAC,IAAI,GAAE,MAAY,EAAE,QAAQ,CAAC,EAAE,MAAM;CA0BpD;AACD,qBAAa,cAAc;IACzB,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;gBAGX,OAAO,EAAE,CAAC,aAAa,GAAG,MAAM,CAAC,EAAE,EACnC,OAAO,EAAE,CAAC,aAAa,GAAG,MAAM,CAAC,EAAE,EACnC,IAAI,GAAE,MAAY;IAOpB,aAAa;IAQb,WAAW;IAQX,UAAU;IAOV,WAAW;IAUX,oBAAoB;CAGrB"}
|
|
@@ -10,8 +10,8 @@ import { mdTable } from "../../utils/markdown/mdTable.js";
|
|
|
10
10
|
import { randint } from "../utils/random/randint.js";
|
|
11
11
|
import { round } from "../utils/round.js";
|
|
12
12
|
export class RandomVariableConstructor {
|
|
13
|
-
static random() {
|
|
14
|
-
const nb = randint(4, 6);
|
|
13
|
+
static random(name = "X", nbIssues) {
|
|
14
|
+
const nb = nbIssues ?? randint(4, 6);
|
|
15
15
|
const xis = [];
|
|
16
16
|
for (let i = -4; i < 10; i++) {
|
|
17
17
|
xis.push(i);
|
|
@@ -31,26 +31,32 @@ export class RandomVariableConstructor {
|
|
|
31
31
|
yValues[index] = round(yValues[index] + (sum > 1 ? -1 : 1) * 0.05, 2);
|
|
32
32
|
sum = yValues.reduce((acc, curr) => acc + curr);
|
|
33
33
|
}
|
|
34
|
-
return new RandomVariable(xValues, yValues);
|
|
34
|
+
return new RandomVariable(xValues, yValues, name);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
export class RandomVariable {
|
|
38
38
|
xValues;
|
|
39
39
|
yValues;
|
|
40
|
-
|
|
40
|
+
name;
|
|
41
|
+
constructor(xValues, yValues, name = "X") {
|
|
41
42
|
this.xValues = xValues.map((x) => (typeof x === "number" ? x.toTree() : x));
|
|
42
43
|
this.yValues = yValues.map((x) => (typeof x === "number" ? x.toTree() : x));
|
|
44
|
+
this.name = name;
|
|
43
45
|
}
|
|
44
46
|
getLawMdTable() {
|
|
47
|
+
const x = this.name.toLocaleLowerCase();
|
|
48
|
+
const X = this.name.toLocaleUpperCase();
|
|
45
49
|
return mdTable([
|
|
46
|
-
[
|
|
47
|
-
[
|
|
50
|
+
[`$${x}_i$`, ...this.xValues.map((x) => `$${x.toTex()}$`)],
|
|
51
|
+
[`$P(${X} = ${x}_i)$`, ...this.yValues.map((x) => `$${x.toTex()}$`)],
|
|
48
52
|
]);
|
|
49
53
|
}
|
|
50
54
|
getLawTable() {
|
|
55
|
+
const x = this.name.toLocaleLowerCase();
|
|
56
|
+
const X = this.name.toLocaleUpperCase();
|
|
51
57
|
return [
|
|
52
|
-
[
|
|
53
|
-
[
|
|
58
|
+
[`${x}_i`, ...this.xValues.map((x) => `${x.toTex()}`)],
|
|
59
|
+
[`P(${X} = ${x}_i)`, ...this.yValues.map((x) => `${x.toTex()}`)],
|
|
54
60
|
];
|
|
55
61
|
}
|
|
56
62
|
getAverage() {
|
|
@@ -14,14 +14,14 @@ export declare class GeneralSystem {
|
|
|
14
14
|
constructor(coeffs: (AlgebraicNode | number)[][]);
|
|
15
15
|
toIdentifiers(): GeneralSystemIdentifiers;
|
|
16
16
|
simplify(opts?: SimplifyOptions): GeneralSystem;
|
|
17
|
-
getEqualNodes(): EqualNode[];
|
|
17
|
+
getEqualNodes(varNames?: string[]): EqualNode[];
|
|
18
18
|
checkCouple(x: AlgebraicNode, y: AlgebraicNode): boolean;
|
|
19
19
|
multiplyEquation(nodes: AlgebraicNode[]): GeneralSystem;
|
|
20
20
|
solve(): {
|
|
21
21
|
x: AlgebraicNode;
|
|
22
22
|
y: AlgebraicNode;
|
|
23
23
|
};
|
|
24
|
-
toTex(): string;
|
|
25
|
-
toCorrectionTex(): string;
|
|
24
|
+
toTex(varNames?: string[]): string;
|
|
25
|
+
toCorrectionTex(varNames?: string[], isTrySolveBySub?: boolean): string;
|
|
26
26
|
}
|
|
27
27
|
//# sourceMappingURL=generalSystem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generalSystem.d.ts","sourceRoot":"","sources":["../../../src/math/systems/generalSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,eAAe,EAChB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAS,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAU7C,8BAAsB,wBAAwB;IAC5C,MAAM,CAAC,MAAM;IAeb,MAAM,CAAC,UAAU;IAiBjB,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,wBAAwB;CAKrD;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,eAAe,EAAE,EAAE,CAAC;CAChC,CAAC;AAEF,qBAAa,aAAa;IACxB,MAAM,EAAE,aAAa,EAAE,EAAE,CAAC;gBAId,MAAM,EAAE,CAAC,aAAa,GAAG,MAAM,CAAC,EAAE,EAAE;IAKhD,aAAa,IAAI,wBAAwB;IAKzC,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe;IAM/B,aAAa;
|
|
1
|
+
{"version":3,"file":"generalSystem.d.ts","sourceRoot":"","sources":["../../../src/math/systems/generalSystem.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,eAAe,EAChB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAS,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAU7C,8BAAsB,wBAAwB;IAC5C,MAAM,CAAC,MAAM;IAeb,MAAM,CAAC,UAAU;IAiBjB,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,wBAAwB;CAKrD;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,EAAE,eAAe,EAAE,EAAE,CAAC;CAChC,CAAC;AAEF,qBAAa,aAAa;IACxB,MAAM,EAAE,aAAa,EAAE,EAAE,CAAC;gBAId,MAAM,EAAE,CAAC,aAAa,GAAG,MAAM,CAAC,EAAE,EAAE;IAKhD,aAAa,IAAI,wBAAwB;IAKzC,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe;IAM/B,aAAa,CAAC,QAAQ,GAAE,MAAM,EAAe;IAU7C,WAAW,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa;IAQ9C,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE;IAUvC,KAAK;;;;IAoDL,KAAK,CAAC,QAAQ,GAAE,MAAM,EAAe;IAerC,eAAe,CACb,QAAQ,GAAE,MAAM,EAAe,EAC/B,eAAe,GAAE,OAAc;CAqIlC"}
|
|
@@ -55,12 +55,13 @@ export class GeneralSystem {
|
|
|
55
55
|
const simpCoeffs = this.coeffs.map((row) => row.map((c) => c.simplify(opts)));
|
|
56
56
|
return new GeneralSystem(simpCoeffs);
|
|
57
57
|
}
|
|
58
|
-
getEqualNodes() {
|
|
58
|
+
getEqualNodes(varNames = ["x", "y"]) {
|
|
59
|
+
const [varNameX, varNameY] = varNames;
|
|
59
60
|
const [a, b, c] = this.coeffs[0];
|
|
60
61
|
const [d, e, f] = this.coeffs[1];
|
|
61
62
|
return [
|
|
62
|
-
new EqualNode(add(multiply(a,
|
|
63
|
-
new EqualNode(add(multiply(d,
|
|
63
|
+
new EqualNode(add(multiply(a, varNameX), multiply(b, varNameY)), c),
|
|
64
|
+
new EqualNode(add(multiply(d, varNameX), multiply(e, varNameY)), f),
|
|
64
65
|
];
|
|
65
66
|
}
|
|
66
67
|
checkCouple(x, y) {
|
|
@@ -129,14 +130,16 @@ export class GeneralSystem {
|
|
|
129
130
|
// y,
|
|
130
131
|
// };
|
|
131
132
|
}
|
|
132
|
-
toTex() {
|
|
133
|
+
toTex(varNames = ["x", "y"]) {
|
|
134
|
+
const [varNameX, varNameY] = varNames;
|
|
133
135
|
return `\\left\\{\\begin{matrix}
|
|
134
|
-
${add(multiply(this.coeffs[0][0],
|
|
135
|
-
${new AddNode(multiply(this.coeffs[1][0],
|
|
136
|
+
${add(multiply(this.coeffs[0][0], varNameX), multiply(this.coeffs[0][1], varNameY)).toTex()}=${this.coeffs[0][2].toTex()} \\\\
|
|
137
|
+
${new AddNode(multiply(this.coeffs[1][0], varNameX), multiply(this.coeffs[1][1], varNameY)).toTex()}=${this.coeffs[1][2].toTex()}
|
|
136
138
|
\\end{matrix}\\right.`;
|
|
137
139
|
}
|
|
138
|
-
toCorrectionTex() {
|
|
139
|
-
const [
|
|
140
|
+
toCorrectionTex(varNames = ["x", "y"], isTrySolveBySub = true) {
|
|
141
|
+
const [varNameX, varNameY] = varNames;
|
|
142
|
+
const [equa1, equa2] = this.getEqualNodes(varNames);
|
|
140
143
|
const coeffs1 = this.coeffs[0];
|
|
141
144
|
const coeffs2 = this.coeffs[1];
|
|
142
145
|
let corr = "";
|
|
@@ -148,12 +151,12 @@ ${new AddNode(multiply(this.coeffs[1][0], "x"), multiply(this.coeffs[1][1], "y")
|
|
|
148
151
|
].findIndex((e) => Math.abs(e.evaluate()) === 1);
|
|
149
152
|
//si une var est à coeff |1|, substitution
|
|
150
153
|
//sinon, cl :
|
|
151
|
-
const solveBySub = unitCoeffIndex > -1;
|
|
154
|
+
const solveBySub = isTrySolveBySub && unitCoeffIndex > -1;
|
|
152
155
|
if (solveBySub) {
|
|
153
156
|
const isFirstEqua = unitCoeffIndex < 2;
|
|
154
157
|
const isX = unitCoeffIndex % 2 === 0;
|
|
155
|
-
const varName = isX ?
|
|
156
|
-
const varName2 = isX ?
|
|
158
|
+
const varName = isX ? varNameX : varNameY;
|
|
159
|
+
const varName2 = isX ? varNameY : varNameX;
|
|
157
160
|
const isolated = isFirstEqua
|
|
158
161
|
? equa1.isolate(varName)
|
|
159
162
|
: equa2.isolate(varName);
|
|
@@ -171,14 +174,14 @@ $$`;
|
|
|
171
174
|
towardsDistribute: true,
|
|
172
175
|
forbidFactorize: true,
|
|
173
176
|
});
|
|
174
|
-
const isolated2 = subSimp.isolate(isX ?
|
|
177
|
+
const isolated2 = subSimp.isolate(isX ? varNameY : varNameX);
|
|
175
178
|
const varFinal = isolated.toDetailedEvaluation({
|
|
176
179
|
[varName2]: isolated2.rightChild,
|
|
177
180
|
});
|
|
178
181
|
const varFinalSimp = varFinal.simplify();
|
|
179
182
|
corr += `
|
|
180
183
|
|
|
181
|
-
On peut alors remplacer $${varName}$ dans la ${isFirstEqua ? "seconde" : "première"} équation, pour en déduire $${isX ?
|
|
184
|
+
On peut alors remplacer $${varName}$ dans la ${isFirstEqua ? "seconde" : "première"} équation, pour en déduire $${isX ? varNameY : varNameX}$ :
|
|
182
185
|
|
|
183
186
|
${alignTex([[substituted.toTex()], [subSimp.toTex()], [isolated2.toTex()]])}
|
|
184
187
|
|
|
@@ -217,14 +220,14 @@ On multiplie la ${shouldHandleFirst
|
|
|
217
220
|
: ""} :
|
|
218
221
|
|
|
219
222
|
$$
|
|
220
|
-
${sysMultiplied.toTex()}
|
|
223
|
+
${sysMultiplied.toTex(varNames)}
|
|
221
224
|
$$
|
|
222
225
|
|
|
223
226
|
`;
|
|
224
227
|
}
|
|
225
|
-
const equaMul = sysMultiplied.getEqualNodes();
|
|
228
|
+
const equaMul = sysMultiplied.getEqualNodes(varNames);
|
|
226
229
|
const added = equal(add(equaMul[0].leftChild, equaMul[1].leftChild), add(equaMul[0].rightChild, equaMul[1].rightChild)).simplify();
|
|
227
|
-
const varName = isX ?
|
|
230
|
+
const varName = isX ? varNameY : varNameX;
|
|
228
231
|
const isolated = added.isolate(varName);
|
|
229
232
|
const sub = equa1.toDetailedEvaluation({
|
|
230
233
|
[varName]: isolated.rightChild,
|
|
@@ -235,7 +238,7 @@ $$
|
|
|
235
238
|
towardsDistribute: true,
|
|
236
239
|
});
|
|
237
240
|
const subSimpToIsolateButWeShouldnt = sub.simplify({});
|
|
238
|
-
const isolated2 = subSimpToIsolateButWeShouldnt.isolate(isX ?
|
|
241
|
+
const isolated2 = subSimpToIsolateButWeShouldnt.isolate(isX ? varNameX : varNameY);
|
|
239
242
|
corr += `On peut alors additionner les deux équations pour éliminer une des variables et isoler l'autre :
|
|
240
243
|
|
|
241
244
|
${alignTex([[added.toTex()], [isolated.toTex()]])}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functionComparison.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/functions/functionComparison.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"functionComparison.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/functions/functionComparison.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAIlE,eAAO,MAAM,iBAAiB,GAC5B,OAAO,aAAa,EACpB,OAAO,aAAa,YAarB,CAAC"}
|
|
@@ -1,48 +1,5 @@
|
|
|
1
|
-
import { isInfiniteNode } from "../../../tree/nodes/numbers/constantNode.js";
|
|
2
1
|
import { substract } from "../../../tree/nodes/operators/substractNode.js";
|
|
3
|
-
import {
|
|
4
|
-
const getSafeEvaluationDictForEqualityCheck = (node1, node2, nbSafeX = 4) => {
|
|
5
|
-
const dict = {};
|
|
6
|
-
let counter = -1;
|
|
7
|
-
while (Object.keys(dict).length < nbSafeX && counter < 1000) {
|
|
8
|
-
counter++;
|
|
9
|
-
const x = randfloat(-20, 100, 3);
|
|
10
|
-
let value1;
|
|
11
|
-
let value2;
|
|
12
|
-
try {
|
|
13
|
-
value1 = node1.evaluate({ x });
|
|
14
|
-
}
|
|
15
|
-
catch (_) {
|
|
16
|
-
continue;
|
|
17
|
-
}
|
|
18
|
-
try {
|
|
19
|
-
value2 = node2.evaluate({ x });
|
|
20
|
-
}
|
|
21
|
-
catch (_) {
|
|
22
|
-
continue;
|
|
23
|
-
}
|
|
24
|
-
const [isValidValue1, isValidValue2] = [value1, value2].map((value) => value !== undefined && !isNaN(value) && !isInfiniteNode(value.toTree()));
|
|
25
|
-
if (isValidValue1 && isValidValue2) {
|
|
26
|
-
dict[x] = [value1, value2].map((value) => {
|
|
27
|
-
return {
|
|
28
|
-
x,
|
|
29
|
-
value,
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return dict;
|
|
35
|
-
};
|
|
36
|
-
const isEqualFromRandomEvaluations = (node1, node2) => {
|
|
37
|
-
const safeEvalDict = getSafeEvaluationDictForEqualityCheck(node1, node2);
|
|
38
|
-
const arrArrSafeEval = Object.values(safeEvalDict);
|
|
39
|
-
return (arrArrSafeEval.length > 0 &&
|
|
40
|
-
arrArrSafeEval.every((arrSafeEval) => {
|
|
41
|
-
return arrSafeEval
|
|
42
|
-
.slice(1)
|
|
43
|
-
.every((safeEval) => substract(arrSafeEval[0].value, safeEval.value).evaluate() === 0);
|
|
44
|
-
}));
|
|
45
|
-
};
|
|
2
|
+
import { NodeComparator } from "../../../tree/utilities/nodeComparator.js";
|
|
46
3
|
export const isEquivalentNodes = (node1, node2) => {
|
|
47
4
|
let isEqualFromAlgebraicSimplification = false;
|
|
48
5
|
try {
|
|
@@ -53,5 +10,5 @@ export const isEquivalentNodes = (node1, node2) => {
|
|
|
53
10
|
(() => { })();
|
|
54
11
|
}
|
|
55
12
|
return (isEqualFromAlgebraicSimplification ||
|
|
56
|
-
|
|
13
|
+
NodeComparator.isEqualViaRandomEvaluations(node1, node2, 4));
|
|
57
14
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { AlgebraicNode, SimplifyOptions } from "../../../tree/nodes/algebraicNode.js";
|
|
2
|
+
import { NodeIdentifiers } from "../../../tree/nodes/nodeConstructor.js";
|
|
2
3
|
import { VariableNode } from "../../../tree/nodes/variables/variableNode.js";
|
|
4
|
+
import { Node } from "../../../tree/nodes/node.js";
|
|
3
5
|
export declare const nodeBySubstitutingVar: (nodeCarrier: AlgebraicNode, nodeInjected: AlgebraicNode, variableNode?: VariableNode) => AlgebraicNode;
|
|
4
6
|
export type NodePathWithNodes = {
|
|
5
7
|
arrNode: AlgebraicNode[];
|
|
@@ -9,5 +11,5 @@ export declare const getAllNodePaths: (node: AlgebraicNode) => NodePathWithNodes
|
|
|
9
11
|
export type NodePath = {
|
|
10
12
|
keys: ("leftChild" | "rightChild" | "child")[];
|
|
11
13
|
};
|
|
12
|
-
export declare function nodeByReplacingNodeAtPath(nodeCarrier: AlgebraicNode, path: NodePath, nodeInjected: AlgebraicNode, simplifyUpToLevel?: number, simplifyOptions?: SimplifyOptions): AlgebraicNode;
|
|
14
|
+
export declare function nodeByReplacingNodeAtPath(nodeCarrier: AlgebraicNode, path: NodePath, nodeInjected: AlgebraicNode, simplifyUpToLevel?: number, simplifyOptions?: SimplifyOptions, fromIdentifiersFunc?: (identifiers: NodeIdentifiers) => Node): AlgebraicNode;
|
|
13
15
|
//# sourceMappingURL=functionComposition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functionComposition.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/functions/functionComposition.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,eAAe,EAChB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"functionComposition.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/functions/functionComposition.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,eAAe,EAChB,MAAM,mCAAmC,CAAC;AAS3C,OAAO,EAEL,eAAe,EAChB,MAAM,qCAAqC,CAAC;AAK7C,OAAO,EAEL,YAAY,EACb,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAEhD,eAAO,MAAM,qBAAqB,GAChC,aAAa,aAAa,EAC1B,cAAc,aAAa,EAC3B,eAAc,YAA2C,kBAiB1D,CAAC;AAMF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,MAAM,aAAa,wBA4ClD,CAAC;AAMF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,CAAC,WAAW,GAAG,YAAY,GAAG,OAAO,CAAC,EAAE,CAAC;CAChD,CAAC;AA8DF,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,aAAa,EAC1B,IAAI,EAAE,QAAQ,EACd,YAAY,EAAE,aAAa,EAC3B,iBAAiB,GAAE,MAAW,EAC9B,eAAe,GAAE,eAAoB,EACrC,mBAAmB,GAAE,CAAC,WAAW,EAAE,eAAe,KAAK,IAEN,iBAwElD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isEqualNode, } from "../../../tree/nodes/equations/equalNode.js";
|
|
2
2
|
import { isFunctionNode, } from "../../../tree/nodes/functions/functionNode.js";
|
|
3
|
-
import { NodeConstructor } from "../../../tree/nodes/nodeConstructor.js";
|
|
3
|
+
import { NodeConstructor, } from "../../../tree/nodes/nodeConstructor.js";
|
|
4
4
|
import { isOperatorNode, } from "../../../tree/nodes/operators/operatorNode.js";
|
|
5
5
|
import { isVariableNode, } from "../../../tree/nodes/variables/variableNode.js";
|
|
6
6
|
export const nodeBySubstitutingVar = (nodeCarrier, nodeInjected, variableNode = "x".toTree()) => {
|
|
@@ -50,32 +50,32 @@ export const getAllNodePaths = (node) => {
|
|
|
50
50
|
}
|
|
51
51
|
return arrNodePaths;
|
|
52
52
|
};
|
|
53
|
-
function functionNodeByReplacingChild(fNode, nodeChildNew) {
|
|
53
|
+
function functionNodeByReplacingChild(fNode, nodeChildNew, fromIdentifiersFunc = (identifiers) => NodeConstructor.fromIdentifiers(identifiers)) {
|
|
54
54
|
const nodeIds = fNode.toIdentifiers();
|
|
55
55
|
nodeIds.child = nodeChildNew.toIdentifiers();
|
|
56
|
-
return
|
|
56
|
+
return fromIdentifiersFunc(nodeIds);
|
|
57
57
|
}
|
|
58
|
-
function operatorNodeByReplacingLeftChild(opNode, nodeLeftChildNew) {
|
|
58
|
+
function operatorNodeByReplacingLeftChild(opNode, nodeLeftChildNew, fromIdentifiersFunc = (identifiers) => NodeConstructor.fromIdentifiers(identifiers)) {
|
|
59
59
|
const nodeIds = opNode.toIdentifiers();
|
|
60
60
|
nodeIds.leftChild = nodeLeftChildNew.toIdentifiers();
|
|
61
|
-
return
|
|
61
|
+
return fromIdentifiersFunc(nodeIds);
|
|
62
62
|
}
|
|
63
|
-
function operatorNodeByReplacingRightChild(opNode, nodeRightChildNew) {
|
|
63
|
+
function operatorNodeByReplacingRightChild(opNode, nodeRightChildNew, fromIdentifiersFunc = (identifiers) => NodeConstructor.fromIdentifiers(identifiers)) {
|
|
64
64
|
const nodeIds = opNode.toIdentifiers();
|
|
65
65
|
nodeIds.rightChild = nodeRightChildNew.toIdentifiers();
|
|
66
|
-
return
|
|
66
|
+
return fromIdentifiersFunc(nodeIds);
|
|
67
67
|
}
|
|
68
|
-
function equalNodeByReplacingLeftChild(equalNode, nodeLeftChildNew) {
|
|
68
|
+
function equalNodeByReplacingLeftChild(equalNode, nodeLeftChildNew, fromIdentifiersFunc = (identifiers) => NodeConstructor.fromIdentifiers(identifiers)) {
|
|
69
69
|
const nodeIds = equalNode.toIdentifiers();
|
|
70
70
|
nodeIds.leftChild = nodeLeftChildNew.toIdentifiers();
|
|
71
|
-
return
|
|
71
|
+
return fromIdentifiersFunc(nodeIds);
|
|
72
72
|
}
|
|
73
|
-
function equalNodeByReplacingRightChild(equalNode, nodeRightChildNew) {
|
|
73
|
+
function equalNodeByReplacingRightChild(equalNode, nodeRightChildNew, fromIdentifiersFunc = (identifiers) => NodeConstructor.fromIdentifiers(identifiers)) {
|
|
74
74
|
const nodeIds = equalNode.toIdentifiers();
|
|
75
75
|
nodeIds.rightChild = nodeRightChildNew.toIdentifiers();
|
|
76
|
-
return
|
|
76
|
+
return fromIdentifiersFunc(nodeIds);
|
|
77
77
|
}
|
|
78
|
-
export function nodeByReplacingNodeAtPath(nodeCarrier, path, nodeInjected, simplifyUpToLevel = -1, simplifyOptions = {}) {
|
|
78
|
+
export function nodeByReplacingNodeAtPath(nodeCarrier, path, nodeInjected, simplifyUpToLevel = -1, simplifyOptions = {}, fromIdentifiersFunc = (identifiers) => NodeConstructor.fromIdentifiers(identifiers)) {
|
|
79
79
|
function getNodeForKey(node, key) {
|
|
80
80
|
if (key === "leftChild" || key === "rightChild") {
|
|
81
81
|
return node[key];
|
|
@@ -89,19 +89,19 @@ export function nodeByReplacingNodeAtPath(nodeCarrier, path, nodeInjected, simpl
|
|
|
89
89
|
}
|
|
90
90
|
function nodeByReplacingChildAtKey(node, key, nodeInjected) {
|
|
91
91
|
if (key === "leftChild" && isOperatorNode(node)) {
|
|
92
|
-
return operatorNodeByReplacingLeftChild(node, nodeInjected);
|
|
92
|
+
return operatorNodeByReplacingLeftChild(node, nodeInjected, fromIdentifiersFunc);
|
|
93
93
|
}
|
|
94
94
|
else if (key === "rightChild" && isOperatorNode(node)) {
|
|
95
|
-
return operatorNodeByReplacingRightChild(node, nodeInjected);
|
|
95
|
+
return operatorNodeByReplacingRightChild(node, nodeInjected, fromIdentifiersFunc);
|
|
96
96
|
}
|
|
97
97
|
else if (key === "leftChild" && isEqualNode(node)) {
|
|
98
|
-
return equalNodeByReplacingLeftChild(node, nodeInjected);
|
|
98
|
+
return equalNodeByReplacingLeftChild(node, nodeInjected, fromIdentifiersFunc);
|
|
99
99
|
}
|
|
100
100
|
else if (key === "rightChild" && isEqualNode(node)) {
|
|
101
|
-
return equalNodeByReplacingRightChild(node, nodeInjected);
|
|
101
|
+
return equalNodeByReplacingRightChild(node, nodeInjected, fromIdentifiersFunc);
|
|
102
102
|
}
|
|
103
103
|
else if (key === "child" && isFunctionNode(node)) {
|
|
104
|
-
return functionNodeByReplacingChild(node, nodeInjected);
|
|
104
|
+
return functionNodeByReplacingChild(node, nodeInjected, fromIdentifiersFunc);
|
|
105
105
|
}
|
|
106
106
|
else {
|
|
107
107
|
throw new Error("Either key and node type are incompatible or Unsupported key: " + key);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AlgebraicNode } from "../../../tree/nodes/algebraicNode.js";
|
|
2
|
+
export declare const lowerSum: (nodeF: AlgebraicNode, nodeIntegralBoundLow: AlgebraicNode, nodeIntegralBoundHigh: AlgebraicNode, nbRectangles: number, isShouldSimplifyAbscissa: boolean) => AlgebraicNode;
|
|
3
|
+
export declare const upperSum: (nodeF: AlgebraicNode, nodeIntegralBoundLow: AlgebraicNode, nodeIntegralBoundHigh: AlgebraicNode, nbRectangles: number, isShouldSimplifyAbscissa: boolean) => AlgebraicNode;
|
|
4
|
+
export declare const lowerSumSameAsGGB: (nodeF: AlgebraicNode, nodeIntegralBoundLow: AlgebraicNode, nodeIntegralBoundHigh: AlgebraicNode, nbRectangles: number) => number;
|
|
5
|
+
export declare const upperSumSameAsGGB: (nodeF: AlgebraicNode, nodeIntegralBoundLow: AlgebraicNode, nodeIntegralBoundHigh: AlgebraicNode, nbRectangles: number) => number;
|
|
6
|
+
//# sourceMappingURL=rectanglesMethod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rectanglesMethod.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/integration/rectanglesMethod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAkElE,eAAO,MAAM,QAAQ,GACnB,OAAO,aAAa,EACpB,sBAAsB,aAAa,EACnC,uBAAuB,aAAa,EACpC,cAAc,MAAM,EACpB,0BAA0B,OAAO,kBAelC,CAAC;AAEF,eAAO,MAAM,QAAQ,GACnB,OAAO,aAAa,EACpB,sBAAsB,aAAa,EACnC,uBAAuB,aAAa,EACpC,cAAc,MAAM,EACpB,0BAA0B,OAAO,kBAelC,CAAC;AA4CF,eAAO,MAAM,iBAAiB,GAC5B,OAAO,aAAa,EACpB,sBAAsB,aAAa,EACnC,uBAAuB,aAAa,EACpC,cAAc,MAAM,WAcrB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,OAAO,aAAa,EACpB,sBAAsB,aAAa,EACnC,uBAAuB,aAAa,EACpC,cAAc,MAAM,WAcrB,CAAC"}
|