math-exercises 3.0.187 → 3.0.189
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/derivation/derivative/exp/expDerivativeProductFExp.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.js +22 -6
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.js +16 -8
- package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.js +44 -37
- package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberAndImageReading.d.ts +9 -0
- package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberAndImageReading.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberAndImageReading.js +155 -0
- package/lib/exercises/math/derivation/derivativeNumber/index.d.ts +1 -0
- package/lib/exercises/math/derivation/derivativeNumber/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivativeNumber/index.js +1 -0
- package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.d.ts.map +1 -1
- package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.js +80 -29
- package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.d.ts.map +1 -1
- package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.js +30 -2
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts.map +1 -1
- package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.js +59 -16
- package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.js +23 -9
- package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.js +2 -7
- package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.js +18 -68
- package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.js +27 -35
- package/lib/exercises/math/functions/affines/adjustment/affineAdjustment.d.ts +8 -0
- package/lib/exercises/math/functions/affines/adjustment/affineAdjustment.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/adjustment/affineAdjustment.js +129 -0
- package/lib/exercises/math/functions/affines/adjustment/affineAdjustmentComplete.d.ts +8 -0
- package/lib/exercises/math/functions/affines/adjustment/affineAdjustmentComplete.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/adjustment/affineAdjustmentComplete.js +108 -0
- package/lib/exercises/math/functions/affines/adjustment/affineAdjustmentRsquared.d.ts +8 -0
- package/lib/exercises/math/functions/affines/adjustment/affineAdjustmentRsquared.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/adjustment/affineAdjustmentRsquared.js +92 -0
- package/lib/exercises/math/functions/affines/adjustment/index.d.ts +4 -0
- package/lib/exercises/math/functions/affines/adjustment/index.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/adjustment/index.js +3 -0
- package/lib/exercises/math/functions/affines/index.d.ts +2 -4
- package/lib/exercises/math/functions/affines/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/index.js +2 -4
- package/lib/exercises/math/functions/affines/situations/affineFromExercise.d.ts +10 -0
- package/lib/exercises/math/functions/affines/situations/affineFromExercise.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/situations/affineFromExercise.js +219 -0
- package/lib/exercises/math/functions/affines/situations/affineModelisationSituations.d.ts +10 -0
- package/lib/exercises/math/functions/affines/situations/affineModelisationSituations.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/situations/affineModelisationSituations.js +69 -0
- package/lib/exercises/math/functions/affines/situations/affineSituationComputeAntecedent.d.ts +10 -0
- package/lib/exercises/math/functions/affines/situations/affineSituationComputeAntecedent.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/situations/affineSituationComputeAntecedent.js +133 -0
- package/lib/exercises/math/functions/affines/situations/affineSituationComputeImage.d.ts +10 -0
- package/lib/exercises/math/functions/affines/situations/affineSituationComputeImage.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/situations/affineSituationComputeImage.js +229 -0
- package/lib/exercises/math/functions/affines/situations/affineSituationThreshold.d.ts +10 -0
- package/lib/exercises/math/functions/affines/situations/affineSituationThreshold.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/situations/affineSituationThreshold.js +166 -0
- package/lib/exercises/math/functions/affines/situations/affineSituationVariation.d.ts +9 -0
- package/lib/exercises/math/functions/affines/situations/affineSituationVariation.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/situations/affineSituationVariation.js +78 -0
- package/lib/exercises/math/functions/affines/situations/index.d.ts +6 -0
- package/lib/exercises/math/functions/affines/situations/index.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/situations/index.js +5 -0
- package/lib/exercises/math/functions/sign/equationFromSignTable.d.ts +1 -0
- package/lib/exercises/math/functions/sign/equationFromSignTable.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/equationFromSignTable.js +60 -33
- package/lib/exercises/math/functions/sign/partialSignTableFromGraph.d.ts +6 -4
- package/lib/exercises/math/functions/sign/partialSignTableFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/partialSignTableFromGraph.js +160 -63
- package/lib/exercises/math/functions/sign/readSignTable.d.ts +4 -1
- package/lib/exercises/math/functions/sign/readSignTable.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/readSignTable.js +32 -9
- package/lib/exercises/math/functions/sign/signTableFromGraph.d.ts +6 -4
- package/lib/exercises/math/functions/sign/signTableFromGraph.d.ts.map +1 -1
- package/lib/exercises/math/functions/sign/signTableFromGraph.js +160 -57
- package/lib/exercises/math/percent/evolutions/averageEvolutionRateFromStartAndEndValue.d.ts +9 -0
- package/lib/exercises/math/percent/evolutions/averageEvolutionRateFromStartAndEndValue.d.ts.map +1 -0
- package/lib/exercises/math/percent/evolutions/averageEvolutionRateFromStartAndEndValue.js +135 -0
- package/lib/exercises/math/percent/evolutions/index.d.ts +1 -0
- package/lib/exercises/math/percent/evolutions/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutions/index.js +1 -0
- package/lib/exercises/math/powers/equationOnePlusTPowerN.d.ts +9 -0
- package/lib/exercises/math/powers/equationOnePlusTPowerN.d.ts.map +1 -0
- package/lib/exercises/math/powers/equationOnePlusTPowerN.js +118 -0
- package/lib/exercises/math/powers/estimateNthRoot.d.ts +13 -0
- package/lib/exercises/math/powers/estimateNthRoot.d.ts.map +1 -0
- package/lib/exercises/math/powers/estimateNthRoot.js +126 -0
- package/lib/exercises/math/powers/index.d.ts +3 -0
- package/lib/exercises/math/powers/index.d.ts.map +1 -1
- package/lib/exercises/math/powers/index.js +3 -0
- package/lib/exercises/math/powers/solveNthRootEquation.d.ts +9 -0
- package/lib/exercises/math/powers/solveNthRootEquation.d.ts.map +1 -0
- package/lib/exercises/math/powers/solveNthRootEquation.js +111 -0
- package/lib/exercises/math/probaStat/randomVariable/index.d.ts +1 -7
- package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/randomVariable/index.js +1 -7
- package/lib/exercises/math/probaStat/randomVariable/situations/index.d.ts +8 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/index.js +7 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationAverage.d.ts +11 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationAverage.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationAverage.js +112 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationComputeProbability.d.ts +9 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationComputeProbability.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationComputeProbability.js +176 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationIsGameFavorable.d.ts +8 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationIsGameFavorable.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationIsGameFavorable.js +94 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationProbabilityLaw.d.ts +9 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationProbabilityLaw.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationProbabilityLaw.js +166 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationStandardDeviation.d.ts +8 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationStandardDeviation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationStandardDeviation.js +133 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationValues.d.ts +8 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationValues.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationValues.js +211 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationVariance.d.ts +8 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationVariance.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituationVariance.js +113 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituations.d.ts +41 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituations.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/randomVariable/situations/randomVariableSituations.js +173 -0
- package/lib/exercises/math/python/list/pyListMutationMix.d.ts.map +1 -1
- package/lib/exercises/math/python/list/pyListMutationMix.js +11 -6
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRecurrenceFormulaFromSituation.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRecurrenceFormulaFromSituation.js +2 -2
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.js +1 -1
- package/lib/exercises/vea/percentVEA.d.ts +6 -1
- package/lib/exercises/vea/percentVEA.d.ts.map +1 -1
- package/lib/exercises/vea/percentVEA.js +15 -1
- package/lib/index.d.ts +78 -33
- package/lib/index.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticSituations.js +5 -8
- package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqArithmeticUtils.js +1 -3
- package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts.map +1 -1
- package/lib/math/utils/sequences/situations/seqGeometricSituations.js +8 -10
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +8 -0
- package/lib/tree/nodes/sets/closure.d.ts +1 -0
- package/lib/tree/nodes/sets/closure.d.ts.map +1 -1
- package/lib/tree/nodes/sets/closure.js +12 -0
- package/lib/tree/utilities/nodeUtils.d.ts +2 -0
- package/lib/tree/utilities/nodeUtils.d.ts.map +1 -1
- package/lib/tree/utilities/nodeUtils.js +40 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"percentVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/percentVEA.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"percentVEA.d.ts","sourceRoot":"","sources":["../../../src/exercises/vea/percentVEA.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,EAAE,QAAQ,MAAM,YAUrD,CAAC"}
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { frac } from "../../tree/nodes/operators/fractionNode.js";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param ans élève, % accepté ou non
|
|
5
|
+
* @param answer doit être sous forme x%
|
|
6
|
+
*/
|
|
7
|
+
export const percentVEA = (ans, answer) => {
|
|
8
|
+
const rightAnswerPercent = frac(answer.replace("\\%", "").unfrenchify(), 100).evaluate();
|
|
9
|
+
const studentAns = ans.includes("\\%")
|
|
10
|
+
? frac(ans.replace("\\%", "").unfrenchify(), 100).evaluate()
|
|
11
|
+
: ans.unfrenchify();
|
|
12
|
+
if (isNaN(studentAns))
|
|
13
|
+
return false;
|
|
14
|
+
return Math.abs(rightAnswerPercent - studentAns) < 0.00001;
|
|
15
|
+
};
|
package/lib/index.d.ts
CHANGED
|
@@ -1065,6 +1065,10 @@ declare const mathExercises: (Exercise<{
|
|
|
1065
1065
|
arrNodeIdsX: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
1066
1066
|
nodeIdsF: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1067
1067
|
initTable: string[][];
|
|
1068
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1069
|
+
A: number[];
|
|
1070
|
+
B: number[];
|
|
1071
|
+
coeffs: number[];
|
|
1068
1072
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1069
1073
|
abscisse: number;
|
|
1070
1074
|
trinome: number[];
|
|
@@ -1337,15 +1341,6 @@ declare const mathExercises: (Exercise<{
|
|
|
1337
1341
|
}, {
|
|
1338
1342
|
parameter: string;
|
|
1339
1343
|
}> | Exercise<{
|
|
1340
|
-
xValues: number[];
|
|
1341
|
-
yValues: number[];
|
|
1342
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1343
|
-
xValues: number[];
|
|
1344
|
-
yValues: number[];
|
|
1345
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1346
|
-
xValues: number[];
|
|
1347
|
-
yValues: number[];
|
|
1348
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1349
1344
|
trinomial: number[];
|
|
1350
1345
|
leftbound: number;
|
|
1351
1346
|
rightbound: number;
|
|
@@ -1354,10 +1349,6 @@ declare const mathExercises: (Exercise<{
|
|
|
1354
1349
|
xB: number;
|
|
1355
1350
|
yA: number;
|
|
1356
1351
|
yB: number;
|
|
1357
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1358
|
-
situationIndex: number;
|
|
1359
|
-
initial: number;
|
|
1360
|
-
growth: number;
|
|
1361
1352
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1362
1353
|
correctA: number;
|
|
1363
1354
|
correctB: number;
|
|
@@ -1426,6 +1417,39 @@ declare const mathExercises: (Exercise<{
|
|
|
1426
1417
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1427
1418
|
nodeIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1428
1419
|
pointIds: import("./math/geometry/point.js").PointIdentifiers[];
|
|
1420
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1421
|
+
xValues: number[];
|
|
1422
|
+
yValues: number[];
|
|
1423
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1424
|
+
xValues: number[];
|
|
1425
|
+
yValues: number[];
|
|
1426
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1427
|
+
xValues: number[];
|
|
1428
|
+
yValues: number[];
|
|
1429
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1430
|
+
id: string;
|
|
1431
|
+
situationIndex: number;
|
|
1432
|
+
initial: number;
|
|
1433
|
+
growth: number;
|
|
1434
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1435
|
+
situationId: string;
|
|
1436
|
+
initial: number;
|
|
1437
|
+
growth: number;
|
|
1438
|
+
x: number;
|
|
1439
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1440
|
+
situationId: string;
|
|
1441
|
+
initial: number;
|
|
1442
|
+
growth: number;
|
|
1443
|
+
y: number;
|
|
1444
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1445
|
+
initial: number;
|
|
1446
|
+
growth: number;
|
|
1447
|
+
situationId: string;
|
|
1448
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1449
|
+
initial: number;
|
|
1450
|
+
growth: number;
|
|
1451
|
+
situationId: string;
|
|
1452
|
+
threshold: number;
|
|
1429
1453
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
1430
1454
|
xValue: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1431
1455
|
polynomeCoeffs: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
@@ -1928,27 +1952,32 @@ declare const mathExercises: (Exercise<{
|
|
|
1928
1952
|
signs: string[];
|
|
1929
1953
|
xs: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
1930
1954
|
x: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
1931
|
-
},
|
|
1932
|
-
|
|
1955
|
+
}, {
|
|
1956
|
+
functionType: string;
|
|
1957
|
+
}> | Exercise<{
|
|
1933
1958
|
a: number;
|
|
1934
1959
|
x1: number;
|
|
1935
|
-
x2
|
|
1936
|
-
x3
|
|
1937
|
-
},
|
|
1960
|
+
x2?: number;
|
|
1961
|
+
x3?: number;
|
|
1962
|
+
}, {
|
|
1963
|
+
functionType: string;
|
|
1964
|
+
}> | Exercise<{
|
|
1938
1965
|
signs: string[];
|
|
1939
1966
|
xs: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
1940
1967
|
type: number;
|
|
1941
1968
|
ineqSymbol?: string;
|
|
1942
1969
|
}, {
|
|
1943
1970
|
questionType: string;
|
|
1971
|
+
functionType: string;
|
|
1944
1972
|
}> | Exercise<{
|
|
1945
|
-
initTable: string[][];
|
|
1946
1973
|
a: number;
|
|
1947
1974
|
x1: number;
|
|
1948
|
-
x2
|
|
1949
|
-
x3
|
|
1975
|
+
x2?: number;
|
|
1976
|
+
x3?: number;
|
|
1950
1977
|
lineAsked: number;
|
|
1951
|
-
},
|
|
1978
|
+
}, {
|
|
1979
|
+
functionType: string;
|
|
1980
|
+
}> | Exercise<{
|
|
1952
1981
|
affine1Coeffs: number[];
|
|
1953
1982
|
affine2Coeffs: number[];
|
|
1954
1983
|
initTable: string[][];
|
|
@@ -2944,6 +2973,10 @@ declare const mathExercises: (Exercise<{
|
|
|
2944
2973
|
askingFinalPrice: boolean;
|
|
2945
2974
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2946
2975
|
evolutions: number[];
|
|
2976
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2977
|
+
vi: number;
|
|
2978
|
+
vf: number;
|
|
2979
|
+
nbEvolutions: number;
|
|
2947
2980
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2948
2981
|
initialCapital: number;
|
|
2949
2982
|
rate: number;
|
|
@@ -3019,6 +3052,18 @@ declare const mathExercises: (Exercise<{
|
|
|
3019
3052
|
a: number;
|
|
3020
3053
|
n: number;
|
|
3021
3054
|
isSimplified: boolean;
|
|
3055
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3056
|
+
writeAsRoot: boolean;
|
|
3057
|
+
aIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3058
|
+
nIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3059
|
+
}, {
|
|
3060
|
+
writeAsRoot: boolean;
|
|
3061
|
+
}> | Exercise<{
|
|
3062
|
+
nIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3063
|
+
kIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3064
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3065
|
+
nIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3066
|
+
kIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3022
3067
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3023
3068
|
c: number;
|
|
3024
3069
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
@@ -3262,23 +3307,23 @@ declare const mathExercises: (Exercise<{
|
|
|
3262
3307
|
probasIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
3263
3308
|
intervalIds: import("./tree/nodes/sets/intervalNode.js").IntervalNodeIdentifiers;
|
|
3264
3309
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3265
|
-
params: import("./exercises/math/probaStat/randomVariable/
|
|
3266
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3267
|
-
params: import("./exercises/math/probaStat/randomVariable/utils/randomVariableSituations.js").RandomVariableSituationParams;
|
|
3268
|
-
xi: number;
|
|
3269
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3270
|
-
params: import("./exercises/math/probaStat/randomVariable/utils/randomVariableSituations.js").RandomVariableSituationParams;
|
|
3310
|
+
params: import("./exercises/math/probaStat/randomVariable/situations/randomVariableSituations.js").RandomVariableSituationParams;
|
|
3271
3311
|
}, {
|
|
3272
3312
|
averageFormulation: string;
|
|
3273
3313
|
}> | Exercise<{
|
|
3274
|
-
params: import("./exercises/math/probaStat/randomVariable/
|
|
3275
|
-
|
|
3276
|
-
params: import("./exercises/math/probaStat/randomVariable/utils/randomVariableSituations.js").RandomVariableSituationParams;
|
|
3314
|
+
params: import("./exercises/math/probaStat/randomVariable/situations/randomVariableSituations.js").RandomVariableSituationParams;
|
|
3315
|
+
xi: number;
|
|
3277
3316
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3278
|
-
params: import("./exercises/math/probaStat/randomVariable/
|
|
3317
|
+
params: import("./exercises/math/probaStat/randomVariable/situations/randomVariableSituations.js").RandomVariableSituationParams;
|
|
3279
3318
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3280
|
-
params: import("./exercises/math/probaStat/randomVariable/
|
|
3319
|
+
params: import("./exercises/math/probaStat/randomVariable/situations/randomVariableSituations.js").RandomVariableSituationParams;
|
|
3281
3320
|
initTable: string[][];
|
|
3321
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3322
|
+
params: import("./exercises/math/probaStat/randomVariable/situations/randomVariableSituations.js").RandomVariableSituationParams;
|
|
3323
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3324
|
+
params: import("./exercises/math/probaStat/randomVariable/situations/randomVariableSituations.js").RandomVariableSituationParams;
|
|
3325
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3326
|
+
params: import("./exercises/math/probaStat/randomVariable/situations/randomVariableSituations.js").RandomVariableSituationParams;
|
|
3282
3327
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3283
3328
|
xValues: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
|
3284
3329
|
pValues: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers[];
|
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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAA+B,CAAC;AACnD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seqArithmeticSituations.d.ts","sourceRoot":"","sources":["../../../../../src/math/utils/sequences/situations/seqArithmeticSituations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAiBlE,MAAM,MAAM,4BAA4B,GAAG;IACzC,cAAc,CAAC,EAAE,CACf,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,GAAG,SAAS,EAAE,OAAO,EAAE,KACpB,MAAM,CAAC;IAEZ,aAAa,EAAE,CACb,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,E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,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,MAAM,CAAC;IACzB,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;IAC9D,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9E,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IAErB,eAAe,EAAE,CACf,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,eAAe,CAAC,EAAE,kCAAkC,KACjD,MAAM,CAAC;IAEZ,4BAA4B,EAAE,4BAA4B,CAAC;IAC3D,8BAA8B,EAAE,4BAA4B,CAAC;IAE7D,uBAAuB,EAAE,4BAA4B,CAAC;IAEtD,iBAAiB,EAAE,4CAA4C,CAAC;IAChE,sBAAsB,EAAE,4CAA4C,CAAC;CACtE,CAAC;
|
|
1
|
+
{"version":3,"file":"seqArithmeticSituations.d.ts","sourceRoot":"","sources":["../../../../../src/math/utils/sequences/situations/seqArithmeticSituations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAiBlE,MAAM,MAAM,4BAA4B,GAAG;IACzC,cAAc,CAAC,EAAE,CACf,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,GAAG,SAAS,EAAE,OAAO,EAAE,KACpB,MAAM,CAAC;IAEZ,aAAa,EAAE,CACb,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACj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${rank1.frPretty(0)}}
|
|
39
|
+
u_{${rank2.frPretty(0)}} = ${add(`u_{${rank1.frPretty(0)}}`.toTree(), reason)
|
|
40
|
+
.simplify({ towardsDistribute: true })
|
|
41
|
+
.toTex()}
|
|
40
42
|
$$
|
|
41
43
|
|
|
42
44
|
La relation de récurrence est, pour $n \\geq ${firstRank.frPretty(0)}$ :
|
|
@@ -117,16 +119,11 @@ Le nombre recherché est donc $${texAnswer}$.`;
|
|
|
117
119
|
}),
|
|
118
120
|
variationFindThreshold: Object.assign({}, variationFindThreshold, {
|
|
119
121
|
getCorrectionStuff: (initial, reason, firstRank, ...otherArgs) => {
|
|
120
|
-
const [valueThreshold, inequationSymbol, digitsValue, digitsTarget] = otherArgs;
|
|
122
|
+
const [valueThreshold, inequationSymbol, _rankDecoder, digitsValue, digitsTarget,] = otherArgs;
|
|
121
123
|
const { str: strRaw } = variationFindThreshold.getCorrectionStuff(initial, reason, firstRank, ...otherArgs);
|
|
122
124
|
const { answerNode, rankNode } = variationFindThreshold.getAnswerStuff(initial, reason, firstRank, ...otherArgs);
|
|
123
125
|
const texRankSimplified = rankNode.evaluate().frPretty(0);
|
|
124
|
-
const texAnswer =
|
|
125
|
-
...new Set([
|
|
126
|
-
answerNode.toTex(),
|
|
127
|
-
answerNode.evaluate().frPretty(digitsTarget),
|
|
128
|
-
]),
|
|
129
|
-
].join(" = ");
|
|
126
|
+
const texAnswer = answerNode.evaluate().frPretty(digitsTarget);
|
|
130
127
|
const str = `${strRaw}
|
|
131
128
|
|
|
132
129
|
On note $p$ le rang recherché. On a :
|
|
@@ -6,7 +6,7 @@ export declare const seqArithmeticUtils: {
|
|
|
6
6
|
getAnswerNodeExplicitFormula: (initial: number, reason: number, firstRank: number) => EqualNode;
|
|
7
7
|
getAnswerNodeRecurrenceFormula: (_initial: number, reason: number, _firstRank: number) => EqualNode;
|
|
8
8
|
getAnswerNodeRandomTerm: (initial: number, reason: number, firstRank: number, rankAsked: number) => import("../../../../tree/nodes/operators/addNode.js").AddNode;
|
|
9
|
-
getAnswerNodeRandomRank: (initial: number, reason: number, _firstRank: number, valueAsked: number) => import("../../../../tree/nodes/
|
|
9
|
+
getAnswerNodeRandomRank: (initial: number, reason: number, _firstRank: number, valueAsked: number) => import("../../../../tree/nodes/operators/fractionNode.js").FractionNode;
|
|
10
10
|
getAnswerNodeThresholdRank: (initial: number, reason: number, firstRank: number, valueThreshold: number, inequationSymbol: InequationSymbol) => import("../../../../tree/nodes/numbers/constantNode.js").ConstantNode | import("../../../../tree/nodes/numbers/numberNode.js").NumberNode;
|
|
11
11
|
getAnswerNodeSumThresholdRank: (initial: number, reason: number, firstRank: number, valueThreshold: number, inequationSymbol: InequationSymbol) => import("../../../../tree/nodes/numbers/constantNode.js").ConstantNode | import("../../../../tree/nodes/numbers/numberNode.js").NumberNode;
|
|
12
12
|
randThreshold: (initial: number, reason: number, firstRank: number, roundTo: number) => number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seqArithmeticUtils.d.ts","sourceRoot":"","sources":["../../../../../src/math/utils/sequences/situations/seqArithmeticUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"seqArithmeticUtils.d.ts","sourceRoot":"","sources":["../../../../../src/math/utils/sequences/situations/seqArithmeticUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA+MpE,eAAO,MAAM,kBAAkB;4BAtMA,MAAM,UAAU,MAAM,QAAQ,MAAM;+BAIjC,MAAM,UAAU,MAAM,QAAQ,MAAM;4CAK3D,MAAM,UACP,MAAM,aACH,MAAM;+CAaP,MAAM,UACR,MAAM,cACF,MAAM;uCAWT,MAAM,UACP,MAAM,aACH,MAAM,aACN,MAAM;uCAUR,MAAM,UACP,MAAM,cACF,MAAM,cACN,MAAM;0CAST,MAAM,UACP,MAAM,aACH,MAAM,kBACD,MAAM,oBACJ,gBAAgB;6CAwBzB,MAAM,UACP,MAAM,aACH,MAAM,kBACD,MAAM,oBACJ,gBAAgB;6BAmEzB,MAAM,UACP,MAAM,aACH,MAAM,WACR,MAAM;gCAgBN,MAAM,UACP,MAAM,aACH,MAAM,WACR,MAAM;CA0BhB,CAAC"}
|
|
@@ -7,7 +7,6 @@ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
|
7
7
|
import { probaFlip } from "../../../../utils/alea/probaFlip.js";
|
|
8
8
|
import { random, randomMany } from "../../../../utils/alea/random.js";
|
|
9
9
|
import { randfloat } from "../../random/randfloat.js";
|
|
10
|
-
import { round } from "../../round.js";
|
|
11
10
|
const valueForRank = (initial, reason, rank) => {
|
|
12
11
|
return initial + reason * rank;
|
|
13
12
|
};
|
|
@@ -35,8 +34,7 @@ const getAnswerNodeRandomRank = (initial, reason, _firstRank, valueAsked) => {
|
|
|
35
34
|
//u_n = u_0 + r * n
|
|
36
35
|
//n = (u_n - u_0) / r
|
|
37
36
|
const nodeRaw = frac(substract(valueAsked, initial), reason);
|
|
38
|
-
|
|
39
|
-
return valueRounded.toTree();
|
|
37
|
+
return nodeRaw;
|
|
40
38
|
};
|
|
41
39
|
const getAnswerNodeThresholdRank = (initial, reason, firstRank, valueThreshold, inequationSymbol) => {
|
|
42
40
|
//u_n = u_0 + r * n >= t
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seqGeometricSituations.d.ts","sourceRoot":"","sources":["../../../../../src/math/utils/sequences/situations/seqGeometricSituations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"seqGeometricSituations.d.ts","sourceRoot":"","sources":["../../../../../src/math/utils/sequences/situations/seqGeometricSituations.ts"],"names":[],"mapp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AAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9E,WAAW,EAAE,WAAW,CAAC;IAEzB,eAAe,EAAE,CACf,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,eAAe,CAAC,EAAE,iCAAiC,KAChD,MAAM,CAAC;IAEZ,4BAA4B,EAAE,2BAA2B,CAAC;IAC1D,8BAA8B,EAAE,2BAA2B,CAAC;IAE5D,uBAAuB,EAAE,2BAA2B,CAAC;CAItD,CAAC;AA42CF,eAAO,MAAM,mBAAmB;;sCAz1Cb,MAAM,UACP,MAAM,aACH,MAAM,gBACH,OAAO,EAAE;;;;;sCA2Bd,MAAM,UACP,MAAM,aACH,MAAM,gBACH,OAAO,EAAE;;;;;;;sCAiChB,MAAM,UACP,MAAM,aACH,MAAM,gBACH,OAAO,EAAE;;;;IAsxC9B,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
|
|
|
3
3
|
import { alignTex } from "../../../../utils/latex/alignTex.js";
|
|
4
4
|
import { randfloat } from "../../random/randfloat.js";
|
|
5
5
|
import { randint } from "../../random/randint.js";
|
|
6
|
+
import { round } from "../../round.js";
|
|
6
7
|
import { seqGeometricUtils } from "./seqGeometricUtils.js";
|
|
7
8
|
const getStrFactor = (firstRank) => {
|
|
8
9
|
return firstRank === 0 ? "n" : "(n-1)";
|
|
@@ -67,10 +68,7 @@ $$
|
|
|
67
68
|
|
|
68
69
|
En particulier :
|
|
69
70
|
|
|
70
|
-
${alignTex([
|
|
71
|
-
[`u_{${rankAsked}}`, "=", answerNode.toTex()],
|
|
72
|
-
["", "=", answerNode.simplify().toTex()],
|
|
73
|
-
])}
|
|
71
|
+
${alignTex([[`u_{${rankAsked}}`, "=", answerNode.toTex()]])}
|
|
74
72
|
|
|
75
73
|
`;
|
|
76
74
|
return { str };
|
|
@@ -84,7 +82,7 @@ const templatesSituationsGeometric = [
|
|
|
84
82
|
{
|
|
85
83
|
type: "evoPercentage",
|
|
86
84
|
randInitial: () => randint(20, 51) * 100,
|
|
87
|
-
randReason: () => 1 + randfloat(0, 4, 2, [0]) / 100, //expl: 1,0331
|
|
85
|
+
randReason: () => round(1 + randfloat(0, 4, 2, [0]) / 100, 4), //expl: 1,0331
|
|
88
86
|
randThreshold: (initial, reason, firstRank) => seqGeometricUtils.randThreshold(initial, reason, firstRank, 2),
|
|
89
87
|
randSuperfluousData: () => {
|
|
90
88
|
const rand = randint(0, 2);
|
|
@@ -211,7 +209,7 @@ Le capital en $\\textrm{€}$, au premier janvier de l'année $${add(2026, subst
|
|
|
211
209
|
{
|
|
212
210
|
type: "evoPercentage",
|
|
213
211
|
randInitial: () => randint(13, 30) * 1000,
|
|
214
|
-
randReason: () => 1 - (randint(10, 26, [0]) * 1.0) / 100, //expl: 0,80
|
|
212
|
+
randReason: () => round(1 - (randint(10, 26, [0]) * 1.0) / 100, 2), //expl: 0,80
|
|
215
213
|
randThreshold: (initial, reason, firstRank) => seqGeometricUtils.randThreshold(initial, reason, firstRank, 2),
|
|
216
214
|
randSuperfluousData: () => {
|
|
217
215
|
const rand = randint(0, 2);
|
|
@@ -341,7 +339,7 @@ La valeur de la voiture de Killian en $\\textrm{€}$, au premier juillet de l'a
|
|
|
341
339
|
{
|
|
342
340
|
type: "factorPercentage",
|
|
343
341
|
randInitial: () => randfloat(1, 2, 2),
|
|
344
|
-
randReason: () => 1 - (randint(10, 26, [0]) * 1.0) / 100, //expl: 0,80
|
|
342
|
+
randReason: () => round(1 - (randint(10, 26, [0]) * 1.0) / 100, 2), //expl: 0,80
|
|
345
343
|
randThreshold: (initial, reason, firstRank) => seqGeometricUtils.randThreshold(initial, reason, firstRank, 2),
|
|
346
344
|
randSuperfluousData: () => {
|
|
347
345
|
const rand = randint(0, 2);
|
|
@@ -468,7 +466,7 @@ La hauteur de la balle est donc une suite géométrique de premier terme $${init
|
|
|
468
466
|
{
|
|
469
467
|
type: "evoPercentage",
|
|
470
468
|
randInitial: () => randint(50, 101) * 100,
|
|
471
|
-
randReason: () => 1 + (randint(10, 40) * 1.0) / 100, //expl: 1,25
|
|
469
|
+
randReason: () => round(1 + (randint(10, 40) * 1.0) / 100, 2), //expl: 1,25
|
|
472
470
|
randThreshold: (initial, reason, firstRank) => seqGeometricUtils.randThreshold(initial, reason, firstRank, 2),
|
|
473
471
|
randSuperfluousData: () => {
|
|
474
472
|
const rand = randint(0, 2);
|
|
@@ -710,7 +708,7 @@ Le nombre de personnes informées est donc une suite géométrique de premier te
|
|
|
710
708
|
{
|
|
711
709
|
type: "evoPercentage",
|
|
712
710
|
randInitial: () => randint(28, 44) * 1000,
|
|
713
|
-
randReason: () => 1 + randint(2, 7) / 100, //expl: 1,05
|
|
711
|
+
randReason: () => round(1 + randint(2, 7) / 100, 2), //expl: 1,05
|
|
714
712
|
randThreshold: (initial, reason, firstRank) => seqGeometricUtils.randThreshold(initial, reason, firstRank, 2),
|
|
715
713
|
randSuperfluousData: () => {
|
|
716
714
|
const rand = randint(0, 2);
|
|
@@ -845,7 +843,7 @@ Le salaire en $\\textrm{€}$ pour l'année $${add(2025, substract("n".toTree(),
|
|
|
845
843
|
{
|
|
846
844
|
type: "evoPercentage",
|
|
847
845
|
randInitial: () => randint(28, 44) * 1000,
|
|
848
|
-
randReason: () => 1 + randint(2, 7) / 100, //expl: 1,05
|
|
846
|
+
randReason: () => round(1 + randint(2, 7) / 100, 2), //expl: 1,05
|
|
849
847
|
randThreshold: (initial, reason, firstRank) => seqGeometricUtils.randThreshold(initial, reason, firstRank, 2),
|
|
850
848
|
randSuperfluousData: () => {
|
|
851
849
|
const rand = randint(0, 2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"questionTest.d.ts","sourceRoot":"","sources":["../../src/tests/questionTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAKjE,eAAO,MAAM,YAAY,GACvB,KAAK,QAAQ,CAAC,MAAM,CAAC,EACrB,UAAU,QAAQ,CAAC,MAAM,CAAC;;;
|
|
1
|
+
{"version":3,"file":"questionTest.d.ts","sourceRoot":"","sources":["../../src/tests/questionTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAKjE,eAAO,MAAM,YAAY,GACvB,KAAK,QAAQ,CAAC,MAAM,CAAC,EACrB,UAAU,QAAQ,CAAC,MAAM,CAAC;;;CAgU3B,CAAC"}
|
|
@@ -69,6 +69,14 @@ export const questionTest = (exo, question) => {
|
|
|
69
69
|
throw new Error(`exo ${exo.id} has no initTable`);
|
|
70
70
|
if (!question.initTable.some((row) => row.some((cell) => cell === "")))
|
|
71
71
|
throw new Error(`exo ${exo.id} is answertype table but no input in table`);
|
|
72
|
+
const initTableRowsLengths = question.initTable.map((row) => row.length);
|
|
73
|
+
if (initTableRowsLengths.some((rowLength, i) => rowLength !== initTableRowsLengths[0]))
|
|
74
|
+
throw new Error(`exo ${exo.id} has different row lengths in initTable`);
|
|
75
|
+
const answerTableRowsLengths = question.answerTable.map((row) => row.length);
|
|
76
|
+
if (answerTableRowsLengths.some((rowLength, i) => rowLength !== answerTableRowsLengths[0]))
|
|
77
|
+
throw new Error(`exo ${exo.id} has different row lengths in answerTable`);
|
|
78
|
+
if (initTableRowsLengths.some((rowLength, i) => rowLength !== question.answerTable[i].length))
|
|
79
|
+
throw new Error(`exo ${exo.id} has different row lengths in answerTable and initTable`);
|
|
72
80
|
}
|
|
73
81
|
else if (exo.answerType === "treeDiagram") {
|
|
74
82
|
if (!question.initTreeTable?.length)
|
|
@@ -10,6 +10,7 @@ export declare abstract class Closure {
|
|
|
10
10
|
static leftReverse(closure: ClosureType): ClosureType;
|
|
11
11
|
static rightReverse(closure: ClosureType): ClosureType;
|
|
12
12
|
static switch(closure: ClosureType): ClosureType;
|
|
13
|
+
static fromBooleans(isLeftClosed: boolean, isRightClosed: boolean): ClosureType;
|
|
13
14
|
static fromBrackets(left: "[" | "]", right: "]" | "["): ClosureType;
|
|
14
15
|
static toBrackets(closure: ClosureType): string[];
|
|
15
16
|
static isLeftOpen(closure: ClosureType): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"closure.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/closure.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACrB,EAAE,IAAA;IACF,EAAE,IAAA;IACF,EAAE,IAAA;IACF,EAAE,IAAA;CACH;AAED,8BAAsB,OAAO;IAC3B,MAAM,CAAC,MAAM;IAcb,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,WAAW;IAYnC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW;IAYvC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,WAAW;IAYxC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW;IAYlC,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG;IAQrD,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW;IAatC,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW;IAUtC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW;IAWvC,MAAM,CAAC,iBAAiB,GAAI,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,eAGpD;IACF,MAAM,CAAC,kBAAkB,GAAI,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,eAGrD;IACF,MAAM,CAAC,iBAAiB,GAAI,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,eAGpD;IACF,MAAM,CAAC,kBAAkB,GAAI,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,eAGrD;CACH"}
|
|
1
|
+
{"version":3,"file":"closure.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/closure.ts"],"names":[],"mappings":"AAEA,oBAAY,WAAW;IACrB,EAAE,IAAA;IACF,EAAE,IAAA;IACF,EAAE,IAAA;IACF,EAAE,IAAA;CACH;AAED,8BAAsB,OAAO;IAC3B,MAAM,CAAC,MAAM;IAcb,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,WAAW;IAYnC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW;IAYvC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,WAAW;IAYxC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,WAAW;IAYlC,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO;IAOjE,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,GAAG;IAQrD,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW;IAatC,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW;IAUtC,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW;IAWvC,MAAM,CAAC,iBAAiB,GAAI,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,eAGpD;IACF,MAAM,CAAC,kBAAkB,GAAI,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,eAGrD;IACF,MAAM,CAAC,iBAAiB,GAAI,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,eAGpD;IACF,MAAM,CAAC,kBAAkB,GAAI,GAAG,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,eAGrD;CACH"}
|
|
@@ -69,6 +69,18 @@ export class Closure {
|
|
|
69
69
|
return ClosureType.FO;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
+
static fromBooleans(isLeftClosed, isRightClosed) {
|
|
73
|
+
if (isLeftClosed) {
|
|
74
|
+
if (isRightClosed)
|
|
75
|
+
return ClosureType.FF;
|
|
76
|
+
else
|
|
77
|
+
return ClosureType.FO;
|
|
78
|
+
}
|
|
79
|
+
else if (isRightClosed)
|
|
80
|
+
return ClosureType.OF;
|
|
81
|
+
else
|
|
82
|
+
return ClosureType.OO;
|
|
83
|
+
}
|
|
72
84
|
static fromBrackets(left, right) {
|
|
73
85
|
if (left === "[")
|
|
74
86
|
if (right === "]")
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { AlgebraicNode } from "../nodes/algebraicNode.js";
|
|
2
|
+
import { NodeIdentifiers } from "../nodes/nodeConstructor.js";
|
|
2
3
|
export declare abstract class NodeUtils {
|
|
3
4
|
static getDepth: <T extends AlgebraicNode>(algebraicNode: T) => number;
|
|
4
5
|
static getChildren(algebraicNode: AlgebraicNode): AlgebraicNode[];
|
|
6
|
+
static getStrCodeForNodeIdentifiers(nodeIdentifiers: NodeIdentifiers): string;
|
|
5
7
|
}
|
|
6
8
|
//# sourceMappingURL=nodeUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeUtils.d.ts","sourceRoot":"","sources":["../../../src/tree/utilities/nodeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"nodeUtils.d.ts","sourceRoot":"","sources":["../../../src/tree/utilities/nodeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG1D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,8BAAsB,SAAS;IAC7B,MAAM,CAAC,QAAQ,GAAI,CAAC,SAAS,aAAa,EAAE,eAAe,CAAC,KAAG,MAAM,CASnE;IAEF,MAAM,CAAC,WAAW,CAAC,aAAa,EAAE,aAAa;IAU/C,MAAM,CAAC,4BAA4B,CACjC,eAAe,EAAE,eAAe,GAC/B,MAAM;CA2CV"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isFunctionNode } from "../nodes/functions/functionNode.js";
|
|
2
|
+
import { NodeIds } from "../nodes/node.js";
|
|
2
3
|
import { isOperatorNode } from "../nodes/operators/operatorNode.js";
|
|
3
4
|
export class NodeUtils {
|
|
4
5
|
static getDepth = (algebraicNode) => {
|
|
@@ -21,4 +22,43 @@ export class NodeUtils {
|
|
|
21
22
|
return [];
|
|
22
23
|
}
|
|
23
24
|
}
|
|
25
|
+
static getStrCodeForNodeIdentifiers(nodeIdentifiers) {
|
|
26
|
+
const nodeId = nodeIdentifiers.id;
|
|
27
|
+
switch (nodeId) {
|
|
28
|
+
case NodeIds.add:
|
|
29
|
+
case NodeIds.substract:
|
|
30
|
+
case NodeIds.multiply:
|
|
31
|
+
case NodeIds.fraction:
|
|
32
|
+
case NodeIds.divide:
|
|
33
|
+
case NodeIds.power: {
|
|
34
|
+
const strCodeOp = (() => {
|
|
35
|
+
switch (nodeId) {
|
|
36
|
+
case NodeIds.add:
|
|
37
|
+
return "add";
|
|
38
|
+
case NodeIds.substract:
|
|
39
|
+
return "substract";
|
|
40
|
+
case NodeIds.multiply:
|
|
41
|
+
return "multiply";
|
|
42
|
+
case NodeIds.fraction:
|
|
43
|
+
return "frac";
|
|
44
|
+
case NodeIds.divide:
|
|
45
|
+
return "divide";
|
|
46
|
+
case NodeIds.power:
|
|
47
|
+
return "power";
|
|
48
|
+
}
|
|
49
|
+
})();
|
|
50
|
+
const [strCodeNodeLeft, strCodeNodeRight] = [
|
|
51
|
+
nodeIdentifiers.leftChild,
|
|
52
|
+
nodeIdentifiers.rightChild,
|
|
53
|
+
].map((nodeIdentifiers) => this.getStrCodeForNodeIdentifiers(nodeIdentifiers));
|
|
54
|
+
return `${strCodeOp}(${strCodeNodeLeft},${strCodeNodeRight})`;
|
|
55
|
+
}
|
|
56
|
+
case NodeIds.number:
|
|
57
|
+
return nodeIdentifiers.value;
|
|
58
|
+
case NodeIds.variable:
|
|
59
|
+
return `new VariableNode("${nodeIdentifiers.name}")`;
|
|
60
|
+
default:
|
|
61
|
+
throw new Error("Unsupported nodeId: " + nodeId);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
24
64
|
}
|