math-exercises 1.3.7 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/lib/exercises/exercises.d.ts +0 -1
- package/lib/exercises/exercises.d.ts.map +1 -1
- package/lib/exercises/exercises.js +1 -2
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts +3 -0
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -1
- package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.js +33 -23
- package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts +4 -0
- package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -0
- package/lib/exercises/sequences/geometric/geometricFindExplicitFormula.js +33 -0
- package/lib/exercises/sequences/geometric/geometricFindReason.d.ts +3 -0
- package/lib/exercises/sequences/geometric/geometricFindReason.d.ts.map +1 -1
- package/lib/exercises/sequences/geometric/geometricFindReason.js +28 -22
- package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts +4 -0
- package/lib/exercises/sequences/geometric/geometricReasonUsage.d.ts.map +1 -0
- package/lib/exercises/sequences/geometric/geometricReasonUsage.js +28 -0
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts +4 -0
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts.map +1 -0
- package/lib/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.js +28 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +16 -2
- package/lib/math/sequences/sequence.d.ts +11 -3
- package/lib/math/sequences/sequence.d.ts.map +1 -1
- package/lib/math/sequences/sequence.js +7 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,13 +32,13 @@ You can see all the exercises implemented so far [by playing with the select inp
|
|
|
32
32
|
|
|
33
33
|
Example with (ax+b)^2 questions :
|
|
34
34
|
|
|
35
|
-
```
|
|
36
|
-
import { firstIdentity } from exercises/calculLitteral/distributivity/firstIdentity
|
|
35
|
+
```js
|
|
36
|
+
import { firstIdentity } from 'exercises/calculLitteral/distributivity/firstIdentity';
|
|
37
37
|
|
|
38
38
|
console.log(firstIdentity.instruction);
|
|
39
|
-
const question = firstIdentity.generator(1)
|
|
40
|
-
console.log(question.startStatement)
|
|
41
|
-
console.log(question.answer)
|
|
39
|
+
const question = firstIdentity.generator(1);
|
|
40
|
+
console.log(question.startStatement);
|
|
41
|
+
console.log(question.answer);
|
|
42
42
|
|
|
43
43
|
//output :
|
|
44
44
|
// Développer et réduire :
|
|
@@ -46,7 +46,9 @@ console.log(question.answer)
|
|
|
46
46
|
// 4x^2 + 12x + 9
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Some exercises do not have instructions, because the instruction is directly in the question itself.
|
|
50
|
+
|
|
51
|
+
A list of all exercises is exported from root.
|
|
50
52
|
|
|
51
53
|
## Expression tree and latex parser
|
|
52
54
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercises.d.ts","sourceRoot":"","sources":["../../src/exercises/exercises.ts"],"names":[],"mappings":"AAoCA,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"exercises.d.ts","sourceRoot":"","sources":["../../src/exercises/exercises.ts"],"names":[],"mappings":"AAoCA,eAAO,MAAM,SAAS,iCAoErB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.exercises =
|
|
3
|
+
exports.exercises = void 0;
|
|
4
4
|
const addAndSub_1 = require("./calcul/addAndSub");
|
|
5
5
|
const fractionAndIntegerDivision_1 = require("./calcul/fractions/fractionAndIntegerDivision");
|
|
6
6
|
const fractionAndIntegerProduct_1 = require("./calcul/fractions/fractionAndIntegerProduct");
|
|
@@ -30,7 +30,6 @@ const powersPower_1 = require("./powers/powersPower");
|
|
|
30
30
|
const powersProduct_1 = require("./powers/powersProduct");
|
|
31
31
|
const scientificToDecimal_1 = require("./powers/scientificToDecimal");
|
|
32
32
|
const simpifySquareRoot_1 = require("./squareRoots/simpifySquareRoot");
|
|
33
|
-
exports.data = [{}];
|
|
34
33
|
exports.exercises = [
|
|
35
34
|
/**
|
|
36
35
|
* calcul litteral
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometricExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/geometric/geometricExplicitFormulaUsage.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"geometricExplicitFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/geometric/geometricExplicitFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,6BAA6B,EAAE,QAS3C,CAAC;AAEF,wBAAgB,gCAAgC,IAAI,QAAQ,CAgB3D"}
|
|
@@ -1,24 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGeometricExplicitFormulaUsage = exports.geometricExplicitFormulaUsage = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
6
|
+
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
7
|
+
const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
|
|
8
|
+
const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
|
|
9
|
+
const variableNode_1 = require("../../../tree/nodes/variables/variableNode");
|
|
10
|
+
const simplify_1 = require("../../../tree/parsers/simplify");
|
|
11
|
+
exports.geometricExplicitFormulaUsage = {
|
|
12
|
+
id: 'geometricExplicitFormulaUsage',
|
|
13
|
+
connector: '=',
|
|
14
|
+
instruction: '',
|
|
15
|
+
label: "Utiliser la formule explicite d'une suite géométrique",
|
|
16
|
+
levels: ['1', '0'],
|
|
17
|
+
isSingleStep: false,
|
|
18
|
+
section: 'Suites',
|
|
19
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getGeometricExplicitFormulaUsage, nb),
|
|
20
|
+
};
|
|
21
|
+
function getGeometricExplicitFormulaUsage() {
|
|
22
|
+
const askedRank = (0, randint_1.randint)(0, 10);
|
|
23
|
+
const firstValue = (0, randint_1.randint)(1, 10);
|
|
24
|
+
const reason = (0, randint_1.randint)(2, 10);
|
|
25
|
+
const formula = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(firstValue), new powerNode_1.PowerNode(new numberNode_1.NumberNode(reason), new variableNode_1.VariableNode('n')));
|
|
26
|
+
const formulaTex = (0, simplify_1.simplifyNode)(formula).toTex();
|
|
27
|
+
const question = {
|
|
28
|
+
instruction: `La suite $(u_n)$ est définie par $u_n = ${formulaTex}$. Calculer $u_{${askedRank}}$`,
|
|
29
|
+
startStatement: `u_{${askedRank}}`,
|
|
30
|
+
answer: (firstValue * Math.pow(reason, askedRank)).toString(),
|
|
31
|
+
};
|
|
32
|
+
return question;
|
|
33
|
+
}
|
|
34
|
+
exports.getGeometricExplicitFormulaUsage = getGeometricExplicitFormulaUsage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometricFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/geometric/geometricFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,4BAA4B,EAAE,QAS1C,CAAC;AAEF,wBAAgB,+BAA+B,IAAI,QAAQ,CAe1D"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGeometricFindExplicitFormula = exports.geometricFindExplicitFormula = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
6
|
+
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
7
|
+
const multiplyNode_1 = require("../../../tree/nodes/operators/multiplyNode");
|
|
8
|
+
const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
|
|
9
|
+
const variableNode_1 = require("../../../tree/nodes/variables/variableNode");
|
|
10
|
+
const simplify_1 = require("../../../tree/parsers/simplify");
|
|
11
|
+
exports.geometricFindExplicitFormula = {
|
|
12
|
+
id: 'geometricFindExplicitFormula',
|
|
13
|
+
connector: '=',
|
|
14
|
+
instruction: '',
|
|
15
|
+
label: "Déterminer la formule explicite d'une suite géométrique",
|
|
16
|
+
levels: ['1', '0'],
|
|
17
|
+
isSingleStep: false,
|
|
18
|
+
section: 'Suites',
|
|
19
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getGeometricFindExplicitFormula, nb),
|
|
20
|
+
};
|
|
21
|
+
function getGeometricFindExplicitFormula() {
|
|
22
|
+
const firstRank = 0;
|
|
23
|
+
const firstValue = (0, randint_1.randint)(1, 10);
|
|
24
|
+
const reason = (0, randint_1.randint)(2, 10);
|
|
25
|
+
const formula = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(firstValue), new powerNode_1.PowerNode(new numberNode_1.NumberNode(reason), new variableNode_1.VariableNode('n')));
|
|
26
|
+
const question = {
|
|
27
|
+
instruction: `$(u_n)$ est une suite géométrique de premier terme $u_{${firstRank}} = ${firstValue}$ et de raison $q = ${reason}$. Donner l'expression de $u_n$ en fonction de $n$.`,
|
|
28
|
+
startStatement: 'u_n',
|
|
29
|
+
answer: (0, simplify_1.simplifyNode)(formula).toTex(),
|
|
30
|
+
};
|
|
31
|
+
return question;
|
|
32
|
+
}
|
|
33
|
+
exports.getGeometricFindExplicitFormula = getGeometricFindExplicitFormula;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometricFindReason.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/geometric/geometricFindReason.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"geometricFindReason.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/geometric/geometricFindReason.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAI9D,eAAO,MAAM,mBAAmB,EAAE,QASjC,CAAC;AAEF,wBAAgB,sBAAsB,IAAI,QAAQ,CAYjD"}
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGeometricFindReason = exports.geometricFindReason = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
6
|
+
exports.geometricFindReason = {
|
|
7
|
+
id: 'geometricFindReason',
|
|
8
|
+
connector: '=',
|
|
9
|
+
instruction: '',
|
|
10
|
+
label: "Déterminer la raison d'une suite géométrique",
|
|
11
|
+
levels: ['1', '0'],
|
|
12
|
+
isSingleStep: false,
|
|
13
|
+
section: 'Suites',
|
|
14
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getGeometricFindReason, nb),
|
|
15
|
+
};
|
|
16
|
+
function getGeometricFindReason() {
|
|
17
|
+
const rank1 = (0, randint_1.randint)(0, 10);
|
|
18
|
+
const rank2 = rank1 + 1;
|
|
19
|
+
const reason = (0, randint_1.randint)(2, 10);
|
|
20
|
+
const value1 = (0, randint_1.randint)(1, 10);
|
|
21
|
+
const value2 = reason * value1;
|
|
22
|
+
const question = {
|
|
23
|
+
instruction: `$(u_n)$ est une suite géométrique. On sait que $u_{${rank1}} = ${value1} et $u_{${rank2}} = ${value2}. Quelle est la raison de $(u_n)$ ?`,
|
|
24
|
+
startStatement: 'q',
|
|
25
|
+
answer: reason.toString(),
|
|
26
|
+
};
|
|
27
|
+
return question;
|
|
28
|
+
}
|
|
29
|
+
exports.getGeometricFindReason = getGeometricFindReason;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometricReasonUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/geometric/geometricReasonUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAI9D,eAAO,MAAM,oBAAoB,EAAE,QASlC,CAAC;AAEF,wBAAgB,uBAAuB,IAAI,QAAQ,CAWlD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGeometricReasonUsage = exports.geometricReasonUsage = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
6
|
+
exports.geometricReasonUsage = {
|
|
7
|
+
id: 'geometricReasonUsage',
|
|
8
|
+
connector: '=',
|
|
9
|
+
instruction: '',
|
|
10
|
+
label: "Utiliser la raison d'une suite géométrique",
|
|
11
|
+
levels: ['1', '0'],
|
|
12
|
+
isSingleStep: false,
|
|
13
|
+
section: 'Suites',
|
|
14
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getGeometricReasonUsage, nb),
|
|
15
|
+
};
|
|
16
|
+
function getGeometricReasonUsage() {
|
|
17
|
+
const reason = (0, randint_1.randint)(2, 10);
|
|
18
|
+
const startRank = (0, randint_1.randint)(0, 20);
|
|
19
|
+
const askedRank = startRank + 1;
|
|
20
|
+
const startValue = (0, randint_1.randint)(1, 10);
|
|
21
|
+
const question = {
|
|
22
|
+
instruction: `$(u_n)$ est une suite géométrique de raison $q = ${reason}$ et $u_{${startRank}} = ${startValue}$. Calculer $u_{${askedRank}}$`,
|
|
23
|
+
startStatement: `u_{${askedRank}}`,
|
|
24
|
+
answer: (startValue * reason).toString(),
|
|
25
|
+
};
|
|
26
|
+
return question;
|
|
27
|
+
}
|
|
28
|
+
exports.getGeometricReasonUsage = getGeometricReasonUsage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometricRecurrenceFormulaUsage.d.ts","sourceRoot":"","sources":["../../../../src/exercises/sequences/geometric/geometricRecurrenceFormulaUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAS9D,eAAO,MAAM,+BAA+B,EAAE,QAS7C,CAAC;AAEF,wBAAgB,kCAAkC,IAAI,QAAQ,CAY7D"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGeometricRecurrenceFormulaUsage = exports.geometricRecurrenceFormulaUsage = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
6
|
+
exports.geometricRecurrenceFormulaUsage = {
|
|
7
|
+
id: 'geometricRecurrenceFormulaUsage',
|
|
8
|
+
connector: '=',
|
|
9
|
+
instruction: '',
|
|
10
|
+
label: "Utiliser la formule de récurrence d'une suite géométrique",
|
|
11
|
+
levels: ['1', '0'],
|
|
12
|
+
isSingleStep: false,
|
|
13
|
+
section: 'Suites',
|
|
14
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getGeometricRecurrenceFormulaUsage, nb),
|
|
15
|
+
};
|
|
16
|
+
function getGeometricRecurrenceFormulaUsage() {
|
|
17
|
+
const firstRank = (0, randint_1.randint)(1, 20);
|
|
18
|
+
const firstValue = (0, randint_1.randint)(1, 10);
|
|
19
|
+
const reason = (0, randint_1.randint)(2, 10);
|
|
20
|
+
const askedRank = firstRank + 1;
|
|
21
|
+
const question = {
|
|
22
|
+
instruction: `$(u_n)$ est une suite définie par $u_{n+1} = ${reason}\\times u_n$ et $u_{${firstRank}} = ${firstValue}. Calculer $u_{${askedRank}}`,
|
|
23
|
+
startStatement: `u_{${askedRank}}`,
|
|
24
|
+
answer: (firstValue * reason).toString(),
|
|
25
|
+
};
|
|
26
|
+
return question;
|
|
27
|
+
}
|
|
28
|
+
exports.getGeometricRecurrenceFormulaUsage = getGeometricRecurrenceFormulaUsage;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,YAAY,2CAAiB,CAAC;AAcpC,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -2,7 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.allExercises = void 0;
|
|
4
4
|
const exercises_1 = require("./exercises/exercises");
|
|
5
|
+
const geometricExplicitFormulaUsage_1 = require("./exercises/sequences/geometric/geometricExplicitFormulaUsage");
|
|
6
|
+
const geometricFindExplicitFormula_1 = require("./exercises/sequences/geometric/geometricFindExplicitFormula");
|
|
7
|
+
const geometricFindReason_1 = require("./exercises/sequences/geometric/geometricFindReason");
|
|
8
|
+
const geometricReasonUsage_1 = require("./exercises/sequences/geometric/geometricReasonUsage");
|
|
9
|
+
const geometricRecurrenceFormulaUsage_1 = require("./exercises/sequences/geometric/geometricRecurrenceFormulaUsage");
|
|
5
10
|
const allExercises = [...exercises_1.exercises];
|
|
6
11
|
exports.allExercises = allExercises;
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
const exos = [
|
|
13
|
+
geometricExplicitFormulaUsage_1.geometricExplicitFormulaUsage,
|
|
14
|
+
geometricFindExplicitFormula_1.geometricFindExplicitFormula,
|
|
15
|
+
geometricFindReason_1.geometricFindReason,
|
|
16
|
+
geometricReasonUsage_1.geometricReasonUsage,
|
|
17
|
+
geometricRecurrenceFormulaUsage_1.geometricRecurrenceFormulaUsage,
|
|
18
|
+
];
|
|
19
|
+
exos.forEach((exo) => {
|
|
20
|
+
console.log(exo);
|
|
21
|
+
console.log(exo.generator(10));
|
|
22
|
+
});
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { Node } from '../../tree/nodes/node';
|
|
2
|
+
import { Integer } from '../numbers/integer/integer';
|
|
2
3
|
declare enum SequenceType {
|
|
3
4
|
arithmetic = 0,
|
|
4
|
-
geometric = 1
|
|
5
|
+
geometric = 1,
|
|
6
|
+
other = 2
|
|
5
7
|
}
|
|
6
8
|
export declare class Sequence {
|
|
7
9
|
type: SequenceType;
|
|
10
|
+
firstRank: Integer;
|
|
8
11
|
firstTerm: Node;
|
|
9
|
-
reason?: Node;
|
|
10
12
|
recurrenceFormula?: string;
|
|
11
13
|
explicitFormula?: string;
|
|
12
|
-
constructor(type
|
|
14
|
+
constructor({ type, recurrenceFormula, explicitFormula, firstRank, firstTerm, }: {
|
|
15
|
+
type: SequenceType;
|
|
16
|
+
recurrenceFormula?: string;
|
|
17
|
+
explicitFormula?: string;
|
|
18
|
+
firstRank: Integer;
|
|
19
|
+
firstTerm: Node;
|
|
20
|
+
});
|
|
13
21
|
}
|
|
14
22
|
export {};
|
|
15
23
|
//# sourceMappingURL=sequence.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequence.d.ts","sourceRoot":"","sources":["../../../src/math/sequences/sequence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"sequence.d.ts","sourceRoot":"","sources":["../../../src/math/sequences/sequence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,aAAK,YAAY;IACf,UAAU,IAAA;IACV,SAAS,IAAA;IACT,KAAK,IAAA;CACN;AAED,qBAAa,QAAQ;IACnB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,OAAO,CAAkB;IACpC,SAAS,EAAE,IAAI,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;gBAEb,EACV,IAAI,EACJ,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,SAAS,GACV,EAAE;QACD,IAAI,EAAE,YAAY,CAAC;QACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,SAAS,EAAE,OAAO,CAAC;QACnB,SAAS,EAAE,IAAI,CAAC;KACjB;CAOF"}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Sequence = void 0;
|
|
4
|
+
const integer_1 = require("../numbers/integer/integer");
|
|
4
5
|
var SequenceType;
|
|
5
6
|
(function (SequenceType) {
|
|
6
7
|
SequenceType[SequenceType["arithmetic"] = 0] = "arithmetic";
|
|
7
8
|
SequenceType[SequenceType["geometric"] = 1] = "geometric";
|
|
9
|
+
SequenceType[SequenceType["other"] = 2] = "other";
|
|
8
10
|
})(SequenceType || (SequenceType = {}));
|
|
9
11
|
class Sequence {
|
|
10
|
-
constructor(type, firstTerm,
|
|
12
|
+
constructor({ type, recurrenceFormula, explicitFormula, firstRank, firstTerm, }) {
|
|
13
|
+
this.firstRank = new integer_1.Integer(0);
|
|
11
14
|
this.type = type;
|
|
12
15
|
this.firstTerm = firstTerm;
|
|
13
|
-
this.
|
|
16
|
+
this.recurrenceFormula = recurrenceFormula;
|
|
17
|
+
this.explicitFormula = explicitFormula;
|
|
18
|
+
this.firstRank = firstRank;
|
|
14
19
|
}
|
|
15
20
|
}
|
|
16
21
|
exports.Sequence = Sequence;
|