math-exercises 2.2.27 → 2.2.28

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 (456) 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/exercise.js +1 -1
  4. package/lib/exercises/math/calcul/addAndSub.js +1 -1
  5. package/lib/exercises/math/calcul/addAndSubWithoutRelatives.js +1 -1
  6. package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +1 -1
  7. package/lib/exercises/math/calcul/arithmetics/divisibiltyCriteria.js +1 -1
  8. package/lib/exercises/math/calcul/arithmetics/divisorsList.js +1 -1
  9. package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.js +1 -1
  10. package/lib/exercises/math/calcul/decimals/multiplyDecimalByTens.js +1 -1
  11. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +1 -1
  12. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +1 -1
  13. package/lib/exercises/math/calcul/fractions/fractionAndIntegerSum.js +1 -1
  14. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +1 -1
  15. package/lib/exercises/math/calcul/fractions/fractionsDivision.js +1 -1
  16. package/lib/exercises/math/calcul/fractions/fractionsProduct.js +1 -1
  17. package/lib/exercises/math/calcul/fractions/fractionsSum.js +1 -1
  18. package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +1 -1
  19. package/lib/exercises/math/calcul/fractions/simplifyFraction.js +1 -1
  20. package/lib/exercises/math/calcul/mentalCaluls/mentalAddAndSub.js +2 -2
  21. package/lib/exercises/math/calcul/mentalCaluls/mentalDivisions.js +2 -2
  22. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +2 -2
  23. package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationsNoRelative.js +2 -2
  24. package/lib/exercises/math/calcul/mentalCaluls/mentalPercentage.js +2 -2
  25. package/lib/exercises/math/calcul/operations/expressionNature.js +1 -1
  26. package/lib/exercises/math/calcul/operations/operationsPriorities.js +2 -2
  27. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesis.js +1 -1
  28. package/lib/exercises/math/calcul/operations/operationsPrioritiesParenthesisNoRelatives.js +1 -1
  29. package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.js +2 -2
  30. package/lib/exercises/math/calcul/ordering/decimalOrdering.js +1 -1
  31. package/lib/exercises/math/calcul/ordering/decimalOrderingNoRelatives.js +1 -1
  32. package/lib/exercises/math/calcul/ordering/framing.js +2 -2
  33. package/lib/exercises/math/calcul/ordering/integerOrdering.js +2 -2
  34. package/lib/exercises/math/calcul/proportionality/proportionalityTable.js +1 -1
  35. package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.js +1 -1
  36. package/lib/exercises/math/calcul/proportionality/scaleCalculation.js +1 -1
  37. package/lib/exercises/math/calcul/proportionality/scaleUsage.js +1 -1
  38. package/lib/exercises/math/calcul/rounding/rounding.js +1 -1
  39. package/lib/exercises/math/calculLitteral/distributivity/allIdentities.js +1 -1
  40. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.js +1 -1
  41. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +1 -1
  42. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +1 -1
  43. package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.js +1 -1
  44. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +1 -1
  45. package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +1 -1
  46. package/lib/exercises/math/calculLitteral/equation/equationFromSentenceExercise.js +1 -1
  47. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +3 -3
  48. package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.js +1 -1
  49. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +1 -1
  50. package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +1 -1
  51. package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.js +1 -1
  52. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.js +1 -1
  53. package/lib/exercises/math/calculLitteral/equation/fractionEquation.js +1 -1
  54. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -1
  55. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +1 -1
  56. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +1 -1
  57. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +2 -2
  58. package/lib/exercises/math/calculLitteral/factorisation/factoType2.js +1 -1
  59. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType0.js +2 -2
  60. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.js +2 -2
  61. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.js +2 -2
  62. package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +2 -2
  63. package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.js +1 -1
  64. package/lib/exercises/math/calculLitteral/simplifying/distributeAndSimplify.js +1 -1
  65. package/lib/exercises/math/calculLitteral/simplifying/evaluateExpression.js +2 -2
  66. package/lib/exercises/math/calculLitteral/simplifying/reduceExpression.js +1 -1
  67. package/lib/exercises/math/calculLitteral/systems/basicNiceValuesSystemResolution.js +1 -1
  68. package/lib/exercises/math/calculLitteral/systems/basicSystemResolution.js +1 -1
  69. package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +1 -1
  70. package/lib/exercises/math/combinatory/anagrams.js +1 -1
  71. package/lib/exercises/math/complex/addComplex.js +1 -1
  72. package/lib/exercises/math/complex/argumentFromAlgebraicComplex.js +1 -1
  73. package/lib/exercises/math/complex/conjugateComplex.ts.js +1 -1
  74. package/lib/exercises/math/complex/conjugateDivideComplex.js +1 -1
  75. package/lib/exercises/math/complex/conjugateMultiplyComplex.js +1 -1
  76. package/lib/exercises/math/complex/divideComplex.js +1 -1
  77. package/lib/exercises/math/complex/inverseComplex.js +1 -1
  78. package/lib/exercises/math/complex/linearCombinaisonComplex.js +1 -1
  79. package/lib/exercises/math/complex/mutiplyComplex.js +1 -1
  80. package/lib/exercises/math/complex/reAndIm.js +2 -2
  81. package/lib/exercises/math/conversion/aeraConversion.js +1 -1
  82. package/lib/exercises/math/conversion/capacityConversion.js +1 -1
  83. package/lib/exercises/math/conversion/hoursToDecimal.js +1 -1
  84. package/lib/exercises/math/conversion/lengthConversion.js +1 -1
  85. package/lib/exercises/math/conversion/massConversion.js +1 -1
  86. package/lib/exercises/math/conversion/volumeCapacityConversion.js +2 -2
  87. package/lib/exercises/math/conversion/volumeConversion.js +1 -1
  88. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.js +1 -1
  89. package/lib/exercises/math/derivation/derivative/lnDerivativeTwo.js +1 -1
  90. package/lib/exercises/math/derivation/derivative/rootFunctionDerivative.js +1 -1
  91. package/lib/exercises/math/derivation/derivative/secondDegreeDerivative.js +1 -1
  92. package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +2 -2
  93. package/lib/exercises/math/derivation/tangent/derivativeNumberReading.js +1 -1
  94. package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.js +1 -1
  95. package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +2 -2
  96. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +1 -1
  97. package/lib/exercises/math/equaDiff/equaDiffGeneralFormeWithIC.js +1 -1
  98. package/lib/exercises/math/functions/absolute/absoluteValueEquations.js +2 -2
  99. package/lib/exercises/math/functions/absolute/absoluteValueInequations.js +1 -1
  100. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +1 -1
  101. package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +1 -1
  102. package/lib/exercises/math/functions/affines/leadingCoefficient.js +1 -1
  103. package/lib/exercises/math/functions/affines/leadingCoefficientCalculV1.js +1 -1
  104. package/lib/exercises/math/functions/affines/leadingCoefficientCalculV2.js +1 -1
  105. package/lib/exercises/math/functions/affines/signFunction.js +2 -2
  106. package/lib/exercises/math/functions/basics/graphicEquation.js +1 -1
  107. package/lib/exercises/math/functions/basics/graphicInequation.js +1 -1
  108. package/lib/exercises/math/functions/basics/imageFunction.js +2 -2
  109. package/lib/exercises/math/functions/basics/imageFunctionGeogebra.js +2 -2
  110. package/lib/exercises/math/functions/basics/inverseImageFunction.js +1 -1
  111. package/lib/exercises/math/functions/basics/inverseImageFunctionGeogebra.js +2 -2
  112. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +3 -3
  113. package/lib/exercises/math/functions/basics/twoFunctionsEquation.js +2 -2
  114. package/lib/exercises/math/functions/basics/twoFunctionsInequation.js +2 -2
  115. package/lib/exercises/math/functions/cube/cubicEquation.js +1 -1
  116. package/lib/exercises/math/functions/exponential/expEquation.js +1 -1
  117. package/lib/exercises/math/functions/exponential/expSimplifiying.js +1 -1
  118. package/lib/exercises/math/functions/integral/integralExpU.js +1 -1
  119. package/lib/exercises/math/functions/integral/integralFractions.js +1 -1
  120. package/lib/exercises/math/functions/logarithm/log10Simplifying.js +1 -1
  121. package/lib/exercises/math/functions/logarithm/logEquation.js +1 -1
  122. package/lib/exercises/math/functions/logarithm/logSimplifiying.js +2 -2
  123. package/lib/exercises/math/functions/parity/parityFromAlgebra.js +3 -3
  124. package/lib/exercises/math/functions/parity/parityFromGraph.js +3 -3
  125. package/lib/exercises/math/functions/rationalFraction/rationalFractionForbiddenValue.js +1 -1
  126. package/lib/exercises/math/functions/trinoms/alphaBetaFromDevForm.js +2 -2
  127. package/lib/exercises/math/functions/trinoms/alphaBetaInCanonicalForm.js +2 -2
  128. package/lib/exercises/math/functions/trinoms/canonicalFromDevForm.js +1 -1
  129. package/lib/exercises/math/functions/trinoms/deltaTrinom.js +1 -1
  130. package/lib/exercises/math/functions/trinoms/extremumFromCanonicalForm.js +1 -1
  131. package/lib/exercises/math/functions/trinoms/extremumTypeFromAlgebricForm.js +2 -2
  132. package/lib/exercises/math/functions/trinoms/factorizedFormFromRoots.js +1 -1
  133. package/lib/exercises/math/functions/trinoms/niceRootsFromDevForm.js +1 -1
  134. package/lib/exercises/math/functions/trinoms/rootsFromDevForm.js +1 -1
  135. package/lib/exercises/math/functions/trinoms/rootsFromFactorizedForm.js +1 -1
  136. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +1 -1
  137. package/lib/exercises/math/functions/trinoms/variationsFromAlgebricForm.js +2 -2
  138. package/lib/exercises/math/geometry/areas/circleArea.js +2 -2
  139. package/lib/exercises/math/geometry/areas/rectangleArea.js +1 -1
  140. package/lib/exercises/math/geometry/areas/rightTriangleArea.js +1 -1
  141. package/lib/exercises/math/geometry/areas/squareArea.js +1 -1
  142. package/lib/exercises/math/geometry/areas/triangleArea.js +1 -1
  143. package/lib/exercises/math/geometry/areas/triangleAreaV2.js +1 -1
  144. package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +1 -1
  145. package/lib/exercises/math/geometry/cartesian/index.d.ts +4 -0
  146. package/lib/exercises/math/geometry/cartesian/index.d.ts.map +1 -1
  147. package/lib/exercises/math/geometry/cartesian/index.js +4 -0
  148. package/lib/exercises/math/geometry/cartesian/midpoint.js +1 -1
  149. package/lib/exercises/math/geometry/cartesian/placeAPoint.js +1 -1
  150. package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.d.ts +13 -0
  151. package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.d.ts.map +1 -0
  152. package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.js +133 -0
  153. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts +13 -0
  154. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts.map +1 -0
  155. package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.js +132 -0
  156. package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.js +1 -1
  157. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts +12 -0
  158. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.d.ts.map +1 -1
  159. package/lib/exercises/math/geometry/cartesian/readAbscissOnLine.js +151 -91
  160. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts +13 -0
  161. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.d.ts.map +1 -0
  162. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +153 -0
  163. package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +1 -1
  164. package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +1 -1
  165. package/lib/exercises/math/geometry/perimeters/circleCircumference.js +2 -2
  166. package/lib/exercises/math/geometry/perimeters/rectanglePerimeter.js +1 -1
  167. package/lib/exercises/math/geometry/perimeters/squarePerimeter.js +1 -1
  168. package/lib/exercises/math/geometry/perimeters/trianglePerimeter.js +1 -1
  169. package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +2 -2
  170. package/lib/exercises/math/geometry/thales/thales.js +1 -1
  171. package/lib/exercises/math/geometry/thales/thalesCalcul.js +2 -2
  172. package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +2 -2
  173. package/lib/exercises/math/geometry/vectors/chasles.js +2 -2
  174. package/lib/exercises/math/geometry/vectors/colinearity.js +2 -2
  175. package/lib/exercises/math/geometry/vectors/determinant.js +1 -1
  176. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +2 -2
  177. package/lib/exercises/math/geometry/vectors/fourthParallelogramPoint.js +1 -1
  178. package/lib/exercises/math/geometry/vectors/paralellismViaColinearity.js +2 -2
  179. package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +2 -2
  180. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +1 -1
  181. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.js +1 -1
  182. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +1 -1
  183. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithSquareOrRectBase.js +1 -1
  184. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +1 -1
  185. package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +1 -1
  186. package/lib/exercises/math/limits/limitReading.js +1 -1
  187. package/lib/exercises/math/limits/polynomLimit.js +2 -2
  188. package/lib/exercises/math/limits/polynomLimitNoFI.js +2 -2
  189. package/lib/exercises/math/limits/rationalFracForbiddenValueLimit.js +1 -1
  190. package/lib/exercises/math/limits/rationalFracLimit.js +2 -2
  191. package/lib/exercises/math/limits/sequencePolynomLimit.js +1 -1
  192. package/lib/exercises/math/limits/sequencePolynomNoFILimit.js +1 -1
  193. package/lib/exercises/math/limits/sequencePolynomProductLimit.js +1 -1
  194. package/lib/exercises/math/limits/sequenceRationalFracLimit.js +1 -1
  195. package/lib/exercises/math/percent/applyPercent.js +2 -2
  196. package/lib/exercises/math/percent/averageEvolutionRate.js +1 -1
  197. package/lib/exercises/math/percent/cmToEvolution.js +1 -1
  198. package/lib/exercises/math/percent/evolutionRateFromValues.d.ts +8 -0
  199. package/lib/exercises/math/percent/evolutionRateFromValues.d.ts.map +1 -0
  200. package/lib/exercises/math/percent/evolutionRateFromValues.js +71 -0
  201. package/lib/exercises/math/percent/findStartValueAfterEvolution.d.ts +8 -0
  202. package/lib/exercises/math/percent/findStartValueAfterEvolution.d.ts.map +1 -0
  203. package/lib/exercises/math/percent/findStartValueAfterEvolution.js +65 -0
  204. package/lib/exercises/math/percent/findTVA.js +2 -2
  205. package/lib/exercises/math/percent/globalPercent.js +1 -1
  206. package/lib/exercises/math/percent/htToTTC.js +2 -2
  207. package/lib/exercises/math/percent/index.d.ts +4 -0
  208. package/lib/exercises/math/percent/index.d.ts.map +1 -1
  209. package/lib/exercises/math/percent/index.js +4 -0
  210. package/lib/exercises/math/percent/isTableProportional.js +1 -1
  211. package/lib/exercises/math/percent/percentToDecimal.js +2 -2
  212. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts +9 -0
  213. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.d.ts.map +1 -0
  214. package/lib/exercises/math/percent/populationEffectifFromSubPopulation.js +93 -0
  215. package/lib/exercises/math/percent/reciprocalPercentage.js +2 -2
  216. package/lib/exercises/math/percent/subPopulationEffectifFromPercent.d.ts +9 -0
  217. package/lib/exercises/math/percent/subPopulationEffectifFromPercent.d.ts.map +1 -0
  218. package/lib/exercises/math/percent/subPopulationEffectifFromPercent.js +85 -0
  219. package/lib/exercises/math/percent/ttcToHT.js +2 -2
  220. package/lib/exercises/math/powers/decimalToScientific.js +1 -1
  221. package/lib/exercises/math/powers/powersDivision.js +1 -1
  222. package/lib/exercises/math/powers/powersOfTenToDecimal.js +1 -1
  223. package/lib/exercises/math/powers/powersProduct.js +1 -1
  224. package/lib/exercises/math/primitive/constantPrimitive.js +1 -1
  225. package/lib/exercises/math/primitive/logarithmePrimitive.js +1 -1
  226. package/lib/exercises/math/primitive/polynomialPrimitive.js +1 -1
  227. package/lib/exercises/math/primitive/sinCosPrimitive.js +2 -2
  228. package/lib/exercises/math/primitive/sinUCosUPrimitive.js +2 -2
  229. package/lib/exercises/math/probaStat/cardBasicProbas.js +2 -2
  230. package/lib/exercises/math/probaStat/conditionalProbability.js +1 -1
  231. package/lib/exercises/math/probaStat/diceBasicProbas.js +2 -2
  232. package/lib/exercises/math/probaStat/independancy.js +2 -2
  233. package/lib/exercises/math/probaStat/issuesCountingForCards.js +3 -3
  234. package/lib/exercises/math/probaStat/probaFromTableNoContext.js +1 -1
  235. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +1 -1
  236. package/lib/exercises/math/probaStat/probabilityTree.js +1 -1
  237. package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +1 -1
  238. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
  239. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +2 -1
  240. package/lib/exercises/math/probaStat/stats1var/median.js +1 -1
  241. package/lib/exercises/math/probaStat/stats1var/quartiles.js +1 -1
  242. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +1 -1
  243. package/lib/exercises/math/python/pyForLoop1Exercise.js +2 -2
  244. package/lib/exercises/math/python/pyNestedForLoopExercise.js +1 -1
  245. package/lib/exercises/math/python/pyWhileLoop1Exercise.js +1 -1
  246. package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +1 -1
  247. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +1 -1
  248. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js +1 -1
  249. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReason.js +1 -1
  250. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.js +1 -1
  251. package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +1 -1
  252. package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.js +1 -1
  253. package/lib/exercises/math/sequences/arithmetic/arithmeticReasonUsage.js +1 -1
  254. package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +1 -1
  255. package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.js +1 -1
  256. package/lib/exercises/math/sequences/arithmetic/firstIntegersSum.js +1 -1
  257. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +2 -2
  258. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +2 -2
  259. package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +1 -1
  260. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +1 -1
  261. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +1 -1
  262. package/lib/exercises/math/sequences/geometric/geometricFindReason.js +1 -1
  263. package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +1 -1
  264. package/lib/exercises/math/sequences/geometric/geometricFirstTermsGeneralSum.js +1 -1
  265. package/lib/exercises/math/sequences/geometric/geometricFirstTermsSum.js +1 -1
  266. package/lib/exercises/math/sequences/geometric/geometricReasonUsage.js +1 -1
  267. package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.js +1 -1
  268. package/lib/exercises/math/sequences/sequencePlot.js +1 -1
  269. package/lib/exercises/math/sets/intervals/inequalityToInterval.js +1 -1
  270. package/lib/exercises/math/sets/intervals/intervalToInequality.js +1 -1
  271. package/lib/exercises/math/sets/intervals/intervalsIntersection.js +1 -1
  272. package/lib/exercises/math/sets/intervals/intervalsUnion.js +1 -1
  273. package/lib/exercises/math/sets/setBelonging.js +2 -2
  274. package/lib/exercises/math/squareRoots/simpifySquareRoot.js +1 -1
  275. package/lib/exercises/math/squareRoots/squareRootEquation.js +1 -1
  276. package/lib/exercises/math/squareRoots/squareRootIdentities.js +2 -2
  277. package/lib/exercises/math/squareRoots/squareRootsSum.js +1 -1
  278. package/lib/exercises/math/trigonometry/arcLength.d.ts +10 -0
  279. package/lib/exercises/math/trigonometry/arcLength.d.ts.map +1 -0
  280. package/lib/exercises/math/trigonometry/arcLength.js +92 -0
  281. package/lib/exercises/math/trigonometry/associatePoint.js +1 -1
  282. package/lib/exercises/math/trigonometry/basicEquationCos.d.ts +7 -0
  283. package/lib/exercises/math/trigonometry/basicEquationCos.d.ts.map +1 -0
  284. package/lib/exercises/math/trigonometry/basicEquationCos.js +94 -0
  285. package/lib/exercises/math/trigonometry/basicEquationSin.d.ts +7 -0
  286. package/lib/exercises/math/trigonometry/basicEquationSin.d.ts.map +1 -0
  287. package/lib/exercises/math/trigonometry/basicEquationSin.js +106 -0
  288. package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.d.ts +7 -0
  289. package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.d.ts.map +1 -0
  290. package/lib/exercises/math/trigonometry/basicTrigoSystemEquation.js +85 -0
  291. package/lib/exercises/math/trigonometry/calculateCosSinAndTan.js +1 -1
  292. package/lib/exercises/math/trigonometry/degreeToRadians.d.ts +9 -0
  293. package/lib/exercises/math/trigonometry/degreeToRadians.d.ts.map +1 -0
  294. package/lib/exercises/math/trigonometry/degreeToRadians.js +125 -0
  295. package/lib/exercises/math/trigonometry/index.d.ts +6 -0
  296. package/lib/exercises/math/trigonometry/index.d.ts.map +1 -1
  297. package/lib/exercises/math/trigonometry/index.js +6 -0
  298. package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts +9 -0
  299. package/lib/exercises/math/trigonometry/mainAngleMeasure.d.ts.map +1 -0
  300. package/lib/exercises/math/trigonometry/mainAngleMeasure.js +91 -0
  301. package/lib/exercises/math/trigonometry/mainRemarkableValues.js +2 -2
  302. package/lib/exercises/math/trigonometry/remarkableValues.js +3 -3
  303. package/lib/exercises/math/trigonometry/trigonometry.js +1 -1
  304. package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +1 -1
  305. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +1 -1
  306. package/lib/exercises/pc/calibrationCurveOfSolution.js +2 -2
  307. package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
  308. package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.js +2 -2
  309. package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +1 -1
  310. package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +1 -1
  311. package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.js +1 -1
  312. package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.js +1 -1
  313. package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +1 -1
  314. package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +2 -2
  315. package/lib/exercises/pc/chemicalEquations.js +1 -1
  316. package/lib/exercises/pc/chemicalReactions/calculateCombustionEnergy.js +1 -1
  317. package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +1 -1
  318. package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +1 -1
  319. package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.js +1 -1
  320. package/lib/exercises/pc/chemicalReactionsProduct.js +1 -1
  321. package/lib/exercises/pc/delution.js +1 -1
  322. package/lib/exercises/pc/dosage/beerLambertRandomValue.js +1 -1
  323. package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.js +1 -1
  324. package/lib/exercises/pc/electricity/calculateVoltage.js +1 -1
  325. package/lib/exercises/pc/electricity/electricEnergyFromPower.js +1 -1
  326. package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +2 -2
  327. package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.js +1 -1
  328. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +1 -1
  329. package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +2 -2
  330. package/lib/exercises/pc/fluids/mariotte.js +1 -1
  331. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +1 -1
  332. package/lib/exercises/pc/forces/forceWork.js +1 -1
  333. package/lib/exercises/pc/forces/massWeight.js +1 -1
  334. package/lib/exercises/pc/forces/pressingForce.js +1 -1
  335. package/lib/exercises/pc/formulaFromComposition.js +1 -1
  336. package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.js +2 -2
  337. package/lib/exercises/pc/kineticEnergy.js +1 -1
  338. package/lib/exercises/pc/math/isolateVariables.js +1 -1
  339. package/lib/exercises/pc/math/proportionnalityCoeffFromLine.js +1 -1
  340. package/lib/exercises/pc/molarQuantity.js +1 -1
  341. package/lib/exercises/pc/mole/molarMass.js +1 -1
  342. package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.js +1 -1
  343. package/lib/exercises/pc/moleculeFormula.js +1 -1
  344. package/lib/exercises/pc/moleculeNomenclature.js +1 -1
  345. package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -1
  346. package/lib/exercises/pc/motion/characteristicsOfVelocityVector.js +1 -1
  347. package/lib/exercises/pc/motion/motionReference.js +1 -1
  348. package/lib/exercises/pc/motion/typeOfAcceleration.js +1 -1
  349. package/lib/exercises/pc/motion/typeOfMovement.js +1 -1
  350. package/lib/exercises/pc/pH.js +1 -1
  351. package/lib/exercises/pc/perceivedFrequency.js +1 -1
  352. package/lib/exercises/pc/potentialEnergy.js +1 -1
  353. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +1 -1
  354. package/lib/exercises/pc/snellDescartes.js +1 -1
  355. package/lib/exercises/pc/sound/findPeriodFromGraph.js +1 -1
  356. package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.js +1 -1
  357. package/lib/exercises/pc/sound/frequencyComparison.js +1 -1
  358. package/lib/exercises/pc/waves/lightDistanceConversion.js +1 -1
  359. package/lib/exercises/pc/waves/periodicWaveCelerity.js +1 -1
  360. package/lib/exercises/pc/weight/weightOnTheMoon.js +1 -1
  361. package/lib/exercises/utils/getDistinctQuestions.d.ts +1 -1
  362. package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
  363. package/lib/exercises/utils/getDistinctQuestions.js +11 -5
  364. package/lib/geogebra/colors.js +1 -1
  365. package/lib/geogebra/geogebraConstructor.js +1 -1
  366. package/lib/geogebra/parsers/ggbPointToCoords.d.ts +5 -0
  367. package/lib/geogebra/parsers/ggbPointToCoords.d.ts.map +1 -0
  368. package/lib/geogebra/parsers/ggbPointToCoords.js +12 -0
  369. package/lib/geogebra/parsers/parseGGBPoints.d.ts +2 -0
  370. package/lib/geogebra/parsers/parseGGBPoints.d.ts.map +1 -0
  371. package/lib/geogebra/parsers/parseGGBPoints.js +10 -0
  372. package/lib/index.d.ts +61 -0
  373. package/lib/index.d.ts.map +1 -1
  374. package/lib/math/geometry/line.d.ts.map +1 -1
  375. package/lib/math/geometry/line.js +0 -1
  376. package/lib/math/inequations/inequation.js +1 -1
  377. package/lib/math/numbers/integer/integer.js +1 -1
  378. package/lib/math/numbers/nombre.js +1 -1
  379. package/lib/math/numbers/rationals/rational.js +3 -3
  380. package/lib/math/numbers/reals/real.js +2 -2
  381. package/lib/math/polynomials/polynomial.js +1 -1
  382. package/lib/math/polynomials/trinom.js +1 -1
  383. package/lib/math/sequences/geometricSequence.d.ts +2 -2
  384. package/lib/math/sequences/geometricSequence.d.ts.map +1 -1
  385. package/lib/math/sequences/geometricSequence.js +13 -11
  386. package/lib/math/sets/discreteSet.d.ts +2 -2
  387. package/lib/math/sets/discreteSet.d.ts.map +1 -1
  388. package/lib/math/sets/discreteSet.js +4 -4
  389. package/lib/math/sets/intervals/intervals.js +1 -1
  390. package/lib/math/trigonometry/remarkableValue.js +1 -1
  391. package/lib/math/trigonometry/remarkableValues.d.ts +3 -0
  392. package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -1
  393. package/lib/math/trigonometry/remarkableValues.js +72 -1
  394. package/lib/math/utils/random/randTupleInt.js +1 -1
  395. package/lib/playground.d.ts.map +1 -1
  396. package/lib/playground.js +1 -31
  397. package/lib/tree/nodes/equations/multiEqualNode.js +2 -2
  398. package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
  399. package/lib/tree/nodes/geometry/degree.js +3 -2
  400. package/lib/tree/nodes/geometry/pointNode.js +1 -1
  401. package/lib/tree/nodes/inequations/inequationNode.js +1 -1
  402. package/lib/tree/nodes/operators/addNode.js +3 -3
  403. package/lib/tree/nodes/operators/divideNode.js +1 -1
  404. package/lib/tree/nodes/operators/multiplyNode.js +3 -3
  405. package/lib/tree/nodes/operators/substractNode.js +1 -1
  406. package/lib/tree/nodes/sets/discreteSetNode.d.ts +1 -0
  407. package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
  408. package/lib/tree/nodes/sets/discreteSetNode.js +8 -2
  409. package/lib/tree/nodes/sets/intervalNode.js +1 -1
  410. package/lib/tree/nodes/sets/unionIntervalNode.js +2 -2
  411. package/lib/tree/parsers/euroParser.d.ts +2 -0
  412. package/lib/tree/parsers/euroParser.d.ts.map +1 -0
  413. package/lib/tree/parsers/euroParser.js +12 -0
  414. package/lib/tree/parsers/percentParser.d.ts +1 -0
  415. package/lib/tree/parsers/percentParser.d.ts.map +1 -1
  416. package/lib/tree/parsers/percentParser.js +11 -0
  417. package/lib/utils/alea/coinFlip.d.ts +2 -0
  418. package/lib/utils/alea/coinFlip.d.ts.map +1 -0
  419. package/lib/utils/alea/coinFlip.js +7 -0
  420. package/lib/utils/alea/diceFlip.d.ts +2 -0
  421. package/lib/utils/alea/diceFlip.d.ts.map +1 -0
  422. package/lib/utils/alea/diceFlip.js +8 -0
  423. package/lib/utils/alea/probaFlip.d.ts +7 -0
  424. package/lib/utils/alea/probaFlip.d.ts.map +1 -0
  425. package/lib/utils/alea/probaFlip.js +12 -0
  426. package/lib/utils/alea/probaLawFlip.d.ts +7 -0
  427. package/lib/utils/alea/probaLawFlip.d.ts.map +1 -0
  428. package/lib/utils/alea/probaLawFlip.js +24 -0
  429. package/lib/utils/alea/random.d.ts +2 -0
  430. package/lib/utils/alea/random.d.ts.map +1 -0
  431. package/lib/utils/alea/random.js +7 -0
  432. package/lib/utils/alea/randomEnumValue.d.ts +2 -0
  433. package/lib/utils/alea/randomEnumValue.d.ts.map +1 -0
  434. package/lib/utils/alea/randomEnumValue.js +9 -0
  435. package/lib/utils/alea/shuffle.d.ts +2 -0
  436. package/lib/utils/alea/shuffle.d.ts.map +1 -0
  437. package/lib/utils/alea/shuffle.js +15 -0
  438. package/lib/utils/arrays/arrayEqual.d.ts +2 -0
  439. package/lib/utils/arrays/arrayEqual.d.ts.map +1 -0
  440. package/lib/utils/arrays/arrayEqual.js +13 -0
  441. package/lib/utils/arrays/arrayHasSameElement.d.ts +2 -0
  442. package/lib/utils/arrays/arrayHasSameElement.d.ts.map +1 -0
  443. package/lib/utils/arrays/arrayHasSameElement.js +8 -0
  444. package/lib/utils/arrays/cartesianProducts.d.ts +13 -0
  445. package/lib/utils/arrays/cartesianProducts.d.ts.map +1 -0
  446. package/lib/utils/arrays/cartesianProducts.js +64 -0
  447. package/lib/utils/arrays/enumToArray.d.ts +8 -0
  448. package/lib/utils/arrays/enumToArray.d.ts.map +1 -0
  449. package/lib/utils/arrays/enumToArray.js +16 -0
  450. package/lib/utils/arrays/permutations.d.ts +2 -0
  451. package/lib/utils/arrays/permutations.d.ts.map +1 -0
  452. package/lib/utils/arrays/permutations.js +21 -0
  453. package/lib/utils/latex/alignTex.d.ts +1 -1
  454. package/lib/utils/latex/alignTex.d.ts.map +1 -1
  455. package/lib/utils/latex/alignTex.js +3 -3
  456. package/package.json +1 -1
