math-exercises 1.3.6 → 1.3.7

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.
Files changed (242) hide show
  1. package/lib/exercises/calcul/addAndSub.d.ts +7 -0
  2. package/lib/exercises/calcul/addAndSub.d.ts.map +1 -0
  3. package/lib/exercises/calcul/addAndSub.js +3 -3
  4. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts +4 -0
  5. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -0
  6. package/lib/exercises/calcul/fractions/fractionAndIntegerDivision.js +6 -6
  7. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts +4 -0
  8. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -0
  9. package/lib/exercises/calcul/fractions/fractionAndIntegerProduct.js +5 -5
  10. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts +4 -0
  11. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.d.ts.map +1 -0
  12. package/lib/exercises/calcul/fractions/fractionAndIntegerSum.js +5 -5
  13. package/lib/exercises/calcul/fractions/fractionsDivision.d.ts +4 -0
  14. package/lib/exercises/calcul/fractions/fractionsDivision.d.ts.map +1 -0
  15. package/lib/exercises/calcul/fractions/fractionsDivision.js +3 -3
  16. package/lib/exercises/calcul/fractions/fractionsProduct.d.ts +4 -0
  17. package/lib/exercises/calcul/fractions/fractionsProduct.d.ts.map +1 -0
  18. package/lib/exercises/calcul/fractions/fractionsProduct.js +3 -3
  19. package/lib/exercises/calcul/fractions/fractionsSum.d.ts +4 -0
  20. package/lib/exercises/calcul/fractions/fractionsSum.d.ts.map +1 -0
  21. package/lib/exercises/calcul/fractions/fractionsSum.js +3 -3
  22. package/lib/exercises/calcul/fractions/simplifyFraction.d.ts +4 -0
  23. package/lib/exercises/calcul/fractions/simplifyFraction.d.ts.map +1 -0
  24. package/lib/exercises/calcul/fractions/simplifyFraction.js +2 -2
  25. package/lib/exercises/calcul/operations/operationsPriorities.d.ts +11 -0
  26. package/lib/exercises/calcul/operations/operationsPriorities.d.ts.map +1 -0
  27. package/lib/exercises/calcul/operations/operationsPriorities.js +7 -7
  28. package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts +1 -0
  29. package/lib/exercises/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -0
  30. package/lib/exercises/calcul/rounding/rounding.d.ts +20 -0
  31. package/lib/exercises/calcul/rounding/rounding.d.ts.map +1 -0
  32. package/lib/exercises/calcul/rounding/rounding.js +3 -3
  33. package/lib/exercises/calculLitteral/distributivity/allIdentities.d.ts +4 -0
  34. package/lib/exercises/calculLitteral/distributivity/allIdentities.d.ts.map +1 -0
  35. package/lib/exercises/calculLitteral/distributivity/allIdentities.js +2 -2
  36. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts +4 -0
  37. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -0
  38. package/lib/exercises/calculLitteral/distributivity/doubleDistributivity.js +6 -6
  39. package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts +4 -0
  40. package/lib/exercises/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -0
  41. package/lib/exercises/calculLitteral/distributivity/firstIdentity.js +7 -7
  42. package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts +4 -0
  43. package/lib/exercises/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -0
  44. package/lib/exercises/calculLitteral/distributivity/secondIdentity.js +7 -7
  45. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts +4 -0
  46. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -0
  47. package/lib/exercises/calculLitteral/distributivity/simpleDistributivity.js +7 -7
  48. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts +4 -0
  49. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -0
  50. package/lib/exercises/calculLitteral/distributivity/thirdIdentity.js +6 -6
  51. package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts +7 -0
  52. package/lib/exercises/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -0
  53. package/lib/exercises/calculLitteral/equation/equationType1Exercise.js +6 -6
  54. package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts +7 -0
  55. package/lib/exercises/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -0
  56. package/lib/exercises/calculLitteral/equation/equationType2Exercise.js +8 -8
  57. package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts +7 -0
  58. package/lib/exercises/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -0
  59. package/lib/exercises/calculLitteral/equation/equationType3Exercise.js +8 -8
  60. package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts +7 -0
  61. package/lib/exercises/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -0
  62. package/lib/exercises/calculLitteral/equation/equationType4Exercise.js +8 -8
  63. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts +7 -0
  64. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -0
  65. package/lib/exercises/calculLitteral/factorisation/factoType1Exercise.js +7 -7
  66. package/lib/exercises/exercise.d.ts +16 -0
  67. package/lib/exercises/exercise.d.ts.map +1 -0
  68. package/lib/exercises/exercises.d.ts +3 -0
  69. package/lib/exercises/exercises.d.ts.map +1 -0
  70. package/lib/exercises/geometry/cartesian/midpoint.d.ts +4 -0
  71. package/lib/exercises/geometry/cartesian/midpoint.d.ts.map +1 -0
  72. package/lib/exercises/geometry/cartesian/midpoint.js +4 -4
  73. package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts +4 -0
  74. package/lib/exercises/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -0
  75. package/lib/exercises/geometry/vectors/scalarProductViaCoords.js +4 -4
  76. package/lib/exercises/geometry/vectors/scalarProductViaNorms.d.ts +1 -0
  77. package/lib/exercises/geometry/vectors/scalarProductViaNorms.d.ts.map +1 -0
  78. package/lib/exercises/powers/powersDivision.d.ts +8 -0
  79. package/lib/exercises/powers/powersDivision.d.ts.map +1 -0
  80. package/lib/exercises/powers/powersDivision.js +5 -5
  81. package/lib/exercises/powers/powersOfTenToDecimal.d.ts +7 -0
  82. package/lib/exercises/powers/powersOfTenToDecimal.d.ts.map +1 -0
  83. package/lib/exercises/powers/powersOfTenToDecimal.js +4 -4
  84. package/lib/exercises/powers/powersPower.d.ts +8 -0
  85. package/lib/exercises/powers/powersPower.d.ts.map +1 -0
  86. package/lib/exercises/powers/powersPower.js +4 -4
  87. package/lib/exercises/powers/powersProduct.d.ts +8 -0
  88. package/lib/exercises/powers/powersProduct.d.ts.map +1 -0
  89. package/lib/exercises/powers/powersProduct.js +5 -5
  90. package/lib/exercises/powers/scientificToDecimal.d.ts +7 -0
  91. package/lib/exercises/powers/scientificToDecimal.d.ts.map +1 -0
  92. package/lib/exercises/powers/scientificToDecimal.js +6 -6
  93. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts +1 -0
  94. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.d.ts.map +1 -0
  95. package/lib/exercises/sequences/geometric/geometricExplicitFormulaUsage.js +3 -3
  96. package/lib/exercises/sequences/geometric/geometricFindReason.d.ts +1 -0
  97. package/lib/exercises/sequences/geometric/geometricFindReason.d.ts.map +1 -0
  98. package/lib/exercises/sequences/geometric/geometricFindReason.js +3 -3
  99. package/lib/exercises/squareRoots/simpifySquareRoot.d.ts +4 -0
  100. package/lib/exercises/squareRoots/simpifySquareRoot.d.ts.map +1 -0
  101. package/lib/exercises/squareRoots/simpifySquareRoot.js +1 -1
  102. package/lib/exercises/trigonometry/mainRemarkableValues.d.ts +4 -0
  103. package/lib/exercises/trigonometry/mainRemarkableValues.d.ts.map +1 -0
  104. package/lib/exercises/trigonometry/mainRemarkableValues.js +2 -2
  105. package/lib/exercises/trigonometry/remarkableValues.d.ts +4 -0
  106. package/lib/exercises/trigonometry/remarkableValues.d.ts.map +1 -0
  107. package/lib/exercises/trigonometry/remarkableValues.js +2 -2
  108. package/lib/exercises/utils/getDistinctQuestions.d.ts +3 -0
  109. package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -0
  110. package/lib/index.d.ts +3 -0
  111. package/lib/index.d.ts.map +1 -0
  112. package/lib/index.js +4 -3
  113. package/lib/math/geometry/point.d.ts +13 -0
  114. package/lib/math/geometry/point.d.ts.map +1 -0
  115. package/lib/math/geometry/point.js +4 -4
  116. package/lib/math/geometry/vector.d.ts +16 -0
  117. package/lib/math/geometry/vector.d.ts.map +1 -0
  118. package/lib/math/geometry/vector.js +4 -4
  119. package/lib/math/numbers/decimals/decimal.d.ts +25 -0
  120. package/lib/math/numbers/decimals/decimal.d.ts.map +1 -0
  121. package/lib/math/numbers/decimals/decimal.js +2 -2
  122. package/lib/math/numbers/epsilon.d.ts +2 -0
  123. package/lib/math/numbers/epsilon.d.ts.map +1 -0
  124. package/lib/math/numbers/integer/integer.d.ts +15 -0
  125. package/lib/math/numbers/integer/integer.d.ts.map +1 -0
  126. package/lib/math/numbers/integer/integer.js +2 -2
  127. package/lib/math/numbers/integer/power.d.ts +14 -0
  128. package/lib/math/numbers/integer/power.d.ts.map +1 -0
  129. package/lib/math/numbers/integer/power.js +2 -2
  130. package/lib/math/numbers/nombre.d.ts +14 -0
  131. package/lib/math/numbers/nombre.d.ts.map +1 -0
  132. package/lib/math/numbers/rationals/rational.d.ts +26 -0
  133. package/lib/math/numbers/rationals/rational.d.ts.map +1 -0
  134. package/lib/math/numbers/rationals/rational.js +8 -8
  135. package/lib/math/numbers/reals/real.d.ts +10 -0
  136. package/lib/math/numbers/reals/real.d.ts.map +1 -0
  137. package/lib/math/numbers/reals/real.js +1 -1
  138. package/lib/math/numbers/reals/squareRoot.d.ts +19 -0
  139. package/lib/math/numbers/reals/squareRoot.d.ts.map +1 -0
  140. package/lib/math/numbers/reals/squareRoot.js +6 -6
  141. package/lib/math/polynomials/affine.d.ts +16 -0
  142. package/lib/math/polynomials/affine.d.ts.map +1 -0
  143. package/lib/math/polynomials/polynomial.d.ts +25 -0
  144. package/lib/math/polynomials/polynomial.d.ts.map +1 -0
  145. package/lib/math/sequences/arithmeticSequence.d.ts +1 -0
  146. package/lib/math/sequences/arithmeticSequence.d.ts.map +1 -0
  147. package/lib/math/sequences/geometricSequence.d.ts +4 -0
  148. package/lib/math/sequences/geometricSequence.d.ts.map +1 -0
  149. package/lib/math/sequences/sequence.d.ts +15 -0
  150. package/lib/math/sequences/sequence.d.ts.map +1 -0
  151. package/lib/math/sets/discreteSet.d.ts +11 -0
  152. package/lib/math/sets/discreteSet.d.ts.map +1 -0
  153. package/lib/math/sets/discreteSet.js +1 -1
  154. package/lib/math/sets/emptySet.d.ts +1 -0
  155. package/lib/math/sets/emptySet.d.ts.map +1 -0
  156. package/lib/math/sets/intervals/intervals.d.ts +27 -0
  157. package/lib/math/sets/intervals/intervals.d.ts.map +1 -0
  158. package/lib/math/sets/intervals/intervals.js +5 -5
  159. package/lib/math/sets/mathSet.d.ts +8 -0
  160. package/lib/math/sets/mathSet.d.ts.map +1 -0
  161. package/lib/math/sets/mathSetInterface.d.ts +6 -0
  162. package/lib/math/sets/mathSetInterface.d.ts.map +1 -0
  163. package/lib/math/trigonometry/remarkableValue.d.ts +11 -0
  164. package/lib/math/trigonometry/remarkableValue.d.ts.map +1 -0
  165. package/lib/math/trigonometry/remarkableValue.js +6 -6
  166. package/lib/math/trigonometry/remarkableValues.d.ts +3 -0
  167. package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -0
  168. package/lib/math/trigonometry/remarkableValues.js +6 -6
  169. package/lib/math/utils/arithmetic/coprimesOf.d.ts +2 -0
  170. package/lib/math/utils/arithmetic/coprimesOf.d.ts.map +1 -0
  171. package/lib/math/utils/arithmetic/dividersOf.d.ts +2 -0
  172. package/lib/math/utils/arithmetic/dividersOf.d.ts.map +1 -0
  173. package/lib/math/utils/arithmetic/gcd.d.ts +2 -0
  174. package/lib/math/utils/arithmetic/gcd.d.ts.map +1 -0
  175. package/lib/math/utils/arithmetic/isSquare.d.ts +2 -0
  176. package/lib/math/utils/arithmetic/isSquare.d.ts.map +1 -0
  177. package/lib/math/utils/arithmetic/lcd.d.ts +2 -0
  178. package/lib/math/utils/arithmetic/lcd.d.ts.map +1 -0
  179. package/lib/math/utils/arithmetic/nonCoprimesOf.d.ts +2 -0
  180. package/lib/math/utils/arithmetic/nonCoprimesOf.d.ts.map +1 -0
  181. package/lib/math/utils/arithmetic/nonDividersOf.d.ts +2 -0
  182. package/lib/math/utils/arithmetic/nonDividersOf.d.ts.map +1 -0
  183. package/lib/math/utils/arithmetic/primeFactors.d.ts +6 -0
  184. package/lib/math/utils/arithmetic/primeFactors.d.ts.map +1 -0
  185. package/lib/math/utils/decimals/decimalPartLengthOf.d.ts +2 -0
  186. package/lib/math/utils/decimals/decimalPartLengthOf.d.ts.map +1 -0
  187. package/lib/math/utils/random/randTupleInt.d.ts +14 -0
  188. package/lib/math/utils/random/randTupleInt.d.ts.map +1 -0
  189. package/lib/math/utils/random/randTupleInt.js +1 -1
  190. package/lib/math/utils/random/randint.d.ts +5 -0
  191. package/lib/math/utils/random/randint.d.ts.map +1 -0
  192. package/lib/math/utils/round.d.ts +2 -0
  193. package/lib/math/utils/round.d.ts.map +1 -0
  194. package/lib/tree/nodes/functions/cosNode.d.ts +10 -0
  195. package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -0
  196. package/lib/tree/nodes/functions/functionNode.d.ts +15 -0
  197. package/lib/tree/nodes/functions/functionNode.d.ts.map +1 -0
  198. package/lib/tree/nodes/functions/oppositeNode.d.ts +8 -0
  199. package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -0
  200. package/lib/tree/nodes/functions/sinNode.d.ts +1 -0
  201. package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -0
  202. package/lib/tree/nodes/functions/sqrtNode.d.ts +9 -0
  203. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -0
  204. package/lib/tree/nodes/node.d.ts +13 -0
  205. package/lib/tree/nodes/node.d.ts.map +1 -0
  206. package/lib/tree/nodes/numbers/constantNode.d.ts +10 -0
  207. package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -0
  208. package/lib/tree/nodes/numbers/numberNode.d.ts +11 -0
  209. package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -0
  210. package/lib/tree/nodes/numbers/piNode.d.ts +3 -0
  211. package/lib/tree/nodes/numbers/piNode.d.ts.map +1 -0
  212. package/lib/tree/nodes/operators/addNode.d.ts +8 -0
  213. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -0
  214. package/lib/tree/nodes/operators/divideNode.d.ts +12 -0
  215. package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -0
  216. package/lib/tree/nodes/operators/equalNode.d.ts +8 -0
  217. package/lib/tree/nodes/operators/equalNode.d.ts.map +1 -0
  218. package/lib/tree/nodes/operators/fractionNode.d.ts +12 -0
  219. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -0
  220. package/lib/tree/nodes/operators/multiplyNode.d.ts +8 -0
  221. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -0
  222. package/lib/tree/nodes/operators/operatorNode.d.ts +22 -0
  223. package/lib/tree/nodes/operators/operatorNode.d.ts.map +1 -0
  224. package/lib/tree/nodes/operators/powerNode.d.ts +8 -0
  225. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -0
  226. package/lib/tree/nodes/operators/substractNode.d.ts +8 -0
  227. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -0
  228. package/lib/tree/nodes/variables/variableNode.d.ts +9 -0
  229. package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -0
  230. package/lib/tree/parsers/derivateParser.d.ts +1 -0
  231. package/lib/tree/parsers/derivateParser.d.ts.map +1 -0
  232. package/lib/tree/parsers/simplify.d.ts +3 -0
  233. package/lib/tree/parsers/simplify.d.ts.map +1 -0
  234. package/lib/utils/arrayEqual.d.ts +2 -0
  235. package/lib/utils/arrayEqual.d.ts.map +1 -0
  236. package/lib/utils/coinFlip.d.ts +2 -0
  237. package/lib/utils/coinFlip.d.ts.map +1 -0
  238. package/lib/utils/random.d.ts +2 -0
  239. package/lib/utils/random.d.ts.map +1 -0
  240. package/lib/utils/shuffle.d.ts +2 -0
  241. package/lib/utils/shuffle.d.ts.map +1 -0
  242. package/package.json +6 -8
