math-exercises 2.2.9 → 2.2.11

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 (293) hide show
  1. package/lib/exercises/exercise.d.ts +2 -1
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +24 -7
  5. package/lib/exercises/math/calcul/decimals/index.d.ts +3 -0
  6. package/lib/exercises/math/calcul/decimals/index.d.ts.map +1 -0
  7. package/lib/exercises/math/calcul/decimals/index.js +18 -0
  8. package/lib/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.d.ts +8 -0
  9. package/lib/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.d.ts.map +1 -0
  10. package/lib/exercises/math/calcul/decimals/multiplyDecimalByNegativeTens.js +53 -0
  11. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.d.ts +9 -0
  12. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.d.ts.map +1 -0
  13. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.js +63 -0
  14. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
  15. package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +33 -1
  16. package/lib/exercises/math/calcul/index.d.ts +2 -0
  17. package/lib/exercises/math/calcul/index.d.ts.map +1 -1
  18. package/lib/exercises/math/calcul/index.js +2 -0
  19. package/lib/exercises/math/calcul/operations/expressionNature.d.ts +8 -0
  20. package/lib/exercises/math/calcul/operations/expressionNature.d.ts.map +1 -1
  21. package/lib/exercises/math/calcul/operations/expressionNature.js +180 -80
  22. package/lib/exercises/math/calcul/operations/index.d.ts +3 -0
  23. package/lib/exercises/math/calcul/operations/index.d.ts.map +1 -1
  24. package/lib/exercises/math/calcul/operations/index.js +3 -0
  25. package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts +1 -1
  26. package/lib/exercises/math/calcul/operations/operationsPriorities.d.ts.map +1 -1
  27. package/lib/exercises/math/calcul/operations/operationsPriorities.js +20 -5
  28. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.d.ts +8 -0
  29. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.d.ts.map +1 -0
  30. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.js +111 -0
  31. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.d.ts +8 -0
  32. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.d.ts.map +1 -0
  33. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.js +127 -0
  34. package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -1
  35. package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.js +18 -1
  36. package/lib/exercises/math/calcul/ordering/decimalOrdering.d.ts +9 -0
  37. package/lib/exercises/math/calcul/ordering/decimalOrdering.d.ts.map +1 -0
  38. package/lib/exercises/math/calcul/ordering/decimalOrdering.js +77 -0
  39. package/lib/exercises/math/calcul/ordering/framing.d.ts +10 -0
  40. package/lib/exercises/math/calcul/ordering/framing.d.ts.map +1 -0
  41. package/lib/exercises/math/calcul/ordering/framing.js +143 -0
  42. package/lib/exercises/math/calcul/ordering/index.d.ts +4 -0
  43. package/lib/exercises/math/calcul/ordering/index.d.ts.map +1 -0
  44. package/lib/exercises/math/calcul/ordering/index.js +19 -0
  45. package/lib/exercises/math/calcul/ordering/integerOrdering.d.ts +8 -0
  46. package/lib/exercises/math/calcul/ordering/integerOrdering.d.ts.map +1 -0
  47. package/lib/exercises/math/calcul/ordering/integerOrdering.js +61 -0
  48. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
  49. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
  50. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
  51. package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
  52. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
  53. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
  54. package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
  55. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
  56. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  57. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.d.ts.map +1 -1
  58. package/lib/exercises/math/derivation/derivative/powerFunctionDerivative.js +1 -1
  59. package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +1 -1
  60. package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
  61. package/lib/exercises/math/functions/basics/graphicInequation.js +9 -6
  62. package/lib/exercises/math/functions/basics/twoFunctionsInequation.d.ts.map +1 -1
  63. package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +15 -4
  64. package/lib/exercises/math/functions/trinoms/canonicalFromDevForm.d.ts.map +1 -1
  65. package/lib/exercises/math/geometry/cartesian/directionVector.d.ts.map +1 -1
  66. package/lib/exercises/math/geometry/cartesian/directionVectorEquation.d.ts.map +1 -1
  67. package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
  68. package/lib/exercises/math/geometry/cartesian/placeAPoint.js +0 -4
  69. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.d.ts.map +1 -1
  70. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +2 -3
  71. package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts.map +1 -1
  72. package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.js +17 -0
  73. package/lib/exercises/math/geometry/volumes/volumeOfCube.d.ts.map +1 -1
  74. package/lib/exercises/math/geometry/volumes/volumeOfCube.js +7 -1
  75. package/lib/exercises/math/index.d.ts +0 -1
  76. package/lib/exercises/math/index.d.ts.map +1 -1
  77. package/lib/exercises/math/index.js +0 -1
  78. package/lib/exercises/math/limits/rationalFracForbiddenValueLimit.d.ts.map +1 -1
  79. package/lib/exercises/math/percent/htToTTC.d.ts +8 -0
  80. package/lib/exercises/math/percent/htToTTC.d.ts.map +1 -0
  81. package/lib/exercises/math/percent/htToTTC.js +50 -0
  82. package/lib/exercises/math/percent/index.d.ts +2 -0
  83. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  84. package/lib/exercises/math/percent/index.js +2 -0
  85. package/lib/exercises/math/percent/ttcToHT.d.ts +8 -0
  86. package/lib/exercises/math/percent/ttcToHT.d.ts.map +1 -0
  87. package/lib/exercises/math/percent/ttcToHT.js +50 -0
  88. package/lib/exercises/math/powers/powersDivision.d.ts.map +1 -1
  89. package/lib/exercises/math/powers/powersDivision.js +35 -2
  90. package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.d.ts.map +1 -1
  91. package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.js +21 -0
  92. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +1 -1
  93. package/lib/exercises/math/probaStat/stats1var/averageList.d.ts +7 -0
  94. package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -0
  95. package/lib/exercises/math/probaStat/stats1var/averageList.js +52 -0
  96. package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts +7 -0
  97. package/lib/exercises/math/probaStat/stats1var/etendueList.d.ts.map +1 -0
  98. package/lib/exercises/math/probaStat/stats1var/etendueList.js +49 -0
  99. package/lib/exercises/math/probaStat/stats1var/index.d.ts +2 -0
  100. package/lib/exercises/math/probaStat/stats1var/index.d.ts.map +1 -1
  101. package/lib/exercises/math/probaStat/stats1var/index.js +2 -0
  102. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
  103. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +2 -11
  104. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.d.ts.map +1 -1
  105. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +42 -0
  106. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.d.ts.map +1 -1
  107. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +7 -2
  108. package/lib/exercises/math/sequences/geometric/geometricFindTerm.d.ts.map +1 -1
  109. package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +42 -0
  110. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts +10 -0
  111. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.d.ts.map +1 -0
  112. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +56 -0
  113. package/lib/exercises/math/sequences/geometric/index.d.ts +1 -0
  114. package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
  115. package/lib/exercises/math/sequences/geometric/index.js +1 -0
  116. package/lib/exercises/math/sequences/index.d.ts +2 -0
  117. package/lib/exercises/math/sequences/index.d.ts.map +1 -1
  118. package/lib/exercises/math/sequences/index.js +2 -0
  119. package/lib/exercises/math/sequences/sequenceEvaluation.d.ts +10 -0
  120. package/lib/exercises/math/sequences/sequenceEvaluation.d.ts.map +1 -0
  121. package/lib/exercises/math/sequences/sequenceEvaluation.js +143 -0
  122. package/lib/exercises/math/sequences/sequencePlot.d.ts +9 -0
  123. package/lib/exercises/math/sequences/sequencePlot.d.ts.map +1 -0
  124. package/lib/exercises/math/sequences/sequencePlot.js +94 -0
  125. package/lib/exercises/math/sets/intervals/intervalsIntersection.d.ts.map +1 -1
  126. package/lib/exercises/math/sets/intervals/intervalsIntersection.js +19 -1
  127. package/lib/exercises/math/sets/intervals/intervalsUnion.js +1 -1
  128. package/lib/exercises/math/trigonometry/arcValue.d.ts.map +1 -1
  129. package/lib/exercises/math/trigonometry/arcValue.js +23 -0
  130. package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +1 -1
  131. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +1 -1
  132. package/lib/exercises/pc/motion/typeOfAcceleration.js +1 -1
  133. package/lib/exercises/pc/motion/typeOfMovement.js +1 -1
  134. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +1 -1
  135. package/lib/index.d.ts +54 -10
  136. package/lib/index.d.ts.map +1 -1
  137. package/lib/math/geometry/point.d.ts +11 -0
  138. package/lib/math/geometry/point.d.ts.map +1 -1
  139. package/lib/math/geometry/point.js +8 -0
  140. package/lib/math/numbers/decimals/decimal.d.ts +2 -0
  141. package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
  142. package/lib/math/numbers/decimals/decimal.js +18 -0
  143. package/lib/math/numbers/reals/extendedRingElement.d.ts +3 -1
  144. package/lib/math/numbers/reals/extendedRingElement.d.ts.map +1 -1
  145. package/lib/math/numbers/reals/real.d.ts +1 -1
  146. package/lib/math/polynomials/trinom.d.ts +1 -1
  147. package/lib/math/sets/intervals/intervals.d.ts +3 -1
  148. package/lib/math/sets/intervals/intervals.d.ts.map +1 -1
  149. package/lib/math/sets/intervals/intervals.js +9 -5
  150. package/lib/math/sets/mathSet.d.ts +2 -2
  151. package/lib/math/sets/mathSet.d.ts.map +1 -1
  152. package/lib/math/sets/mathSetInterface.d.ts +1 -1
  153. package/lib/playground.d.ts.map +1 -1
  154. package/lib/playground.js +13 -2
  155. package/lib/server.d.ts.map +1 -1
  156. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  157. package/lib/tree/nodes/algebraicNode.js +0 -3
  158. package/lib/tree/nodes/complex/complexNode.d.ts +10 -1
  159. package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -1
  160. package/lib/tree/nodes/complex/complexNode.js +7 -0
  161. package/lib/tree/nodes/equations/equalNode.d.ts +10 -1
  162. package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
  163. package/lib/tree/nodes/equations/equalNode.js +7 -0
  164. package/lib/tree/nodes/equations/equationSolutionNode.d.ts +10 -1
  165. package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
  166. package/lib/tree/nodes/equations/equationSolutionNode.js +6 -0
  167. package/lib/tree/nodes/equations/multiEqualNode.d.ts +7 -1
  168. package/lib/tree/nodes/equations/multiEqualNode.d.ts.map +1 -1
  169. package/lib/tree/nodes/equations/multiEqualNode.js +6 -0
  170. package/lib/tree/nodes/functions/absNode.d.ts +7 -1
  171. package/lib/tree/nodes/functions/absNode.d.ts.map +1 -1
  172. package/lib/tree/nodes/functions/absNode.js +6 -0
  173. package/lib/tree/nodes/functions/arcSinNode.d.ts +7 -1
  174. package/lib/tree/nodes/functions/arcSinNode.d.ts.map +1 -1
  175. package/lib/tree/nodes/functions/arcSinNode.js +8 -1
  176. package/lib/tree/nodes/functions/arccosNode.d.ts +7 -1
  177. package/lib/tree/nodes/functions/arccosNode.d.ts.map +1 -1
  178. package/lib/tree/nodes/functions/arccosNode.js +8 -1
  179. package/lib/tree/nodes/functions/arctanNode.d.ts +7 -1
  180. package/lib/tree/nodes/functions/arctanNode.d.ts.map +1 -1
  181. package/lib/tree/nodes/functions/arctanNode.js +8 -1
  182. package/lib/tree/nodes/functions/cosNode.d.ts +7 -1
  183. package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
  184. package/lib/tree/nodes/functions/cosNode.js +8 -1
  185. package/lib/tree/nodes/functions/expNode.d.ts +7 -1
  186. package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
  187. package/lib/tree/nodes/functions/expNode.js +6 -0
  188. package/lib/tree/nodes/functions/integralNode.d.ts +19 -2
  189. package/lib/tree/nodes/functions/integralNode.d.ts.map +1 -1
  190. package/lib/tree/nodes/functions/integralNode.js +20 -0
  191. package/lib/tree/nodes/functions/log10Node.d.ts +7 -1
  192. package/lib/tree/nodes/functions/log10Node.d.ts.map +1 -1
  193. package/lib/tree/nodes/functions/log10Node.js +6 -0
  194. package/lib/tree/nodes/functions/logNode.d.ts +7 -1
  195. package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
  196. package/lib/tree/nodes/functions/logNode.js +6 -0
  197. package/lib/tree/nodes/functions/oppositeNode.d.ts +7 -1
  198. package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
  199. package/lib/tree/nodes/functions/oppositeNode.js +6 -0
  200. package/lib/tree/nodes/functions/sinNode.d.ts +7 -1
  201. package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
  202. package/lib/tree/nodes/functions/sinNode.js +8 -1
  203. package/lib/tree/nodes/functions/sqrtNode.d.ts +7 -1
  204. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
  205. package/lib/tree/nodes/functions/sqrtNode.js +6 -0
  206. package/lib/tree/nodes/functions/tanNode.d.ts +7 -1
  207. package/lib/tree/nodes/functions/tanNode.d.ts.map +1 -1
  208. package/lib/tree/nodes/functions/tanNode.js +8 -1
  209. package/lib/tree/nodes/geometry/degree.d.ts +5 -1
  210. package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
  211. package/lib/tree/nodes/geometry/degree.js +6 -0
  212. package/lib/tree/nodes/geometry/lengthNode.d.ts +5 -1
  213. package/lib/tree/nodes/geometry/lengthNode.d.ts.map +1 -1
  214. package/lib/tree/nodes/geometry/lengthNode.js +6 -0
  215. package/lib/tree/nodes/geometry/pointNode.d.ts +14 -1
  216. package/lib/tree/nodes/geometry/pointNode.d.ts.map +1 -1
  217. package/lib/tree/nodes/geometry/pointNode.js +6 -0
  218. package/lib/tree/nodes/geometry/vectorNode.d.ts +5 -1
  219. package/lib/tree/nodes/geometry/vectorNode.d.ts.map +1 -1
  220. package/lib/tree/nodes/geometry/vectorNode.js +6 -0
  221. package/lib/tree/nodes/hasVariableNode.d.ts +3 -0
  222. package/lib/tree/nodes/hasVariableNode.d.ts.map +1 -0
  223. package/lib/tree/nodes/hasVariableNode.js +16 -0
  224. package/lib/tree/nodes/inequations/inequationNode.d.ts +8 -1
  225. package/lib/tree/nodes/inequations/inequationNode.d.ts.map +1 -1
  226. package/lib/tree/nodes/inequations/inequationNode.js +7 -0
  227. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +19 -1
  228. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts.map +1 -1
  229. package/lib/tree/nodes/inequations/inequationSolutionNode.js +7 -1
  230. package/lib/tree/nodes/node.d.ts +52 -8
  231. package/lib/tree/nodes/node.d.ts.map +1 -1
  232. package/lib/tree/nodes/node.js +49 -21
  233. package/lib/tree/nodes/nodeConstructor.d.ts +7 -0
  234. package/lib/tree/nodes/nodeConstructor.d.ts.map +1 -0
  235. package/lib/tree/nodes/nodeConstructor.js +170 -0
  236. package/lib/tree/nodes/numbers/constantNode.d.ts +7 -1
  237. package/lib/tree/nodes/numbers/constantNode.d.ts.map +1 -1
  238. package/lib/tree/nodes/numbers/constantNode.js +9 -1
  239. package/lib/tree/nodes/numbers/numberNode.d.ts +5 -1
  240. package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
  241. package/lib/tree/nodes/numbers/numberNode.js +6 -0
  242. package/lib/tree/nodes/numbers/percentNode.d.ts +5 -1
  243. package/lib/tree/nodes/numbers/percentNode.d.ts.map +1 -1
  244. package/lib/tree/nodes/numbers/percentNode.js +6 -0
  245. package/lib/tree/nodes/operators/addNode.d.ts +10 -1
  246. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  247. package/lib/tree/nodes/operators/addNode.js +16 -6
  248. package/lib/tree/nodes/operators/divideNode.d.ts +11 -1
  249. package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
  250. package/lib/tree/nodes/operators/divideNode.js +12 -0
  251. package/lib/tree/nodes/operators/fractionNode.d.ts +10 -1
  252. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  253. package/lib/tree/nodes/operators/fractionNode.js +7 -0
  254. package/lib/tree/nodes/operators/limitNode.d.ts +11 -1
  255. package/lib/tree/nodes/operators/limitNode.d.ts.map +1 -1
  256. package/lib/tree/nodes/operators/limitNode.js +8 -0
  257. package/lib/tree/nodes/operators/multiplyNode.d.ts +10 -1
  258. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  259. package/lib/tree/nodes/operators/multiplyNode.js +7 -0
  260. package/lib/tree/nodes/operators/powerNode.d.ts +10 -1
  261. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
  262. package/lib/tree/nodes/operators/powerNode.js +7 -0
  263. package/lib/tree/nodes/operators/substractNode.d.ts +11 -1
  264. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
  265. package/lib/tree/nodes/operators/substractNode.js +12 -0
  266. package/lib/tree/nodes/sets/belongsNode.d.ts +10 -1
  267. package/lib/tree/nodes/sets/belongsNode.d.ts.map +1 -1
  268. package/lib/tree/nodes/sets/belongsNode.js +7 -0
  269. package/lib/tree/nodes/sets/closure.d.ts +2 -0
  270. package/lib/tree/nodes/sets/closure.d.ts.map +1 -1
  271. package/lib/tree/nodes/sets/closure.js +20 -0
  272. package/lib/tree/nodes/sets/discreteSetNode.d.ts +10 -2
  273. package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
  274. package/lib/tree/nodes/sets/discreteSetNode.js +13 -3
  275. package/lib/tree/nodes/sets/intervalNode.d.ts +14 -2
  276. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
  277. package/lib/tree/nodes/sets/intervalNode.js +22 -1
  278. package/lib/tree/nodes/sets/setNode.d.ts +1 -0
  279. package/lib/tree/nodes/sets/setNode.d.ts.map +1 -1
  280. package/lib/tree/nodes/sets/unionIntervalNode.d.ts +7 -1
  281. package/lib/tree/nodes/sets/unionIntervalNode.d.ts.map +1 -1
  282. package/lib/tree/nodes/sets/unionIntervalNode.js +7 -1
  283. package/lib/tree/nodes/variables/variableNode.d.ts +5 -1
  284. package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
  285. package/lib/tree/nodes/variables/variableNode.js +6 -0
  286. package/lib/tree/utilities/operatorComposition.js +4 -2
  287. package/lib/types/keyProps.d.ts +13 -0
  288. package/lib/types/keyProps.d.ts.map +1 -0
  289. package/lib/types/keyProps.js +2 -0
  290. package/lib/utils/alignTex.js +11 -9
  291. package/lib/utils/diceFlip.d.ts.map +1 -1
  292. package/lib/utils/diceFlip.js +2 -6
  293. package/package.json +1 -1