package/lib/playground.js CHANGED
@@ -1,37 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.playground = void 0;
4
- const numberToFrenchWord_1 = require("./utils/strings/numberToFrenchWord");
5
4
  const playground = () => {
6
- // for (let i = 0; i < 10000; i++) {
7
- // console.log(numberToFrenchWord(i));
8
- // }
9
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(2));
10
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(21));
11
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(71));
12
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(100));
13
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(120));
14
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(281));
15
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(323));
16
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(900));
17
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(999));
18
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(1000));
19
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(1100));
20
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(1323));
21
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(3000));
22
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(3242));
23
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(9999));
24
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(10000));
25
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(11000));
26
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(10001));
27
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(10100));
28
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(10010));
29
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(12345));
30
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(12234));
31
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(100000));
32
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(1001000));
33
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(1000100));
34
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(1000000));
35
- console.log((0, numberToFrenchWord_1.numberToFrenchWord)(9999999));
5
+ // console.log(mainTrigoValues.map((e) => e.angle.toTex()));
36
6
  };
37
7
  exports.playground = playground;
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MultiEqualNode = void 0;
4
4
  const node_1 = require("../node");
5
- const permutations_1 = require("../../../utils/permutations");
6
- const cartesianProducts_1 = require("../../../utils/cartesianProducts");
5
+ const permutations_1 = require("../../../utils/arrays/permutations");
6
+ const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
7
7
  class MultiEqualNode {
8
8
  constructor(children, opts) {
9
9
  this.children = children;
@@ -1 +1 @@
1
- {"version":3,"file":"degree.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/geometry/degree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,UAAU,CAErD;AAED,qBAAa,UAAW,YAAW,aAAa;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAmB;IACjC,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;IAO5D,aAAa;;;;IAMb,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;IAGf,QAAQ;IAGR,cAAc;IAOd,iBAAiB;IAGjB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGrC,QAAQ;IAGR,MAAM,CAAC,IAAI,EAAE,aAAa;CAG3B"}
1
+ {"version":3,"file":"degree.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/geometry/degree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,UAAU,CAErD;AAED,qBAAa,UAAW,YAAW,aAAa;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,CAAmB;IACjC,SAAS,EAAE,OAAO,CAAC;gBACP,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;IAO5D,aAAa;;;;IAMb,YAAY,IAAI,MAAM;IAGtB,KAAK,IAAI,MAAM;IAGf,QAAQ;IAGR,cAAc;IAQd,iBAAiB;IAGjB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAGrC,QAAQ;IAGR,MAAM,CAAC,IAAI,EAAE,aAAa;CAG3B"}
@@ -11,8 +11,8 @@ class DegreeNode {
11
11
  this.type = node_1.NodeType.number;
12
12
  this.value = value;
13
13
  this.tex =
14
- (tex?.replace(".", ",") || (value + "").replace(".", ",")) + `^\\circ`;
15
- this.mathString = mathString || this.value + "^\\circ";
14
+ (tex?.replace(".", ",") || (value + "").replace(".", ",")) + `^{\\circ}`;
15
+ this.mathString = mathString || this.value + "^\\{\\circ\\}";
16
16
  this.isNumeric = true;
17
17
  }
18
18
  toIdentifiers() {
@@ -33,6 +33,7 @@ class DegreeNode {
33
33
  toAllValidTexs() {
34
34
  const res = [];
35
35
  res.push(this.tex);
36
+ res.push(this.value.frenchify());
36
37
  //!est-ce vraiment nécessaire sachant que les inputs students n'auront en théorie jamais de "."
37
38
  if (this.tex.includes(","))
38
39
  res.push(this.tex.replace(",", "."));
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PointNode = void 0;
4
4
  const point_1 = require("../../../math/geometry/point");
5
- const cartesianProducts_1 = require("../../../utils/cartesianProducts");
5
+ const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
6
6
  const node_1 = require("../node");
7
7
  class PointNode {
8
8
  constructor(point, opts) {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InequationNode = void 0;
4
4
  const inequation_1 = require("../../../math/inequations/inequation");
5
- const cartesianProducts_1 = require("../../../utils/cartesianProducts");
5
+ const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
6
6
  const isLetter_1 = require("../../../utils/strings/isLetter");
7
7
  const node_1 = require("../node");
8
8
  const infiniteNode_1 = require("../numbers/infiniteNode");
@@ -4,9 +4,9 @@ exports.AddNode = exports.isAddNode = void 0;
4
4
  // import { add } from "mathjs";
5
5
  const node_1 = require("../node");
6
6
  const operatorNode_1 = require("./operatorNode");
7
- const coinFlip_1 = require("../../../utils/coinFlip");
8
- const permutations_1 = require("../../../utils/permutations");
9
- const cartesianProducts_1 = require("../../../utils/cartesianProducts");
7
+ const coinFlip_1 = require("../../../utils/alea/coinFlip");
8
+ const permutations_1 = require("../../../utils/arrays/permutations");
9
+ const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
10
10
  const operatorComposition_1 = require("../../../tree/utilities/operatorComposition");
11
11
  const substractNode_1 = require("./substractNode");
12
12
  const oppositeNode_1 = require("../functions/oppositeNode");
@@ -4,7 +4,7 @@ exports.DivideNode = exports.isDivideNode = void 0;
4
4
  // import { divide } from "mathjs";
5
5
  const node_1 = require("../node");
6
6
  const operatorNode_1 = require("./operatorNode");
7
- const coinFlip_1 = require("../../../utils/coinFlip");
7
+ const coinFlip_1 = require("../../../utils/alea/coinFlip");
8
8
  function isDivideNode(a) {
9
9
  return (0, operatorNode_1.isOperatorNode)(a) && a.id === operatorNode_1.OperatorIds.divide;
10
10
  }
@@ -4,9 +4,9 @@ exports.MultiplyNode = exports.sortMultiplyNodes = exports.isMultiplyNode = void
4
4
  // import { multiply } from "mathjs";
5
5
  const node_1 = require("../node");
6
6
  const operatorNode_1 = require("./operatorNode");
7
- const coinFlip_1 = require("../../../utils/coinFlip");
8
- const permutations_1 = require("../../../utils/permutations");
9
- const cartesianProducts_1 = require("../../../utils/cartesianProducts");
7
+ const coinFlip_1 = require("../../../utils/alea/coinFlip");
8
+ const permutations_1 = require("../../../utils/arrays/permutations");
9
+ const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
10
10
  const operatorComposition_1 = require("../../../tree/utilities/operatorComposition");
11
11
  const powerNode_1 = require("./powerNode");
12
12
  const numberNode_1 = require("../numbers/numberNode");
@@ -6,7 +6,7 @@ const node_1 = require("../node");
6
6
  const operatorNode_1 = require("./operatorNode");
7
7
  const oppositeNode_1 = require("../functions/oppositeNode");
8
8
  const addNode_1 = require("./addNode");
9
- const coinFlip_1 = require("../../../utils/coinFlip");
9
+ const coinFlip_1 = require("../../../utils/alea/coinFlip");
10
10
  const colorize_1 = require("../../../utils/latex/colorize");
11
11
  function isSubstractNode(a) {
12
12
  return (0, operatorNode_1.isOperatorNode)(a) && a.id === operatorNode_1.OperatorIds.substract;
@@ -20,6 +20,7 @@ export declare class DiscreteSetNode implements SetNode {
20
20
  toMathString(): string;
21
21
  toMathjs(): string;
22
22
  toTex(): string;
23
+ toDeleteRandomElement(): DiscreteSetNode;
23
24
  }
24
25
  export declare const EmptySet: DiscreteSetNode;
25
26
  //# sourceMappingURL=discreteSetNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"discreteSetNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/discreteSetNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAa,MAAM,WAAW,CAAC;AACvD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,eAAe,CAE/D;AACD,qBAAa,eAAgB,YAAW,OAAO;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;gBACL,QAAQ,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,EAAE,WAAW;IAOhD,UAAU;IAGV,cAAc;IAGd,aAAa;;;;;;IAMb,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW;IAyBpC,YAAY;IAGZ,QAAQ;IAGR,KAAK;CAMN;AAED,eAAO,MAAM,QAAQ,iBAA0B,CAAC"}
1
+ {"version":3,"file":"discreteSetNode.d.ts","sourceRoot":"","sources":["../../../../src/tree/nodes/sets/discreteSetNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,OAAO,EAAa,MAAM,WAAW,CAAC;AACvD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,eAAe,CAE/D;AACD,qBAAa,eAAgB,YAAW,OAAO;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;gBACL,QAAQ,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,EAAE,WAAW;IAOhD,UAAU;IAGV,cAAc;IAGd,aAAa;;;;;;IAMb,iBAAiB,CAAC,IAAI,CAAC,EAAE,WAAW;IAyBpC,YAAY;IAGZ,QAAQ;IAGR,KAAK;IAOL,qBAAqB;CAMtB;AAED,eAAO,MAAM,QAAQ,iBAA0B,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EmptySet = exports.DiscreteSetNode = exports.isDiscreteSetNode = void 0;
4
- const cartesianProducts_1 = require("../../../utils/cartesianProducts");
5
- const permutations_1 = require("../../../utils/permutations");
4
+ const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
5
+ const permutations_1 = require("../../../utils/arrays/permutations");
6
6
  const node_1 = require("../node");
7
7
  const setNode_1 = require("./setNode");
8
8
  function isDiscreteSetNode(a) {
@@ -65,6 +65,12 @@ class DiscreteSetNode {
65
65
  .map((el) => el.toTex())
66
66
  .join(";")}\\right\\}`;
67
67
  }
68
+ toDeleteRandomElement() {
69
+ const index = Math.floor(Math.random() * this.elements.length);
70
+ const newElements = [...this.elements];
71
+ newElements.splice(index, 1);
72
+ return new DiscreteSetNode(newElements);
73
+ }
68
74
  }
69
75
  exports.DiscreteSetNode = DiscreteSetNode;
70
76
  exports.EmptySet = new DiscreteSetNode([]);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IntervalNode = exports.isIntervalNode = void 0;
4
- const cartesianProducts_1 = require("../../../utils/cartesianProducts");
4
+ const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
5
5
  const inequationNode_1 = require("../inequations/inequationNode");
6
6
  const node_1 = require("../node");
7
7
  const constantNode_1 = require("../numbers/constantNode");
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UnionIntervalNode = exports.UnionIntervalNodeBuilder = exports.isUnionIntervalNode = void 0;
4
- const cartesianProducts_1 = require("../../../utils/cartesianProducts");
5
- const permutations_1 = require("../../../utils/permutations");
4
+ const cartesianProducts_1 = require("../../../utils/arrays/cartesianProducts");
5
+ const permutations_1 = require("../../../utils/arrays/permutations");
6
6
  const node_1 = require("../node");
7
7
  const infiniteNode_1 = require("../numbers/infiniteNode");
8
8
  const closure_1 = require("./closure");
@@ -0,0 +1,2 @@
1
+ export declare const euroParser: (ans: string, allowNoEuroSign?: boolean) => string | false;
2
+ //# sourceMappingURL=euroParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"euroParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/euroParser.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,QAAS,MAAM,8CAKrC,CAAC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.euroParser = void 0;
4
+ const euroParser = (ans, allowNoEuroSign = true) => {
5
+ if (!allowNoEuroSign && !ans.includes("€"))
6
+ return false;
7
+ const nb = ans.replace("€", "").unfrenchify();
8
+ if (isNaN(nb))
9
+ return false;
10
+ return nb.frenchify() + "€";
11
+ };
12
+ exports.euroParser = euroParser;
@@ -1 +1,2 @@
1
+ export declare const percentParser: (ans: string, allowNoPercentSign?: boolean) => string | false;
1
2
  //# sourceMappingURL=percentParser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"percentParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/percentParser.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"percentParser.d.ts","sourceRoot":"","sources":["../../../src/tree/parsers/percentParser.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,QAAS,MAAM,iDAKxC,CAAC"}
@@ -1 +1,12 @@
1
1
  "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.percentParser = void 0;
4
+ const percentParser = (ans, allowNoPercentSign = true) => {
5
+ if (!allowNoPercentSign && !ans.includes("\\%"))
6
+ return false;
7
+ const nb = ans.replace("\\%", "").unfrenchify();
8
+ if (isNaN(nb))
9
+ return false;
10
+ return nb.frenchify() + "\\%";
11
+ };
12
+ exports.percentParser = percentParser;
@@ -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/alea/coinFlip.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,QAAO,OAE3B,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.coinFlip = void 0;
4
+ const coinFlip = () => {
5
+ return Math.random() < 0.5;
6
+ };
7
+ exports.coinFlip = coinFlip;
@@ -0,0 +1,2 @@
1
+ export declare const diceFlip: (faces: number) => number;
2
+ //# sourceMappingURL=diceFlip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diceFlip.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/diceFlip.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,UAAW,MAAM,WAErC,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.diceFlip = void 0;
4
+ const randint_1 = require("../../math/utils/random/randint");
5
+ const diceFlip = (faces) => {
6
+ return (0, randint_1.randint)(1, faces + 1);
7
+ };
8
+ exports.diceFlip = diceFlip;
@@ -0,0 +1,7 @@
1
+ /**
2
+ *
3
+ * @param n
4
+ * @returns true iff random < n
5
+ */
6
+ export declare const probaFlip: (n: number) => boolean;
7
+ //# sourceMappingURL=probaFlip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"probaFlip.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/probaFlip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,SAAS,MAAO,MAAM,YAElC,CAAC"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ *
4
+ * @param n
5
+ * @returns true iff random < n
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.probaFlip = void 0;
9
+ const probaFlip = (n) => {
10
+ return Math.random() < n;
11
+ };
12
+ exports.probaFlip = probaFlip;
@@ -0,0 +1,7 @@
1
+ /**
2
+ *
3
+ * @param arr [T, proba]
4
+ * @returns element T_i with proba p_i
5
+ */
6
+ export declare const probaLawFlip: <T>(arr: [T, number][]) => T;
7
+ //# sourceMappingURL=probaLawFlip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"probaLawFlip.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/probaLawFlip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,YAAY,8BAaxB,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /**
3
+ *
4
+ * @param arr [T, proba]
5
+ * @returns element T_i with proba p_i
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.probaLawFlip = void 0;
9
+ const probaLawFlip = (arr) => {
10
+ if (Math.abs(arr.reduce((acc, curr) => (acc += curr[1]), 0) - 1) > 0.1)
11
+ throw Error("proba law does not add up t 1");
12
+ const rand = Math.random();
13
+ const sorted = [...arr].sort((a, b) => b[1] - a[1]);
14
+ let probaAcc = 0;
15
+ let i = 0;
16
+ while (i < arr.length - 1) {
17
+ probaAcc += sorted[i][1];
18
+ if (rand < probaAcc)
19
+ return arr[i][0];
20
+ i++;
21
+ }
22
+ return arr[arr.length - 1][0];
23
+ };
24
+ exports.probaLawFlip = probaLawFlip;
@@ -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/alea/random.ts"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAEnC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.random = void 0;
4
+ function random(array) {
5
+ return array[Math.floor(Math.random() * array.length)];
6
+ }
7
+ exports.random = random;
@@ -0,0 +1,2 @@
1
+ export declare const randomEnumValue: (e: any) => any;
2
+ //# sourceMappingURL=randomEnumValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"randomEnumValue.d.ts","sourceRoot":"","sources":["../../../src/utils/alea/randomEnumValue.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,MAAO,GAAG,QAGrC,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.randomEnumValue = void 0;
4
+ const randint_1 = require("../../math/utils/random/randint");
5
+ const randomEnumValue = (e) => {
6
+ const randIndex = (0, randint_1.randint)(0, Object.keys(e).length / 2);
7
+ return e[randIndex];
8
+ };
9
+ exports.randomEnumValue = randomEnumValue;
@@ -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/alea/shuffle.ts"],"names":[],"mappings":"AACA,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAS1C"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.shuffle = void 0;
4
+ /* Randomize array in-place using Durstenfeld shuffle algorithm */
5
+ function shuffle(array) {
6
+ const res = [...array];
7
+ for (var i = res.length - 1; i > 0; i--) {
8
+ var j = Math.floor(Math.random() * (i + 1));
9
+ var temp = res[i];
10
+ res[i] = res[j];
11
+ res[j] = temp;
12
+ }
13
+ return res;
14
+ }
15
+ exports.shuffle = shuffle;
@@ -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/arrays/arrayEqual.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,OAAO,CAM3D"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.arrayEqual = void 0;
4
+ function arrayEqual(arr1, arr2) {
5
+ if (arr1.length !== arr2.length)
6
+ return false;
7
+ for (let i = 0; i < arr1.length; i++) {
8
+ if (arr1[i] !== arr2[i])
9
+ return false;
10
+ }
11
+ return true;
12
+ }
13
+ exports.arrayEqual = arrayEqual;
@@ -0,0 +1,2 @@
1
+ export declare function arrayHasSameElements<E>(arr1: E[], arr2: E[]): boolean;
2
+ //# sourceMappingURL=arrayHasSameElement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrayHasSameElement.d.ts","sourceRoot":"","sources":["../../../src/utils/arrays/arrayHasSameElement.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,OAAO,CAKrE"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.arrayHasSameElements = void 0;
4
+ function arrayHasSameElements(arr1, arr2) {
5
+ return (arr1.length === arr2.length &&
6
+ arr1.every((element) => arr2.includes(element)));
7
+ }
8
+ exports.arrayHasSameElements = arrayHasSameElements;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * exp [[1,2],[3],[4,5]] donnera [[1,3,4], [1,3,5], [2,3,4],[2,3,5]]
3
+ * @param arr
4
+ * @returns
5
+ */
6
+ export declare function getCartesiansProducts<T>(arr: T[][]): T[][];
7
+ /**
8
+ * exp [[1], [[5, 5], 6], [7, [8, 9]]] -> [1,5,5,7] [1,5,5,8,9] [1,6,7] [1,6,8,9]
9
+ * @param arr
10
+ * @returns
11
+ */
12
+ export declare function getFlatCartesianProducts<T>(arr: (T | T[])[][]): T[][];
13
+ //# sourceMappingURL=cartesianProducts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cartesianProducts.d.ts","sourceRoot":"","sources":["../../../src/utils/arrays/cartesianProducts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,SAkBlD;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,SA8B7D"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getFlatCartesianProducts = exports.getCartesiansProducts = void 0;
4
+ /**
5
+ * exp [[1,2],[3],[4,5]] donnera [[1,3,4], [1,3,5], [2,3,4],[2,3,5]]
6
+ * @param arr
7
+ * @returns
8
+ */
9
+ function getCartesiansProducts(arr) {
10
+ const res = [];
11
+ for (let i = 0; i < arr.length; i++) {
12
+ const currentRes = [...res];
13
+ for (let j = 0; j < arr[i].length; j++) {
14
+ if (i === 0)
15
+ res.push([arr[i][j]]);
16
+ else {
17
+ if (j === 0) {
18
+ currentRes.forEach((el) => el.push(arr[i][j]));
19
+ }
20
+ else {
21
+ currentRes.forEach((el) => res.push([...el.slice(0, el.length - 1), arr[i][j]]));
22
+ }
23
+ }
24
+ }
25
+ }
26
+ return res;
27
+ }
28
+ exports.getCartesiansProducts = getCartesiansProducts;
29
+ /**
30
+ * exp [[1], [[5, 5], 6], [7, [8, 9]]] -> [1,5,5,7] [1,5,5,8,9] [1,6,7] [1,6,8,9]
31
+ * @param arr
32
+ * @returns
33
+ */
34
+ function getFlatCartesianProducts(arr) {
35
+ const res = [];
36
+ for (let i = 0; i < arr.length; i++) {
37
+ const currentRes = [...res];
38
+ for (let j = 0; j < arr[i].length; j++) {
39
+ const isArray = Array.isArray(arr[i][j]);
40
+ const eltToArray = isArray
41
+ ? arr[i][j]
42
+ : [arr[i][j]];
43
+ if (i === 0)
44
+ res.push([...eltToArray]);
45
+ else {
46
+ if (j === 0) {
47
+ res.forEach((el) => el.push(...eltToArray));
48
+ }
49
+ else {
50
+ const isPrevArray = Array.isArray(arr[i][0]);
51
+ const prevEltToArray = isPrevArray
52
+ ? arr[i][0]
53
+ : [arr[i][0]];
54
+ currentRes.forEach((el) => res.push([
55
+ ...el.slice(0, el.length - prevEltToArray.length),
56
+ ...eltToArray,
57
+ ]));
58
+ }
59
+ }
60
+ }
61
+ }
62
+ return res;
63
+ }
64
+ exports.getFlatCartesianProducts = getFlatCartesianProducts;
@@ -0,0 +1,8 @@
1
+ /**
2
+ *
3
+ * @param e
4
+ * @returns
5
+ * ! probably doesn't work if enum contains numbers
6
+ */
7
+ export declare const enumToArray: (e: any) => string;
8
+ //# sourceMappingURL=enumToArray.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enumToArray.d.ts","sourceRoot":"","sources":["../../../src/utils/arrays/enumToArray.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,WAAW,MAAO,GAAG,WAKjC,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.enumToArray = void 0;
4
+ /**
5
+ *
6
+ * @param e
7
+ * @returns
8
+ * ! probably doesn't work if enum contains numbers
9
+ */
10
+ const enumToArray = (e) => {
11
+ const colors = Object.keys(e).filter((item) => {
12
+ return isNaN(Number(item));
13
+ });
14
+ return colors.join('\n');
15
+ };
16
+ exports.enumToArray = enumToArray;
@@ -0,0 +1,2 @@
1
+ export declare function permute<T>(arr: T[]): T[][];
2
+ //# sourceMappingURL=permutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permutations.d.ts","sourceRoot":"","sources":["../../../src/utils/arrays/permutations.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,SAclC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.permute = void 0;
4
+ function permute(arr) {
5
+ const result = [];
6
+ if (arr.length === 0)
7
+ return [];
8
+ if (arr.length === 1)
9
+ return [arr];
10
+ for (let i = 0; i < arr.length; i++) {
11
+ const currentNum = arr[i];
12
+ const remainingNums = arr.slice(0, i).concat(arr.slice(i + 1));
13
+ const remainingNumsPermuted = permute(remainingNums);
14
+ for (let j = 0; j < remainingNumsPermuted.length; j++) {
15
+ const permutedArray = [currentNum].concat(remainingNumsPermuted[j]);
16
+ result.push(permutedArray);
17
+ }
18
+ }
19
+ return result;
20
+ }
21
+ exports.permute = permute;
@@ -1,2 +1,2 @@
1
- export declare function alignTex(arr: string[][] | string): string;
1
+ export declare function alignTex(arr: string[][] | string, noLatexSigns?: boolean): string;
2
2
  //# sourceMappingURL=alignTex.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"alignTex.d.ts","sourceRoot":"","sources":["../../../src/utils/latex/alignTex.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,UAehD"}
1
+ {"version":3,"file":"alignTex.d.ts","sourceRoot":"","sources":["../../../src/utils/latex/alignTex.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,YAAY,UAAQ,UAetE"}