@@ -0,0 +1,15 @@
1
+ import { Node, NodeType } from '../node';
2
+ export declare enum FunctionsIds {
3
+ opposite = 0,
4
+ sqrt = 1,
5
+ cos = 2,
6
+ sin = 3
7
+ }
8
+ export declare abstract class FunctionNode {
9
+ id: FunctionsIds;
10
+ child: Node;
11
+ type: NodeType;
12
+ tex: string;
13
+ constructor(id: FunctionsIds, child: Node, tex: string);
14
+ }
15
+ //# sourceMappingURL=functionNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functionNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/functionNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEzC,oBAAY,YAAY;IACtB,QAAQ,IAAA;IACR,IAAI,IAAA;IACJ,GAAG,IAAA;IACH,GAAG,IAAA;CACJ;AAED,8BAAsB,YAAY;IAChC,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,IAAI,CAAC;IACZ,IAAI,WAAqB;IACzB,GAAG,EAAE,MAAM,CAAC;gBACA,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM;CAKvD"}
@@ -0,0 +1,8 @@
1
+ import { Node } from '../node';
2
+ import { FunctionNode } from './functionNode';
3
+ export declare class OppositeNode extends FunctionNode implements Node {
4
+ constructor(child: Node);
5
+ toMathString(): string;
6
+ toTex(): string;
7
+ }
8
+ //# sourceMappingURL=oppositeNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oppositeNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/oppositeNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAE5D,qBAAa,YAAa,SAAQ,YAAa,YAAW,IAAI;gBAChD,KAAK,EAAE,IAAI;IAGvB,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;CAUhB"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=sinNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sinNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/sinNode.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { Node, NodeType } from '../node';
2
+ import { FunctionNode } from './functionNode';
3
+ export declare class SqrtNode extends FunctionNode implements Node {
4
+ type: NodeType;
5
+ constructor(child: Node);
6
+ toMathString(): string;
7
+ toTex(): string;
8
+ }
9
+ //# sourceMappingURL=sqrtNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqrtNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/sqrtNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAE5D,qBAAa,QAAS,SAAQ,YAAa,YAAW,IAAI;IACxD,IAAI,EAAE,QAAQ,CAAqB;gBACvB,KAAK,EAAE,IAAI;IAGvB,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;CAGhB"}
@@ -0,0 +1,13 @@
1
+ export declare enum NodeType {
2
+ number = 0,
3
+ constant = 1,
4
+ variable = 2,
5
+ operator = 3,
6
+ function = 4
7
+ }
8
+ export interface Node {
9
+ type: NodeType;
10
+ toMathString: () => string;
11
+ toTex: () => string;
12
+ }
13
+ //# sourceMappingURL=node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/tree/nodes/node.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,MAAM,IAAA;IACN,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,QAAQ,IAAA;CACT;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,MAAM,CAAC;CAErB"}
@@ -0,0 +1,10 @@
1
+ import { Node, NodeType } from '../node';
2
+ export declare class ConstantNode implements Node {
3
+ tex: string;
4
+ mathString: string;
5
+ type: NodeType;
6
+ constructor(tex: string, mathString: string);
7
+ toMathString(): string;
8
+ toTex(): string;
9
+ }
10
+ //# sourceMappingURL=constantNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constantNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/numbers/constantNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,YAAa,YAAW,IAAI;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAqB;gBAEvB,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAK3C,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;CAGhB"}
@@ -0,0 +1,11 @@
1
+ import { Node, NodeType } from '../node';
2
+ export declare class NumberNode implements Node {
3
+ tex: string;
4
+ mathString: string;
5
+ value: number;
6
+ type: NodeType;
7
+ constructor(value: number, tex?: string, mathString?: string);
8
+ toMathString(): string;
9
+ toTex(): string;
10
+ }
11
+ //# sourceMappingURL=numberNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"numberNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/numbers/numberNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,UAAW,YAAW,IAAI;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAmB;gBAErB,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;IAM5D,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;CAMhB"}
@@ -0,0 +1,3 @@
1
+ import { ConstantNode } from './constantNode';
2
+ export declare const PiNode: ConstantNode;
3
+ //# sourceMappingURL=piNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"piNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/numbers/piNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,eAAO,MAAM,MAAM,cAAiC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Node } from '../node';
2
+ import { OperatorNode } from './operatorNode';
3
+ export declare class AddNode extends OperatorNode implements Node {
4
+ constructor(leftChild: Node, rightChild: Node);
5
+ toMathString(): string;
6
+ toTex(): string;
7
+ }
8
+ //# sourceMappingURL=addNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/addNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AACzC,OAAO,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3D,qBAAa,OAAQ,SAAQ,YAAa,YAAW,IAAI;gBAC3C,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;IAK7C,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;CAIhB"}
@@ -0,0 +1,12 @@
1
+ import { Node } from '../node';
2
+ import { OperatorNode } from './operatorNode';
3
+ export declare class DivideNode extends OperatorNode implements Node {
4
+ /**
5
+ * @param leftChild num
6
+ * @param rightChild denum
7
+ */
8
+ constructor(leftChild: Node, rightChild: Node);
9
+ toMathString(): string;
10
+ toTex(): string;
11
+ }
12
+ //# sourceMappingURL=divideNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divideNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/divideNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AACzC,OAAO,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3D,qBAAa,UAAW,SAAQ,YAAa,YAAW,IAAI;IAC1D;;;OAGG;gBACS,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;IAI7C,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;CAqBhB"}
@@ -0,0 +1,8 @@
1
+ import { Node } from '../node';
2
+ import { OperatorNode } from './operatorNode';
3
+ export declare class EqualNode extends OperatorNode implements Node {
4
+ constructor(leftChild: Node, rightChild: Node);
5
+ toMathString(): string;
6
+ toTex(): string;
7
+ }
8
+ //# sourceMappingURL=equalNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equalNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/equalNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AACzC,OAAO,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3D,qBAAa,SAAU,SAAQ,YAAa,YAAW,IAAI;gBAC7C,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;IAG7C,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;CAGhB"}
@@ -0,0 +1,12 @@
1
+ import { Node } from '../node';
2
+ import { OperatorNode } from './operatorNode';
3
+ export declare class FractionNode extends OperatorNode implements Node {
4
+ /**
5
+ * @param leftChild num
6
+ * @param rightChild denum
7
+ */
8
+ constructor(leftChild: Node, rightChild: Node);
9
+ toMathString(): string;
10
+ toTex(): string;
11
+ }
12
+ //# sourceMappingURL=fractionNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fractionNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/fractionNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AACzC,OAAO,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3D,qBAAa,YAAa,SAAQ,YAAa,YAAW,IAAI;IAC5D;;;OAGG;gBACS,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;IAI7C,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;CAGhB"}
@@ -0,0 +1,8 @@
1
+ import { Node } from '../node';
2
+ import { OperatorNode } from './operatorNode';
3
+ export declare class MultiplyNode extends OperatorNode implements Node {
4
+ constructor(leftChild: Node, rightChild: Node);
5
+ toMathString(): string;
6
+ toTex(): string;
7
+ }
8
+ //# sourceMappingURL=multiplyNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multiplyNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/multiplyNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AACzC,OAAO,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3D,qBAAa,YAAa,SAAQ,YAAa,YAAW,IAAI;gBAChD,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;IAY7C,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;CA6BhB"}
@@ -0,0 +1,22 @@
1
+ import { Node, NodeType } from '../node';
2
+ export declare enum OperatorIds {
3
+ add = 0,
4
+ substract = 1,
5
+ multiply = 2,
6
+ fraction = 3,
7
+ divide = 4,
8
+ power = 5,
9
+ equal = 6
10
+ }
11
+ export declare abstract class OperatorNode {
12
+ id: OperatorIds;
13
+ leftChild: Node;
14
+ rightChild: Node;
15
+ isCommutative: boolean;
16
+ type: NodeType;
17
+ tex: string;
18
+ constructor(id: OperatorIds, leftChild: Node, rightChild: Node, isCommutative: boolean, tex: string);
19
+ /**shuffles in place */
20
+ shuffle(): void;
21
+ }
22
+ //# sourceMappingURL=operatorNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operatorNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/operatorNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEzC,oBAAY,WAAW;IACrB,GAAG,IAAA;IACH,SAAS,IAAA;IACT,QAAQ,IAAA;IACR,QAAQ,IAAA;IACR,MAAM,IAAA;IACN,KAAK,IAAA;IACL,KAAK,IAAA;CACN;AAED,8BAAsB,YAAY;IAChC,EAAE,EAAE,WAAW,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,WAAqB;IACzB,GAAG,EAAE,MAAM,CAAC;gBACA,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM;IAQnG,uBAAuB;IACvB,OAAO,IAAI,IAAI;CAMhB"}
@@ -0,0 +1,8 @@
1
+ import { Node } from '../node';
2
+ import { OperatorNode } from './operatorNode';
3
+ export declare class PowerNode extends OperatorNode implements Node {
4
+ constructor(leftChild: Node, rightChild: Node);
5
+ toMathString(): string;
6
+ toTex(): string;
7
+ }
8
+ //# sourceMappingURL=powerNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"powerNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/powerNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AACzC,OAAO,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3D,qBAAa,SAAU,SAAQ,YAAa,YAAW,IAAI;gBAC7C,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;IAI7C,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;CAkBhB"}
@@ -0,0 +1,8 @@
1
+ import { Node } from '../node';
2
+ import { OperatorNode } from './operatorNode';
3
+ export declare class SubstractNode extends OperatorNode implements Node {
4
+ constructor(leftChild: Node, rightChild: Node);
5
+ toMathString(): string;
6
+ toTex(): string;
7
+ }
8
+ //# sourceMappingURL=substractNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"substractNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/operators/substractNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,SAAS,CAAC;AACzC,OAAO,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE3D,qBAAa,aAAc,SAAQ,YAAa,YAAW,IAAI;gBACjD,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;IAG7C,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;CAahB"}
@@ -0,0 +1,9 @@
1
+ import { Node, NodeType } from '../node';
2
+ export declare class VariableNode implements Node {
3
+ name: string;
4
+ type: NodeType;
5
+ constructor(name: string);
6
+ toTex(): string;
7
+ toMathString(): string;
8
+ }
9
+ //# sourceMappingURL=variableNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variableNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/variables/variableNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEzC,qBAAa,YAAa,YAAW,IAAI;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,WAAqB;gBAEb,IAAI,EAAE,MAAM;IAKxB,KAAK,IAAI,MAAM;IAGf,YAAY,IAAI,MAAM;CAMvB"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=derivateParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"derivateParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/derivateParser.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { Node } from '../nodes/node';
2
+ export declare const simplifyNode: (node: Node) => Node;
3
+ //# sourceMappingURL=simplify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simplify.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/simplify.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAqBrC,eAAO,MAAM,YAAY,SAAU,IAAI,KAAG,IAEzC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function arrayEqual<T>(arr1: T[], arr2: T[]): boolean;
2
+ //# sourceMappingURL=arrayEqual.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrayEqual.d.ts","sourceRoot":"","sources":["../../src/utils/arrayEqual.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,OAAO,CAO3D"}
@@ -0,0 +1,2 @@
1
+ export declare const coinFlip: () => Boolean;
2
+ //# sourceMappingURL=coinFlip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coinFlip.d.ts","sourceRoot":"","sources":["../../src/utils/coinFlip.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,QAAO,OAE3B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function random<t>(array: t[]): t;
2
+ //# sourceMappingURL=random.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"random.d.ts","sourceRoot":"","sources":["../../src/utils/random.ts"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAEnC"}
@@ -0,0 +1,2 @@
1
+ export declare function shuffle<T>(array: T[]): T[];
2
+ //# sourceMappingURL=shuffle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shuffle.d.ts","sourceRoot":"","sources":["../../src/utils/shuffle.ts"],"names":[],"mappings":"AACA,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAS1C"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "math-exercises",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "Math exercises generator for middle school and high school",
5
- "main": "src/index.js",
5
+ "main": "lib/index.js",
6
6
  "files": [
7
7
  "lib/**/*"
8
8
  ],