@@ -112,6 +112,6 @@ exports.recognizeRefractionOrReflectionAngles = {
112
112
  qcmTimer: 60,
113
113
  freeTimer: 60,
114
114
  getPropositions,
115
- answerType: "QCM",
115
+ answerType: "QCU",
116
116
  subject: "Physique",
117
117
  };
package/lib/index.d.ts CHANGED
@@ -129,7 +129,7 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
129
129
  a: number;
130
130
  b: number;
131
131
  c: number;
132
- d: number;
132
+ d: number | undefined;
133
133
  }> | import("./exercises/exercise").Exercise<{
134
134
  type: number;
135
135
  flip: number;
@@ -137,6 +137,16 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
137
137
  b: number;
138
138
  c: number;
139
139
  d: number;
140
+ }> | import("./exercises/exercise").Exercise<{
141
+ nodeIds: any;
142
+ type: number;
143
+ subType: number;
144
+ }> | import("./exercises/exercise").Exercise<{
145
+ nodeIds: any;
146
+ type: number;
147
+ }> | import("./exercises/exercise").Exercise<{
148
+ nodeIds: any;
149
+ type: number;
140
150
  }> | import("./exercises/exercise").Exercise<{
141
151
  randQuation: number;
142
152
  x1: string | number;
@@ -173,6 +183,25 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
173
183
  }> | import("./exercises/exercise").Exercise<{
174
184
  a: number;
175
185
  b: number;
186
+ }> | import("./exercises/exercise").Exercise<{
187
+ type: number;
188
+ a: number;
189
+ b: number;
190
+ }> | import("./exercises/exercise").Exercise<{
191
+ type: number;
192
+ nbIds: any;
193
+ nbValue: number;
194
+ pow: number;
195
+ }> | import("./exercises/exercise").Exercise<{
196
+ dec: number;
197
+ pow: number;
198
+ isDivide: boolean;
199
+ }> | import("./exercises/exercise").Exercise<{
200
+ dec: number;
201
+ pow: number;
202
+ }> | import("./exercises/exercise").Exercise<{
203
+ a: number;
204
+ b: number;
176
205
  }> | import("./exercises/exercise").Exercise<{
177
206
  a: number;
178
207
  b: number;
@@ -1070,6 +1099,12 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
1070
1099
  lefties: number;
1071
1100
  }> | import("./exercises/exercise").Exercise<{}> | import("./exercises/exercise").Exercise<{
1072
1101
  evolution: number;
1102
+ }> | import("./exercises/exercise").Exercise<{
1103
+ TVA: number;
1104
+ ht: number;
1105
+ }> | import("./exercises/exercise").Exercise<{
1106
+ TTC: number;
1107
+ TVA: number;
1073
1108
  }> | import("./exercises/exercise").Exercise<{
1074
1109
  int: number;
1075
1110
  power: number;
@@ -1162,6 +1197,10 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
1162
1197
  }> | import("./exercises/exercise").Exercise<{
1163
1198
  randomValues: number[];
1164
1199
  randomQuartile: number;
1200
+ }> | import("./exercises/exercise").Exercise<{
1201
+ sortedValues: number[];
1202
+ }> | import("./exercises/exercise").Exercise<{
1203
+ sortedValues: number[];
1165
1204
  }> | import("./exercises/exercise").Exercise<{
1166
1205
  xValues: number[];
1167
1206
  yValues: number[];
@@ -1300,6 +1339,11 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
1300
1339
  }> | import("./exercises/exercise").Exercise<{
1301
1340
  sequence: number[];
1302
1341
  reason: number;
1342
+ }> | import("./exercises/exercise").Exercise<{
1343
+ firstRank: number;
1344
+ firstValue: number;
1345
+ reason: number;
1346
+ nbTerms: number;
1303
1347
  }> | import("./exercises/exercise").Exercise<{
1304
1348
  rank: number;
1305
1349
  coeffs: number[];
@@ -1309,6 +1353,15 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
1309
1353
  rank: number;
1310
1354
  u0: number;
1311
1355
  coeffs: number[];
1356
+ }> | import("./exercises/exercise").Exercise<{
1357
+ termeid: number;
1358
+ affine: number[];
1359
+ termeAdd: number;
1360
+ termeMult: number;
1361
+ }> | import("./exercises/exercise").Exercise<{
1362
+ nValue: number;
1363
+ points: number[][];
1364
+ isArithmetic: boolean;
1312
1365
  }> | import("./exercises/exercise").Exercise<{
1313
1366
  intervalMin: string | number;
1314
1367
  intervalMax: string | number;
@@ -1436,15 +1489,6 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
1436
1489
  n: number;
1437
1490
  p: number;
1438
1491
  };
