math-exercises 3.0.202 → 3.0.204
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/exercise.d.ts +4 -0
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/productOfSinAXPlusBCosCXPlusDDerivative.js +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/sinAndCosMixedWithSquareDerivative.js +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/trigo/sinCosDerivativeRewriteUsingCos2PlusSin2Equals1.js +1 -1
- package/lib/exercises/math/derivation/variations/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/variations/index.js +1 -0
- package/lib/exercises/math/derivation/variations/signVarTableWithExtremumTestExercise.d.ts +9 -0
- package/lib/exercises/math/derivation/variations/signVarTableWithExtremumTestExercise.d.ts.map +1 -0
- package/lib/exercises/math/derivation/variations/signVarTableWithExtremumTestExercise.js +191 -0
- package/lib/exercises/math/functions/continuity/equationNumberOfSolutionsFromVarTable.d.ts +9 -0
- package/lib/exercises/math/functions/continuity/equationNumberOfSolutionsFromVarTable.d.ts.map +1 -0
- package/lib/exercises/math/functions/continuity/equationNumberOfSolutionsFromVarTable.js +176 -0
- package/lib/exercises/math/functions/continuity/index.d.ts +6 -0
- package/lib/exercises/math/functions/continuity/index.d.ts.map +1 -0
- package/lib/exercises/math/functions/continuity/index.js +5 -0
- package/lib/exercises/math/functions/continuity/isFunctionContinuousFromGraph.d.ts +9 -0
- package/lib/exercises/math/functions/continuity/isFunctionContinuousFromGraph.d.ts.map +1 -0
- package/lib/exercises/math/functions/continuity/isFunctionContinuousFromGraph.js +193 -0
- package/lib/exercises/math/functions/continuity/piecewiseFunctionContinuity.d.ts +10 -0
- package/lib/exercises/math/functions/continuity/piecewiseFunctionContinuity.d.ts.map +1 -0
- package/lib/exercises/math/functions/continuity/piecewiseFunctionContinuity.js +150 -0
- package/lib/exercises/math/functions/continuity/signTableFromVarTableWithZeroes.d.ts +9 -0
- package/lib/exercises/math/functions/continuity/signTableFromVarTableWithZeroes.d.ts.map +1 -0
- package/lib/exercises/math/functions/continuity/signTableFromVarTableWithZeroes.js +162 -0
- package/lib/exercises/math/functions/continuity/thirdDegreeZeroesFramingWithCalculator.d.ts +8 -0
- package/lib/exercises/math/functions/continuity/thirdDegreeZeroesFramingWithCalculator.d.ts.map +1 -0
- package/lib/exercises/math/functions/continuity/thirdDegreeZeroesFramingWithCalculator.js +194 -0
- package/lib/exercises/math/functions/index.d.ts +1 -0
- package/lib/exercises/math/functions/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/index.js +1 -0
- package/lib/exercises/math/functions/variations/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/variations/index.js +1 -0
- package/lib/exercises/math/functions/variations/varTableWithExtremumTestExercise.d.ts +9 -0
- package/lib/exercises/math/functions/variations/varTableWithExtremumTestExercise.d.ts.map +1 -0
- package/lib/exercises/math/functions/variations/varTableWithExtremumTestExercise.js +183 -0
- package/lib/exercises/math/geometry/angles/anglesUsingIsParallel.d.ts.map +1 -1
- package/lib/exercises/math/geometry/angles/anglesUsingIsParallel.js +172 -51
- package/lib/exercises/math/geometry/angles/index.d.ts +1 -0
- package/lib/exercises/math/geometry/angles/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/angles/index.js +1 -1
- package/lib/exercises/math/limits/index.d.ts +1 -5
- package/lib/exercises/math/limits/index.d.ts.map +1 -1
- package/lib/exercises/math/limits/index.js +1 -5
- package/lib/exercises/math/limits/limitReading.d.ts.map +1 -1
- package/lib/exercises/math/limits/limitReading.js +70 -0
- package/lib/exercises/math/limits/polynomLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/polynomLimit.js +55 -4
- package/lib/exercises/math/limits/polynomLimitNoFI.d.ts.map +1 -1
- package/lib/exercises/math/limits/polynomLimitNoFI.js +35 -2
- package/lib/exercises/math/limits/sequenceGeometricLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequenceGeometricLimit.js +45 -9
- package/lib/exercises/math/limits/sequencePolynomLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequencePolynomLimit.js +56 -3
- package/lib/exercises/math/limits/sequencePolynomNoFILimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequencePolynomNoFILimit.js +32 -0
- package/lib/exercises/math/limits/sequencePolynomProductLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequencePolynomProductLimit.js +33 -3
- package/lib/exercises/math/limits/sequenceRationalFracLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequenceRationalFracLimit.js +2 -2
- package/lib/exercises/math/limits/sequences/index.d.ts +6 -0
- package/lib/exercises/math/limits/sequences/index.d.ts.map +1 -0
- package/lib/exercises/math/limits/sequences/index.js +5 -0
- package/lib/exercises/math/limits/sequences/sequenceGeometricLimit.d.ts +9 -0
- package/lib/exercises/math/limits/sequences/sequenceGeometricLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/sequences/sequenceGeometricLimit.js +110 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomLimit.d.ts +7 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomLimit.js +116 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomNoFILimit.d.ts +7 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomNoFILimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomNoFILimit.js +95 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomProductLimit.d.ts +8 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomProductLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/sequences/sequencePolynomProductLimit.js +111 -0
- package/lib/exercises/math/limits/sequences/sequenceRationalFracLimit.d.ts +8 -0
- package/lib/exercises/math/limits/sequences/sequenceRationalFracLimit.d.ts.map +1 -0
- package/lib/exercises/math/limits/sequences/sequenceRationalFracLimit.js +114 -0
- package/lib/exercises/math/sequences/index.d.ts +1 -0
- package/lib/exercises/math/sequences/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/index.js +1 -0
- package/lib/exercises/math/sequences/proofByInduction/index.d.ts +5 -0
- package/lib/exercises/math/sequences/proofByInduction/index.d.ts.map +1 -0
- package/lib/exercises/math/sequences/proofByInduction/index.js +4 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionCheckInitialization.d.ts +10 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionCheckInitialization.d.ts.map +1 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionCheckInitialization.js +236 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionReorderProof.d.ts +13 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionReorderProof.d.ts.map +1 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionReorderProof.js +244 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionSituations.d.ts +98 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionSituations.d.ts.map +1 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionSituations.js +175 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionWriteMissingStep.d.ts +13 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionWriteMissingStep.d.ts.map +1 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionWriteMissingStep.js +317 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionWritePropAtRankKPlus1.d.ts +13 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionWritePropAtRankKPlus1.d.ts.map +1 -0
- package/lib/exercises/math/sequences/proofByInduction/proofByInductionWritePropAtRankKPlus1.js +265 -0
- package/lib/exercises/vea/polynomialVEA.d.ts.map +1 -1
- package/lib/exercises/vea/polynomialVEA.js +4 -0
- package/lib/index.d.ts +68 -13
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +1 -1
- package/lib/math/utils/functions/functionDecomposition.d.ts +2 -2
- package/lib/math/utils/functions/functionDecomposition.d.ts.map +1 -1
- package/lib/tests/exoTest.d.ts.map +1 -1
- package/lib/tests/exoTest.js +7 -11
- package/lib/tests/questionTest.d.ts.map +1 -1
- package/lib/tests/questionTest.js +7 -3
- package/lib/tests/singleExo.test.d.ts.map +1 -1
- package/lib/tests/singleExo.test.js +2 -2
- package/lib/tree/nodes/node.d.ts +2 -1
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/node.js +1 -0
- package/lib/tree/nodes/student/iDontKnowNode.d.ts +26 -0
- package/lib/tree/nodes/student/iDontKnowNode.d.ts.map +1 -0
- package/lib/tree/nodes/student/iDontKnowNode.js +63 -0
- package/lib/tree/parsers/latexParser.d.ts +3 -2
- package/lib/tree/parsers/latexParser.d.ts.map +1 -1
- package/lib/tree/parsers/latexParser.js +7 -0
- package/lib/tree/parsers/monomParser.d.ts +1 -1
- package/lib/tree/parsers/monomParser.d.ts.map +1 -1
- package/lib/tree/parsers/polynomialParser.d.ts +1 -1
- package/lib/tree/parsers/polynomialParser.d.ts.map +1 -1
- package/lib/tree/parsers/trinomParser.d.ts +1 -1
- package/lib/tree/parsers/trinomParser.d.ts.map +1 -1
- package/lib/tree/utilities/nodeComparator.d.ts +3 -1
- package/lib/tree/utilities/nodeComparator.d.ts.map +1 -1
- package/lib/tree/utilities/nodeComparator.js +63 -5
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -2220,6 +2220,25 @@ declare const mathExercises: (Exercise<{
|
|
|
2220
2220
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2221
2221
|
situationIndex: number;
|
|
2222
2222
|
numP: number;
|
|
2223
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2224
|
+
k: number;
|
|
2225
|
+
xValues: number[];
|
|
2226
|
+
yValues: number[];
|
|
2227
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2228
|
+
aIds: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
2229
|
+
f1Ids: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
2230
|
+
f2Ids: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
2231
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2232
|
+
type: number;
|
|
2233
|
+
functionCmd: string;
|
|
2234
|
+
coords: number[];
|
|
2235
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2236
|
+
xValues: number[];
|
|
2237
|
+
yValues: number[];
|
|
2238
|
+
xZeroes: number[];
|
|
2239
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2240
|
+
coeffs: number[];
|
|
2241
|
+
xValues: number[];
|
|
2223
2242
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2224
2243
|
coin: boolean;
|
|
2225
2244
|
radius: number;
|
|
@@ -2857,6 +2876,20 @@ declare const mathExercises: (Exercise<{
|
|
|
2857
2876
|
doubleAngle: number;
|
|
2858
2877
|
singleAngle: number;
|
|
2859
2878
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
2879
|
+
isParallel: boolean;
|
|
2880
|
+
angleType: "alternes-internes" | "correspondants" | "alternes-externes" | "autres";
|
|
2881
|
+
arrIntersectionIds: {
|
|
2882
|
+
center: import("./math/geometry/point.js").PointIdentifiers;
|
|
2883
|
+
lineH: import("./math/geometry/line.js").LineIdentifiers;
|
|
2884
|
+
lineV: import("./math/geometry/line.js").LineIdentifiers;
|
|
2885
|
+
}[];
|
|
2886
|
+
arrAngleIndex: number[];
|
|
2887
|
+
arrAngleForLabel: number[] | undefined;
|
|
2888
|
+
}, {
|
|
2889
|
+
angleTypes: ("alternes-internes" | "correspondants" | "alternes-externes" | "autres")[];
|
|
2890
|
+
isFakeDisplay: boolean;
|
|
2891
|
+
nbDigits: "0" | "1" | "2";
|
|
2892
|
+
}> | Exercise<{
|
|
2860
2893
|
lines: {
|
|
2861
2894
|
pointA: number[];
|
|
2862
2895
|
pointB: number[];
|
|
@@ -3014,19 +3047,6 @@ declare const mathExercises: (Exercise<{
|
|
|
3014
3047
|
limitTo: "+\\infty" | "-\\infty";
|
|
3015
3048
|
numCoeffs: number[];
|
|
3016
3049
|
denumCoeffs: number[];
|
|
3017
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3018
|
-
reason: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3019
|
-
firstTerm: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3020
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3021
|
-
coeffs: number[];
|
|
3022
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3023
|
-
coeffs: number[];
|
|
3024
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3025
|
-
polyNumCoeffs: number[];
|
|
3026
|
-
polyDenumCoeffs: number[];
|
|
3027
|
-
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3028
|
-
numCoeffs: number[];
|
|
3029
|
-
denumCoeffs: number[];
|
|
3030
3050
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3031
3051
|
type: number;
|
|
3032
3052
|
to: string;
|
|
@@ -3048,6 +3068,19 @@ declare const mathExercises: (Exercise<{
|
|
|
3048
3068
|
nodeIdsLimitAbscissa: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3049
3069
|
nodeIdsP: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3050
3070
|
isPossible: boolean;
|
|
3071
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3072
|
+
reason: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3073
|
+
firstTerm: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
3074
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3075
|
+
coeffs: number[];
|
|
3076
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3077
|
+
coeffs: number[];
|
|
3078
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3079
|
+
polyNumCoeffs: number[];
|
|
3080
|
+
polyDenumCoeffs: number[];
|
|
3081
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3082
|
+
numCoeffs: number[];
|
|
3083
|
+
denumCoeffs: number[];
|
|
3051
3084
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
3052
3085
|
a: string;
|
|
3053
3086
|
b: string;
|
|
@@ -4100,6 +4133,28 @@ declare const mathExercises: (Exercise<{
|
|
|
4100
4133
|
type: number;
|
|
4101
4134
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4102
4135
|
coeffs: number[];
|
|
4136
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4137
|
+
situationParams: import("./exercises/math/sequences/proofByInduction/proofByInductionSituations.js").ProofByInductionSituationParams;
|
|
4138
|
+
isValid: boolean;
|
|
4139
|
+
indexForNodeProperty: number;
|
|
4140
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4141
|
+
situationParams: import("./exercises/math/sequences/proofByInduction/proofByInductionSituations.js").ProofByInductionSituationParams;
|
|
4142
|
+
isValid: boolean;
|
|
4143
|
+
indexForNodeProperty: number;
|
|
4144
|
+
nodeIdsVarStepDefinition: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
4145
|
+
nodeIdsVarStepInduction: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
4146
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4147
|
+
situationParams: import("./exercises/math/sequences/proofByInduction/proofByInductionSituations.js").ProofByInductionSituationParams;
|
|
4148
|
+
isValid: boolean;
|
|
4149
|
+
indexForNodeProperty: number;
|
|
4150
|
+
nodeIdsVarStepDefinition: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
4151
|
+
nodeIdsVarStepInduction: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
4152
|
+
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4153
|
+
situationParams: import("./exercises/math/sequences/proofByInduction/proofByInductionSituations.js").ProofByInductionSituationParams;
|
|
4154
|
+
isValid: boolean;
|
|
4155
|
+
indexForNodeProperty: number;
|
|
4156
|
+
nodeIdsVarStepDefinition: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
4157
|
+
nodeIdsVarStepInduction: import("./tree/nodes/nodeConstructor.js").NodeIdentifiers;
|
|
4103
4158
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
|
4104
4159
|
intervalIdentifiers: import("./tree/nodes/sets/intervalNode.js").IntervalNodeIdentifiers;
|
|
4105
4160
|
}, Record<string, string | boolean | string[]>> | Exercise<{
|
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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B,cAAc,CAAC,CAAC,EAAE,KAAK,GAAG,aAAa;IAMvC,MAAM,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO;IAGzB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK;IAK5B,YAAY;IAGZ,YAAY,CAAC,EACX,OAAc,EACd,gBAAwB,EACxB,SAAgB,EAChB,KAAK,EACL,IAAI,EACJ,KAAK,EACL,KAAK,EACL,SAAgB,GACjB,GAAE,kBAAuB;IA2B1B,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK;IAiBpC,aAAa,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,MAAM;IAkBhE,eAAe,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,SAAkB;IAIrD,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,SAAkB;IAI1C,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,SAAkB;IAKhD,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe;IAG/B,SAAS,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM,EAAE,CAAC,EAAE,aAAa,GAAG,MAAM;CAO/D"}
|
|
@@ -160,7 +160,7 @@ export class Point {
|
|
|
160
160
|
}
|
|
161
161
|
toGGBCommand({ isFixed = true, isSelectionnable = false, showLabel = true, style, size, color, label, isVisible = true, } = {}) {
|
|
162
162
|
const commands = [
|
|
163
|
-
`${this.name} = (${this.x.toMathString()}, ${this.y.toMathString()})`,
|
|
163
|
+
`${this.name} = Point({${this.x.toMathString()}, ${this.y.toMathString()}})`,
|
|
164
164
|
`SetFixed(${this.name},${isFixed ? "true" : "false"},${isSelectionnable ? "true" : "false"})`,
|
|
165
165
|
`ShowLabel(${this.name},${showLabel ? "true" : "false"})`,
|
|
166
166
|
];
|
|
@@ -4,7 +4,7 @@ export declare const functionDecompositions: (node: AlgebraicNode, variableNode?
|
|
|
4
4
|
nodeU: AlgebraicNode;
|
|
5
5
|
nodeV: AlgebraicNode;
|
|
6
6
|
}[];
|
|
7
|
-
export declare const nodeBySubstitutingX: (node: AlgebraicNode, strVar: string) => AlgebraicNode;
|
|
8
|
-
export declare function composeNodes(nodeU: AlgebraicNode, nodeV: AlgebraicNode): AlgebraicNode;
|
|
7
|
+
export declare const nodeBySubstitutingX: (node: AlgebraicNode, strVar: string) => AlgebraicNode | import("../../../tree/nodes/student/iDontKnowNode.js").IDontKnowNode;
|
|
8
|
+
export declare function composeNodes(nodeU: AlgebraicNode, nodeV: AlgebraicNode): AlgebraicNode | import("../../../tree/nodes/student/iDontKnowNode.js").IDontKnowNode;
|
|
9
9
|
export declare function isContainingFacetiousFrac(node: AlgebraicNode): boolean;
|
|
10
10
|
//# sourceMappingURL=functionDecomposition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functionDecomposition.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/functions/functionDecomposition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAYlE,OAAO,EAEL,YAAY,EACb,MAAM,4CAA4C,CAAC;AAcpD,eAAO,MAAM,sBAAsB,GACjC,MAAM,aAAa,EACnB,eAAc,YAA2C;WAElC,aAAa;WAAS,aAAa;GAyO3D,CAAC;AAqEF,eAAO,MAAM,mBAAmB,GAAI,MAAM,aAAa,EAAE,QAAQ,MAAM,
|
|
1
|
+
{"version":3,"file":"functionDecomposition.d.ts","sourceRoot":"","sources":["../../../../src/math/utils/functions/functionDecomposition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAYlE,OAAO,EAEL,YAAY,EACb,MAAM,4CAA4C,CAAC;AAcpD,eAAO,MAAM,sBAAsB,GACjC,MAAM,aAAa,EACnB,eAAc,YAA2C;WAElC,aAAa;WAAS,aAAa;GAyO3D,CAAC;AAqEF,eAAO,MAAM,mBAAmB,GAAI,MAAM,aAAa,EAAE,QAAQ,MAAM,yFAItE,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,wFAMtE;AAMD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAmBtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exoTest.d.ts","sourceRoot":"","sources":["../../src/tests/exoTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAuB,MAAM,6BAA6B,CAAC;AAI5E,eAAO,MAAM,OAAO,GAAI,KAAK,QAAQ,CAAC,MAAM,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"exoTest.d.ts","sourceRoot":"","sources":["../../src/tests/exoTest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAuB,MAAM,6BAA6B,CAAC;AAI5E,eAAO,MAAM,OAAO,GAAI,KAAK,QAAQ,CAAC,MAAM,CAAC;;;;CA4H5C,CAAC"}
|
package/lib/tests/exoTest.js
CHANGED
|
@@ -32,16 +32,11 @@ export const exoTest = (exo) => {
|
|
|
32
32
|
const questions = exo.generator(30);
|
|
33
33
|
const after = Date.now();
|
|
34
34
|
generatorTime = after - before;
|
|
35
|
-
if (exo.answerType
|
|
36
|
-
exo.
|
|
37
|
-
exo.
|
|
38
|
-
|
|
39
|
-
exo.
|
|
40
|
-
exo.answerType !== "treeDiagram" &&
|
|
41
|
-
exo.answerType !== "signVarTable") {
|
|
42
|
-
if (!exo.getPropositions)
|
|
43
|
-
throw new Error(`exo ${exo.id} has no getPropositions`);
|
|
44
|
-
}
|
|
35
|
+
if ((exo.answerType === "QCU" || exo.answerType === "QCM") &&
|
|
36
|
+
!exo.getPropositions)
|
|
37
|
+
throw new Error(`exo ${exo.id} has no getPropositions`);
|
|
38
|
+
if (exo.answerType === "reorder" && !exo.getOrderedItems)
|
|
39
|
+
throw new Error(`exo ${exo.id} has no getOrderedItems`);
|
|
45
40
|
if (exo.answerType !== "QCM" &&
|
|
46
41
|
exo.answerType !== "QCU" &&
|
|
47
42
|
exo.answerType !== "GGB" &&
|
|
@@ -49,7 +44,8 @@ export const exoTest = (exo) => {
|
|
|
49
44
|
exo.answerType !== "varTable" &&
|
|
50
45
|
exo.answerType !== "signTable" &&
|
|
51
46
|
exo.answerType !== "treeDiagram" &&
|
|
52
|
-
exo.answerType !== "signVarTable"
|
|
47
|
+
exo.answerType !== "signVarTable" &&
|
|
48
|
+
exo.answerType !== "reorder") {
|
|
53
49
|
if (!exo.isAnswerValid)
|
|
54
50
|
throw new Error(`exo ${exo.id} has no isAnswerValid`);
|
|
55
51
|
}
|
|
@@ -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;AA0BjE,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;AA0BjE,eAAO,MAAM,YAAY,GACvB,KAAK,QAAQ,CAAC,MAAM,CAAC,EACrB,UAAU,QAAQ,CAAC,MAAM,CAAC;;;CA6V3B,CAAC"}
|
|
@@ -106,7 +106,9 @@ export const questionTest = (exo, question) => {
|
|
|
106
106
|
if (!question.initTreeTable.some((stage) => stage.some((block) => block.some((branch) => branch.some((cell) => cell === "")))))
|
|
107
107
|
throw new Error(`exo ${exo.id} is answertype treeDiagram but no input in treeTable`);
|
|
108
108
|
}
|
|
109
|
-
else if (exo.answerType !== "QCU" &&
|
|
109
|
+
else if (exo.answerType !== "QCU" &&
|
|
110
|
+
exo.answerType !== "QCM" &&
|
|
111
|
+
exo.answerType !== "reorder") {
|
|
110
112
|
if (!question.answer)
|
|
111
113
|
throw new Error(`exo ${exo.id} has no answer`);
|
|
112
114
|
}
|
|
@@ -198,7 +200,8 @@ export const questionTest = (exo, question) => {
|
|
|
198
200
|
exo.answerType !== "signTable" &&
|
|
199
201
|
exo.answerType !== "varTable" &&
|
|
200
202
|
exo.answerType !== "signVarTable" &&
|
|
201
|
-
exo.answerType !== "treeDiagram"
|
|
203
|
+
exo.answerType !== "treeDiagram" &&
|
|
204
|
+
exo.answerType !== "reorder") {
|
|
202
205
|
if (!question.keys)
|
|
203
206
|
throw new Error(`exo ${exo.id} has no keys`);
|
|
204
207
|
const answer = question.answer;
|
|
@@ -219,7 +222,8 @@ export const questionTest = (exo, question) => {
|
|
|
219
222
|
exo.answerType !== "varTable" &&
|
|
220
223
|
exo.answerType !== "signTable" &&
|
|
221
224
|
exo.answerType !== "signVarTable" &&
|
|
222
|
-
exo.answerType !== "treeDiagram"
|
|
225
|
+
exo.answerType !== "treeDiagram" &&
|
|
226
|
+
exo.answerType !== "reorder") {
|
|
223
227
|
if (exo.answerType === "QCM" && !exo.isQCM)
|
|
224
228
|
throw new Error("exo " + exo.id + " has answerType QCM but not isQCM");
|
|
225
229
|
const before = Date.now();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"singleExo.test.d.ts","sourceRoot":"","sources":["../../src/tests/singleExo.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"singleExo.test.d.ts","sourceRoot":"","sources":["../../src/tests/singleExo.test.ts"],"names":[],"mappings":"AAEA,OAAO,6BAA6B,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../prototypesEnhancement.js";
|
|
2
2
|
import { exoTest } from "./exoTest.js";
|
|
3
|
-
import {
|
|
3
|
+
import { proofByInductionCheckInitialization, } from "../exercises/math/index.js";
|
|
4
4
|
try {
|
|
5
5
|
for (let i = 0; i < 1000; i++)
|
|
6
|
-
exoTest(
|
|
6
|
+
exoTest(proofByInductionCheckInitialization);
|
|
7
7
|
}
|
|
8
8
|
catch (err) {
|
|
9
9
|
throw err;
|
package/lib/tree/nodes/node.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/tree/nodes/node.ts"],"names":[],"mappings":"AAGA,oBAAY,QAAQ;IAClB,MAAM,IAAA;IACN,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,UAAU,IAAA;IACV,KAAK,IAAA;IACL,MAAM,IAAA;IACN,QAAQ,IAAA;IACR,OAAO,IAAA;IACP,MAAM,KAAA;IACN,GAAG,KAAA;IACH,MAAM,KAAA;IACN,KAAK,KAAA;IACL,OAAO,KAAA;IACP,WAAW,KAAA;
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/tree/nodes/node.ts"],"names":[],"mappings":"AAGA,oBAAY,QAAQ;IAClB,MAAM,IAAA;IACN,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,UAAU,IAAA;IACV,KAAK,IAAA;IACL,MAAM,IAAA;IACN,QAAQ,IAAA;IACR,OAAO,IAAA;IACP,MAAM,KAAA;IACN,GAAG,KAAA;IACH,MAAM,KAAA;IACN,KAAK,KAAA;IACL,OAAO,KAAA;IACP,WAAW,KAAA;IACX,SAAS,KAAA;CACV;AACD,MAAM,MAAM,WAAW,GAAG;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC;IACz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AAO,KAAA,CAAE,IAAI;IACb,KAAK,KAAA;IACL,UAAU,KAAA;IACV,gBAAgB,KAAA;IAChB,GAAG,KAAA;IACH,MAAM,KAAA,CAAE,IAAI;IACZ,MAAM,KAAA;IACN,MAAM,KAAA;IACN,GAAG,KAAA;IACH,GAAG,KAAA;IACH,GAAG,KAAA,CAAE,IAAI;IACT,GAAG,KAAA;IACH,KAAK,KAAA;IACL,GAAG,KAAA;IACH,IAAI,KAAA;IACJ,QAAQ,KAAA,CAAE,IAAI;IACd,QAAQ,KAAA;IACR,MAAM,KAAA;IACN,MAAM,KAAA;IACN,KAAK,KAAA;IACL,MAAM,KAAA,CAAE,IAAI;IACZ,UAAU,KAAA;IACV,kBAAkB,KAAA;IAClB,mBAAmB,KAAA;IACnB,MAAM,KAAA;IACN,KAAK,KAAA,CAAE,IAAI;IACX,QAAQ,KAAA;IACR,SAAS,KAAA;CACV;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,iBAAiB,EAAE,CAAC,IAAI,CAAC,EAAE,WAAW,KAAK,IAAI,EAAE,CAAC;IAClD,cAAc,EAAE,CAAC,IAAI,CAAC,EAAE,WAAW,KAAK,MAAM,EAAE,CAAC;IACjD,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,YAAY,KAAK,MAAM,CAAC;IAEvC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,EAAE,MAAM;QAAE,EAAE,EAAE,OAAO,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5D"}
|
package/lib/tree/nodes/node.js
CHANGED
|
@@ -18,6 +18,7 @@ export var NodeType;
|
|
|
18
18
|
NodeType[NodeType["monom"] = 13] = "monom";
|
|
19
19
|
NodeType[NodeType["complex"] = 14] = "complex";
|
|
20
20
|
NodeType[NodeType["notequality"] = 15] = "notequality";
|
|
21
|
+
NodeType[NodeType["iDontKnow"] = 16] = "iDontKnow";
|
|
21
22
|
})(NodeType || (NodeType = {}));
|
|
22
23
|
//toujours ajouter les ids en fin de liste (youpi c'est vmt hyper bien codé)
|
|
23
24
|
export var NodeIds;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Node, NodeIds, NodeType } from "../node.js";
|
|
2
|
+
import { AlgebraicNode, SimplifyOptions } from "../algebraicNode.js";
|
|
3
|
+
export declare function isIDontKnowNode(a: Node): a is IDontKnowNode;
|
|
4
|
+
export declare class IDontKnowNode implements AlgebraicNode {
|
|
5
|
+
tex: string;
|
|
6
|
+
type: NodeType;
|
|
7
|
+
isNumeric: boolean;
|
|
8
|
+
constructor(tex: string);
|
|
9
|
+
static keyword(): string;
|
|
10
|
+
toMathString(): string;
|
|
11
|
+
toTex(): string;
|
|
12
|
+
toAllValidTexs(): string[];
|
|
13
|
+
toIdentifiers(): {
|
|
14
|
+
id: NodeIds;
|
|
15
|
+
tex: string;
|
|
16
|
+
};
|
|
17
|
+
toEquivalentNodes(): this[];
|
|
18
|
+
evaluate(): number;
|
|
19
|
+
simplify(_opts?: SimplifyOptions): this;
|
|
20
|
+
toSimplificationTex(opts?: SimplifyOptions): string;
|
|
21
|
+
equals(node: AlgebraicNode): boolean;
|
|
22
|
+
toDetailedEvaluation(vars: Record<string, AlgebraicNode>): AlgebraicNode;
|
|
23
|
+
derivative(): this;
|
|
24
|
+
toSignInequationTex(): string;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=iDontKnowNode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iDontKnowNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/student/iDontKnowNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAErE,wBAAgB,eAAe,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,aAAa,CAE3D;AACD,qBAAa,aAAc,YAAW,aAAa;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBACP,GAAG,EAAE,MAAM;IAMvB,MAAM,CAAC,OAAO;IAId,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;IAMf,cAAc;IAGd,aAAa;;;;IAMb,iBAAiB;IAGjB,QAAQ;IAGR,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe;IAGhC,mBAAmB,CAAC,IAAI,CAAC,EAAE,eAAe;IAK1C,MAAM,CAAC,IAAI,EAAE,aAAa;IAG1B,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAIxD,UAAU;IAGV,mBAAmB;CAGpB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { NodeIds, NodeType } from "../node.js";
|
|
2
|
+
export function isIDontKnowNode(a) {
|
|
3
|
+
return a.type === NodeType.iDontKnow;
|
|
4
|
+
}
|
|
5
|
+
export class IDontKnowNode {
|
|
6
|
+
tex;
|
|
7
|
+
type;
|
|
8
|
+
isNumeric;
|
|
9
|
+
constructor(tex) {
|
|
10
|
+
this.tex = tex;
|
|
11
|
+
this.isNumeric = false;
|
|
12
|
+
this.type = NodeType.iDontKnow;
|
|
13
|
+
}
|
|
14
|
+
static keyword() {
|
|
15
|
+
return "N.S.P";
|
|
16
|
+
}
|
|
17
|
+
toMathString() {
|
|
18
|
+
throw new Error("can't create mathString from IDontKnowNode");
|
|
19
|
+
}
|
|
20
|
+
toTex() {
|
|
21
|
+
return `${this.tex}`;
|
|
22
|
+
}
|
|
23
|
+
// toMathjs() {
|
|
24
|
+
// return parse(this.mathString);
|
|
25
|
+
// }
|
|
26
|
+
toAllValidTexs() {
|
|
27
|
+
return this.toEquivalentNodes().map((node) => node.toTex());
|
|
28
|
+
}
|
|
29
|
+
toIdentifiers() {
|
|
30
|
+
return {
|
|
31
|
+
id: NodeIds.constant,
|
|
32
|
+
tex: this.tex,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
toEquivalentNodes() {
|
|
36
|
+
return [this];
|
|
37
|
+
}
|
|
38
|
+
evaluate() {
|
|
39
|
+
return NaN;
|
|
40
|
+
}
|
|
41
|
+
simplify(_opts) {
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
44
|
+
toSimplificationTex(opts) {
|
|
45
|
+
const simp = this.simplify(opts);
|
|
46
|
+
if (simp.toTex() !== this.toTex())
|
|
47
|
+
return this.toTex() + "=" + simp.toTex();
|
|
48
|
+
return this.toTex();
|
|
49
|
+
}
|
|
50
|
+
equals(node) {
|
|
51
|
+
return isIDontKnowNode(node) && node.tex === this.tex;
|
|
52
|
+
}
|
|
53
|
+
toDetailedEvaluation(vars) {
|
|
54
|
+
//?utile pour des trucs genre 3Pi+4 --> 3*3.14+4
|
|
55
|
+
return vars[this.tex] ?? this;
|
|
56
|
+
}
|
|
57
|
+
derivative() {
|
|
58
|
+
return this;
|
|
59
|
+
}
|
|
60
|
+
toSignInequationTex() {
|
|
61
|
+
return "";
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AlgebraicNode } from "../nodes/algebraicNode.js";
|
|
2
2
|
import { EqualNode } from "../nodes/equations/equalNode.js";
|
|
3
3
|
import { InequationNode } from "../nodes/inequations/inequationNode.js";
|
|
4
|
+
import { IDontKnowNode } from "../nodes/student/iDontKnowNode.js";
|
|
4
5
|
export declare const tokenize: (latex: string) => string[];
|
|
5
6
|
type ParserOptions = {
|
|
6
7
|
allowStartingPower?: boolean;
|
|
7
8
|
};
|
|
8
|
-
export declare const parseAlgebraic: (latex: string, opts?: ParserOptions) => AlgebraicNode;
|
|
9
|
-
export declare const parseLatex: (latex: string) => AlgebraicNode | EqualNode | InequationNode;
|
|
9
|
+
export declare const parseAlgebraic: (latex: string, opts?: ParserOptions) => AlgebraicNode | IDontKnowNode;
|
|
10
|
+
export declare const parseLatex: (latex: string) => AlgebraicNode | EqualNode | InequationNode | IDontKnowNode;
|
|
10
11
|
export {};
|
|
11
12
|
//# sourceMappingURL=latexParser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"latexParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/latexParser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAQ5D,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"latexParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/latexParser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAQ5D,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAgBxE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AA2DlE,eAAO,MAAM,QAAQ,GAAI,OAAO,MAAM,aAwDrC,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AACF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,EAAE,OAAO,aAAa,kCA4BjE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,+DA6CvC,CAAC"}
|
|
@@ -16,6 +16,7 @@ import { FractionNode } from "../nodes/operators/fractionNode.js";
|
|
|
16
16
|
import { MultiplyNode, isMultiplyNode, } from "../nodes/operators/multiplyNode.js";
|
|
17
17
|
import { PowerNode } from "../nodes/operators/powerNode.js";
|
|
18
18
|
import { SubstractNode } from "../nodes/operators/substractNode.js";
|
|
19
|
+
import { IDontKnowNode } from "../nodes/student/iDontKnowNode.js";
|
|
19
20
|
import { VariableNode } from "../nodes/variables/variableNode.js";
|
|
20
21
|
//cmds that needs a child, like \exp{3}
|
|
21
22
|
const functions = [
|
|
@@ -125,6 +126,9 @@ export const tokenize = (latex) => {
|
|
|
125
126
|
};
|
|
126
127
|
export const parseAlgebraic = (latex, opts) => {
|
|
127
128
|
// console.log("parsingAlg ", latex);
|
|
129
|
+
if (latex.includes(IDontKnowNode.keyword())) {
|
|
130
|
+
return new IDontKnowNode(latex);
|
|
131
|
+
}
|
|
128
132
|
let formatedLatex = latex;
|
|
129
133
|
if (!opts?.allowStartingPower && latex.startsWith("^")) {
|
|
130
134
|
if (latex[1] === "{") {
|
|
@@ -151,6 +155,9 @@ export const parseAlgebraic = (latex, opts) => {
|
|
|
151
155
|
};
|
|
152
156
|
export const parseLatex = (latex) => {
|
|
153
157
|
// console.log("parsingLatex ", latex);
|
|
158
|
+
if (latex.includes(IDontKnowNode.keyword())) {
|
|
159
|
+
return new IDontKnowNode(latex);
|
|
160
|
+
}
|
|
154
161
|
const formattedLatex = latex
|
|
155
162
|
.replaceAll("\\left", "")
|
|
156
163
|
.replaceAll("\\right", "");
|
|
@@ -3,6 +3,6 @@ type Opts = {
|
|
|
3
3
|
maxDegree?: number;
|
|
4
4
|
minDegree?: number;
|
|
5
5
|
};
|
|
6
|
-
export declare const monomParser: (str: string, { variable, maxDegree, minDegree }?: Opts) => false | import("../nodes/algebraicNode.js").AlgebraicNode;
|
|
6
|
+
export declare const monomParser: (str: string, { variable, maxDegree, minDegree }?: Opts) => false | import("../nodes/algebraicNode.js").AlgebraicNode | import("../nodes/student/iDontKnowNode.js").IDontKnowNode;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=monomParser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monomParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/monomParser.ts"],"names":[],"mappings":"AAIA,KAAK,IAAI,GAAG;IACV,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AACF,eAAO,MAAM,WAAW,GACtB,KAAK,MAAM,EACX,qCAAoC,IAInC,
|
|
1
|
+
{"version":3,"file":"monomParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/monomParser.ts"],"names":[],"mappings":"AAIA,KAAK,IAAI,GAAG;IACV,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AACF,eAAO,MAAM,WAAW,GACtB,KAAK,MAAM,EACX,qCAAoC,IAInC,0HAaF,CAAC"}
|
|
@@ -2,6 +2,6 @@ import { AlgebraicNode } from "../nodes/algebraicNode.js";
|
|
|
2
2
|
type Opts = {
|
|
3
3
|
variable?: string;
|
|
4
4
|
};
|
|
5
|
-
export declare const polynomialParser: (ans: string, opts?: Opts) => false | AlgebraicNode | import("../nodes/numbers/constantNode.js").ConstantNode | import("../nodes/numbers/numberNode.js").NumberNode | import("../nodes/operators/substractNode.js").SubstractNode | import("../nodes/operators/addNode.js").AddNode;
|
|
5
|
+
export declare const polynomialParser: (ans: string, opts?: Opts) => false | AlgebraicNode | import("../nodes/numbers/constantNode.js").ConstantNode | import("../nodes/numbers/numberNode.js").NumberNode | import("../nodes/operators/substractNode.js").SubstractNode | import("../nodes/operators/addNode.js").AddNode | import("../nodes/student/iDontKnowNode.js").IDontKnowNode;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=polynomialParser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polynomialParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/polynomialParser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAS1D,KAAK,IAAI,GAAG;IACV,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAIF,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,EAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"polynomialParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/polynomialParser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAS1D,KAAK,IAAI,GAAG;IACV,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAIF,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,EAAE,OAAO,IAAI,sTAkCxD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const trinomParser: (ans: string, variable?: string) => false | import("../nodes/algebraicNode.js").AlgebraicNode | undefined;
|
|
1
|
+
export declare const trinomParser: (ans: string, variable?: string) => false | import("../nodes/algebraicNode.js").AlgebraicNode | import("../nodes/student/iDontKnowNode.js").IDontKnowNode | undefined;
|
|
2
2
|
//# sourceMappingURL=trinomParser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trinomParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/trinomParser.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,EAAE,WAAU,MAAY,
|
|
1
|
+
{"version":3,"file":"trinomParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/trinomParser.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,EAAE,WAAU,MAAY,sIAgC/D,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { Tuple } from "../../math/sets/tuple.js";
|
|
2
2
|
import { AlgebraicNode } from "../nodes/algebraicNode.js";
|
|
3
3
|
import { DiscreteSetNode } from "../nodes/sets/discreteSetNode.js";
|
|
4
|
+
import { VariableNode } from "../nodes/variables/variableNode.js";
|
|
4
5
|
export declare abstract class NodeComparator {
|
|
5
6
|
static compareViaSub: <T extends AlgebraicNode>(node1: T, node2: T) => -1 | 0 | 1;
|
|
6
7
|
static isEqualViaSub: (node1: AlgebraicNode, node2: AlgebraicNode) => boolean;
|
|
7
8
|
static isEqualViaFrac: (node1: AlgebraicNode, node2: AlgebraicNode) => boolean;
|
|
8
|
-
static isEqualViaRandomEvaluations(node1: AlgebraicNode, node2: AlgebraicNode, nbRandomEvaluations: number, precision?: number): boolean;
|
|
9
|
+
static isEqualViaRandomEvaluations(node1: AlgebraicNode, node2: AlgebraicNode, nbRandomEvaluations: number, precision?: number, nodeVar?: VariableNode, randFunc?: () => number): boolean;
|
|
10
|
+
static isEqualViaRandomSubstitutions(node1: AlgebraicNode, node2: AlgebraicNode, nbRandomEvaluations: number, nodeVar?: VariableNode): boolean;
|
|
9
11
|
static isNodeInDiscreteSet: (node: AlgebraicNode, nodeDiscreteSet: DiscreteSetNode) => boolean;
|
|
10
12
|
static isTupleInCartesianProductOfDiscreteSets: (tuple: Tuple, arrDiscreteSet: DiscreteSetNode[]) => boolean;
|
|
11
13
|
static isEqualTuple: (tuple1: Tuple, tuple2: Tuple) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeComparator.d.ts","sourceRoot":"","sources":["../../../src/tree/utilities/nodeComparator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"nodeComparator.d.ts","sourceRoot":"","sources":["../../../src/tree/utilities/nodeComparator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAIjD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAI1D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,YAAY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