@@ -11,7 +11,7 @@
11
11
  "start": "ts-node -r tsconfig-paths/register src/index.ts",
12
12
  "test": "echo \"Error: no test specified\" && exit 1",
13
13
  "start:dev": "nodemon",
14
- "build": "tsc",
14
+ "build": "tsc && tsc-alias",
15
15
  "prepublish": "tsc"
16
16
  },
17
17
  "keywords": [],
@@ -22,6 +22,8 @@
22
22
  "nodemon": "^2.0.20",
23
23
  "prettier": "^2.8.4",
24
24
  "ts-node": "^10.9.1",
25
+ "tsc-alias": "^1.8.2",
26
+ "tsconfig-paths": "^4.1.2",
25
27
  "tslint": "^6.1.3",
26
28
  "tslint-config-prettier": "^1.18.0",
27
29
  "typescript": "^4.9.3"
@@ -35,11 +37,7 @@
35
37
  },
36
38
  "homepage": "https://github.com/krirkrirk/math-exercises#readme",
37
39
  "dependencies": {
38
- "mathjs": "^11.5.1",
39
- "tsconfig-paths": "^4.1.2"
40
- },
41
- "imports": {
42
- "#root/*": "./lib/*"
40
+ "mathjs": "^11.5.1"
43
41
  },
44
42
  "exports": {
45
43
  ".": "./lib/index.js"