1439
- }> | import("./exercises/exercise").Exercise<{
1440
- termeid: number;
1441
- affine: number[];
1442
- termeAdd: number;
1443
- termeMult: number;
1444
- }> | import("./exercises/exercise").Exercise<{
1445
- nValue: number;
1446
- points: number[][];
1447
- isArithmetic: boolean;
1448
1492
  }>)[];
1449
1493
  declare const pcExercises: (import("./exercises/exercise").Exercise<{
1450
1494
  numbers: number[];
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAI3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,SAAS,EAAE,MAAM,MAAM,CAAC;QACxB,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,aAAa,CAAC;KACpD;IACD,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,WAAW,EAAE,MAAM,MAAM,CAAC;KAC3B;CACF;AAmBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BE;AAEF,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,EAAE,WAAW,EAAE,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { NodeIds } from "../../tree/nodes/node";
1
2
  import { AlgebraicNode } from "../../tree/nodes/algebraicNode";
2
3
  export declare abstract class PointConstructor {
3
4
  static random(name: string): Point;
@@ -9,6 +10,16 @@ export declare class Point {
9
10
  y: AlgebraicNode;
10
11
  constructor(name: string, x: AlgebraicNode, y: AlgebraicNode);
11
12
  toTex(): string;
13
+ toIdentifiers(): {
14
+ id: string;
15
+ name: string;
16
+ x: {
17
+ id: NodeIds;
18
+ } & Record<string, any>;
19
+ y: {
20
+ id: NodeIds;
21
+ } & Record<string, any>;
22
+ };
12
23
  toTexWithCoords(): string;
13
24
  toCoords(): string;
14
25
  getXnumber(): number;
@@ -1 +1 @@
1
- {"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/point.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAI/D,8BAAsB,gBAAgB;IACpC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK;IAMlC,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE;CAevC;AAED,qBAAa,KAAK;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,aAAa,CAAC;IACjB,CAAC,EAAE,aAAa,CAAC;gBACL,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa;IAM5D,KAAK,IAAI,MAAM;IAIf,eAAe,IAAI,MAAM;IAGzB,QAAQ,IAAI,MAAM;IAIlB,UAAU,IAAI,MAAM;IAMpB,UAAU,IAAI,MAAM;IAMpB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,SAAM,GAAG,KAAK;IAiBrC,UAAU,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM;IAM5B,MAAM,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO;IAGzB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK;IAM5B,YAAY;CAKb"}
1
+ {"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../src/math/geometry/point.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,uBAAuB,CAAC;AAI1D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAI/D,8BAAsB,gBAAgB;IACpC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK;IAMlC,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE;CAevC;AAED,qBAAa,KAAK;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,aAAa,CAAC;IACjB,CAAC,EAAE,aAAa,CAAC;gBACL,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa;IAM5D,KAAK,IAAI,MAAM;IAGf,aAAa;;;;;;;;;;IAQb,eAAe,IAAI,MAAM;IAGzB,QAAQ,IAAI,MAAM;IAIlB,UAAU,IAAI,MAAM;IAMpB,UAAU,IAAI,MAAM;IAMpB,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,SAAM,GAAG,KAAK;IAiBrC,UAAU,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM;IAM5B,MAAM,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO;IAGzB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK;IAM5B,YAAY;CAKb"}
@@ -38,6 +38,14 @@ class Point {
38
38
  toTex() {
39
39
  return `${this.name}`;
40
40
  }
41
+ toIdentifiers() {
42
+ return {
43
+ id: "point",
44
+ name: this.name,
45
+ x: this.x.toIdentifiers(),
46
+ y: this.y.toIdentifiers(),
47
+ };
48
+ }
41
49
  toTexWithCoords() {
42
50
  return `${this.name}\\left(${this.x.toTex()};${this.y.toTex()}\\right)`;
43
51
  }
@@ -32,5 +32,7 @@ export declare class Decimal implements Nombre {
32
32
  toRational(): Rational | import("../integer/integer").Integer;
33
33
  toTree(): NumberNode;
34
34
  toPercentNode(): PercentNode;
35
+ toLowerBound(tenthPower: number): Decimal;
36
+ toUpperBound(tenthPower: number): Decimal;
35
37
  }
36
38
  //# sourceMappingURL=decimal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"decimal.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/decimals/decimal.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAEvE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,eAAO,MAAM,iBAAiB,UAAyC,CAAC;AACxE,8BAAsB,kBAAkB;IACtC,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,GAAE,MAAU,GAAG,MAAM;IAY1E,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO;IAMpE,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO;IAK/D,MAAM,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO;CAMrD;AAED,qBAAa,OAAQ,YAAW,MAAM;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,aAAsB;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;gBACR,KAAK,EAAE,MAAM,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AE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;gBACR,KAAK,EAAE,MAAM,GAAG,MAAM;IASlC,MAAM,CAAC,CAAC,EAAE,MAAM;IAIhB;;;;OAIG;IACH,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAIhC,oBAAoB,CAAC,KAAK,EAAE,MAAM;IAkClC,gBAAgB;IA6BhB,oBAAoB,CAAC,QAAQ,CAAC,EAAE,MAAM;IAwCtC,cAAc,CAAC,IAAI,EAAE,MAAM;IAS3B,UAAU;IAMV,MAAM;IAIN,aAAa;IAIb,YAAY,CAAC,UAAU,EAAE,MAAM;IAS/B,YAAY,CAAC,UAAU,EAAE,MAAM;CAShC"}
@@ -171,5 +171,23 @@ class Decimal {
171
171
  toPercentNode() {
172
172
  return new percentNode_1.PercentNode(this.multiplyByPowerOfTen(2).value);
173
173
  }
174
+ toLowerBound(tenthPower) {
175
+ if (tenthPower > 0)
176
+ throw Error("not implemented : lower bound positive");
177
+ const rounded = (0, round_1.round)(this.value, -tenthPower);
178
+ if (rounded > this.value)
179
+ return new Decimal((0, round_1.round)(rounded - Math.pow(10, tenthPower), -tenthPower));
180
+ else
181
+ return new Decimal(rounded);
182
+ }
183
+ toUpperBound(tenthPower) {
184
+ if (tenthPower > 0)
185
+ throw Error("not implemented : lower bound positive");
186
+ const rounded = (0, round_1.round)(this.value, -tenthPower);
187
+ if (rounded < this.value)
188
+ return new Decimal((0, round_1.round)(rounded + Math.pow(10, tenthPower), -tenthPower));
189
+ else
190
+ return new Decimal(rounded);
191
+ }
174
192
  }
175
193
  exports.Decimal = Decimal;
@@ -1,5 +1,7 @@
1
1
  import { OppositeNode } from '../../../tree/nodes/functions/oppositeNode';
2
2
  import { NumberNode } from '../../../tree/nodes/numbers/numberNode';
3
+ import { AddNode } from '../../../tree/nodes/operators/addNode';
4
+ import { MultiplyNode } from '../../../tree/nodes/operators/multiplyNode';
3
5
  import { SubstractNode } from '../../../tree/nodes/operators/substractNode';
4
6
  import { Nombre } from '../nombre';
5
7
  /**
@@ -11,6 +13,6 @@ export declare class ExtendedRingElement {
11
13
  b: number;
12
14
  algebraicElement: Nombre;
13
15
  constructor(a: number, b: number, algebraicElement: Nombre);
14
- toTree(): import("../../../tree/nodes/algebraicNode").AlgebraicNode | NumberNode | OppositeNode | SubstractNode;
16
+ toTree(): import("../../../tree/nodes/algebraicNode").AlgebraicNode | NumberNode | MultiplyNode | OppositeNode | AddNode | SubstractNode;
15
17
  }
16
18
  //# sourceMappingURL=extendedRingElement.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extendedRingElement.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/reals/extendedRingElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAGjE,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC;;;GAGG;AACH,qBAAa,mBAAmB;IAM9B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,gBAAgB,EAAE,MAAM,CAAC;gBACb,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM;IAM1D,MAAM;CAeP"}
1
+ {"version":3,"file":"extendedRingElement.d.ts","sourceRoot":"","sources":["../../../../src/math/numbers/reals/extendedRingElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC;;;GAGG;AACH,qBAAa,mBAAmB;IAM9B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,gBAAgB,EAAE,MAAM,CAAC;gBACb,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM;IAM1D,MAAM;CAeP"}
@@ -2,7 +2,7 @@ import { AlgebraicNode } from "../../../tree/nodes/algebraicNode";
2
2
  import { SqrtNode } from "../../../tree/nodes/functions/sqrtNode";
3
3
  import { Nombre, NumberType } from "../nombre";
4
4
  export declare abstract class RealConstructor {
5
- static random(): Real;
5
+ static random(): Real | SquareRoot;
6
6
  }
7
7
  export declare class Real implements Nombre {
8
8
  value: number;
@@ -65,7 +65,7 @@ export declare class Trinom extends Polynomial {
65
65
  getAlphaNode(): NumberNode | FractionNode | OppositeNode;
66
66
  getBeta(): number;
67
67
  getBetaNode(): NumberNode | FractionNode | OppositeNode;
68
- getFactorizedForm(): AlgebraicNode;
68
+ getFactorizedForm(): AlgebraicNode | MultiplyNode;
69
69
  getCanonicalForm(): MultiplyNode | AddNode;
70
70
  getSommet(): Point;
71
71
  getCoords(): number[];
@@ -1,6 +1,7 @@
1
1
  import { Nombre } from "../../../math/numbers/nombre";
2
2
  import { AlgebraicNode } from "../../../tree/nodes/algebraicNode";
3
3
  import { ClosureType } from "../../../tree/nodes/sets/closure";
4
+ import { DiscreteSetNode } from "../../../tree/nodes/sets/discreteSetNode";
4
5
  import { IntervalNode } from "../../../tree/nodes/sets/intervalNode";
5
6
  import { MathSet } from "../mathSet";
6
7
  import { MathSetInterface } from "../mathSetInterface";
@@ -21,10 +22,11 @@ export declare class Interval implements MathSetInterface {
21
22
  leftInequalitySymbol: "\\le" | "<";
22
23
  rightInequalitySymbol: "\\le" | "<";
23
24
  tex: string;
25
+ isEmpty: boolean;
24
26
  constructor(min: AlgebraicNode, max: AlgebraicNode, closure: ClosureType);
25
27
  equals(interval: Interval): boolean;
26
28
  union(interval: Interval): MathSet;
27
- intersection(interval: Interval): MathSet;
29
+ intersection(interval: Interval): DiscreteSetNode | IntervalNode;
28
30
  insideToTex(): string;
29
31
  toTex(): string;
30
32
  toInequality(): string;
@@ -1 +1 @@
1
- {"version":3,"file":"intervals.d.ts","sourceRoot":"","sources":["../../../../src/math/sets/intervals/intervals.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAc,MAAM,2BAA2B,CAAC;AAI/D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAM/D,OAAO,EAAW,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAIlE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,8BAAsB,mBAAmB;IACvC,MAAM,CAAC,MAAM;IA2Cb,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE,MAAM;CAWnC;AAED,qBAAa,QAAS,YAAW,gBAAgB;IAC/C,OAAO,EAAE,aAAa,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,WAAW,CAAC;IACrB,WAAW,EAAE,GAAG,GAAG,GAAG,CAAC;IACvB,YAAY,EAAE,GAAG,GAAG,GAAG,CAAC;IACxB,oBAAoB,EAAE,MAAM,GAAG,GAAG,CAAC;IACnC,qBAAqB,EAAE,MAAM,GAAG,GAAG,CAAC;IACpC,GAAG,EAAE,MAAM,CAAC;gBACA,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW;IAiBxE,MAAM,CAAC,QAAQ,EAAE,QA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IACZ,OAAO,EAAE,OAAO,CAAC;gBACL,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW;IAkBxE,MAAM,CAAC,QAAQ,EAAE,QAAQ;IAOzB,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO;IA6ClC,YAAY,CAAC,QAAQ,EAAE,QAAQ;IA0C/B,WAAW,IAAI,MAAM;IAGrB,KAAK,IAAI,MAAM;IAIf,YAAY,IAAI,MAAM;IAmBtB,gBAAgB,IAAI,MAAM;IAI1B,MAAM;CAGP"}
@@ -4,6 +4,7 @@ exports.Interval = exports.IntervalConstructor = void 0;
4
4
  const randint_1 = require("../../../math/utils/random/randint");
5
5
  const infiniteNode_1 = require("../../../tree/nodes/numbers/infiniteNode");
6
6
  const closure_1 = require("../../../tree/nodes/sets/closure");
7
+ const discreteSetNode_1 = require("../../../tree/nodes/sets/discreteSetNode");
7
8
  const intervalNode_1 = require("../../../tree/nodes/sets/intervalNode");
8
9
  const coinFlip_1 = require("../../../utils/coinFlip");
9
10
  const mathSet_1 = require("../mathSet");
@@ -80,6 +81,7 @@ class Interval {
80
81
  this.leftInequalitySymbol = this.leftBracket === "[" ? "\\le" : "<";
81
82
  this.rightInequalitySymbol = this.rightBracket === "]" ? "\\le" : "<";
82
83
  this.tex = this.toTex();
84
+ this.isEmpty = false;
83
85
  }
84
86
  equals(interval) {
85
87
  return (this.min === interval.min &&
@@ -113,7 +115,7 @@ class Interval {
113
115
  interval.rightBracket === "[")) {
114
116
  const firstInterval = this.min < interval.min ? this : interval;
115
117
  const secondInterval = this.min < interval.min ? interval : this;
116
- return new mathSet_1.MathSet(`${unionLeftBracket}\\ ${firstInterval.minTex};${firstInterval.maxTex}\\ ${firstInterval.rightBracket}\\ \\cup\\ ${secondInterval.leftBracket}\\ ${secondInterval.minTex};${secondInterval.maxTex}\\ ${unionRightBracket}\\ `, () => (0, coinFlip_1.coinFlip)()
118
+ return new mathSet_1.MathSet(`${unionLeftBracket}${firstInterval.minTex};${firstInterval.maxTex}${firstInterval.rightBracket}\\cup${secondInterval.leftBracket}${secondInterval.minTex};${secondInterval.maxTex}${unionRightBracket}`, () => (0, coinFlip_1.coinFlip)()
117
119
  ? firstInterval.getRandomElement()
118
120
  : secondInterval.getRandomElement());
119
121
  }
@@ -134,30 +136,32 @@ class Interval {
134
136
  (this.rightBracket === "[" || interval.leftBracket === "]")) ||
135
137
  (a === d && (interval.rightBracket === "[" || this.leftBracket === "]"));
136
138
  if (isDisjoint) {
137
- return new mathSet_1.MathSet("\\varnothing", () => null);
139
+ return discreteSetNode_1.EmptySet;
138
140
  }
139
141
  const winningLeftBracket = (brack1, brack2) => brack1 === "]" || brack2 === "]" ? "]" : "[";
140
142
  const winningRightBracket = (brack1, brack2) => brack1 === "[" || brack2 === "[" ? "[" : "]";
141
143
  let min = a >= c ? this.minNode : interval.minNode;
144
+ const max = b <= d ? this.maxNode : interval.maxNode;
145
+ if (min === max)
146
+ return new discreteSetNode_1.DiscreteSetNode([min]);
142
147
  let leftBracket = a === c
143
148
  ? winningLeftBracket(this.leftBracket, interval.leftBracket)
144
149
  : a > c
145
150
  ? this.leftBracket
146
151
  : interval.leftBracket;
147
- const max = b <= d ? this.maxNode : interval.maxNode;
148
152
  let rightBracket = b === d
149
153
  ? winningRightBracket(this.rightBracket, interval.rightBracket)
150
154
  : b < d
151
155
  ? this.rightBracket
152
156
  : interval.rightBracket;
153
157
  const closure = closure_1.Closure.fromBrackets(leftBracket, rightBracket);
154
- return new Interval(min, max, closure);
158
+ return new Interval(min, max, closure).toTree();
155
159
  }
156
160
  insideToTex() {
157
161
  return `${this.minTex};${this.maxTex}`;
158
162
  }
159
163
  toTex() {
160
- return `${this.leftBracket}\\ ${this.insideToTex()}\\ ${this.rightBracket}\\ `;
164
+ return `${this.leftBracket}${this.insideToTex()}${this.rightBracket}`;
161
165
  }
162
166
  toInequality() {
163
167
  const isLeftClosed = this.closure === closure_1.ClosureType.FO || this.closure === closure_1.ClosureType.FF;
@@ -1,5 +1,5 @@
1
- import { Nombre } from '../numbers/nombre';
2
- import { MathSetInterface } from './mathSetInterface';
1
+ import { Nombre } from "../numbers/nombre";
2
+ import { MathSetInterface } from "./mathSetInterface";
3
3
  export declare class MathSet implements MathSetInterface {
4
4
  tex: string;
5
5
  toTex: () => string;
@@ -1 +1 @@
1
- {"version":3,"file":"mathSet.d.ts","sourceRoot":"","sources":["../../../src/math/sets/mathSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,qBAAa,OAAQ,YAAW,gBAAgB;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;gBAC1B,GAAG,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,MAAM,GAAG,IAAI;CAK/D"}
1
+ {"version":3,"file":"mathSet.d.ts","sourceRoot":"","sources":["../../../src/math/sets/mathSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,qBAAa,OAAQ,YAAW,gBAAgB;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;gBAC1B,GAAG,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,MAAM,GAAG,IAAI;CAK/D"}
@@ -1,4 +1,4 @@
1
- import { Nombre } from '../numbers/nombre';
1
+ import { Nombre } from "../numbers/nombre";
2
2
  export interface MathSetInterface {
3
3
  tex: string;
4
4
  toTex: () => string;
@@ -1 +1 @@
1
- {"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../src/playground.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,UAAU,YAEtB,CAAC"}
1
+ {"version":3,"file":"playground.d.ts","sourceRoot":"","sources":["../src/playground.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,UAAU,YActB,CAAC"}
package/lib/playground.js CHANGED
@@ -1,8 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.playground = void 0;
4
- const infiniteNode_1 = require("./tree/nodes/numbers/infiniteNode");
5
4
  const playground = () => {
6
- console.log(infiniteNode_1.MinusInfinityNode.evaluate({}));
5
+ // const node = new AddNode(
6
+ // new MultiplyNode(new Affine(1, 0).toTree(), new Affine(3, 1).toTree()),
7
+ // new MultiplyNode(
8
+ // new ExpNode(new SqrtNode((3).toTree())),
9
+ // new CosNode((3).toTree()),
10
+ // ),
11
+ // );
12
+ // const node = new NumberNode(3);
13
+ // const node = new MultiplyNode((2).toTree(), (3).toTree());
14
+ // const ids = node.toIdentifiers();
15
+ // const parsed = NodeConstructor.fromIdentifiers(ids);
16
+ // console.log(node);
17
+ // console.log(parsed);
7
18
  };
8
19
  exports.playground = playground;
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAuC3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,SAAS,EAAE,MAAM,MAAM,CAAC;QACxB,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,aAAa,CAAC;KACpD;IACD,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,WAAW,EAAE,MAAM,MAAM,CAAC;KAC3B;CACF"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAwC3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,SAAS,EAAE,MAAM,MAAM,CAAC;QACxB,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,aAAa,CAAC;KACpD;IACD,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,WAAW,EAAE,MAAM,MAAM,CAAC;KAC3B;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"algebraicNode.d.ts","sourceRoot":"","sources":["../../../src/tree/nodes/algebraicNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE3C,MAAM,MAAM,eAAe,GAAG;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AACF,MAAM,WAAW,aAAc,SAAQ,IAAI;IAEzC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC;IACnD,iBAAiB,EAAE,CAAC,IAAI,CAAC,EAAE,WAAW,KAAK,aAAa,EAAE,CAAC;IAC3D,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,eAAe,KAAK,aAAa,CAAC;IACpD,MAAM,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,OAAO,CAAC;IACzC,SAAS,EAAE,OAAO,CAAC;CACpB"}
1
+ {"version":3,"file":"algebraicNode.d.ts","sourceRoot":"","sources":["../../../src/tree/nodes/algebraicNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE3C,MAAM,MAAM,eAAe,GAAG;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AACF,MAAM,WAAW,aAAc,SAAQ,IAAI;IACzC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC;IACnD,iBAAiB,EAAE,CAAC,IAAI,CAAC,EAAE,WAAW,KAAK,aAAa,EAAE,CAAC;IAC3D,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,eAAe,KAAK,aAAa,CAAC;IACpD,MAAM,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,OAAO,CAAC;IACzC,SAAS,EAAE,OAAO,CAAC;CACpB"}
@@ -1,5 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //tous les operators et function
4
- // tous les externals (number, variable, constant, length)
5
- //implémenter les opérations add, substract, divide, power etc
@@ -1,4 +1,4 @@
1
- import { Node, NodeOptions, NodeType } from "../node";
1
+ import { Node, NodeIds, NodeOptions, NodeType } from "../node";
2
2
  import { AlgebraicNode } from "../algebraicNode";
3
3
  export declare class ComplexNode implements Node {
4
4
  re: AlgebraicNode;
@@ -6,6 +6,15 @@ export declare class ComplexNode implements Node {
6
6
  opts?: NodeOptions;
7
7
  type: NodeType;
8
8
  constructor(re: AlgebraicNode, im: AlgebraicNode, opts?: NodeOptions);
9
+ toIdentifiers(): {
10
+ id: NodeIds;
11
+ re: {
12
+ id: NodeIds;
13
+ } & Record<string, any>;
14
+ im: {
15
+ id: NodeIds;
16
+ } & Record<string, any>;
17
+ };
9
18
  toEquivalentNodes(opts?: NodeOptions): AlgebraicNode[];
10
19
  toAllValidTexs(opts?: NodeOptions): string[];
11
20
  toMathString(): string;
@@ -1 +1 @@
1
- {"version":3,"file":"complexNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/complex/complexNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAItD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,qBAAa,WAAY,YAAW,IAAI;IACtC,EAAE,EAAE,aAAa,CAAC;IAClB,EAAE,EAAE,aAAa,CAAC;IAClB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAmB;gBAErB,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,WAAW;IAKpE,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,aAAa,EAAE;IAkBtD,cAAc,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE;IAI5C,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;CAiBhB"}
1
+ {"version":3,"file":"complexNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/complex/complexNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAI/D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,qBAAa,WAAY,YAAW,IAAI;IACtC,EAAE,EAAE,aAAa,CAAC;IAClB,EAAE,EAAE,aAAa,CAAC;IAClB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAmB;gBAErB,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,WAAW;IAKpE,aAAa;;;;;;;;;IAOb,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,aAAa,EAAE;IAkBtD,cAAc,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE;IAI5C,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;CAiBhB"}
@@ -13,6 +13,13 @@ class ComplexNode {
13
13
  this.im = im;
14
14
  this.opts = opts;
15
15
  }
16
+ toIdentifiers() {
17
+ return {
18
+ id: node_1.NodeIds.complex,
19
+ re: this.re.toIdentifiers(),
20
+ im: this.im.toIdentifiers(),
21
+ };
22
+ }
16
23
  toEquivalentNodes(opts) {
17
24
  const options = opts ?? this.opts;
18
25
  const res = [];
@@ -1,10 +1,19 @@
1
- import { Node, NodeOptions, NodeType } from "../node";
1
+ import { Node, NodeIds, NodeOptions, NodeType } from "../node";
2
2
  export declare class EqualNode implements Node {
3
3
  leftChild: Node;
4
4
  rightChild: Node;
5
5
  opts?: NodeOptions;
6
6
  type: NodeType;
7
7
  constructor(leftChild: Node, rightChild: Node, opts?: NodeOptions);
8
+ toIdentifiers(): {
9
+ id: NodeIds;
10
+ leftChild: {
11
+ id: NodeIds;
12
+ } & Record<string, any>;
13
+ rightChild: {
14
+ id: NodeIds;
15
+ } & Record<string, any>;
16
+ };
8
17
  toEquivalentNodes(opts?: NodeOptions): Node[];
9
18
  toAllValidTexs(opts?: NodeOptions): string[];
10
19
  toMathString(): string;
@@ -1 +1 @@
1
- {"version":3,"file":"equalNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/equations/equalNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEtD,qBAAa,SAAU,YAAW,IAAI;IACpC,SAAS,EAAE,IAAI,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;IACjB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAC;gBACH,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,WAAW;IAOjE,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW;IAmBpC,cAAc,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE;IAM5C,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;CAUhB"}
1
+ {"version":3,"file":"equalNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/equations/equalNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE/D,qBAAa,SAAU,YAAW,IAAI;IACpC,SAAS,EAAE,IAAI,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;IACjB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAC;gBACH,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,WAAW;IAOjE,aAAa;;;;;;;;;IAOb,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW;IAmBpC,cAAc,CAAC,IAAI,CAAC,EAAE,WAAW,GAAG,MAAM,EAAE;IAM5C,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;CAUhB"}
@@ -9,6 +9,13 @@ class EqualNode {
9
9
  this.type = node_1.NodeType.equality;
10
10
  this.opts = opts;
11
11
  }
12
+ toIdentifiers() {
13
+ return {
14
+ id: node_1.NodeIds.equal,
15
+ leftChild: this.leftChild.toIdentifiers(),
16
+ rightChild: this.rightChild.toIdentifiers(),
17
+ };
18
+ }
12
19
  toEquivalentNodes(opts) {
13
20
  const options = opts ?? this.opts;
14
21
  const res = [];
@@ -1,4 +1,4 @@
1
- import { Node, NodeOptions, NodeType } from "../node";
1
+ import { Node, NodeIds, NodeOptions, NodeType } from "../node";
2
2
  import { DiscreteSetNode } from "../sets/discreteSetNode";
3
3
  type EquationSolutionNodeOptions = {
4
4
  variable?: string;
@@ -10,6 +10,15 @@ export declare class EquationSolutionNode implements Node {
10
10
  solutionsSet: DiscreteSetNode;
11
11
  opts?: NodeOptions;
12
12
  constructor(solutionsSet: DiscreteSetNode, params?: EquationSolutionNodeOptions);
13
+ toIdentifiers(): {
14
+ id: NodeIds;
15
+ solutionsSet: {
16
+ id: NodeIds;
17
+ children: ({
18
+ id: NodeIds;
19
+ } & Record<string, any>)[];
20
+ };
21
+ };
13
22
  toAllValidTexs(): string[];
14
23
  toAllTexs(): string[];
15
24
  toEquivalentNodes(opts?: NodeOptions): EquationSolutionNode[];
@@ -1 +1 @@
1
- {"version":3,"file":"equationSolutionNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/equations/equationSolutionNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,KAAK,2BAA2B,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAC7E,qBAAa,oBAAqB,YAAW,IAAI;IAC/C,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,eAAe,CAAC;IAC9B,IAAI,CAAC,EAAE,WAAW,CAAC;gBAEjB,YAAY,EAAE,eAAe,EAC7B,MAAM,CAAC,EAAE,2BAA2B;IActC,cAAc;IAId,SAAS;IAiBT,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW;IAQpC,YAAY;IAGZ,QAAQ;IAGR,KAAK;CAGN"}
1
+ {"version":3,"file":"equationSolutionNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/equations/equationSolutionNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,KAAK,2BAA2B,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAC7E,qBAAa,oBAAqB,YAAW,IAAI;IAC/C,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,eAAe,CAAC;IAC9B,IAAI,CAAC,EAAE,WAAW,CAAC;gBAEjB,YAAY,EAAE,eAAe,EAC7B,MAAM,CAAC,EAAE,2BAA2B;IActC,aAAa;;;;;;;;;IAMb,cAAc;IAId,SAAS;IAiBT,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW;IAQpC,YAAY;IAGZ,QAAQ;IAGR,KAAK;CAGN"}
@@ -14,6 +14,12 @@ class EquationSolutionNode {
14
14
  }
15
15
  : { allowRawRightChildAsSolution: true };
16
16
  }
17
+ toIdentifiers() {
18
+ return {
19
+ id: node_1.NodeIds.equationSolution,
20
+ solutionsSet: this.solutionsSet.toIdentifiers(),
21
+ };
22
+ }
17
23
  toAllValidTexs() {
18
24
  return this.toEquivalentNodes(this.opts).flatMap((el) => el.toAllTexs());
19
25
  }
@@ -1,10 +1,16 @@
1
- import { Node, NodeOptions, NodeType } from "../node";
1
+ import { Node, NodeIds, NodeOptions, NodeType } from "../node";
2
2
  export declare class MultiEqualNode implements Node {
3
3
  children: Node[];
4
4
  opts?: NodeOptions;
5
5
  type: NodeType;
6
6
  constructor(children: Node[], opts?: NodeOptions);
7
7
  toEquivalentNodes(): MultiEqualNode[];
8
+ toIdentifiers(): {
9
+ id: NodeIds;
10
+ children: ({
11
+ id: NodeIds;
12
+ } & Record<string, any>)[];
13
+ };
8
14
  toAllTexs(): string[];
9
15
  toAllValidTexs(): string[];
10
16
  toMathString(): string;
@@ -1 +1 @@
1
- {"version":3,"file":"multiEqualNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/equations/multiEqualNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAItD,qBAAa,cAAe,YAAW,IAAI;IACzC,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAC;gBACH,QAAQ,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,EAAE,WAAW;IAMhD,iBAAiB;IAUjB,SAAS;IAMT,cAAc,IAAI,MAAM,EAAE;IAI1B,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;IAIf,QAAQ;CAGT"}
1
+ {"version":3,"file":"multiEqualNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/equations/multiEqualNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAI/D,qBAAa,cAAe,YAAW,IAAI;IACzC,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,EAAE,QAAQ,CAAC;gBACH,QAAQ,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,EAAE,WAAW;IAMhD,iBAAiB;IAUjB,aAAa;;;;;;IAMb,SAAS;IAMT,cAAc,IAAI,MAAM,EAAE;IAI1B,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;IAIf,QAAQ;CAGT"}
@@ -19,6 +19,12 @@ class MultiEqualNode {
19
19
  });
20
20
  return res;
21
21
  }
22
+ toIdentifiers() {
23
+ return {
24
+ id: node_1.NodeIds.multiEqual,
25
+ children: this.children.map((e) => e.toIdentifiers()),
26
+ };
27
+ }
22
28
  toAllTexs() {
23
29
  const permutations = (0, permutations_1.permute)(this.children);
24
30
  return permutations.flatMap((permutation) => `${permutation.map((node) => node.toTex()).join("=")}`);
@@ -1,4 +1,4 @@
1
- import { Node, NodeType } from "../node";
1
+ import { Node, NodeIds, NodeType } from "../node";
2
2
  import { FunctionNode, FunctionsIds } from "./functionNode";
3
3
  import { AlgebraicNode } from "../algebraicNode";
4
4
  export declare function isAbsNode(a: Node): a is AbsNode;
@@ -8,6 +8,12 @@ export declare class AbsNode implements FunctionNode {
8
8
  type: NodeType;
9
9
  isNumeric: boolean;
10
10
  constructor(child: AlgebraicNode);
11
+ toIdentifiers(): {
12
+ id: NodeIds;
13
+ child: {
14
+ id: NodeIds;
15
+ } & Record<string, any>;
16
+ };
11
17
  toMathString(): string;
12
18
  toTex(): string;
13
19
  toEquivalentNodes(): AlgebraicNode[];
@@ -1 +1 @@
1
- {"version":3,"file":"absNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/functions/absNode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAkB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,OAAO,CAE/C;AACD,qBAAa,OAAQ,YAAW,YAAY;IAC1C,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,aAAa;IAOhC,YAAY,IAAI,MAAM;IAItB,KAAK,IAAI,MAAM;IAOf,iBAAiB,IAAI,aAAa,EAAE;IASpC,cAAc,IAAI,MAAM,EAAE;IAG1B,QAAQ;IAIR,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGrC,MAAM,CAAC,IAAI,EAAE,aAAa;CAG3B"}
1
+ {"version":3,"file":"absNode.d.ts","sourceRoot":"","sources":["../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