mathjs 11.2.1 → 11.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1322) hide show
  1. package/HISTORY.md +19 -1
  2. package/README.md +26 -0
  3. package/lib/browser/math.js +1 -1
  4. package/lib/browser/math.js.LICENSE.txt +2 -2
  5. package/lib/browser/math.js.map +1 -1
  6. package/lib/cjs/constants.js +21 -23
  7. package/lib/cjs/core/create.js +23 -41
  8. package/lib/cjs/core/function/config.js +12 -16
  9. package/lib/cjs/core/function/import.js +21 -66
  10. package/lib/cjs/core/function/typed.js +24 -50
  11. package/lib/cjs/defaultInstance.js +0 -7
  12. package/lib/cjs/entry/allFactoriesAny.js +1 -5
  13. package/lib/cjs/entry/allFactoriesNumber.js +1 -5
  14. package/lib/cjs/entry/configReadonly.js +0 -7
  15. package/lib/cjs/entry/dependenciesAny/dependenciesAbs.generated.js +1 -3
  16. package/lib/cjs/entry/dependenciesAny/dependenciesAccessorNode.generated.js +1 -4
  17. package/lib/cjs/entry/dependenciesAny/dependenciesAcos.generated.js +1 -4
  18. package/lib/cjs/entry/dependenciesAny/dependenciesAcosh.generated.js +1 -4
  19. package/lib/cjs/entry/dependenciesAny/dependenciesAcot.generated.js +1 -4
  20. package/lib/cjs/entry/dependenciesAny/dependenciesAcoth.generated.js +1 -5
  21. package/lib/cjs/entry/dependenciesAny/dependenciesAcsc.generated.js +1 -5
  22. package/lib/cjs/entry/dependenciesAny/dependenciesAcsch.generated.js +1 -4
  23. package/lib/cjs/entry/dependenciesAny/dependenciesAdd.generated.js +1 -8
  24. package/lib/cjs/entry/dependenciesAny/dependenciesAddScalar.generated.js +1 -3
  25. package/lib/cjs/entry/dependenciesAny/dependenciesAnd.generated.js +1 -7
  26. package/lib/cjs/entry/dependenciesAny/dependenciesApply.generated.js +1 -4
  27. package/lib/cjs/entry/dependenciesAny/dependenciesApplyTransform.generated.js +1 -4
  28. package/lib/cjs/entry/dependenciesAny/dependenciesArg.generated.js +1 -3
  29. package/lib/cjs/entry/dependenciesAny/dependenciesArrayNode.generated.js +1 -3
  30. package/lib/cjs/entry/dependenciesAny/dependenciesAsec.generated.js +1 -5
  31. package/lib/cjs/entry/dependenciesAny/dependenciesAsech.generated.js +1 -5
  32. package/lib/cjs/entry/dependenciesAny/dependenciesAsin.generated.js +1 -4
  33. package/lib/cjs/entry/dependenciesAny/dependenciesAsinh.generated.js +1 -3
  34. package/lib/cjs/entry/dependenciesAny/dependenciesAssignmentNode.generated.js +1 -5
  35. package/lib/cjs/entry/dependenciesAny/dependenciesAtan.generated.js +1 -3
  36. package/lib/cjs/entry/dependenciesAny/dependenciesAtan2.generated.js +1 -7
  37. package/lib/cjs/entry/dependenciesAny/dependenciesAtanh.generated.js +1 -4
  38. package/lib/cjs/entry/dependenciesAny/dependenciesAtomicMass.generated.js +1 -4
  39. package/lib/cjs/entry/dependenciesAny/dependenciesAvogadro.generated.js +1 -4
  40. package/lib/cjs/entry/dependenciesAny/dependenciesBellNumbers.generated.js +1 -7
  41. package/lib/cjs/entry/dependenciesAny/dependenciesBigNumberClass.generated.js +1 -2
  42. package/lib/cjs/entry/dependenciesAny/dependenciesBignumber.generated.js +1 -4
  43. package/lib/cjs/entry/dependenciesAny/dependenciesBin.generated.js +1 -4
  44. package/lib/cjs/entry/dependenciesAny/dependenciesBitAnd.generated.js +1 -5
  45. package/lib/cjs/entry/dependenciesAny/dependenciesBitNot.generated.js +1 -3
  46. package/lib/cjs/entry/dependenciesAny/dependenciesBitOr.generated.js +1 -6
  47. package/lib/cjs/entry/dependenciesAny/dependenciesBitXor.generated.js +1 -5
  48. package/lib/cjs/entry/dependenciesAny/dependenciesBlockNode.generated.js +1 -4
  49. package/lib/cjs/entry/dependenciesAny/dependenciesBohrMagneton.generated.js +1 -4
  50. package/lib/cjs/entry/dependenciesAny/dependenciesBohrRadius.generated.js +1 -4
  51. package/lib/cjs/entry/dependenciesAny/dependenciesBoltzmann.generated.js +1 -4
  52. package/lib/cjs/entry/dependenciesAny/dependenciesBoolean.generated.js +1 -3
  53. package/lib/cjs/entry/dependenciesAny/dependenciesCatalan.generated.js +1 -9
  54. package/lib/cjs/entry/dependenciesAny/dependenciesCbrt.generated.js +1 -9
  55. package/lib/cjs/entry/dependenciesAny/dependenciesCeil.generated.js +1 -8
  56. package/lib/cjs/entry/dependenciesAny/dependenciesChain.generated.js +1 -4
  57. package/lib/cjs/entry/dependenciesAny/dependenciesChainClass.generated.js +1 -3
  58. package/lib/cjs/entry/dependenciesAny/dependenciesClassicalElectronRadius.generated.js +1 -4
  59. package/lib/cjs/entry/dependenciesAny/dependenciesClone.generated.js +1 -3
  60. package/lib/cjs/entry/dependenciesAny/dependenciesColumn.generated.js +1 -6
  61. package/lib/cjs/entry/dependenciesAny/dependenciesColumnTransform.generated.js +1 -6
  62. package/lib/cjs/entry/dependenciesAny/dependenciesCombinations.generated.js +1 -3
  63. package/lib/cjs/entry/dependenciesAny/dependenciesCombinationsWithRep.generated.js +1 -3
  64. package/lib/cjs/entry/dependenciesAny/dependenciesCompare.generated.js +1 -8
  65. package/lib/cjs/entry/dependenciesAny/dependenciesCompareNatural.generated.js +1 -4
  66. package/lib/cjs/entry/dependenciesAny/dependenciesCompareText.generated.js +1 -4
  67. package/lib/cjs/entry/dependenciesAny/dependenciesCompile.generated.js +1 -4
  68. package/lib/cjs/entry/dependenciesAny/dependenciesComplex.generated.js +1 -4
  69. package/lib/cjs/entry/dependenciesAny/dependenciesComplexClass.generated.js +1 -2
  70. package/lib/cjs/entry/dependenciesAny/dependenciesComposition.generated.js +1 -9
  71. package/lib/cjs/entry/dependenciesAny/dependenciesConcat.generated.js +1 -5
  72. package/lib/cjs/entry/dependenciesAny/dependenciesConcatTransform.generated.js +1 -5
  73. package/lib/cjs/entry/dependenciesAny/dependenciesConditionalNode.generated.js +1 -3
  74. package/lib/cjs/entry/dependenciesAny/dependenciesConductanceQuantum.generated.js +1 -4
  75. package/lib/cjs/entry/dependenciesAny/dependenciesConj.generated.js +1 -3
  76. package/lib/cjs/entry/dependenciesAny/dependenciesConstantNode.generated.js +1 -3
  77. package/lib/cjs/entry/dependenciesAny/dependenciesCos.generated.js +1 -3
  78. package/lib/cjs/entry/dependenciesAny/dependenciesCosh.generated.js +1 -3
  79. package/lib/cjs/entry/dependenciesAny/dependenciesCot.generated.js +1 -4
  80. package/lib/cjs/entry/dependenciesAny/dependenciesCoth.generated.js +1 -4
  81. package/lib/cjs/entry/dependenciesAny/dependenciesCoulomb.generated.js +1 -4
  82. package/lib/cjs/entry/dependenciesAny/dependenciesCount.generated.js +1 -5
  83. package/lib/cjs/entry/dependenciesAny/dependenciesCreateUnit.generated.js +1 -4
  84. package/lib/cjs/entry/dependenciesAny/dependenciesCross.generated.js +1 -6
  85. package/lib/cjs/entry/dependenciesAny/dependenciesCsc.generated.js +1 -4
  86. package/lib/cjs/entry/dependenciesAny/dependenciesCsch.generated.js +1 -4
  87. package/lib/cjs/entry/dependenciesAny/dependenciesCtranspose.generated.js +1 -5
  88. package/lib/cjs/entry/dependenciesAny/dependenciesCube.generated.js +1 -3
  89. package/lib/cjs/entry/dependenciesAny/dependenciesCumSum.generated.js +1 -5
  90. package/lib/cjs/entry/dependenciesAny/dependenciesCumSumTransform.generated.js +1 -5
  91. package/lib/cjs/entry/dependenciesAny/dependenciesDeepEqual.generated.js +1 -4
  92. package/lib/cjs/entry/dependenciesAny/dependenciesDenseMatrixClass.generated.js +1 -3
  93. package/lib/cjs/entry/dependenciesAny/dependenciesDerivative.generated.js +1 -13
  94. package/lib/cjs/entry/dependenciesAny/dependenciesDet.generated.js +1 -9
  95. package/lib/cjs/entry/dependenciesAny/dependenciesDeuteronMass.generated.js +1 -4
  96. package/lib/cjs/entry/dependenciesAny/dependenciesDiag.generated.js +1 -6
  97. package/lib/cjs/entry/dependenciesAny/dependenciesDiff.generated.js +1 -6
  98. package/lib/cjs/entry/dependenciesAny/dependenciesDiffTransform.generated.js +1 -7
  99. package/lib/cjs/entry/dependenciesAny/dependenciesDistance.generated.js +1 -10
  100. package/lib/cjs/entry/dependenciesAny/dependenciesDivide.generated.js +1 -8
  101. package/lib/cjs/entry/dependenciesAny/dependenciesDivideScalar.generated.js +1 -4
  102. package/lib/cjs/entry/dependenciesAny/dependenciesDot.generated.js +1 -7
  103. package/lib/cjs/entry/dependenciesAny/dependenciesDotDivide.generated.js +1 -7
  104. package/lib/cjs/entry/dependenciesAny/dependenciesDotMultiply.generated.js +1 -6
  105. package/lib/cjs/entry/dependenciesAny/dependenciesDotPow.generated.js +1 -7
  106. package/lib/cjs/entry/dependenciesAny/dependenciesE.generated.js +1 -3
  107. package/lib/cjs/entry/dependenciesAny/dependenciesEfimovFactor.generated.js +1 -3
  108. package/lib/cjs/entry/dependenciesAny/dependenciesEigs.generated.js +1 -32
  109. package/lib/cjs/entry/dependenciesAny/dependenciesElectricConstant.generated.js +1 -4
  110. package/lib/cjs/entry/dependenciesAny/dependenciesElectronMass.generated.js +1 -4
  111. package/lib/cjs/entry/dependenciesAny/dependenciesElementaryCharge.generated.js +1 -4
  112. package/lib/cjs/entry/dependenciesAny/dependenciesEqual.generated.js +1 -6
  113. package/lib/cjs/entry/dependenciesAny/dependenciesEqualScalar.generated.js +1 -3
  114. package/lib/cjs/entry/dependenciesAny/dependenciesEqualText.generated.js +1 -5
  115. package/lib/cjs/entry/dependenciesAny/dependenciesErf.generated.js +1 -3
  116. package/lib/cjs/entry/dependenciesAny/dependenciesEvaluate.generated.js +1 -4
  117. package/lib/cjs/entry/dependenciesAny/dependenciesExp.generated.js +1 -3
  118. package/lib/cjs/entry/dependenciesAny/dependenciesExpm.generated.js +1 -8
  119. package/lib/cjs/entry/dependenciesAny/dependenciesExpm1.generated.js +1 -4
  120. package/lib/cjs/entry/dependenciesAny/dependenciesFactorial.generated.js +1 -4
  121. package/lib/cjs/entry/dependenciesAny/dependenciesFalse.generated.js +1 -2
  122. package/lib/cjs/entry/dependenciesAny/dependenciesFaraday.generated.js +1 -4
  123. package/lib/cjs/entry/dependenciesAny/dependenciesFermiCoupling.generated.js +1 -4
  124. package/lib/cjs/entry/dependenciesAny/dependenciesFft.generated.js +1 -10
  125. package/lib/cjs/entry/dependenciesAny/dependenciesFibonacciHeapClass.generated.js +1 -4
  126. package/lib/cjs/entry/dependenciesAny/dependenciesFilter.generated.js +1 -3
  127. package/lib/cjs/entry/dependenciesAny/dependenciesFilterTransform.generated.js +1 -3
  128. package/lib/cjs/entry/dependenciesAny/dependenciesFineStructure.generated.js +1 -3
  129. package/lib/cjs/entry/dependenciesAny/dependenciesFirstRadiation.generated.js +1 -4
  130. package/lib/cjs/entry/dependenciesAny/dependenciesFix.generated.js +1 -10
  131. package/lib/cjs/entry/dependenciesAny/dependenciesFlatten.generated.js +1 -4
  132. package/lib/cjs/entry/dependenciesAny/dependenciesFloor.generated.js +1 -8
  133. package/lib/cjs/entry/dependenciesAny/dependenciesForEach.generated.js +1 -3
  134. package/lib/cjs/entry/dependenciesAny/dependenciesForEachTransform.generated.js +1 -3
  135. package/lib/cjs/entry/dependenciesAny/dependenciesFormat.generated.js +1 -3
  136. package/lib/cjs/entry/dependenciesAny/dependenciesFraction.generated.js +1 -4
  137. package/lib/cjs/entry/dependenciesAny/dependenciesFractionClass.generated.js +1 -2
  138. package/lib/cjs/entry/dependenciesAny/dependenciesFunctionAssignmentNode.generated.js +1 -4
  139. package/lib/cjs/entry/dependenciesAny/dependenciesFunctionNode.generated.js +1 -4
  140. package/lib/cjs/entry/dependenciesAny/dependenciesGamma.generated.js +1 -7
  141. package/lib/cjs/entry/dependenciesAny/dependenciesGasConstant.generated.js +1 -4
  142. package/lib/cjs/entry/dependenciesAny/dependenciesGcd.generated.js +1 -7
  143. package/lib/cjs/entry/dependenciesAny/dependenciesGetMatrixDataType.generated.js +1 -3
  144. package/lib/cjs/entry/dependenciesAny/dependenciesGravitationConstant.generated.js +1 -4
  145. package/lib/cjs/entry/dependenciesAny/dependenciesGravity.generated.js +1 -4
  146. package/lib/cjs/entry/dependenciesAny/dependenciesHartreeEnergy.generated.js +1 -4
  147. package/lib/cjs/entry/dependenciesAny/dependenciesHasNumericValue.generated.js +1 -4
  148. package/lib/cjs/entry/dependenciesAny/dependenciesHelp.generated.js +1 -4
  149. package/lib/cjs/entry/dependenciesAny/dependenciesHelpClass.generated.js +1 -3
  150. package/lib/cjs/entry/dependenciesAny/dependenciesHex.generated.js +1 -4
  151. package/lib/cjs/entry/dependenciesAny/dependenciesHypot.generated.js +1 -10
  152. package/lib/cjs/entry/dependenciesAny/dependenciesI.generated.js +1 -3
  153. package/lib/cjs/entry/dependenciesAny/dependenciesIdentity.generated.js +1 -7
  154. package/lib/cjs/entry/dependenciesAny/dependenciesIfft.generated.js +1 -6
  155. package/lib/cjs/entry/dependenciesAny/dependenciesIm.generated.js +1 -3
  156. package/lib/cjs/entry/dependenciesAny/dependenciesImmutableDenseMatrixClass.generated.js +1 -4
  157. package/lib/cjs/entry/dependenciesAny/dependenciesIndex.generated.js +1 -4
  158. package/lib/cjs/entry/dependenciesAny/dependenciesIndexClass.generated.js +1 -3
  159. package/lib/cjs/entry/dependenciesAny/dependenciesIndexNode.generated.js +1 -4
  160. package/lib/cjs/entry/dependenciesAny/dependenciesIndexTransform.generated.js +1 -3
  161. package/lib/cjs/entry/dependenciesAny/dependenciesInfinity.generated.js +1 -3
  162. package/lib/cjs/entry/dependenciesAny/dependenciesIntersect.generated.js +1 -16
  163. package/lib/cjs/entry/dependenciesAny/dependenciesInv.generated.js +1 -11
  164. package/lib/cjs/entry/dependenciesAny/dependenciesInverseConductanceQuantum.generated.js +1 -4
  165. package/lib/cjs/entry/dependenciesAny/dependenciesInvmod.generated.js +1 -10
  166. package/lib/cjs/entry/dependenciesAny/dependenciesIsInteger.generated.js +1 -3
  167. package/lib/cjs/entry/dependenciesAny/dependenciesIsNaN.generated.js +1 -3
  168. package/lib/cjs/entry/dependenciesAny/dependenciesIsNegative.generated.js +1 -3
  169. package/lib/cjs/entry/dependenciesAny/dependenciesIsNumeric.generated.js +1 -3
  170. package/lib/cjs/entry/dependenciesAny/dependenciesIsPositive.generated.js +1 -3
  171. package/lib/cjs/entry/dependenciesAny/dependenciesIsPrime.generated.js +1 -3
  172. package/lib/cjs/entry/dependenciesAny/dependenciesIsZero.generated.js +1 -3
  173. package/lib/cjs/entry/dependenciesAny/dependenciesKldivergence.generated.js +1 -11
  174. package/lib/cjs/entry/dependenciesAny/dependenciesKlitzing.generated.js +1 -4
  175. package/lib/cjs/entry/dependenciesAny/dependenciesKron.generated.js +1 -5
  176. package/lib/cjs/entry/dependenciesAny/dependenciesLN10.generated.js +1 -3
  177. package/lib/cjs/entry/dependenciesAny/dependenciesLN2.generated.js +1 -3
  178. package/lib/cjs/entry/dependenciesAny/dependenciesLOG10E.generated.js +1 -3
  179. package/lib/cjs/entry/dependenciesAny/dependenciesLOG2E.generated.js +1 -3
  180. package/lib/cjs/entry/dependenciesAny/dependenciesLarger.generated.js +1 -5
  181. package/lib/cjs/entry/dependenciesAny/dependenciesLargerEq.generated.js +1 -5
  182. package/lib/cjs/entry/dependenciesAny/dependenciesLcm.generated.js +1 -5
  183. package/lib/cjs/entry/dependenciesAny/dependenciesLeafCount.generated.js +1 -4
  184. package/lib/cjs/entry/dependenciesAny/dependenciesLeftShift.generated.js +1 -7
  185. package/lib/cjs/entry/dependenciesAny/dependenciesLgamma.generated.js +1 -4
  186. package/lib/cjs/entry/dependenciesAny/dependenciesLog.generated.js +1 -5
  187. package/lib/cjs/entry/dependenciesAny/dependenciesLog10.generated.js +1 -4
  188. package/lib/cjs/entry/dependenciesAny/dependenciesLog1p.generated.js +1 -6
  189. package/lib/cjs/entry/dependenciesAny/dependenciesLog2.generated.js +1 -4
  190. package/lib/cjs/entry/dependenciesAny/dependenciesLoschmidt.generated.js +1 -4
  191. package/lib/cjs/entry/dependenciesAny/dependenciesLsolve.generated.js +1 -9
  192. package/lib/cjs/entry/dependenciesAny/dependenciesLsolveAll.generated.js +1 -9
  193. package/lib/cjs/entry/dependenciesAny/dependenciesLup.generated.js +1 -15
  194. package/lib/cjs/entry/dependenciesAny/dependenciesLusolve.generated.js +1 -9
  195. package/lib/cjs/entry/dependenciesAny/dependenciesMad.generated.js +1 -7
  196. package/lib/cjs/entry/dependenciesAny/dependenciesMagneticConstant.generated.js +1 -4
  197. package/lib/cjs/entry/dependenciesAny/dependenciesMagneticFluxQuantum.generated.js +1 -4
  198. package/lib/cjs/entry/dependenciesAny/dependenciesMap.generated.js +1 -3
  199. package/lib/cjs/entry/dependenciesAny/dependenciesMapTransform.generated.js +1 -3
  200. package/lib/cjs/entry/dependenciesAny/dependenciesMatrix.generated.js +1 -6
  201. package/lib/cjs/entry/dependenciesAny/dependenciesMatrixClass.generated.js +1 -2
  202. package/lib/cjs/entry/dependenciesAny/dependenciesMatrixFromColumns.generated.js +1 -6
  203. package/lib/cjs/entry/dependenciesAny/dependenciesMatrixFromFunction.generated.js +1 -5
  204. package/lib/cjs/entry/dependenciesAny/dependenciesMatrixFromRows.generated.js +1 -6
  205. package/lib/cjs/entry/dependenciesAny/dependenciesMax.generated.js +1 -5
  206. package/lib/cjs/entry/dependenciesAny/dependenciesMaxTransform.generated.js +1 -5
  207. package/lib/cjs/entry/dependenciesAny/dependenciesMean.generated.js +1 -5
  208. package/lib/cjs/entry/dependenciesAny/dependenciesMeanTransform.generated.js +1 -5
  209. package/lib/cjs/entry/dependenciesAny/dependenciesMedian.generated.js +1 -7
  210. package/lib/cjs/entry/dependenciesAny/dependenciesMin.generated.js +1 -5
  211. package/lib/cjs/entry/dependenciesAny/dependenciesMinTransform.generated.js +1 -5
  212. package/lib/cjs/entry/dependenciesAny/dependenciesMod.generated.js +1 -6
  213. package/lib/cjs/entry/dependenciesAny/dependenciesMode.generated.js +1 -5
  214. package/lib/cjs/entry/dependenciesAny/dependenciesMolarMass.generated.js +1 -4
  215. package/lib/cjs/entry/dependenciesAny/dependenciesMolarMassC12.generated.js +1 -4
  216. package/lib/cjs/entry/dependenciesAny/dependenciesMolarPlanckConstant.generated.js +1 -4
  217. package/lib/cjs/entry/dependenciesAny/dependenciesMolarVolume.generated.js +1 -4
  218. package/lib/cjs/entry/dependenciesAny/dependenciesMultinomial.generated.js +1 -9
  219. package/lib/cjs/entry/dependenciesAny/dependenciesMultiply.generated.js +1 -8
  220. package/lib/cjs/entry/dependenciesAny/dependenciesMultiplyScalar.generated.js +1 -3
  221. package/lib/cjs/entry/dependenciesAny/dependenciesNaN.generated.js +1 -3
  222. package/lib/cjs/entry/dependenciesAny/dependenciesNeutronMass.generated.js +1 -4
  223. package/lib/cjs/entry/dependenciesAny/dependenciesNode.generated.js +1 -2
  224. package/lib/cjs/entry/dependenciesAny/dependenciesNorm.generated.js +1 -15
  225. package/lib/cjs/entry/dependenciesAny/dependenciesNot.generated.js +1 -3
  226. package/lib/cjs/entry/dependenciesAny/dependenciesNthRoot.generated.js +1 -6
  227. package/lib/cjs/entry/dependenciesAny/dependenciesNthRoots.generated.js +1 -5
  228. package/lib/cjs/entry/dependenciesAny/dependenciesNuclearMagneton.generated.js +1 -4
  229. package/lib/cjs/entry/dependenciesAny/dependenciesNull.generated.js +1 -2
  230. package/lib/cjs/entry/dependenciesAny/dependenciesNumber.generated.js +1 -3
  231. package/lib/cjs/entry/dependenciesAny/dependenciesNumeric.generated.js +1 -5
  232. package/lib/cjs/entry/dependenciesAny/dependenciesObjectNode.generated.js +1 -3
  233. package/lib/cjs/entry/dependenciesAny/dependenciesOct.generated.js +1 -4
  234. package/lib/cjs/entry/dependenciesAny/dependenciesOnes.generated.js +1 -5
  235. package/lib/cjs/entry/dependenciesAny/dependenciesOperatorNode.generated.js +1 -3
  236. package/lib/cjs/entry/dependenciesAny/dependenciesOr.generated.js +1 -6
  237. package/lib/cjs/entry/dependenciesAny/dependenciesParenthesisNode.generated.js +1 -3
  238. package/lib/cjs/entry/dependenciesAny/dependenciesParse.generated.js +1 -19
  239. package/lib/cjs/entry/dependenciesAny/dependenciesParser.generated.js +1 -4
  240. package/lib/cjs/entry/dependenciesAny/dependenciesParserClass.generated.js +1 -3
  241. package/lib/cjs/entry/dependenciesAny/dependenciesPartitionSelect.generated.js +1 -6
  242. package/lib/cjs/entry/dependenciesAny/dependenciesPermutations.generated.js +1 -4
  243. package/lib/cjs/entry/dependenciesAny/dependenciesPhi.generated.js +1 -3
  244. package/lib/cjs/entry/dependenciesAny/dependenciesPi.generated.js +1 -3
  245. package/lib/cjs/entry/dependenciesAny/dependenciesPickRandom.generated.js +1 -3
  246. package/lib/cjs/entry/dependenciesAny/dependenciesPinv.generated.js +1 -14
  247. package/lib/cjs/entry/dependenciesAny/dependenciesPlanckCharge.generated.js +1 -4
  248. package/lib/cjs/entry/dependenciesAny/dependenciesPlanckConstant.generated.js +1 -4
  249. package/lib/cjs/entry/dependenciesAny/dependenciesPlanckLength.generated.js +1 -4
  250. package/lib/cjs/entry/dependenciesAny/dependenciesPlanckMass.generated.js +1 -4
  251. package/lib/cjs/entry/dependenciesAny/dependenciesPlanckTemperature.generated.js +1 -4
  252. package/lib/cjs/entry/dependenciesAny/dependenciesPlanckTime.generated.js +1 -4
  253. package/lib/cjs/entry/dependenciesAny/dependenciesPow.generated.js +1 -10
  254. package/lib/cjs/entry/dependenciesAny/dependenciesPrint.generated.js +1 -3
  255. package/lib/cjs/entry/dependenciesAny/dependenciesProd.generated.js +1 -5
  256. package/lib/cjs/entry/dependenciesAny/dependenciesProtonMass.generated.js +1 -4
  257. package/lib/cjs/entry/dependenciesAny/dependenciesQr.generated.js +1 -17
  258. package/lib/cjs/entry/dependenciesAny/dependenciesQuantileSeq.generated.js +1 -7
  259. package/lib/cjs/entry/dependenciesAny/dependenciesQuantumOfCirculation.generated.js +1 -4
  260. package/lib/cjs/entry/dependenciesAny/dependenciesRandom.generated.js +1 -3
  261. package/lib/cjs/entry/dependenciesAny/dependenciesRandomInt.generated.js +1 -3
  262. package/lib/cjs/entry/dependenciesAny/dependenciesRange.generated.js +1 -9
  263. package/lib/cjs/entry/dependenciesAny/dependenciesRangeClass.generated.js +1 -2
  264. package/lib/cjs/entry/dependenciesAny/dependenciesRangeNode.generated.js +1 -3
  265. package/lib/cjs/entry/dependenciesAny/dependenciesRangeTransform.generated.js +1 -9
  266. package/lib/cjs/entry/dependenciesAny/dependenciesRationalize.generated.js +1 -26
  267. package/lib/cjs/entry/dependenciesAny/dependenciesRe.generated.js +1 -3
  268. package/lib/cjs/entry/dependenciesAny/dependenciesReducedPlanckConstant.generated.js +1 -4
  269. package/lib/cjs/entry/dependenciesAny/dependenciesRelationalNode.generated.js +1 -3
  270. package/lib/cjs/entry/dependenciesAny/dependenciesReplacer.generated.js +1 -2
  271. package/lib/cjs/entry/dependenciesAny/dependenciesReshape.generated.js +1 -5
  272. package/lib/cjs/entry/dependenciesAny/dependenciesResize.generated.js +1 -3
  273. package/lib/cjs/entry/dependenciesAny/dependenciesResolve.generated.js +1 -8
  274. package/lib/cjs/entry/dependenciesAny/dependenciesResultSet.generated.js +1 -2
  275. package/lib/cjs/entry/dependenciesAny/dependenciesReviver.generated.js +1 -2
  276. package/lib/cjs/entry/dependenciesAny/dependenciesRightArithShift.generated.js +1 -7
  277. package/lib/cjs/entry/dependenciesAny/dependenciesRightLogShift.generated.js +1 -7
  278. package/lib/cjs/entry/dependenciesAny/dependenciesRotate.generated.js +1 -5
  279. package/lib/cjs/entry/dependenciesAny/dependenciesRotationMatrix.generated.js +1 -13
  280. package/lib/cjs/entry/dependenciesAny/dependenciesRound.generated.js +1 -8
  281. package/lib/cjs/entry/dependenciesAny/dependenciesRow.generated.js +1 -6
  282. package/lib/cjs/entry/dependenciesAny/dependenciesRowTransform.generated.js +1 -6
  283. package/lib/cjs/entry/dependenciesAny/dependenciesRydberg.generated.js +1 -4
  284. package/lib/cjs/entry/dependenciesAny/dependenciesSQRT1_2.generated.js +2 -3
  285. package/lib/cjs/entry/dependenciesAny/dependenciesSQRT2.generated.js +1 -3
  286. package/lib/cjs/entry/dependenciesAny/dependenciesSackurTetrode.generated.js +1 -3
  287. package/lib/cjs/entry/dependenciesAny/dependenciesSec.generated.js +1 -4
  288. package/lib/cjs/entry/dependenciesAny/dependenciesSech.generated.js +1 -4
  289. package/lib/cjs/entry/dependenciesAny/dependenciesSecondRadiation.generated.js +1 -4
  290. package/lib/cjs/entry/dependenciesAny/dependenciesSetCartesian.generated.js +1 -8
  291. package/lib/cjs/entry/dependenciesAny/dependenciesSetDifference.generated.js +1 -8
  292. package/lib/cjs/entry/dependenciesAny/dependenciesSetDistinct.generated.js +1 -8
  293. package/lib/cjs/entry/dependenciesAny/dependenciesSetIntersect.generated.js +1 -8
  294. package/lib/cjs/entry/dependenciesAny/dependenciesSetIsSubset.generated.js +1 -7
  295. package/lib/cjs/entry/dependenciesAny/dependenciesSetMultiplicity.generated.js +1 -7
  296. package/lib/cjs/entry/dependenciesAny/dependenciesSetPowerset.generated.js +1 -7
  297. package/lib/cjs/entry/dependenciesAny/dependenciesSetSize.generated.js +1 -4
  298. package/lib/cjs/entry/dependenciesAny/dependenciesSetSymDifference.generated.js +1 -8
  299. package/lib/cjs/entry/dependenciesAny/dependenciesSetUnion.generated.js +1 -9
  300. package/lib/cjs/entry/dependenciesAny/dependenciesSign.generated.js +1 -6
  301. package/lib/cjs/entry/dependenciesAny/dependenciesSimplify.generated.js +1 -26
  302. package/lib/cjs/entry/dependenciesAny/dependenciesSimplifyConstant.generated.js +1 -15
  303. package/lib/cjs/entry/dependenciesAny/dependenciesSimplifyCore.generated.js +1 -20
  304. package/lib/cjs/entry/dependenciesAny/dependenciesSin.generated.js +1 -3
  305. package/lib/cjs/entry/dependenciesAny/dependenciesSinh.generated.js +1 -3
  306. package/lib/cjs/entry/dependenciesAny/dependenciesSize.generated.js +1 -4
  307. package/lib/cjs/entry/dependenciesAny/dependenciesSlu.generated.js +1 -12
  308. package/lib/cjs/entry/dependenciesAny/dependenciesSmaller.generated.js +1 -5
  309. package/lib/cjs/entry/dependenciesAny/dependenciesSmallerEq.generated.js +1 -5
  310. package/lib/cjs/entry/dependenciesAny/dependenciesSort.generated.js +1 -6
  311. package/lib/cjs/entry/dependenciesAny/dependenciesSpaClass.generated.js +1 -5
  312. package/lib/cjs/entry/dependenciesAny/dependenciesSparse.generated.js +1 -4
  313. package/lib/cjs/entry/dependenciesAny/dependenciesSparseMatrixClass.generated.js +1 -5
  314. package/lib/cjs/entry/dependenciesAny/dependenciesSpeedOfLight.generated.js +1 -4
  315. package/lib/cjs/entry/dependenciesAny/dependenciesSplitUnit.generated.js +1 -3
  316. package/lib/cjs/entry/dependenciesAny/dependenciesSqrt.generated.js +1 -4
  317. package/lib/cjs/entry/dependenciesAny/dependenciesSqrtm.generated.js +1 -13
  318. package/lib/cjs/entry/dependenciesAny/dependenciesSquare.generated.js +1 -3
  319. package/lib/cjs/entry/dependenciesAny/dependenciesSqueeze.generated.js +1 -4
  320. package/lib/cjs/entry/dependenciesAny/dependenciesStd.generated.js +1 -6
  321. package/lib/cjs/entry/dependenciesAny/dependenciesStdTransform.generated.js +1 -6
  322. package/lib/cjs/entry/dependenciesAny/dependenciesStefanBoltzmann.generated.js +1 -4
  323. package/lib/cjs/entry/dependenciesAny/dependenciesStirlingS2.generated.js +1 -15
  324. package/lib/cjs/entry/dependenciesAny/dependenciesString.generated.js +1 -3
  325. package/lib/cjs/entry/dependenciesAny/dependenciesSubset.generated.js +1 -4
  326. package/lib/cjs/entry/dependenciesAny/dependenciesSubsetTransform.generated.js +1 -4
  327. package/lib/cjs/entry/dependenciesAny/dependenciesSubtract.generated.js +1 -8
  328. package/lib/cjs/entry/dependenciesAny/dependenciesSum.generated.js +1 -5
  329. package/lib/cjs/entry/dependenciesAny/dependenciesSumTransform.generated.js +1 -5
  330. package/lib/cjs/entry/dependenciesAny/dependenciesSymbolNode.generated.js +1 -4
  331. package/lib/cjs/entry/dependenciesAny/dependenciesSymbolicEqual.generated.js +1 -6
  332. package/lib/cjs/entry/dependenciesAny/dependenciesTan.generated.js +1 -3
  333. package/lib/cjs/entry/dependenciesAny/dependenciesTanh.generated.js +1 -3
  334. package/lib/cjs/entry/dependenciesAny/dependenciesTau.generated.js +1 -3
  335. package/lib/cjs/entry/dependenciesAny/dependenciesThomsonCrossSection.generated.js +1 -4
  336. package/lib/cjs/entry/dependenciesAny/dependenciesTo.generated.js +1 -4
  337. package/lib/cjs/entry/dependenciesAny/dependenciesTrace.generated.js +1 -5
  338. package/lib/cjs/entry/dependenciesAny/dependenciesTranspose.generated.js +1 -4
  339. package/lib/cjs/entry/dependenciesAny/dependenciesTrue.generated.js +1 -2
  340. package/lib/cjs/entry/dependenciesAny/dependenciesTypeOf.generated.js +1 -3
  341. package/lib/cjs/entry/dependenciesAny/dependenciesTyped.generated.js +1 -6
  342. package/lib/cjs/entry/dependenciesAny/dependenciesUnaryMinus.generated.js +1 -3
  343. package/lib/cjs/entry/dependenciesAny/dependenciesUnaryPlus.generated.js +1 -4
  344. package/lib/cjs/entry/dependenciesAny/dependenciesUnequal.generated.js +1 -6
  345. package/lib/cjs/entry/dependenciesAny/dependenciesUnitClass.generated.js +1 -17
  346. package/lib/cjs/entry/dependenciesAny/dependenciesUnitFunction.generated.js +1 -4
  347. package/lib/cjs/entry/dependenciesAny/dependenciesUppercaseE.generated.js +1 -3
  348. package/lib/cjs/entry/dependenciesAny/dependenciesUppercasePi.generated.js +1 -3
  349. package/lib/cjs/entry/dependenciesAny/dependenciesUsolve.generated.js +1 -9
  350. package/lib/cjs/entry/dependenciesAny/dependenciesUsolveAll.generated.js +1 -9
  351. package/lib/cjs/entry/dependenciesAny/dependenciesVacuumImpedance.generated.js +1 -4
  352. package/lib/cjs/entry/dependenciesAny/dependenciesVariance.generated.js +1 -9
  353. package/lib/cjs/entry/dependenciesAny/dependenciesVarianceTransform.generated.js +1 -9
  354. package/lib/cjs/entry/dependenciesAny/dependenciesVersion.generated.js +1 -2
  355. package/lib/cjs/entry/dependenciesAny/dependenciesWeakMixingAngle.generated.js +1 -3
  356. package/lib/cjs/entry/dependenciesAny/dependenciesWienDisplacement.generated.js +1 -4
  357. package/lib/cjs/entry/dependenciesAny/dependenciesXgcd.generated.js +1 -5
  358. package/lib/cjs/entry/dependenciesAny/dependenciesXor.generated.js +1 -5
  359. package/lib/cjs/entry/dependenciesAny/dependenciesZeros.generated.js +1 -5
  360. package/lib/cjs/entry/dependenciesAny.generated.js +0 -346
  361. package/lib/cjs/entry/dependenciesNumber/dependenciesAbs.generated.js +1 -3
  362. package/lib/cjs/entry/dependenciesNumber/dependenciesAccessorNode.generated.js +1 -4
  363. package/lib/cjs/entry/dependenciesNumber/dependenciesAcos.generated.js +1 -3
  364. package/lib/cjs/entry/dependenciesNumber/dependenciesAcosh.generated.js +1 -3
  365. package/lib/cjs/entry/dependenciesNumber/dependenciesAcot.generated.js +1 -3
  366. package/lib/cjs/entry/dependenciesNumber/dependenciesAcoth.generated.js +1 -3
  367. package/lib/cjs/entry/dependenciesNumber/dependenciesAcsc.generated.js +1 -3
  368. package/lib/cjs/entry/dependenciesNumber/dependenciesAcsch.generated.js +1 -3
  369. package/lib/cjs/entry/dependenciesNumber/dependenciesAdd.generated.js +1 -3
  370. package/lib/cjs/entry/dependenciesNumber/dependenciesAddScalar.generated.js +1 -3
  371. package/lib/cjs/entry/dependenciesNumber/dependenciesAnd.generated.js +1 -3
  372. package/lib/cjs/entry/dependenciesNumber/dependenciesApply.generated.js +1 -4
  373. package/lib/cjs/entry/dependenciesNumber/dependenciesApplyTransform.generated.js +1 -4
  374. package/lib/cjs/entry/dependenciesNumber/dependenciesArrayNode.generated.js +1 -3
  375. package/lib/cjs/entry/dependenciesNumber/dependenciesAsec.generated.js +1 -3
  376. package/lib/cjs/entry/dependenciesNumber/dependenciesAsech.generated.js +1 -3
  377. package/lib/cjs/entry/dependenciesNumber/dependenciesAsin.generated.js +1 -3
  378. package/lib/cjs/entry/dependenciesNumber/dependenciesAsinh.generated.js +1 -3
  379. package/lib/cjs/entry/dependenciesNumber/dependenciesAssignmentNode.generated.js +1 -5
  380. package/lib/cjs/entry/dependenciesNumber/dependenciesAtan.generated.js +1 -3
  381. package/lib/cjs/entry/dependenciesNumber/dependenciesAtan2.generated.js +1 -3
  382. package/lib/cjs/entry/dependenciesNumber/dependenciesAtanh.generated.js +1 -3
  383. package/lib/cjs/entry/dependenciesNumber/dependenciesBellNumbers.generated.js +1 -7
  384. package/lib/cjs/entry/dependenciesNumber/dependenciesBitAnd.generated.js +1 -3
  385. package/lib/cjs/entry/dependenciesNumber/dependenciesBitNot.generated.js +1 -3
  386. package/lib/cjs/entry/dependenciesNumber/dependenciesBitOr.generated.js +1 -3
  387. package/lib/cjs/entry/dependenciesNumber/dependenciesBitXor.generated.js +1 -3
  388. package/lib/cjs/entry/dependenciesNumber/dependenciesBlockNode.generated.js +1 -4
  389. package/lib/cjs/entry/dependenciesNumber/dependenciesBoolean.generated.js +1 -3
  390. package/lib/cjs/entry/dependenciesNumber/dependenciesCatalan.generated.js +1 -9
  391. package/lib/cjs/entry/dependenciesNumber/dependenciesCbrt.generated.js +1 -3
  392. package/lib/cjs/entry/dependenciesNumber/dependenciesCeil.generated.js +1 -4
  393. package/lib/cjs/entry/dependenciesNumber/dependenciesChain.generated.js +1 -4
  394. package/lib/cjs/entry/dependenciesNumber/dependenciesChainClass.generated.js +1 -3
  395. package/lib/cjs/entry/dependenciesNumber/dependenciesClone.generated.js +1 -3
  396. package/lib/cjs/entry/dependenciesNumber/dependenciesCombinations.generated.js +1 -3
  397. package/lib/cjs/entry/dependenciesNumber/dependenciesCombinationsWithRep.generated.js +1 -3
  398. package/lib/cjs/entry/dependenciesNumber/dependenciesCompare.generated.js +1 -3
  399. package/lib/cjs/entry/dependenciesNumber/dependenciesCompareNatural.generated.js +1 -4
  400. package/lib/cjs/entry/dependenciesNumber/dependenciesCompareText.generated.js +1 -3
  401. package/lib/cjs/entry/dependenciesNumber/dependenciesCompile.generated.js +1 -4
  402. package/lib/cjs/entry/dependenciesNumber/dependenciesComposition.generated.js +1 -9
  403. package/lib/cjs/entry/dependenciesNumber/dependenciesConditionalNode.generated.js +1 -3
  404. package/lib/cjs/entry/dependenciesNumber/dependenciesConstantNode.generated.js +1 -3
  405. package/lib/cjs/entry/dependenciesNumber/dependenciesCos.generated.js +1 -3
  406. package/lib/cjs/entry/dependenciesNumber/dependenciesCosh.generated.js +1 -3
  407. package/lib/cjs/entry/dependenciesNumber/dependenciesCot.generated.js +1 -3
  408. package/lib/cjs/entry/dependenciesNumber/dependenciesCoth.generated.js +1 -3
  409. package/lib/cjs/entry/dependenciesNumber/dependenciesCsc.generated.js +1 -3
  410. package/lib/cjs/entry/dependenciesNumber/dependenciesCsch.generated.js +1 -3
  411. package/lib/cjs/entry/dependenciesNumber/dependenciesCube.generated.js +1 -3
  412. package/lib/cjs/entry/dependenciesNumber/dependenciesCumSum.generated.js +1 -5
  413. package/lib/cjs/entry/dependenciesNumber/dependenciesCumSumTransform.generated.js +1 -5
  414. package/lib/cjs/entry/dependenciesNumber/dependenciesDeepEqual.generated.js +1 -4
  415. package/lib/cjs/entry/dependenciesNumber/dependenciesDerivative.generated.js +1 -13
  416. package/lib/cjs/entry/dependenciesNumber/dependenciesDivide.generated.js +1 -3
  417. package/lib/cjs/entry/dependenciesNumber/dependenciesDivideScalar.generated.js +1 -3
  418. package/lib/cjs/entry/dependenciesNumber/dependenciesE.generated.js +1 -2
  419. package/lib/cjs/entry/dependenciesNumber/dependenciesEqual.generated.js +1 -4
  420. package/lib/cjs/entry/dependenciesNumber/dependenciesEqualScalar.generated.js +1 -3
  421. package/lib/cjs/entry/dependenciesNumber/dependenciesEqualText.generated.js +1 -5
  422. package/lib/cjs/entry/dependenciesNumber/dependenciesErf.generated.js +1 -3
  423. package/lib/cjs/entry/dependenciesNumber/dependenciesEvaluate.generated.js +1 -4
  424. package/lib/cjs/entry/dependenciesNumber/dependenciesExp.generated.js +1 -3
  425. package/lib/cjs/entry/dependenciesNumber/dependenciesExpm1.generated.js +1 -3
  426. package/lib/cjs/entry/dependenciesNumber/dependenciesFactorial.generated.js +1 -4
  427. package/lib/cjs/entry/dependenciesNumber/dependenciesFalse.generated.js +1 -2
  428. package/lib/cjs/entry/dependenciesNumber/dependenciesFilter.generated.js +1 -3
  429. package/lib/cjs/entry/dependenciesNumber/dependenciesFilterTransform.generated.js +1 -3
  430. package/lib/cjs/entry/dependenciesNumber/dependenciesFix.generated.js +1 -5
  431. package/lib/cjs/entry/dependenciesNumber/dependenciesFloor.generated.js +1 -4
  432. package/lib/cjs/entry/dependenciesNumber/dependenciesForEach.generated.js +1 -3
  433. package/lib/cjs/entry/dependenciesNumber/dependenciesForEachTransform.generated.js +1 -3
  434. package/lib/cjs/entry/dependenciesNumber/dependenciesFormat.generated.js +1 -3
  435. package/lib/cjs/entry/dependenciesNumber/dependenciesFunctionAssignmentNode.generated.js +1 -4
  436. package/lib/cjs/entry/dependenciesNumber/dependenciesFunctionNode.generated.js +1 -4
  437. package/lib/cjs/entry/dependenciesNumber/dependenciesGamma.generated.js +1 -3
  438. package/lib/cjs/entry/dependenciesNumber/dependenciesGcd.generated.js +1 -3
  439. package/lib/cjs/entry/dependenciesNumber/dependenciesHasNumericValue.generated.js +1 -4
  440. package/lib/cjs/entry/dependenciesNumber/dependenciesHelp.generated.js +1 -4
  441. package/lib/cjs/entry/dependenciesNumber/dependenciesHelpClass.generated.js +1 -3
  442. package/lib/cjs/entry/dependenciesNumber/dependenciesHypot.generated.js +1 -10
  443. package/lib/cjs/entry/dependenciesNumber/dependenciesIndex.generated.js +1 -2
  444. package/lib/cjs/entry/dependenciesNumber/dependenciesIndexNode.generated.js +1 -4
  445. package/lib/cjs/entry/dependenciesNumber/dependenciesInfinity.generated.js +1 -2
  446. package/lib/cjs/entry/dependenciesNumber/dependenciesIsInteger.generated.js +1 -3
  447. package/lib/cjs/entry/dependenciesNumber/dependenciesIsNaN.generated.js +1 -3
  448. package/lib/cjs/entry/dependenciesNumber/dependenciesIsNegative.generated.js +1 -3
  449. package/lib/cjs/entry/dependenciesNumber/dependenciesIsNumeric.generated.js +1 -3
  450. package/lib/cjs/entry/dependenciesNumber/dependenciesIsPositive.generated.js +1 -3
  451. package/lib/cjs/entry/dependenciesNumber/dependenciesIsPrime.generated.js +1 -3
  452. package/lib/cjs/entry/dependenciesNumber/dependenciesIsZero.generated.js +1 -3
  453. package/lib/cjs/entry/dependenciesNumber/dependenciesLN10.generated.js +1 -2
  454. package/lib/cjs/entry/dependenciesNumber/dependenciesLN2.generated.js +1 -2
  455. package/lib/cjs/entry/dependenciesNumber/dependenciesLOG10E.generated.js +1 -2
  456. package/lib/cjs/entry/dependenciesNumber/dependenciesLOG2E.generated.js +1 -2
  457. package/lib/cjs/entry/dependenciesNumber/dependenciesLarger.generated.js +1 -3
  458. package/lib/cjs/entry/dependenciesNumber/dependenciesLargerEq.generated.js +1 -3
  459. package/lib/cjs/entry/dependenciesNumber/dependenciesLcm.generated.js +1 -3
  460. package/lib/cjs/entry/dependenciesNumber/dependenciesLeftShift.generated.js +1 -3
  461. package/lib/cjs/entry/dependenciesNumber/dependenciesLgamma.generated.js +1 -3
  462. package/lib/cjs/entry/dependenciesNumber/dependenciesLog.generated.js +1 -3
  463. package/lib/cjs/entry/dependenciesNumber/dependenciesLog10.generated.js +1 -3
  464. package/lib/cjs/entry/dependenciesNumber/dependenciesLog1p.generated.js +1 -3
  465. package/lib/cjs/entry/dependenciesNumber/dependenciesLog2.generated.js +1 -3
  466. package/lib/cjs/entry/dependenciesNumber/dependenciesMad.generated.js +1 -7
  467. package/lib/cjs/entry/dependenciesNumber/dependenciesMap.generated.js +1 -3
  468. package/lib/cjs/entry/dependenciesNumber/dependenciesMapTransform.generated.js +1 -3
  469. package/lib/cjs/entry/dependenciesNumber/dependenciesMatrix.generated.js +1 -2
  470. package/lib/cjs/entry/dependenciesNumber/dependenciesMax.generated.js +1 -5
  471. package/lib/cjs/entry/dependenciesNumber/dependenciesMaxTransform.generated.js +1 -5
  472. package/lib/cjs/entry/dependenciesNumber/dependenciesMean.generated.js +1 -5
  473. package/lib/cjs/entry/dependenciesNumber/dependenciesMeanTransform.generated.js +1 -5
  474. package/lib/cjs/entry/dependenciesNumber/dependenciesMedian.generated.js +1 -7
  475. package/lib/cjs/entry/dependenciesNumber/dependenciesMin.generated.js +1 -5
  476. package/lib/cjs/entry/dependenciesNumber/dependenciesMinTransform.generated.js +1 -5
  477. package/lib/cjs/entry/dependenciesNumber/dependenciesMod.generated.js +1 -3
  478. package/lib/cjs/entry/dependenciesNumber/dependenciesMode.generated.js +1 -5
  479. package/lib/cjs/entry/dependenciesNumber/dependenciesMultinomial.generated.js +1 -9
  480. package/lib/cjs/entry/dependenciesNumber/dependenciesMultiply.generated.js +1 -3
  481. package/lib/cjs/entry/dependenciesNumber/dependenciesMultiplyScalar.generated.js +1 -3
  482. package/lib/cjs/entry/dependenciesNumber/dependenciesNaN.generated.js +1 -2
  483. package/lib/cjs/entry/dependenciesNumber/dependenciesNode.generated.js +1 -2
  484. package/lib/cjs/entry/dependenciesNumber/dependenciesNorm.generated.js +1 -3
  485. package/lib/cjs/entry/dependenciesNumber/dependenciesNot.generated.js +1 -3
  486. package/lib/cjs/entry/dependenciesNumber/dependenciesNthRoot.generated.js +1 -3
  487. package/lib/cjs/entry/dependenciesNumber/dependenciesNull.generated.js +1 -2
  488. package/lib/cjs/entry/dependenciesNumber/dependenciesNumber.generated.js +1 -3
  489. package/lib/cjs/entry/dependenciesNumber/dependenciesNumeric.generated.js +1 -3
  490. package/lib/cjs/entry/dependenciesNumber/dependenciesObjectNode.generated.js +1 -3
  491. package/lib/cjs/entry/dependenciesNumber/dependenciesOperatorNode.generated.js +1 -3
  492. package/lib/cjs/entry/dependenciesNumber/dependenciesOr.generated.js +1 -3
  493. package/lib/cjs/entry/dependenciesNumber/dependenciesParenthesisNode.generated.js +1 -3
  494. package/lib/cjs/entry/dependenciesNumber/dependenciesParse.generated.js +1 -19
  495. package/lib/cjs/entry/dependenciesNumber/dependenciesParser.generated.js +1 -4
  496. package/lib/cjs/entry/dependenciesNumber/dependenciesParserClass.generated.js +1 -3
  497. package/lib/cjs/entry/dependenciesNumber/dependenciesPartitionSelect.generated.js +1 -6
  498. package/lib/cjs/entry/dependenciesNumber/dependenciesPermutations.generated.js +1 -4
  499. package/lib/cjs/entry/dependenciesNumber/dependenciesPhi.generated.js +1 -2
  500. package/lib/cjs/entry/dependenciesNumber/dependenciesPi.generated.js +1 -2
  501. package/lib/cjs/entry/dependenciesNumber/dependenciesPickRandom.generated.js +1 -3
  502. package/lib/cjs/entry/dependenciesNumber/dependenciesPow.generated.js +1 -3
  503. package/lib/cjs/entry/dependenciesNumber/dependenciesPrint.generated.js +1 -3
  504. package/lib/cjs/entry/dependenciesNumber/dependenciesProd.generated.js +1 -5
  505. package/lib/cjs/entry/dependenciesNumber/dependenciesQuantileSeq.generated.js +1 -7
  506. package/lib/cjs/entry/dependenciesNumber/dependenciesRandom.generated.js +1 -3
  507. package/lib/cjs/entry/dependenciesNumber/dependenciesRandomInt.generated.js +1 -3
  508. package/lib/cjs/entry/dependenciesNumber/dependenciesRange.generated.js +1 -8
  509. package/lib/cjs/entry/dependenciesNumber/dependenciesRangeClass.generated.js +1 -2
  510. package/lib/cjs/entry/dependenciesNumber/dependenciesRangeNode.generated.js +1 -3
  511. package/lib/cjs/entry/dependenciesNumber/dependenciesRangeTransform.generated.js +1 -8
  512. package/lib/cjs/entry/dependenciesNumber/dependenciesRationalize.generated.js +1 -24
  513. package/lib/cjs/entry/dependenciesNumber/dependenciesRelationalNode.generated.js +1 -3
  514. package/lib/cjs/entry/dependenciesNumber/dependenciesReplacer.generated.js +1 -2
  515. package/lib/cjs/entry/dependenciesNumber/dependenciesResolve.generated.js +1 -8
  516. package/lib/cjs/entry/dependenciesNumber/dependenciesResultSet.generated.js +1 -2
  517. package/lib/cjs/entry/dependenciesNumber/dependenciesReviver.generated.js +1 -2
  518. package/lib/cjs/entry/dependenciesNumber/dependenciesRightArithShift.generated.js +1 -3
  519. package/lib/cjs/entry/dependenciesNumber/dependenciesRightLogShift.generated.js +1 -3
  520. package/lib/cjs/entry/dependenciesNumber/dependenciesRound.generated.js +1 -3
  521. package/lib/cjs/entry/dependenciesNumber/dependenciesSQRT1_2.generated.js +1 -2
  522. package/lib/cjs/entry/dependenciesNumber/dependenciesSQRT2.generated.js +1 -2
  523. package/lib/cjs/entry/dependenciesNumber/dependenciesSec.generated.js +1 -3
  524. package/lib/cjs/entry/dependenciesNumber/dependenciesSech.generated.js +1 -3
  525. package/lib/cjs/entry/dependenciesNumber/dependenciesSign.generated.js +1 -3
  526. package/lib/cjs/entry/dependenciesNumber/dependenciesSimplify.generated.js +1 -24
  527. package/lib/cjs/entry/dependenciesNumber/dependenciesSimplifyConstant.generated.js +1 -13
  528. package/lib/cjs/entry/dependenciesNumber/dependenciesSimplifyCore.generated.js +1 -20
  529. package/lib/cjs/entry/dependenciesNumber/dependenciesSin.generated.js +1 -3
  530. package/lib/cjs/entry/dependenciesNumber/dependenciesSinh.generated.js +1 -3
  531. package/lib/cjs/entry/dependenciesNumber/dependenciesSize.generated.js +1 -4
  532. package/lib/cjs/entry/dependenciesNumber/dependenciesSmaller.generated.js +1 -3
  533. package/lib/cjs/entry/dependenciesNumber/dependenciesSmallerEq.generated.js +1 -3
  534. package/lib/cjs/entry/dependenciesNumber/dependenciesSqrt.generated.js +1 -3
  535. package/lib/cjs/entry/dependenciesNumber/dependenciesSquare.generated.js +1 -3
  536. package/lib/cjs/entry/dependenciesNumber/dependenciesStd.generated.js +1 -6
  537. package/lib/cjs/entry/dependenciesNumber/dependenciesStdTransform.generated.js +1 -6
  538. package/lib/cjs/entry/dependenciesNumber/dependenciesStirlingS2.generated.js +1 -14
  539. package/lib/cjs/entry/dependenciesNumber/dependenciesString.generated.js +1 -3
  540. package/lib/cjs/entry/dependenciesNumber/dependenciesSubset.generated.js +1 -2
  541. package/lib/cjs/entry/dependenciesNumber/dependenciesSubsetTransform.generated.js +1 -2
  542. package/lib/cjs/entry/dependenciesNumber/dependenciesSubtract.generated.js +1 -3
  543. package/lib/cjs/entry/dependenciesNumber/dependenciesSum.generated.js +1 -5
  544. package/lib/cjs/entry/dependenciesNumber/dependenciesSumTransform.generated.js +1 -5
  545. package/lib/cjs/entry/dependenciesNumber/dependenciesSymbolNode.generated.js +1 -3
  546. package/lib/cjs/entry/dependenciesNumber/dependenciesTan.generated.js +1 -3
  547. package/lib/cjs/entry/dependenciesNumber/dependenciesTanh.generated.js +1 -3
  548. package/lib/cjs/entry/dependenciesNumber/dependenciesTau.generated.js +1 -2
  549. package/lib/cjs/entry/dependenciesNumber/dependenciesTrue.generated.js +1 -2
  550. package/lib/cjs/entry/dependenciesNumber/dependenciesTypeOf.generated.js +1 -3
  551. package/lib/cjs/entry/dependenciesNumber/dependenciesTyped.generated.js +1 -2
  552. package/lib/cjs/entry/dependenciesNumber/dependenciesUnaryMinus.generated.js +1 -3
  553. package/lib/cjs/entry/dependenciesNumber/dependenciesUnaryPlus.generated.js +1 -3
  554. package/lib/cjs/entry/dependenciesNumber/dependenciesUnequal.generated.js +1 -4
  555. package/lib/cjs/entry/dependenciesNumber/dependenciesUppercaseE.generated.js +1 -3
  556. package/lib/cjs/entry/dependenciesNumber/dependenciesUppercasePi.generated.js +1 -3
  557. package/lib/cjs/entry/dependenciesNumber/dependenciesVariance.generated.js +1 -9
  558. package/lib/cjs/entry/dependenciesNumber/dependenciesVarianceTransform.generated.js +1 -9
  559. package/lib/cjs/entry/dependenciesNumber/dependenciesVersion.generated.js +1 -2
  560. package/lib/cjs/entry/dependenciesNumber/dependenciesXgcd.generated.js +1 -3
  561. package/lib/cjs/entry/dependenciesNumber/dependenciesXor.generated.js +1 -3
  562. package/lib/cjs/entry/dependenciesNumber.generated.js +0 -202
  563. package/lib/cjs/entry/impureFunctionsAny.generated.js +1 -9
  564. package/lib/cjs/entry/impureFunctionsNumber.generated.js +1 -9
  565. package/lib/cjs/entry/mainAny.js +0 -16
  566. package/lib/cjs/entry/mainNumber.js +0 -16
  567. package/lib/cjs/entry/pureFunctionsAny.generated.js +1 -15
  568. package/lib/cjs/entry/pureFunctionsNumber.generated.js +1 -15
  569. package/lib/cjs/entry/typeChecks.js +0 -1
  570. package/lib/cjs/error/ArgumentsError.js +0 -3
  571. package/lib/cjs/error/DimensionError.js +0 -3
  572. package/lib/cjs/error/IndexError.js +0 -6
  573. package/lib/cjs/expression/Help.js +5 -28
  574. package/lib/cjs/expression/Parser.js +8 -21
  575. package/lib/cjs/expression/embeddedDocs/embeddedDocs.js +1 -235
  576. package/lib/cjs/expression/function/compile.js +1 -5
  577. package/lib/cjs/expression/function/evaluate.js +1 -6
  578. package/lib/cjs/expression/function/help.js +3 -12
  579. package/lib/cjs/expression/function/parser.js +1 -4
  580. package/lib/cjs/expression/node/AccessorNode.js +15 -45
  581. package/lib/cjs/expression/node/ArrayNode.js +10 -33
  582. package/lib/cjs/expression/node/AssignmentNode.js +28 -68
  583. package/lib/cjs/expression/node/BlockNode.js +11 -37
  584. package/lib/cjs/expression/node/ConditionalNode.js +14 -56
  585. package/lib/cjs/expression/node/ConstantNode.js +10 -41
  586. package/lib/cjs/expression/node/FunctionAssignmentNode.js +34 -54
  587. package/lib/cjs/expression/node/FunctionNode.js +32 -103
  588. package/lib/cjs/expression/node/IndexNode.js +15 -44
  589. package/lib/cjs/expression/node/Node.js +23 -57
  590. package/lib/cjs/expression/node/ObjectNode.js +10 -48
  591. package/lib/cjs/expression/node/OperatorNode.js +35 -142
  592. package/lib/cjs/expression/node/ParenthesisNode.js +11 -33
  593. package/lib/cjs/expression/node/RangeNode.js +15 -66
  594. package/lib/cjs/expression/node/RelationalNode.js +8 -44
  595. package/lib/cjs/expression/node/SymbolNode.js +16 -43
  596. package/lib/cjs/expression/node/utils/access.js +0 -7
  597. package/lib/cjs/expression/node/utils/assign.js +1 -8
  598. package/lib/cjs/expression/operators.js +22 -54
  599. package/lib/cjs/expression/parse.js +162 -341
  600. package/lib/cjs/expression/transform/apply.transform.js +4 -10
  601. package/lib/cjs/expression/transform/column.transform.js +6 -12
  602. package/lib/cjs/expression/transform/concat.transform.js +3 -10
  603. package/lib/cjs/expression/transform/cumsum.transform.js +2 -9
  604. package/lib/cjs/expression/transform/diff.transform.js +5 -11
  605. package/lib/cjs/expression/transform/filter.transform.js +3 -14
  606. package/lib/cjs/expression/transform/forEach.transform.js +2 -14
  607. package/lib/cjs/expression/transform/index.transform.js +4 -9
  608. package/lib/cjs/expression/transform/map.transform.js +3 -16
  609. package/lib/cjs/expression/transform/max.transform.js +4 -10
  610. package/lib/cjs/expression/transform/mean.transform.js +3 -9
  611. package/lib/cjs/expression/transform/min.transform.js +4 -10
  612. package/lib/cjs/expression/transform/range.transform.js +8 -13
  613. package/lib/cjs/expression/transform/row.transform.js +6 -12
  614. package/lib/cjs/expression/transform/std.transform.js +4 -10
  615. package/lib/cjs/expression/transform/subset.transform.js +2 -6
  616. package/lib/cjs/expression/transform/sum.transform.js +3 -9
  617. package/lib/cjs/expression/transform/utils/compileInlineExpression.js +2 -7
  618. package/lib/cjs/expression/transform/utils/errorTransform.js +0 -3
  619. package/lib/cjs/expression/transform/utils/lastDimToZeroBase.js +0 -4
  620. package/lib/cjs/expression/transform/variance.transform.js +7 -13
  621. package/lib/cjs/factoriesAny.js +0 -278
  622. package/lib/cjs/factoriesNumber.js +20 -123
  623. package/lib/cjs/function/algebra/decomposition/lup.js +136 -173
  624. package/lib/cjs/function/algebra/decomposition/qr.js +36 -54
  625. package/lib/cjs/function/algebra/decomposition/slu.js +18 -22
  626. package/lib/cjs/function/algebra/derivative.js +47 -119
  627. package/lib/cjs/function/algebra/leafCount.js +2 -6
  628. package/lib/cjs/function/algebra/rationalize.js +152 -170
  629. package/lib/cjs/function/algebra/resolve.js +8 -19
  630. package/lib/cjs/function/algebra/simplify/util.js +14 -74
  631. package/lib/cjs/function/algebra/simplify.js +126 -213
  632. package/lib/cjs/function/algebra/simplifyConstant.js +45 -131
  633. package/lib/cjs/function/algebra/simplifyCore.js +29 -81
  634. package/lib/cjs/function/algebra/solver/lsolve.js +28 -35
  635. package/lib/cjs/function/algebra/solver/lsolveAll.js +30 -36
  636. package/lib/cjs/function/algebra/solver/lusolve.js +15 -25
  637. package/lib/cjs/function/algebra/solver/usolve.js +32 -40
  638. package/lib/cjs/function/algebra/solver/usolveAll.js +34 -36
  639. package/lib/cjs/function/algebra/solver/utils/solveValidation.js +4 -32
  640. package/lib/cjs/function/algebra/sparse/csAmd.js +249 -301
  641. package/lib/cjs/function/algebra/sparse/csChol.js +72 -88
  642. package/lib/cjs/function/algebra/sparse/csCounts.js +37 -55
  643. package/lib/cjs/function/algebra/sparse/csCumsum.js +8 -11
  644. package/lib/cjs/function/algebra/sparse/csDfs.js +34 -42
  645. package/lib/cjs/function/algebra/sparse/csEreach.js +24 -31
  646. package/lib/cjs/function/algebra/sparse/csEtree.js +23 -28
  647. package/lib/cjs/function/algebra/sparse/csFkeep.js +20 -25
  648. package/lib/cjs/function/algebra/sparse/csFlip.js +0 -1
  649. package/lib/cjs/function/algebra/sparse/csIpvec.js +2 -4
  650. package/lib/cjs/function/algebra/sparse/csLeaf.js +12 -13
  651. package/lib/cjs/function/algebra/sparse/csLu.js +71 -92
  652. package/lib/cjs/function/algebra/sparse/csMark.js +0 -2
  653. package/lib/cjs/function/algebra/sparse/csMarked.js +0 -1
  654. package/lib/cjs/function/algebra/sparse/csPermute.js +20 -25
  655. package/lib/cjs/function/algebra/sparse/csPost.js +14 -24
  656. package/lib/cjs/function/algebra/sparse/csReach.js +14 -20
  657. package/lib/cjs/function/algebra/sparse/csSpsolve.js +32 -40
  658. package/lib/cjs/function/algebra/sparse/csSqr.js +62 -86
  659. package/lib/cjs/function/algebra/sparse/csSymperm.js +33 -44
  660. package/lib/cjs/function/algebra/sparse/csTdfs.js +12 -15
  661. package/lib/cjs/function/algebra/sparse/csUnflip.js +0 -2
  662. package/lib/cjs/function/algebra/symbolicEqual.js +3 -8
  663. package/lib/cjs/function/arithmetic/abs.js +0 -5
  664. package/lib/cjs/function/arithmetic/add.js +6 -14
  665. package/lib/cjs/function/arithmetic/addScalar.js +0 -6
  666. package/lib/cjs/function/arithmetic/cbrt.js +15 -26
  667. package/lib/cjs/function/arithmetic/ceil.js +11 -29
  668. package/lib/cjs/function/arithmetic/cube.js +2 -4
  669. package/lib/cjs/function/arithmetic/divide.js +7 -11
  670. package/lib/cjs/function/arithmetic/divideScalar.js +1 -4
  671. package/lib/cjs/function/arithmetic/dotDivide.js +5 -13
  672. package/lib/cjs/function/arithmetic/dotMultiply.js +4 -10
  673. package/lib/cjs/function/arithmetic/dotPow.js +5 -14
  674. package/lib/cjs/function/arithmetic/exp.js +0 -4
  675. package/lib/cjs/function/arithmetic/expm1.js +1 -5
  676. package/lib/cjs/function/arithmetic/fix.js +9 -17
  677. package/lib/cjs/function/arithmetic/floor.js +11 -29
  678. package/lib/cjs/function/arithmetic/gcd.js +8 -19
  679. package/lib/cjs/function/arithmetic/hypot.js +8 -17
  680. package/lib/cjs/function/arithmetic/invmod.js +11 -19
  681. package/lib/cjs/function/arithmetic/lcm.js +7 -20
  682. package/lib/cjs/function/arithmetic/log.js +3 -7
  683. package/lib/cjs/function/arithmetic/log10.js +2 -7
  684. package/lib/cjs/function/arithmetic/log1p.js +5 -11
  685. package/lib/cjs/function/arithmetic/log2.js +3 -8
  686. package/lib/cjs/function/arithmetic/mod.js +6 -17
  687. package/lib/cjs/function/arithmetic/multiply.js +312 -335
  688. package/lib/cjs/function/arithmetic/multiplyScalar.js +0 -4
  689. package/lib/cjs/function/arithmetic/norm.js +41 -69
  690. package/lib/cjs/function/arithmetic/nthRoot.js +9 -25
  691. package/lib/cjs/function/arithmetic/nthRoots.js +7 -15
  692. package/lib/cjs/function/arithmetic/pow.js +21 -40
  693. package/lib/cjs/function/arithmetic/round.js +6 -22
  694. package/lib/cjs/function/arithmetic/sign.js +3 -9
  695. package/lib/cjs/function/arithmetic/sqrt.js +3 -6
  696. package/lib/cjs/function/arithmetic/square.js +0 -4
  697. package/lib/cjs/function/arithmetic/subtract.js +7 -17
  698. package/lib/cjs/function/arithmetic/unaryMinus.js +2 -6
  699. package/lib/cjs/function/arithmetic/unaryPlus.js +5 -7
  700. package/lib/cjs/function/arithmetic/xgcd.js +12 -18
  701. package/lib/cjs/function/bitwise/bitAnd.js +3 -11
  702. package/lib/cjs/function/bitwise/bitNot.js +0 -6
  703. package/lib/cjs/function/bitwise/bitOr.js +4 -12
  704. package/lib/cjs/function/bitwise/bitXor.js +3 -11
  705. package/lib/cjs/function/bitwise/leftShift.js +5 -21
  706. package/lib/cjs/function/bitwise/rightArithShift.js +5 -21
  707. package/lib/cjs/function/bitwise/rightLogShift.js +6 -19
  708. package/lib/cjs/function/bitwise/useMatrixForArrayScalar.js +1 -3
  709. package/lib/cjs/function/combinatorics/bellNumbers.js +6 -11
  710. package/lib/cjs/function/combinatorics/catalan.js +6 -10
  711. package/lib/cjs/function/combinatorics/composition.js +6 -10
  712. package/lib/cjs/function/combinatorics/stirlingS2.js +12 -23
  713. package/lib/cjs/function/complex/arg.js +1 -4
  714. package/lib/cjs/function/complex/conj.js +0 -4
  715. package/lib/cjs/function/complex/im.js +0 -4
  716. package/lib/cjs/function/complex/re.js +0 -4
  717. package/lib/cjs/function/geometry/distance.js +7 -55
  718. package/lib/cjs/function/geometry/intersect.js +19 -54
  719. package/lib/cjs/function/logical/and.js +5 -17
  720. package/lib/cjs/function/logical/not.js +0 -5
  721. package/lib/cjs/function/logical/or.js +4 -11
  722. package/lib/cjs/function/logical/xor.js +3 -10
  723. package/lib/cjs/function/matrix/apply.js +3 -23
  724. package/lib/cjs/function/matrix/column.js +4 -10
  725. package/lib/cjs/function/matrix/concat.js +9 -26
  726. package/lib/cjs/function/matrix/count.js +2 -5
  727. package/lib/cjs/function/matrix/cross.js +4 -11
  728. package/lib/cjs/function/matrix/ctranspose.js +2 -5
  729. package/lib/cjs/function/matrix/det.js +7 -26
  730. package/lib/cjs/function/matrix/diag.js +21 -35
  731. package/lib/cjs/function/matrix/diff.js +7 -24
  732. package/lib/cjs/function/matrix/dot.js +22 -46
  733. package/lib/cjs/function/matrix/eigs/complexEigs.js +156 -209
  734. package/lib/cjs/function/matrix/eigs/realSymetric.js +62 -106
  735. package/lib/cjs/function/matrix/eigs.js +40 -72
  736. package/lib/cjs/function/matrix/expm.js +26 -42
  737. package/lib/cjs/function/matrix/fft.js +12 -26
  738. package/lib/cjs/function/matrix/filter.js +1 -7
  739. package/lib/cjs/function/matrix/flatten.js +6 -12
  740. package/lib/cjs/function/matrix/forEach.js +1 -9
  741. package/lib/cjs/function/matrix/getMatrixDataType.js +0 -5
  742. package/lib/cjs/function/matrix/identity.js +14 -30
  743. package/lib/cjs/function/matrix/ifft.js +3 -8
  744. package/lib/cjs/function/matrix/inv.js +20 -44
  745. package/lib/cjs/function/matrix/kron.js +3 -10
  746. package/lib/cjs/function/matrix/map.js +1 -11
  747. package/lib/cjs/function/matrix/matrixFromColumns.js +12 -22
  748. package/lib/cjs/function/matrix/matrixFromFunction.js +2 -8
  749. package/lib/cjs/function/matrix/matrixFromRows.js +6 -18
  750. package/lib/cjs/function/matrix/ones.js +8 -22
  751. package/lib/cjs/function/matrix/partitionSelect.js +15 -26
  752. package/lib/cjs/function/matrix/pinv.js +18 -50
  753. package/lib/cjs/function/matrix/range.js +15 -41
  754. package/lib/cjs/function/matrix/reshape.js +1 -5
  755. package/lib/cjs/function/matrix/resize.js +6 -27
  756. package/lib/cjs/function/matrix/rotate.js +2 -14
  757. package/lib/cjs/function/matrix/rotationMatrix.js +14 -33
  758. package/lib/cjs/function/matrix/row.js +4 -10
  759. package/lib/cjs/function/matrix/size.js +2 -7
  760. package/lib/cjs/function/matrix/sort.js +7 -20
  761. package/lib/cjs/function/matrix/sqrtm.js +12 -25
  762. package/lib/cjs/function/matrix/squeeze.js +3 -8
  763. package/lib/cjs/function/matrix/subset.js +16 -39
  764. package/lib/cjs/function/matrix/trace.js +22 -36
  765. package/lib/cjs/function/matrix/transpose.js +43 -58
  766. package/lib/cjs/function/matrix/zeros.js +10 -23
  767. package/lib/cjs/function/probability/combinations.js +3 -12
  768. package/lib/cjs/function/probability/combinationsWithRep.js +1 -17
  769. package/lib/cjs/function/probability/factorial.js +1 -7
  770. package/lib/cjs/function/probability/gamma.js +23 -34
  771. package/lib/cjs/function/probability/kldivergence.js +10 -22
  772. package/lib/cjs/function/probability/lgamma.js +13 -17
  773. package/lib/cjs/function/probability/multinomial.js +6 -11
  774. package/lib/cjs/function/probability/permutations.js +6 -19
  775. package/lib/cjs/function/probability/pickRandom.js +7 -27
  776. package/lib/cjs/function/probability/random.js +9 -20
  777. package/lib/cjs/function/probability/randomInt.js +3 -12
  778. package/lib/cjs/function/probability/util/randomMatrix.js +0 -3
  779. package/lib/cjs/function/probability/util/seededRNG.js +6 -9
  780. package/lib/cjs/function/relational/compare.js +8 -17
  781. package/lib/cjs/function/relational/compareNatural.js +28 -59
  782. package/lib/cjs/function/relational/compareText.js +2 -6
  783. package/lib/cjs/function/relational/compareUnits.js +0 -3
  784. package/lib/cjs/function/relational/deepEqual.js +2 -8
  785. package/lib/cjs/function/relational/equal.js +5 -15
  786. package/lib/cjs/function/relational/equalScalar.js +3 -9
  787. package/lib/cjs/function/relational/equalText.js +2 -5
  788. package/lib/cjs/function/relational/larger.js +5 -14
  789. package/lib/cjs/function/relational/largerEq.js +5 -14
  790. package/lib/cjs/function/relational/smaller.js +5 -14
  791. package/lib/cjs/function/relational/smallerEq.js +5 -14
  792. package/lib/cjs/function/relational/unequal.js +6 -17
  793. package/lib/cjs/function/set/setCartesian.js +9 -17
  794. package/lib/cjs/function/set/setDifference.js +9 -19
  795. package/lib/cjs/function/set/setDistinct.js +9 -17
  796. package/lib/cjs/function/set/setIntersect.js +9 -17
  797. package/lib/cjs/function/set/setIsSubset.js +4 -13
  798. package/lib/cjs/function/set/setMultiplicity.js +4 -11
  799. package/lib/cjs/function/set/setPowerset.js +10 -20
  800. package/lib/cjs/function/set/setSize.js +1 -7
  801. package/lib/cjs/function/set/setSymDifference.js +5 -10
  802. package/lib/cjs/function/set/setUnion.js +6 -11
  803. package/lib/cjs/function/special/erf.js +12 -27
  804. package/lib/cjs/function/statistics/cumsum.js +4 -27
  805. package/lib/cjs/function/statistics/mad.js +4 -12
  806. package/lib/cjs/function/statistics/max.js +7 -16
  807. package/lib/cjs/function/statistics/mean.js +4 -14
  808. package/lib/cjs/function/statistics/median.js +14 -21
  809. package/lib/cjs/function/statistics/min.js +7 -16
  810. package/lib/cjs/function/statistics/mode.js +3 -15
  811. package/lib/cjs/function/statistics/prod.js +9 -13
  812. package/lib/cjs/function/statistics/quantileSeq.js +19 -65
  813. package/lib/cjs/function/statistics/std.js +3 -10
  814. package/lib/cjs/function/statistics/sum.js +6 -14
  815. package/lib/cjs/function/statistics/utils/improveErrorMessage.js +0 -5
  816. package/lib/cjs/function/statistics/variance.js +11 -24
  817. package/lib/cjs/function/string/bin.js +2 -4
  818. package/lib/cjs/function/string/format.js +0 -4
  819. package/lib/cjs/function/string/hex.js +2 -4
  820. package/lib/cjs/function/string/oct.js +2 -3
  821. package/lib/cjs/function/string/print.js +1 -10
  822. package/lib/cjs/function/trigonometry/acos.js +2 -5
  823. package/lib/cjs/function/trigonometry/acosh.js +2 -8
  824. package/lib/cjs/function/trigonometry/acot.js +1 -5
  825. package/lib/cjs/function/trigonometry/acoth.js +3 -8
  826. package/lib/cjs/function/trigonometry/acsc.js +3 -8
  827. package/lib/cjs/function/trigonometry/acsch.js +1 -5
  828. package/lib/cjs/function/trigonometry/asec.js +3 -8
  829. package/lib/cjs/function/trigonometry/asech.js +3 -10
  830. package/lib/cjs/function/trigonometry/asin.js +2 -5
  831. package/lib/cjs/function/trigonometry/asinh.js +0 -4
  832. package/lib/cjs/function/trigonometry/atan.js +0 -3
  833. package/lib/cjs/function/trigonometry/atan2.js +6 -13
  834. package/lib/cjs/function/trigonometry/atanh.js +2 -7
  835. package/lib/cjs/function/trigonometry/cos.js +1 -4
  836. package/lib/cjs/function/trigonometry/cosh.js +0 -4
  837. package/lib/cjs/function/trigonometry/cot.js +2 -6
  838. package/lib/cjs/function/trigonometry/coth.js +1 -5
  839. package/lib/cjs/function/trigonometry/csc.js +2 -6
  840. package/lib/cjs/function/trigonometry/csch.js +1 -5
  841. package/lib/cjs/function/trigonometry/sec.js +2 -6
  842. package/lib/cjs/function/trigonometry/sech.js +1 -5
  843. package/lib/cjs/function/trigonometry/sin.js +1 -4
  844. package/lib/cjs/function/trigonometry/sinh.js +0 -4
  845. package/lib/cjs/function/trigonometry/tan.js +1 -4
  846. package/lib/cjs/function/trigonometry/tanh.js +0 -4
  847. package/lib/cjs/function/trigonometry/trigUnit.js +0 -3
  848. package/lib/cjs/function/unit/to.js +2 -5
  849. package/lib/cjs/function/utils/clone.js +0 -4
  850. package/lib/cjs/function/utils/hasNumericValue.js +1 -4
  851. package/lib/cjs/function/utils/isInteger.js +1 -5
  852. package/lib/cjs/function/utils/isNaN.js +0 -5
  853. package/lib/cjs/function/utils/isNegative.js +1 -5
  854. package/lib/cjs/function/utils/isNumeric.js +0 -4
  855. package/lib/cjs/function/utils/isPositive.js +0 -5
  856. package/lib/cjs/function/utils/isPrime.js +4 -25
  857. package/lib/cjs/function/utils/isZero.js +0 -5
  858. package/lib/cjs/function/utils/numeric.js +5 -13
  859. package/lib/cjs/function/utils/typeOf.js +0 -4
  860. package/lib/cjs/header.js +2 -2
  861. package/lib/cjs/index.js +0 -2
  862. package/lib/cjs/json/replacer.js +0 -3
  863. package/lib/cjs/json/reviver.js +0 -5
  864. package/lib/cjs/number.js +0 -2
  865. package/lib/cjs/plain/bignumber/arithmetic.js +0 -10
  866. package/lib/cjs/plain/bignumber/index.js +0 -7
  867. package/lib/cjs/plain/number/arithmetic.js +24 -85
  868. package/lib/cjs/plain/number/bitwise.js +0 -23
  869. package/lib/cjs/plain/number/combinations.js +4 -14
  870. package/lib/cjs/plain/number/constants.js +0 -1
  871. package/lib/cjs/plain/number/index.js +0 -18
  872. package/lib/cjs/plain/number/logical.js +0 -8
  873. package/lib/cjs/plain/number/probability.js +11 -22
  874. package/lib/cjs/plain/number/trigonometry.js +0 -52
  875. package/lib/cjs/plain/number/utils.js +0 -12
  876. package/lib/cjs/type/bignumber/BigNumber.js +4 -13
  877. package/lib/cjs/type/bignumber/function/bignumber.js +1 -10
  878. package/lib/cjs/type/boolean.js +2 -9
  879. package/lib/cjs/type/chain/Chain.js +18 -43
  880. package/lib/cjs/type/chain/function/chain.js +1 -4
  881. package/lib/cjs/type/complex/Complex.js +8 -35
  882. package/lib/cjs/type/complex/function/complex.js +2 -7
  883. package/lib/cjs/type/fraction/Fraction.js +2 -8
  884. package/lib/cjs/type/fraction/function/fraction.js +2 -6
  885. package/lib/cjs/type/matrix/DenseMatrix.js +144 -246
  886. package/lib/cjs/type/matrix/FibonacciHeap.js +119 -159
  887. package/lib/cjs/type/matrix/ImmutableDenseMatrix.js +20 -43
  888. package/lib/cjs/type/matrix/Matrix.js +18 -38
  889. package/lib/cjs/type/matrix/MatrixIndex.js +24 -65
  890. package/lib/cjs/type/matrix/Range.js +14 -50
  891. package/lib/cjs/type/matrix/Spa.js +34 -54
  892. package/lib/cjs/type/matrix/SparseMatrix.js +414 -531
  893. package/lib/cjs/type/matrix/function/index.js +1 -5
  894. package/lib/cjs/type/matrix/function/matrix.js +4 -9
  895. package/lib/cjs/type/matrix/function/sparse.js +1 -4
  896. package/lib/cjs/type/matrix/utils/matAlgo01xDSid.js +36 -36
  897. package/lib/cjs/type/matrix/utils/matAlgo02xDS0.js +43 -43
  898. package/lib/cjs/type/matrix/utils/matAlgo03xDSf.js +40 -40
  899. package/lib/cjs/type/matrix/utils/matAlgo04xSidSid.js +71 -71
  900. package/lib/cjs/type/matrix/utils/matAlgo05xSfSf.js +73 -74
  901. package/lib/cjs/type/matrix/utils/matAlgo06xS0S0.js +61 -61
  902. package/lib/cjs/type/matrix/utils/matAlgo07xSSf.js +47 -49
  903. package/lib/cjs/type/matrix/utils/matAlgo08xS0Sid.js +67 -67
  904. package/lib/cjs/type/matrix/utils/matAlgo09xS0Sf.js +57 -56
  905. package/lib/cjs/type/matrix/utils/matAlgo10xSids.js +33 -33
  906. package/lib/cjs/type/matrix/utils/matAlgo11xS0s.js +39 -38
  907. package/lib/cjs/type/matrix/utils/matAlgo12xSfs.js +33 -33
  908. package/lib/cjs/type/matrix/utils/matAlgo13xDD.js +26 -28
  909. package/lib/cjs/type/matrix/utils/matAlgo14xDs.js +18 -19
  910. package/lib/cjs/type/matrix/utils/matrixAlgorithmSuite.js +10 -32
  911. package/lib/cjs/type/number.js +7 -26
  912. package/lib/cjs/type/resultset/ResultSet.js +5 -13
  913. package/lib/cjs/type/string.js +0 -5
  914. package/lib/cjs/type/unit/Unit.js +206 -394
  915. package/lib/cjs/type/unit/function/createUnit.js +1 -4
  916. package/lib/cjs/type/unit/function/splitUnit.js +0 -3
  917. package/lib/cjs/type/unit/function/unit.js +5 -6
  918. package/lib/cjs/type/unit/physicalConstants.js +22 -19
  919. package/lib/cjs/utils/array.js +62 -137
  920. package/lib/cjs/utils/bignumber/bitwise.js +13 -96
  921. package/lib/cjs/utils/bignumber/constants.js +4 -7
  922. package/lib/cjs/utils/bignumber/formatter.js +20 -46
  923. package/lib/cjs/utils/bignumber/nearlyEqual.js +8 -10
  924. package/lib/cjs/utils/collection.js +24 -43
  925. package/lib/cjs/utils/complex.js +0 -2
  926. package/lib/cjs/utils/customs.js +18 -42
  927. package/lib/cjs/utils/emitter.js +2 -4
  928. package/lib/cjs/utils/factory.js +11 -28
  929. package/lib/cjs/utils/function.js +4 -21
  930. package/lib/cjs/utils/is.js +3 -50
  931. package/lib/cjs/utils/latex.js +6 -14
  932. package/lib/cjs/utils/log.js +0 -6
  933. package/lib/cjs/utils/lruQueue.js +0 -9
  934. package/lib/cjs/utils/map.js +12 -44
  935. package/lib/cjs/utils/noop.js +0 -5
  936. package/lib/cjs/utils/number.js +71 -151
  937. package/lib/cjs/utils/object.js +25 -85
  938. package/lib/cjs/utils/product.js +0 -4
  939. package/lib/cjs/utils/scope.js +0 -4
  940. package/lib/cjs/utils/snapshot.js +13 -47
  941. package/lib/cjs/utils/string.js +9 -40
  942. package/lib/cjs/utils/switch.js +0 -5
  943. package/lib/cjs/version.js +2 -2
  944. package/lib/esm/constants.js +9 -5
  945. package/lib/esm/core/create.js +24 -26
  946. package/lib/esm/core/function/config.js +12 -10
  947. package/lib/esm/core/function/import.js +21 -57
  948. package/lib/esm/core/function/typed.js +23 -41
  949. package/lib/esm/entry/configReadonly.js +2 -3
  950. package/lib/esm/entry/dependenciesAny.generated.js +0 -1
  951. package/lib/esm/entry/dependenciesNumber.generated.js +0 -1
  952. package/lib/esm/entry/impureFunctionsAny.generated.js +2 -8
  953. package/lib/esm/entry/impureFunctionsNumber.generated.js +2 -8
  954. package/lib/esm/entry/mainAny.js +10 -5
  955. package/lib/esm/entry/mainNumber.js +10 -5
  956. package/lib/esm/entry/pureFunctionsAny.generated.js +2 -1
  957. package/lib/esm/entry/pureFunctionsNumber.generated.js +2 -1
  958. package/lib/esm/error/ArgumentsError.js +0 -1
  959. package/lib/esm/error/DimensionError.js +0 -1
  960. package/lib/esm/error/IndexError.js +0 -4
  961. package/lib/esm/expression/Help.js +5 -23
  962. package/lib/esm/expression/Parser.js +8 -18
  963. package/lib/esm/expression/embeddedDocs/embeddedDocs.js +1 -0
  964. package/lib/esm/expression/function/compile.js +0 -1
  965. package/lib/esm/expression/function/evaluate.js +0 -1
  966. package/lib/esm/expression/function/help.js +1 -5
  967. package/lib/esm/expression/function/parser.js +0 -1
  968. package/lib/esm/expression/node/AccessorNode.js +14 -40
  969. package/lib/esm/expression/node/ArrayNode.js +11 -29
  970. package/lib/esm/expression/node/AssignmentNode.js +25 -58
  971. package/lib/esm/expression/node/BlockNode.js +11 -33
  972. package/lib/esm/expression/node/ConditionalNode.js +15 -53
  973. package/lib/esm/expression/node/ConstantNode.js +11 -37
  974. package/lib/esm/expression/node/FunctionAssignmentNode.js +22 -46
  975. package/lib/esm/expression/node/FunctionNode.js +30 -93
  976. package/lib/esm/expression/node/IndexNode.js +15 -38
  977. package/lib/esm/expression/node/Node.js +23 -67
  978. package/lib/esm/expression/node/ObjectNode.js +11 -41
  979. package/lib/esm/expression/node/OperatorNode.js +36 -138
  980. package/lib/esm/expression/node/ParenthesisNode.js +12 -32
  981. package/lib/esm/expression/node/RangeNode.js +16 -62
  982. package/lib/esm/expression/node/RelationalNode.js +9 -37
  983. package/lib/esm/expression/node/SymbolNode.js +16 -39
  984. package/lib/esm/expression/node/utils/access.js +0 -2
  985. package/lib/esm/expression/node/utils/assign.js +0 -2
  986. package/lib/esm/expression/operators.js +21 -41
  987. package/lib/esm/expression/parse.js +145 -323
  988. package/lib/esm/expression/transform/apply.transform.js +3 -4
  989. package/lib/esm/expression/transform/column.transform.js +3 -4
  990. package/lib/esm/expression/transform/concat.transform.js +1 -3
  991. package/lib/esm/expression/transform/cumsum.transform.js +1 -3
  992. package/lib/esm/expression/transform/diff.transform.js +1 -2
  993. package/lib/esm/expression/transform/filter.transform.js +3 -7
  994. package/lib/esm/expression/transform/forEach.transform.js +2 -8
  995. package/lib/esm/expression/transform/index.transform.js +4 -6
  996. package/lib/esm/expression/transform/map.transform.js +3 -9
  997. package/lib/esm/expression/transform/max.transform.js +1 -2
  998. package/lib/esm/expression/transform/mean.transform.js +1 -2
  999. package/lib/esm/expression/transform/min.transform.js +1 -2
  1000. package/lib/esm/expression/transform/range.transform.js +1 -3
  1001. package/lib/esm/expression/transform/row.transform.js +3 -4
  1002. package/lib/esm/expression/transform/std.transform.js +1 -2
  1003. package/lib/esm/expression/transform/subset.transform.js +1 -1
  1004. package/lib/esm/expression/transform/sum.transform.js +1 -2
  1005. package/lib/esm/expression/transform/utils/compileInlineExpression.js +3 -5
  1006. package/lib/esm/expression/transform/utils/errorTransform.js +1 -2
  1007. package/lib/esm/expression/transform/utils/lastDimToZeroBase.js +1 -3
  1008. package/lib/esm/expression/transform/variance.transform.js +1 -2
  1009. package/lib/esm/factoriesAny.js +2 -1
  1010. package/lib/esm/factoriesNumber.js +58 -33
  1011. package/lib/esm/function/algebra/decomposition/lup.js +124 -158
  1012. package/lib/esm/function/algebra/decomposition/qr.js +22 -36
  1013. package/lib/esm/function/algebra/decomposition/slu.js +9 -8
  1014. package/lib/esm/function/algebra/derivative.js +36 -105
  1015. package/lib/esm/function/algebra/leafCount.js +1 -3
  1016. package/lib/esm/function/algebra/rationalize.js +127 -142
  1017. package/lib/esm/function/algebra/resolve.js +3 -10
  1018. package/lib/esm/function/algebra/simplify/util.js +12 -67
  1019. package/lib/esm/function/algebra/simplify.js +86 -162
  1020. package/lib/esm/function/algebra/simplifyConstant.js +22 -94
  1021. package/lib/esm/function/algebra/simplifyCore.js +6 -52
  1022. package/lib/esm/function/algebra/solver/lsolve.js +22 -26
  1023. package/lib/esm/function/algebra/solver/lsolveAll.js +24 -25
  1024. package/lib/esm/function/algebra/solver/lusolve.js +9 -14
  1025. package/lib/esm/function/algebra/solver/usolve.js +26 -31
  1026. package/lib/esm/function/algebra/solver/usolveAll.js +28 -25
  1027. package/lib/esm/function/algebra/solver/utils/solveValidation.js +4 -28
  1028. package/lib/esm/function/algebra/sparse/csAmd.js +247 -294
  1029. package/lib/esm/function/algebra/sparse/csChol.js +63 -75
  1030. package/lib/esm/function/algebra/sparse/csCounts.js +37 -52
  1031. package/lib/esm/function/algebra/sparse/csCumsum.js +8 -10
  1032. package/lib/esm/function/algebra/sparse/csDfs.js +35 -39
  1033. package/lib/esm/function/algebra/sparse/csEreach.js +25 -29
  1034. package/lib/esm/function/algebra/sparse/csEtree.js +23 -27
  1035. package/lib/esm/function/algebra/sparse/csFkeep.js +20 -24
  1036. package/lib/esm/function/algebra/sparse/csIpvec.js +2 -3
  1037. package/lib/esm/function/algebra/sparse/csLeaf.js +12 -12
  1038. package/lib/esm/function/algebra/sparse/csLu.js +65 -83
  1039. package/lib/esm/function/algebra/sparse/csMark.js +1 -1
  1040. package/lib/esm/function/algebra/sparse/csPermute.js +20 -24
  1041. package/lib/esm/function/algebra/sparse/csPost.js +15 -23
  1042. package/lib/esm/function/algebra/sparse/csReach.js +15 -17
  1043. package/lib/esm/function/algebra/sparse/csSpsolve.js +30 -35
  1044. package/lib/esm/function/algebra/sparse/csSqr.js +60 -77
  1045. package/lib/esm/function/algebra/sparse/csSymperm.js +32 -40
  1046. package/lib/esm/function/algebra/sparse/csTdfs.js +12 -14
  1047. package/lib/esm/function/algebra/sparse/csUnflip.js +1 -1
  1048. package/lib/esm/function/algebra/symbolicEqual.js +0 -2
  1049. package/lib/esm/function/arithmetic/abs.js +0 -1
  1050. package/lib/esm/function/arithmetic/add.js +1 -3
  1051. package/lib/esm/function/arithmetic/addScalar.js +0 -3
  1052. package/lib/esm/function/arithmetic/cbrt.js +8 -15
  1053. package/lib/esm/function/arithmetic/ceil.js +0 -3
  1054. package/lib/esm/function/arithmetic/cube.js +2 -1
  1055. package/lib/esm/function/arithmetic/divide.js +2 -1
  1056. package/lib/esm/function/arithmetic/divideScalar.js +0 -1
  1057. package/lib/esm/function/arithmetic/dotDivide.js +1 -1
  1058. package/lib/esm/function/arithmetic/dotMultiply.js +1 -1
  1059. package/lib/esm/function/arithmetic/dotPow.js +1 -3
  1060. package/lib/esm/function/arithmetic/exp.js +0 -1
  1061. package/lib/esm/function/arithmetic/expm1.js +0 -1
  1062. package/lib/esm/function/arithmetic/fix.js +0 -3
  1063. package/lib/esm/function/arithmetic/floor.js +0 -3
  1064. package/lib/esm/function/arithmetic/gcd.js +4 -8
  1065. package/lib/esm/function/arithmetic/hypot.js +1 -6
  1066. package/lib/esm/function/arithmetic/invmod.js +0 -2
  1067. package/lib/esm/function/arithmetic/lcm.js +5 -11
  1068. package/lib/esm/function/arithmetic/log.js +0 -1
  1069. package/lib/esm/function/arithmetic/log10.js +0 -1
  1070. package/lib/esm/function/arithmetic/log1p.js +1 -3
  1071. package/lib/esm/function/arithmetic/log2.js +1 -2
  1072. package/lib/esm/function/arithmetic/mod.js +3 -5
  1073. package/lib/esm/function/arithmetic/multiply.js +307 -324
  1074. package/lib/esm/function/arithmetic/multiplyScalar.js +0 -1
  1075. package/lib/esm/function/arithmetic/norm.js +29 -55
  1076. package/lib/esm/function/arithmetic/nthRoot.js +6 -14
  1077. package/lib/esm/function/arithmetic/nthRoots.js +4 -10
  1078. package/lib/esm/function/arithmetic/pow.js +13 -27
  1079. package/lib/esm/function/arithmetic/round.js +1 -10
  1080. package/lib/esm/function/arithmetic/sign.js +0 -2
  1081. package/lib/esm/function/arithmetic/sqrt.js +1 -2
  1082. package/lib/esm/function/arithmetic/square.js +0 -1
  1083. package/lib/esm/function/arithmetic/subtract.js +2 -4
  1084. package/lib/esm/function/arithmetic/unaryMinus.js +2 -2
  1085. package/lib/esm/function/arithmetic/unaryPlus.js +3 -1
  1086. package/lib/esm/function/arithmetic/xgcd.js +9 -12
  1087. package/lib/esm/function/bitwise/bitAnd.js +1 -1
  1088. package/lib/esm/function/bitwise/bitNot.js +0 -1
  1089. package/lib/esm/function/bitwise/bitOr.js +1 -1
  1090. package/lib/esm/function/bitwise/bitXor.js +1 -1
  1091. package/lib/esm/function/bitwise/leftShift.js +1 -5
  1092. package/lib/esm/function/bitwise/rightArithShift.js +1 -5
  1093. package/lib/esm/function/bitwise/rightLogShift.js +2 -4
  1094. package/lib/esm/function/combinatorics/bellNumbers.js +2 -5
  1095. package/lib/esm/function/combinatorics/catalan.js +0 -2
  1096. package/lib/esm/function/combinatorics/composition.js +0 -2
  1097. package/lib/esm/function/combinatorics/stirlingS2.js +0 -8
  1098. package/lib/esm/function/complex/arg.js +1 -1
  1099. package/lib/esm/function/complex/conj.js +0 -1
  1100. package/lib/esm/function/complex/im.js +0 -1
  1101. package/lib/esm/function/complex/re.js +0 -1
  1102. package/lib/esm/function/geometry/distance.js +0 -45
  1103. package/lib/esm/function/geometry/intersect.js +5 -38
  1104. package/lib/esm/function/logical/and.js +1 -5
  1105. package/lib/esm/function/logical/not.js +0 -1
  1106. package/lib/esm/function/logical/or.js +1 -1
  1107. package/lib/esm/function/logical/xor.js +1 -1
  1108. package/lib/esm/function/matrix/apply.js +2 -16
  1109. package/lib/esm/function/matrix/column.js +1 -3
  1110. package/lib/esm/function/matrix/concat.js +7 -16
  1111. package/lib/esm/function/matrix/count.js +0 -1
  1112. package/lib/esm/function/matrix/cross.js +1 -5
  1113. package/lib/esm/function/matrix/ctranspose.js +0 -1
  1114. package/lib/esm/function/matrix/det.js +1 -15
  1115. package/lib/esm/function/matrix/diag.js +18 -27
  1116. package/lib/esm/function/matrix/diff.js +4 -17
  1117. package/lib/esm/function/matrix/dot.js +18 -39
  1118. package/lib/esm/function/matrix/eigs/complexEigs.js +131 -169
  1119. package/lib/esm/function/matrix/eigs/realSymetric.js +51 -93
  1120. package/lib/esm/function/matrix/eigs.js +6 -30
  1121. package/lib/esm/function/matrix/expm.js +21 -33
  1122. package/lib/esm/function/matrix/fft.js +5 -14
  1123. package/lib/esm/function/matrix/filter.js +1 -2
  1124. package/lib/esm/function/matrix/flatten.js +5 -7
  1125. package/lib/esm/function/matrix/forEach.js +1 -4
  1126. package/lib/esm/function/matrix/getMatrixDataType.js +0 -1
  1127. package/lib/esm/function/matrix/identity.js +9 -20
  1128. package/lib/esm/function/matrix/ifft.js +0 -1
  1129. package/lib/esm/function/matrix/inv.js +12 -31
  1130. package/lib/esm/function/matrix/kron.js +1 -5
  1131. package/lib/esm/function/matrix/map.js +1 -7
  1132. package/lib/esm/function/matrix/matrixFromColumns.js +8 -12
  1133. package/lib/esm/function/matrix/matrixFromFunction.js +0 -4
  1134. package/lib/esm/function/matrix/matrixFromRows.js +2 -8
  1135. package/lib/esm/function/matrix/ones.js +5 -14
  1136. package/lib/esm/function/matrix/partitionSelect.js +12 -19
  1137. package/lib/esm/function/matrix/pinv.js +5 -31
  1138. package/lib/esm/function/matrix/range.js +8 -31
  1139. package/lib/esm/function/matrix/reshape.js +0 -1
  1140. package/lib/esm/function/matrix/resize.js +5 -17
  1141. package/lib/esm/function/matrix/rotate.js +0 -9
  1142. package/lib/esm/function/matrix/rotationMatrix.js +3 -19
  1143. package/lib/esm/function/matrix/row.js +1 -3
  1144. package/lib/esm/function/matrix/size.js +0 -1
  1145. package/lib/esm/function/matrix/sort.js +4 -14
  1146. package/lib/esm/function/matrix/sqrtm.js +2 -10
  1147. package/lib/esm/function/matrix/squeeze.js +2 -3
  1148. package/lib/esm/function/matrix/subset.js +15 -30
  1149. package/lib/esm/function/matrix/trace.js +20 -30
  1150. package/lib/esm/function/matrix/transpose.js +42 -53
  1151. package/lib/esm/function/matrix/zeros.js +8 -15
  1152. package/lib/esm/function/probability/combinations.js +3 -8
  1153. package/lib/esm/function/probability/combinationsWithRep.js +1 -12
  1154. package/lib/esm/function/probability/factorial.js +0 -3
  1155. package/lib/esm/function/probability/gamma.js +18 -26
  1156. package/lib/esm/function/probability/kldivergence.js +2 -12
  1157. package/lib/esm/function/probability/lgamma.js +12 -12
  1158. package/lib/esm/function/probability/multinomial.js +0 -2
  1159. package/lib/esm/function/probability/permutations.js +5 -13
  1160. package/lib/esm/function/probability/pickRandom.js +2 -17
  1161. package/lib/esm/function/probability/random.js +4 -10
  1162. package/lib/esm/function/probability/randomInt.js +1 -5
  1163. package/lib/esm/function/probability/util/randomMatrix.js +0 -2
  1164. package/lib/esm/function/probability/util/seededRNG.js +6 -5
  1165. package/lib/esm/function/relational/compare.js +1 -1
  1166. package/lib/esm/function/relational/compareNatural.js +27 -52
  1167. package/lib/esm/function/relational/compareText.js +1 -1
  1168. package/lib/esm/function/relational/compareUnits.js +0 -1
  1169. package/lib/esm/function/relational/deepEqual.js +1 -5
  1170. package/lib/esm/function/relational/equal.js +1 -5
  1171. package/lib/esm/function/relational/equalScalar.js +1 -1
  1172. package/lib/esm/function/relational/equalText.js +0 -1
  1173. package/lib/esm/function/relational/larger.js +1 -1
  1174. package/lib/esm/function/relational/largerEq.js +1 -1
  1175. package/lib/esm/function/relational/smaller.js +1 -1
  1176. package/lib/esm/function/relational/smallerEq.js +1 -1
  1177. package/lib/esm/function/relational/unequal.js +1 -6
  1178. package/lib/esm/function/set/setCartesian.js +4 -9
  1179. package/lib/esm/function/set/setDifference.js +4 -11
  1180. package/lib/esm/function/set/setDistinct.js +4 -9
  1181. package/lib/esm/function/set/setIntersect.js +4 -9
  1182. package/lib/esm/function/set/setIsSubset.js +0 -6
  1183. package/lib/esm/function/set/setMultiplicity.js +0 -4
  1184. package/lib/esm/function/set/setPowerset.js +6 -13
  1185. package/lib/esm/function/set/setSize.js +0 -3
  1186. package/lib/esm/function/set/setSymDifference.js +0 -2
  1187. package/lib/esm/function/set/setUnion.js +0 -2
  1188. package/lib/esm/function/special/erf.js +12 -23
  1189. package/lib/esm/function/statistics/cumsum.js +2 -18
  1190. package/lib/esm/function/statistics/mad.js +0 -4
  1191. package/lib/esm/function/statistics/max.js +4 -9
  1192. package/lib/esm/function/statistics/mean.js +2 -7
  1193. package/lib/esm/function/statistics/median.js +10 -12
  1194. package/lib/esm/function/statistics/min.js +4 -9
  1195. package/lib/esm/function/statistics/mode.js +1 -10
  1196. package/lib/esm/function/statistics/prod.js +6 -6
  1197. package/lib/esm/function/statistics/quantileSeq.js +15 -56
  1198. package/lib/esm/function/statistics/std.js +0 -4
  1199. package/lib/esm/function/statistics/sum.js +3 -7
  1200. package/lib/esm/function/statistics/utils/improveErrorMessage.js +1 -4
  1201. package/lib/esm/function/statistics/variance.js +5 -13
  1202. package/lib/esm/function/string/bin.js +1 -1
  1203. package/lib/esm/function/string/format.js +0 -1
  1204. package/lib/esm/function/string/hex.js +1 -1
  1205. package/lib/esm/function/string/oct.js +1 -0
  1206. package/lib/esm/function/string/print.js +1 -5
  1207. package/lib/esm/function/trigonometry/acos.js +0 -1
  1208. package/lib/esm/function/trigonometry/acosh.js +0 -3
  1209. package/lib/esm/function/trigonometry/acot.js +0 -1
  1210. package/lib/esm/function/trigonometry/acoth.js +0 -2
  1211. package/lib/esm/function/trigonometry/acsc.js +0 -2
  1212. package/lib/esm/function/trigonometry/acsch.js +0 -1
  1213. package/lib/esm/function/trigonometry/asec.js +0 -2
  1214. package/lib/esm/function/trigonometry/asech.js +0 -4
  1215. package/lib/esm/function/trigonometry/asin.js +0 -1
  1216. package/lib/esm/function/trigonometry/asinh.js +0 -1
  1217. package/lib/esm/function/trigonometry/atan.js +0 -1
  1218. package/lib/esm/function/trigonometry/atan2.js +2 -1
  1219. package/lib/esm/function/trigonometry/atanh.js +0 -2
  1220. package/lib/esm/function/trigonometry/cos.js +1 -1
  1221. package/lib/esm/function/trigonometry/cosh.js +0 -1
  1222. package/lib/esm/function/trigonometry/cot.js +1 -1
  1223. package/lib/esm/function/trigonometry/coth.js +0 -1
  1224. package/lib/esm/function/trigonometry/csc.js +1 -1
  1225. package/lib/esm/function/trigonometry/csch.js +0 -1
  1226. package/lib/esm/function/trigonometry/sec.js +1 -1
  1227. package/lib/esm/function/trigonometry/sech.js +0 -1
  1228. package/lib/esm/function/trigonometry/sin.js +1 -1
  1229. package/lib/esm/function/trigonometry/sinh.js +0 -1
  1230. package/lib/esm/function/trigonometry/tan.js +1 -1
  1231. package/lib/esm/function/trigonometry/tanh.js +0 -1
  1232. package/lib/esm/function/trigonometry/trigUnit.js +0 -1
  1233. package/lib/esm/function/unit/to.js +1 -1
  1234. package/lib/esm/function/utils/clone.js +0 -1
  1235. package/lib/esm/function/utils/hasNumericValue.js +0 -1
  1236. package/lib/esm/function/utils/isInteger.js +1 -1
  1237. package/lib/esm/function/utils/isNaN.js +0 -1
  1238. package/lib/esm/function/utils/isNegative.js +1 -1
  1239. package/lib/esm/function/utils/isNumeric.js +0 -1
  1240. package/lib/esm/function/utils/isPositive.js +0 -1
  1241. package/lib/esm/function/utils/isPrime.js +4 -22
  1242. package/lib/esm/function/utils/isZero.js +0 -1
  1243. package/lib/esm/function/utils/numeric.js +3 -7
  1244. package/lib/esm/function/utils/typeOf.js +0 -1
  1245. package/lib/esm/json/replacer.js +0 -1
  1246. package/lib/esm/json/reviver.js +0 -3
  1247. package/lib/esm/plain/bignumber/index.js +2 -1
  1248. package/lib/esm/plain/number/arithmetic.js +25 -45
  1249. package/lib/esm/plain/number/bitwise.js +0 -7
  1250. package/lib/esm/plain/number/combinations.js +4 -10
  1251. package/lib/esm/plain/number/probability.js +12 -16
  1252. package/lib/esm/type/bignumber/BigNumber.js +3 -6
  1253. package/lib/esm/type/bignumber/function/bignumber.js +0 -6
  1254. package/lib/esm/type/boolean.js +2 -6
  1255. package/lib/esm/type/chain/Chain.js +16 -36
  1256. package/lib/esm/type/chain/function/chain.js +0 -1
  1257. package/lib/esm/type/complex/Complex.js +8 -28
  1258. package/lib/esm/type/complex/function/complex.js +1 -3
  1259. package/lib/esm/type/fraction/Fraction.js +2 -4
  1260. package/lib/esm/type/fraction/function/fraction.js +1 -2
  1261. package/lib/esm/type/matrix/DenseMatrix.js +143 -224
  1262. package/lib/esm/type/matrix/FibonacciHeap.js +118 -156
  1263. package/lib/esm/type/matrix/ImmutableDenseMatrix.js +19 -38
  1264. package/lib/esm/type/matrix/Matrix.js +18 -36
  1265. package/lib/esm/type/matrix/MatrixIndex.js +24 -60
  1266. package/lib/esm/type/matrix/Range.js +14 -46
  1267. package/lib/esm/type/matrix/Spa.js +32 -50
  1268. package/lib/esm/type/matrix/SparseMatrix.js +412 -513
  1269. package/lib/esm/type/matrix/function/index.js +0 -1
  1270. package/lib/esm/type/matrix/function/matrix.js +1 -4
  1271. package/lib/esm/type/matrix/function/sparse.js +0 -1
  1272. package/lib/esm/type/matrix/utils/matAlgo01xDSid.js +36 -33
  1273. package/lib/esm/type/matrix/utils/matAlgo02xDS0.js +42 -39
  1274. package/lib/esm/type/matrix/utils/matAlgo03xDSf.js +40 -37
  1275. package/lib/esm/type/matrix/utils/matAlgo04xSidSid.js +70 -67
  1276. package/lib/esm/type/matrix/utils/matAlgo05xSfSf.js +72 -70
  1277. package/lib/esm/type/matrix/utils/matAlgo06xS0S0.js +60 -56
  1278. package/lib/esm/type/matrix/utils/matAlgo07xSSf.js +46 -45
  1279. package/lib/esm/type/matrix/utils/matAlgo08xS0Sid.js +66 -63
  1280. package/lib/esm/type/matrix/utils/matAlgo09xS0Sf.js +56 -52
  1281. package/lib/esm/type/matrix/utils/matAlgo10xSids.js +32 -30
  1282. package/lib/esm/type/matrix/utils/matAlgo11xS0s.js +38 -35
  1283. package/lib/esm/type/matrix/utils/matAlgo12xSfs.js +32 -30
  1284. package/lib/esm/type/matrix/utils/matAlgo13xDD.js +26 -25
  1285. package/lib/esm/type/matrix/utils/matAlgo14xDs.js +18 -16
  1286. package/lib/esm/type/matrix/utils/matrixAlgorithmSuite.js +9 -26
  1287. package/lib/esm/type/number.js +7 -23
  1288. package/lib/esm/type/resultset/ResultSet.js +5 -11
  1289. package/lib/esm/type/string.js +0 -1
  1290. package/lib/esm/type/unit/Unit.js +190 -368
  1291. package/lib/esm/type/unit/function/createUnit.js +0 -1
  1292. package/lib/esm/type/unit/function/splitUnit.js +0 -1
  1293. package/lib/esm/type/unit/function/unit.js +4 -2
  1294. package/lib/esm/type/unit/physicalConstants.js +22 -15
  1295. package/lib/esm/utils/array.js +63 -113
  1296. package/lib/esm/utils/bignumber/bitwise.js +13 -89
  1297. package/lib/esm/utils/bignumber/constants.js +5 -5
  1298. package/lib/esm/utils/bignumber/formatter.js +21 -42
  1299. package/lib/esm/utils/bignumber/nearlyEqual.js +8 -9
  1300. package/lib/esm/utils/collection.js +25 -35
  1301. package/lib/esm/utils/complex.js +1 -1
  1302. package/lib/esm/utils/customs.js +19 -39
  1303. package/lib/esm/utils/emitter.js +3 -2
  1304. package/lib/esm/utils/factory.js +12 -20
  1305. package/lib/esm/utils/function.js +4 -13
  1306. package/lib/esm/utils/is.js +3 -7
  1307. package/lib/esm/utils/latex.js +6 -8
  1308. package/lib/esm/utils/log.js +0 -2
  1309. package/lib/esm/utils/lruQueue.js +0 -8
  1310. package/lib/esm/utils/map.js +6 -21
  1311. package/lib/esm/utils/number.js +72 -115
  1312. package/lib/esm/utils/object.js +26 -66
  1313. package/lib/esm/utils/product.js +0 -3
  1314. package/lib/esm/utils/scope.js +1 -3
  1315. package/lib/esm/utils/snapshot.js +10 -32
  1316. package/lib/esm/utils/string.js +10 -32
  1317. package/lib/esm/utils/switch.js +0 -4
  1318. package/lib/esm/version.js +2 -1
  1319. package/package.json +19 -18
  1320. package/types/index.d.ts +34 -35
  1321. package/types/index.ts +0 -2265
  1322. package/types/tsconfig.json +0 -22
@@ -1,44 +1,36 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.createComplexEigs = createComplexEigs;
9
-
10
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
-
12
9
  var _object = require("../../../utils/object.js");
13
-
14
10
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
15
-
16
11
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
17
-
18
12
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
19
-
20
13
  function createComplexEigs(_ref) {
21
14
  var addScalar = _ref.addScalar,
22
- subtract = _ref.subtract,
23
- flatten = _ref.flatten,
24
- multiply = _ref.multiply,
25
- multiplyScalar = _ref.multiplyScalar,
26
- divideScalar = _ref.divideScalar,
27
- sqrt = _ref.sqrt,
28
- abs = _ref.abs,
29
- bignumber = _ref.bignumber,
30
- diag = _ref.diag,
31
- inv = _ref.inv,
32
- qr = _ref.qr,
33
- usolve = _ref.usolve,
34
- usolveAll = _ref.usolveAll,
35
- equal = _ref.equal,
36
- complex = _ref.complex,
37
- larger = _ref.larger,
38
- smaller = _ref.smaller,
39
- matrixFromColumns = _ref.matrixFromColumns,
40
- dot = _ref.dot;
41
-
15
+ subtract = _ref.subtract,
16
+ flatten = _ref.flatten,
17
+ multiply = _ref.multiply,
18
+ multiplyScalar = _ref.multiplyScalar,
19
+ divideScalar = _ref.divideScalar,
20
+ sqrt = _ref.sqrt,
21
+ abs = _ref.abs,
22
+ bignumber = _ref.bignumber,
23
+ diag = _ref.diag,
24
+ inv = _ref.inv,
25
+ qr = _ref.qr,
26
+ usolve = _ref.usolve,
27
+ usolveAll = _ref.usolveAll,
28
+ equal = _ref.equal,
29
+ complex = _ref.complex,
30
+ larger = _ref.larger,
31
+ smaller = _ref.smaller,
32
+ matrixFromColumns = _ref.matrixFromColumns,
33
+ dot = _ref.dot;
42
34
  /**
43
35
  * @param {number[][]} arr the matrix to find eigenvalues of
44
36
  * @param {number} N size of the matrix
@@ -51,47 +43,52 @@ function createComplexEigs(_ref) {
51
43
  function complexEigs(arr, N, prec, type, findVectors) {
52
44
  if (findVectors === undefined) {
53
45
  findVectors = true;
54
- } // TODO check if any row/col are zero except the diagonal
46
+ }
47
+
48
+ // TODO check if any row/col are zero except the diagonal
49
+
55
50
  // make sure corresponding rows and columns have similar magnitude
56
51
  // important because of numerical stability
57
52
  // MODIFIES arr by side effect!
53
+ var R = balance(arr, N, prec, type, findVectors);
58
54
 
59
-
60
- var R = balance(arr, N, prec, type, findVectors); // R is the row transformation matrix
55
+ // R is the row transformation matrix
61
56
  // arr = A' = R A R⁻¹, A is the original matrix
62
57
  // (if findVectors is false, R is undefined)
63
58
  // (And so to return to original matrix: A = R⁻¹ arr R)
59
+
64
60
  // TODO if magnitudes of elements vary over many orders,
65
61
  // move greatest elements to the top left corner
62
+
66
63
  // using similarity transformations, reduce the matrix
67
64
  // to Hessenberg form (upper triangular plus one subdiagonal row)
68
65
  // updates the transformation matrix R with new row operationsq
69
66
  // MODIFIES arr by side effect!
67
+ reduceToHessenberg(arr, N, prec, type, findVectors, R);
68
+ // still true that original A = R⁻¹ arr R)
70
69
 
71
- reduceToHessenberg(arr, N, prec, type, findVectors, R); // still true that original A = R⁻¹ arr R)
72
70
  // find eigenvalues
73
-
74
71
  var _iterateUntilTriangul = iterateUntilTriangular(arr, N, prec, type, findVectors),
75
- values = _iterateUntilTriangul.values,
76
- C = _iterateUntilTriangul.C; // values is the list of eigenvalues, C is the column
72
+ values = _iterateUntilTriangul.values,
73
+ C = _iterateUntilTriangul.C;
74
+
75
+ // values is the list of eigenvalues, C is the column
77
76
  // transformation matrix that transforms arr, the hessenberg
78
77
  // matrix, to upper triangular
79
78
  // (So U = C⁻¹ arr C and the relationship between current arr
80
79
  // and original A is unchanged.)
81
80
 
82
-
83
81
  var vectors;
84
-
85
82
  if (findVectors) {
86
83
  vectors = findEigenvectors(arr, N, C, R, values, prec, type);
87
84
  vectors = matrixFromColumns.apply(void 0, (0, _toConsumableArray2["default"])(vectors));
88
85
  }
89
-
90
86
  return {
91
87
  values: values,
92
88
  vectors: vectors
93
89
  };
94
90
  }
91
+
95
92
  /**
96
93
  * @param {number[][]} arr
97
94
  * @param {number} N
@@ -99,95 +96,88 @@ function createComplexEigs(_ref) {
99
96
  * @param {'number'|'BigNumber'|'Complex'} type
100
97
  * @returns {number[][]}
101
98
  */
102
-
103
-
104
99
  function balance(arr, N, prec, type, findVectors) {
105
100
  var big = type === 'BigNumber';
106
101
  var cplx = type === 'Complex';
107
102
  var realzero = big ? bignumber(0) : 0;
108
103
  var one = big ? bignumber(1) : cplx ? complex(1) : 1;
109
- var realone = big ? bignumber(1) : 1; // base of the floating-point arithmetic
104
+ var realone = big ? bignumber(1) : 1;
110
105
 
106
+ // base of the floating-point arithmetic
111
107
  var radix = big ? bignumber(10) : 2;
112
- var radixSq = multiplyScalar(radix, radix); // the diagonal transformation matrix R
108
+ var radixSq = multiplyScalar(radix, radix);
113
109
 
110
+ // the diagonal transformation matrix R
114
111
  var Rdiag;
115
-
116
112
  if (findVectors) {
117
113
  Rdiag = Array(N).fill(one);
118
- } // this isn't the only time we loop thru the matrix...
119
-
114
+ }
120
115
 
116
+ // this isn't the only time we loop thru the matrix...
121
117
  var last = false;
122
-
123
118
  while (!last) {
124
119
  // ...haha I'm joking! unless...
125
120
  last = true;
126
-
127
121
  for (var i = 0; i < N; i++) {
128
122
  // compute the taxicab norm of i-th column and row
129
123
  // TODO optimize for complex numbers
130
124
  var colNorm = realzero;
131
125
  var rowNorm = realzero;
132
-
133
126
  for (var j = 0; j < N; j++) {
134
127
  if (i === j) continue;
135
128
  var c = abs(arr[i][j]); // should be real
136
-
137
129
  colNorm = addScalar(colNorm, c);
138
130
  rowNorm = addScalar(rowNorm, c);
139
131
  }
140
-
141
132
  if (!equal(colNorm, 0) && !equal(rowNorm, 0)) {
142
133
  // find integer power closest to balancing the matrix
143
134
  // (we want to scale only by integer powers of radix,
144
135
  // so that we don't lose any precision due to round-off)
136
+
145
137
  var f = realone;
146
138
  var _c = colNorm;
147
139
  var rowDivRadix = divideScalar(rowNorm, radix);
148
140
  var rowMulRadix = multiplyScalar(rowNorm, radix);
149
-
150
141
  while (smaller(_c, rowDivRadix)) {
151
142
  _c = multiplyScalar(_c, radixSq);
152
143
  f = multiplyScalar(f, radix);
153
144
  }
154
-
155
145
  while (larger(_c, rowMulRadix)) {
156
146
  _c = divideScalar(_c, radixSq);
157
147
  f = divideScalar(f, radix);
158
- } // check whether balancing is needed
159
- // condition = (c + rowNorm) / f < 0.95 * (colNorm + rowNorm)
160
-
148
+ }
161
149
 
162
- var condition = smaller(divideScalar(addScalar(_c, rowNorm), f), multiplyScalar(addScalar(colNorm, rowNorm), 0.95)); // apply balancing similarity transformation
150
+ // check whether balancing is needed
151
+ // condition = (c + rowNorm) / f < 0.95 * (colNorm + rowNorm)
152
+ var condition = smaller(divideScalar(addScalar(_c, rowNorm), f), multiplyScalar(addScalar(colNorm, rowNorm), 0.95));
163
153
 
154
+ // apply balancing similarity transformation
164
155
  if (condition) {
165
156
  // we should loop once again to check whether
166
157
  // another rebalancing is needed
167
158
  last = false;
168
159
  var g = divideScalar(1, f);
169
-
170
160
  for (var _j = 0; _j < N; _j++) {
171
161
  if (i === _j) {
172
162
  continue;
173
163
  }
174
-
175
164
  arr[i][_j] = multiplyScalar(arr[i][_j], f);
176
165
  arr[_j][i] = multiplyScalar(arr[_j][i], g);
177
- } // keep track of transformations
178
-
166
+ }
179
167
 
168
+ // keep track of transformations
180
169
  if (findVectors) {
181
170
  Rdiag[i] = multiplyScalar(Rdiag[i], f);
182
171
  }
183
172
  }
184
173
  }
185
174
  }
186
- } // return the diagonal row transformation matrix
187
-
175
+ }
188
176
 
177
+ // return the diagonal row transformation matrix
189
178
  return diag(Rdiag);
190
179
  }
180
+
191
181
  /**
192
182
  * @param {number[][]} arr
193
183
  * @param {number} N
@@ -196,75 +186,69 @@ function createComplexEigs(_ref) {
196
186
  * @param {boolean} findVectors
197
187
  * @param {number[][]} R the row transformation matrix that will be modified
198
188
  */
199
-
200
-
201
189
  function reduceToHessenberg(arr, N, prec, type, findVectors, R) {
202
190
  var big = type === 'BigNumber';
203
191
  var cplx = type === 'Complex';
204
192
  var zero = big ? bignumber(0) : cplx ? complex(0) : 0;
205
-
206
193
  if (big) {
207
194
  prec = bignumber(prec);
208
195
  }
209
-
210
196
  for (var i = 0; i < N - 2; i++) {
211
197
  // Find the largest subdiag element in the i-th col
198
+
212
199
  var maxIndex = 0;
213
200
  var max = zero;
214
-
215
201
  for (var j = i + 1; j < N; j++) {
216
202
  var el = arr[j][i];
217
-
218
203
  if (smaller(abs(max), abs(el))) {
219
204
  max = el;
220
205
  maxIndex = j;
221
206
  }
222
- } // This col is pivoted, no need to do anything
223
-
207
+ }
224
208
 
209
+ // This col is pivoted, no need to do anything
225
210
  if (smaller(abs(max), prec)) {
226
211
  continue;
227
212
  }
228
-
229
213
  if (maxIndex !== i + 1) {
230
214
  // Interchange maxIndex-th and (i+1)-th row
231
215
  var tmp1 = arr[maxIndex];
232
216
  arr[maxIndex] = arr[i + 1];
233
- arr[i + 1] = tmp1; // Interchange maxIndex-th and (i+1)-th column
217
+ arr[i + 1] = tmp1;
234
218
 
219
+ // Interchange maxIndex-th and (i+1)-th column
235
220
  for (var _j2 = 0; _j2 < N; _j2++) {
236
221
  var tmp2 = arr[_j2][maxIndex];
237
222
  arr[_j2][maxIndex] = arr[_j2][i + 1];
238
223
  arr[_j2][i + 1] = tmp2;
239
- } // keep track of transformations
240
-
224
+ }
241
225
 
226
+ // keep track of transformations
242
227
  if (findVectors) {
243
228
  var tmp3 = R[maxIndex];
244
229
  R[maxIndex] = R[i + 1];
245
230
  R[i + 1] = tmp3;
246
231
  }
247
- } // Reduce following rows and columns
248
-
232
+ }
249
233
 
234
+ // Reduce following rows and columns
250
235
  for (var _j3 = i + 2; _j3 < N; _j3++) {
251
236
  var n = divideScalar(arr[_j3][i], max);
252
-
253
237
  if (n === 0) {
254
238
  continue;
255
- } // from j-th row subtract n-times (i+1)th row
256
-
239
+ }
257
240
 
241
+ // from j-th row subtract n-times (i+1)th row
258
242
  for (var k = 0; k < N; k++) {
259
243
  arr[_j3][k] = subtract(arr[_j3][k], multiplyScalar(n, arr[i + 1][k]));
260
- } // to (i+1)th column add n-times j-th column
261
-
244
+ }
262
245
 
246
+ // to (i+1)th column add n-times j-th column
263
247
  for (var _k = 0; _k < N; _k++) {
264
248
  arr[_k][i + 1] = addScalar(arr[_k][i + 1], multiplyScalar(n, arr[_k][_j3]));
265
- } // keep track of transformations
266
-
249
+ }
267
250
 
251
+ // keep track of transformations
268
252
  if (findVectors) {
269
253
  for (var _k2 = 0; _k2 < N; _k2++) {
270
254
  R[_j3][_k2] = subtract(R[_j3][_k2], multiplyScalar(n, R[i + 1][_k2]));
@@ -272,24 +256,23 @@ function createComplexEigs(_ref) {
272
256
  }
273
257
  }
274
258
  }
275
-
276
259
  return R;
277
260
  }
261
+
278
262
  /**
279
263
  * @returns {{values: values, C: Matrix}}
280
264
  * @see Press, Wiliams: Numerical recipes in Fortran 77
281
265
  * @see https://en.wikipedia.org/wiki/QR_algorithm
282
266
  */
283
-
284
-
285
267
  function iterateUntilTriangular(A, N, prec, type, findVectors) {
286
268
  var big = type === 'BigNumber';
287
269
  var cplx = type === 'Complex';
288
270
  var one = big ? bignumber(1) : cplx ? complex(1) : 1;
289
-
290
271
  if (big) {
291
272
  prec = bignumber(prec);
292
- } // The Francis Algorithm
273
+ }
274
+
275
+ // The Francis Algorithm
293
276
  // The core idea of this algorithm is that doing successive
294
277
  // A' = Q⁺AQ transformations will eventually converge to block-
295
278
  // upper-triangular with diagonal blocks either 1x1 or 2x2.
@@ -298,123 +281,127 @@ function createComplexEigs(_ref) {
298
281
  // the eigenvalues of its diagonal blocks and we know how to find
299
282
  // eigenvalues of a 2x2 matrix, we know the eigenvalues of A.
300
283
 
284
+ var arr = (0, _object.clone)(A);
301
285
 
302
- var arr = (0, _object.clone)(A); // the list of converged eigenvalues
286
+ // the list of converged eigenvalues
287
+ var lambdas = [];
303
288
 
304
- var lambdas = []; // size of arr, which will get smaller as eigenvalues converge
289
+ // size of arr, which will get smaller as eigenvalues converge
290
+ var n = N;
305
291
 
306
- var n = N; // the diagonal of the block-diagonal matrix that turns
292
+ // the diagonal of the block-diagonal matrix that turns
307
293
  // converged 2x2 matrices into upper triangular matrices
294
+ var Sdiag = [];
308
295
 
309
- var Sdiag = []; // N×N matrix describing the overall transformation done during the QR algorithm
296
+ // N×N matrix describing the overall transformation done during the QR algorithm
297
+ var Qtotal = findVectors ? diag(Array(N).fill(one)) : undefined;
310
298
 
311
- var Qtotal = findVectors ? diag(Array(N).fill(one)) : undefined; // n×n matrix describing the QR transformations done since last convergence
312
-
313
- var Qpartial = findVectors ? diag(Array(n).fill(one)) : undefined; // last eigenvalue converged before this many steps
299
+ // n×n matrix describing the QR transformations done since last convergence
300
+ var Qpartial = findVectors ? diag(Array(n).fill(one)) : undefined;
314
301
 
302
+ // last eigenvalue converged before this many steps
315
303
  var lastConvergenceBefore = 0;
316
-
317
304
  while (lastConvergenceBefore <= 100) {
318
- lastConvergenceBefore += 1; // TODO if the convergence is slow, do something clever
305
+ lastConvergenceBefore += 1;
306
+
307
+ // TODO if the convergence is slow, do something clever
308
+
319
309
  // Perform the factorization
320
310
 
321
311
  var k = 0; // TODO set close to an eigenvalue
322
312
 
323
313
  for (var i = 0; i < n; i++) {
324
314
  arr[i][i] = subtract(arr[i][i], k);
325
- } // TODO do an implicit QR transformation
326
-
315
+ }
327
316
 
317
+ // TODO do an implicit QR transformation
328
318
  var _qr = qr(arr),
329
- Q = _qr.Q,
330
- R = _qr.R;
331
-
319
+ Q = _qr.Q,
320
+ R = _qr.R;
332
321
  arr = multiply(R, Q);
333
-
334
322
  for (var _i = 0; _i < n; _i++) {
335
323
  arr[_i][_i] = addScalar(arr[_i][_i], k);
336
- } // keep track of transformations
337
-
324
+ }
338
325
 
326
+ // keep track of transformations
339
327
  if (findVectors) {
340
328
  Qpartial = multiply(Qpartial, Q);
341
- } // The rightmost diagonal element converged to an eigenvalue
342
-
329
+ }
343
330
 
331
+ // The rightmost diagonal element converged to an eigenvalue
344
332
  if (n === 1 || smaller(abs(arr[n - 1][n - 2]), prec)) {
345
333
  lastConvergenceBefore = 0;
346
- lambdas.push(arr[n - 1][n - 1]); // keep track of transformations
334
+ lambdas.push(arr[n - 1][n - 1]);
347
335
 
336
+ // keep track of transformations
348
337
  if (findVectors) {
349
338
  Sdiag.unshift([[1]]);
350
339
  inflateMatrix(Qpartial, N);
351
340
  Qtotal = multiply(Qtotal, Qpartial);
352
-
353
341
  if (n > 1) {
354
342
  Qpartial = diag(Array(n - 1).fill(one));
355
343
  }
356
- } // reduce the matrix size
357
-
344
+ }
358
345
 
346
+ // reduce the matrix size
359
347
  n -= 1;
360
348
  arr.pop();
361
-
362
349
  for (var _i2 = 0; _i2 < n; _i2++) {
363
350
  arr[_i2].pop();
364
- } // The rightmost diagonal 2x2 block converged
351
+ }
365
352
 
353
+ // The rightmost diagonal 2x2 block converged
366
354
  } else if (n === 2 || smaller(abs(arr[n - 2][n - 3]), prec)) {
367
355
  lastConvergenceBefore = 0;
368
356
  var ll = eigenvalues2x2(arr[n - 2][n - 2], arr[n - 2][n - 1], arr[n - 1][n - 2], arr[n - 1][n - 1]);
369
- lambdas.push.apply(lambdas, (0, _toConsumableArray2["default"])(ll)); // keep track of transformations
357
+ lambdas.push.apply(lambdas, (0, _toConsumableArray2["default"])(ll));
370
358
 
359
+ // keep track of transformations
371
360
  if (findVectors) {
372
361
  Sdiag.unshift(jordanBase2x2(arr[n - 2][n - 2], arr[n - 2][n - 1], arr[n - 1][n - 2], arr[n - 1][n - 1], ll[0], ll[1], prec, type));
373
362
  inflateMatrix(Qpartial, N);
374
363
  Qtotal = multiply(Qtotal, Qpartial);
375
-
376
364
  if (n > 2) {
377
365
  Qpartial = diag(Array(n - 2).fill(one));
378
366
  }
379
- } // reduce the matrix size
380
-
367
+ }
381
368
 
369
+ // reduce the matrix size
382
370
  n -= 2;
383
371
  arr.pop();
384
372
  arr.pop();
385
-
386
373
  for (var _i3 = 0; _i3 < n; _i3++) {
387
374
  arr[_i3].pop();
388
-
389
375
  arr[_i3].pop();
390
376
  }
391
377
  }
392
-
393
378
  if (n === 0) {
394
379
  break;
395
380
  }
396
- } // standard sorting
397
-
381
+ }
398
382
 
383
+ // standard sorting
399
384
  lambdas.sort(function (a, b) {
400
385
  return +subtract(abs(a), abs(b));
401
- }); // the algorithm didn't converge
386
+ });
402
387
 
388
+ // the algorithm didn't converge
403
389
  if (lastConvergenceBefore > 100) {
404
390
  var err = Error('The eigenvalues failed to converge. Only found these eigenvalues: ' + lambdas.join(', '));
405
391
  err.values = lambdas;
406
392
  err.vectors = [];
407
393
  throw err;
408
- } // combine the overall QR transformation Qtotal with the subsequent
409
- // transformation S that turns the diagonal 2x2 blocks to upper triangular
410
-
394
+ }
411
395
 
396
+ // combine the overall QR transformation Qtotal with the subsequent
397
+ // transformation S that turns the diagonal 2x2 blocks to upper triangular
412
398
  var C = findVectors ? multiply(Qtotal, blockDiag(Sdiag, N)) : undefined;
413
399
  return {
414
400
  values: lambdas,
415
401
  C: C
416
402
  };
417
403
  }
404
+
418
405
  /**
419
406
  * @param {Matrix} A hessenberg-form matrix
420
407
  * @param {number} N size of A
@@ -424,73 +411,66 @@ function createComplexEigs(_ref) {
424
411
  * @param {'number'|'BigNumber'|'Complex'} type
425
412
  * @returns {number[][]} eigenvalues
426
413
  */
427
-
428
-
429
414
  function findEigenvectors(A, N, C, R, values, prec, type) {
430
415
  var Cinv = inv(C);
431
416
  var U = multiply(Cinv, A, C);
432
417
  var big = type === 'BigNumber';
433
418
  var cplx = type === 'Complex';
434
419
  var zero = big ? bignumber(0) : cplx ? complex(0) : 0;
435
- var one = big ? bignumber(1) : cplx ? complex(1) : 1; // turn values into a kind of "multiset"
436
- // this way it is easier to find eigenvectors
420
+ var one = big ? bignumber(1) : cplx ? complex(1) : 1;
437
421
 
422
+ // turn values into a kind of "multiset"
423
+ // this way it is easier to find eigenvectors
438
424
  var uniqueValues = [];
439
425
  var multiplicities = [];
440
-
441
426
  var _iterator = _createForOfIteratorHelper(values),
442
- _step;
443
-
427
+ _step;
444
428
  try {
445
429
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
446
430
  var λ = _step.value;
447
-
448
431
  var _i4 = indexOf(uniqueValues, λ, equal);
449
-
450
432
  if (_i4 === -1) {
451
433
  uniqueValues.push(λ);
452
434
  multiplicities.push(1);
453
435
  } else {
454
436
  multiplicities[_i4] += 1;
455
437
  }
456
- } // find eigenvectors by solving U − λE = 0
438
+ }
439
+
440
+ // find eigenvectors by solving U − λE = 0
457
441
  // TODO replace with an iterative eigenvector algorithm
458
442
  // (this one might fail for imprecise eigenvalues)
459
-
460
443
  } catch (err) {
461
444
  _iterator.e(err);
462
445
  } finally {
463
446
  _iterator.f();
464
447
  }
465
-
466
448
  var vectors = [];
467
449
  var len = uniqueValues.length;
468
450
  var b = Array(N).fill(zero);
469
- var E = diag(Array(N).fill(one)); // eigenvalues for which usolve failed (due to numerical error)
451
+ var E = diag(Array(N).fill(one));
470
452
 
453
+ // eigenvalues for which usolve failed (due to numerical error)
471
454
  var failedLambdas = [];
472
-
473
455
  var _loop = function _loop(i) {
474
456
  var λ = uniqueValues[i];
475
457
  var S = subtract(U, multiply(λ, E)); // the characteristic matrix
476
458
 
477
459
  var solutions = usolveAll(S, b);
478
460
  solutions.shift(); // ignore the null vector
479
- // looks like we missed something, try inverse iteration
480
461
 
462
+ // looks like we missed something, try inverse iteration
481
463
  while (solutions.length < multiplicities[i]) {
482
464
  var approxVec = inverseIterate(S, N, solutions, prec, type);
483
-
484
465
  if (approxVec == null) {
485
466
  // no more vectors were found
486
467
  failedLambdas.push(λ);
487
468
  break;
488
469
  }
489
-
490
470
  solutions.push(approxVec);
491
- } // Transform back into original array coordinates
492
-
471
+ }
493
472
 
473
+ // Transform back into original array coordinates
494
474
  var correction = multiply(inv(R), C);
495
475
  solutions = solutions.map(function (v) {
496
476
  return multiply(correction, v);
@@ -499,26 +479,22 @@ function createComplexEigs(_ref) {
499
479
  return flatten(v);
500
480
  })));
501
481
  };
502
-
503
482
  for (var i = 0; i < len; i++) {
504
483
  _loop(i);
505
484
  }
506
-
507
485
  if (failedLambdas.length !== 0) {
508
486
  var err = new Error('Failed to find eigenvectors for the following eigenvalues: ' + failedLambdas.join(', '));
509
487
  err.values = values;
510
488
  err.vectors = vectors;
511
489
  throw err;
512
490
  }
513
-
514
491
  return vectors;
515
492
  }
493
+
516
494
  /**
517
495
  * Compute the eigenvalues of an 2x2 matrix
518
496
  * @return {[number,number]}
519
497
  */
520
-
521
-
522
498
  function eigenvalues2x2(a, b, c, d) {
523
499
  // λ± = ½ trA ± ½ √( tr²A - 4 detA )
524
500
  var trA = addScalar(a, d);
@@ -527,6 +503,7 @@ function createComplexEigs(_ref) {
527
503
  var y = multiplyScalar(sqrt(subtract(multiplyScalar(trA, trA), multiplyScalar(4, detA))), 0.5);
528
504
  return [addScalar(x, y), subtract(x, y)];
529
505
  }
506
+
530
507
  /**
531
508
  * For an 2x2 matrix compute the transformation matrix S,
532
509
  * so that SAS⁻¹ is an upper triangular matrix
@@ -534,92 +511,81 @@ function createComplexEigs(_ref) {
534
511
  * @see https://math.berkeley.edu/~ogus/old/Math_54-05/webfoils/jordan.pdf
535
512
  * @see http://people.math.harvard.edu/~knill/teaching/math21b2004/exhibits/2dmatrices/index.html
536
513
  */
537
-
538
-
539
514
  function jordanBase2x2(a, b, c, d, l1, l2, prec, type) {
540
515
  var big = type === 'BigNumber';
541
516
  var cplx = type === 'Complex';
542
517
  var zero = big ? bignumber(0) : cplx ? complex(0) : 0;
543
- var one = big ? bignumber(1) : cplx ? complex(1) : 1; // matrix is already upper triangular
544
- // return an identity matrix
518
+ var one = big ? bignumber(1) : cplx ? complex(1) : 1;
545
519
 
520
+ // matrix is already upper triangular
521
+ // return an identity matrix
546
522
  if (smaller(abs(c), prec)) {
547
523
  return [[one, zero], [zero, one]];
548
- } // matrix is diagonalizable
549
- // return its eigenvectors as columns
550
-
524
+ }
551
525
 
526
+ // matrix is diagonalizable
527
+ // return its eigenvectors as columns
552
528
  if (larger(abs(subtract(l1, l2)), prec)) {
553
529
  return [[subtract(l1, d), subtract(l2, d)], [c, c]];
554
- } // matrix is not diagonalizable
530
+ }
531
+
532
+ // matrix is not diagonalizable
555
533
  // compute off-diagonal elements of N = A - λI
556
534
  // N₁₂ = 0 ⇒ S = ( N⃗₁, I⃗₁ )
557
535
  // N₁₂ ≠ 0 ⇒ S = ( N⃗₂, I⃗₂ )
558
536
 
559
-
560
537
  var na = subtract(a, l1);
561
538
  var nb = subtract(b, l1);
562
539
  var nc = subtract(c, l1);
563
540
  var nd = subtract(d, l1);
564
-
565
541
  if (smaller(abs(nb), prec)) {
566
542
  return [[na, one], [nc, zero]];
567
543
  } else {
568
544
  return [[nb, zero], [nd, one]];
569
545
  }
570
546
  }
547
+
571
548
  /**
572
549
  * Enlarge the matrix from n×n to N×N, setting the new
573
550
  * elements to 1 on diagonal and 0 elsewhere
574
551
  */
575
-
576
-
577
552
  function inflateMatrix(arr, N) {
578
553
  // add columns
579
554
  for (var i = 0; i < arr.length; i++) {
580
555
  var _arr$i;
581
-
582
556
  (_arr$i = arr[i]).push.apply(_arr$i, (0, _toConsumableArray2["default"])(Array(N - arr[i].length).fill(0)));
583
- } // add rows
584
-
557
+ }
585
558
 
559
+ // add rows
586
560
  for (var _i5 = arr.length; _i5 < N; _i5++) {
587
561
  arr.push(Array(N).fill(0));
588
562
  arr[_i5][_i5] = 1;
589
563
  }
590
-
591
564
  return arr;
592
565
  }
566
+
593
567
  /**
594
568
  * Create a block-diagonal matrix with the given square matrices on the diagonal
595
569
  * @param {Matrix[] | number[][][]} arr array of matrices to be placed on the diagonal
596
570
  * @param {number} N the size of the resulting matrix
597
571
  */
598
-
599
-
600
572
  function blockDiag(arr, N) {
601
573
  var M = [];
602
-
603
574
  for (var i = 0; i < N; i++) {
604
575
  M[i] = Array(N).fill(0);
605
576
  }
606
-
607
577
  var I = 0;
608
-
609
578
  var _iterator2 = _createForOfIteratorHelper(arr),
610
- _step2;
611
-
579
+ _step2;
612
580
  try {
613
581
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
614
582
  var sub = _step2.value;
615
583
  var n = sub.length;
616
-
617
584
  for (var _i6 = 0; _i6 < n; _i6++) {
618
585
  for (var j = 0; j < n; j++) {
619
586
  M[I + _i6][I + j] = sub[_i6][j];
620
587
  }
621
588
  }
622
-
623
589
  I += n;
624
590
  }
625
591
  } catch (err) {
@@ -627,9 +593,9 @@ function createComplexEigs(_ref) {
627
593
  } finally {
628
594
  _iterator2.f();
629
595
  }
630
-
631
596
  return M;
632
597
  }
598
+
633
599
  /**
634
600
  * Finds the index of an element in an array using a custom equality function
635
601
  * @template T
@@ -638,17 +604,15 @@ function createComplexEigs(_ref) {
638
604
  * @param {function(T, T): boolean} fn the equality function, first argument is an element of `arr`, the second is always `el`
639
605
  * @returns {number} the index of `el`, or -1 when it's not in `arr`
640
606
  */
641
-
642
-
643
607
  function indexOf(arr, el, fn) {
644
608
  for (var i = 0; i < arr.length; i++) {
645
609
  if (fn(arr[i], el)) {
646
610
  return i;
647
611
  }
648
612
  }
649
-
650
613
  return -1;
651
614
  }
615
+
652
616
  /**
653
617
  * Provided a near-singular upper-triangular matrix A and a list of vectors,
654
618
  * finds an eigenvector of A with the smallest eigenvalue, which is orthogonal
@@ -663,47 +627,38 @@ function createComplexEigs(_ref) {
663
627
  *
664
628
  * @see Numerical Recipes for Fortran 77 – 11.7 Eigenvalues or Eigenvectors by Inverse Iteration
665
629
  */
666
-
667
-
668
630
  function inverseIterate(A, N, orthog, prec, type) {
669
631
  var largeNum = type === 'BigNumber' ? bignumber(1000) : 1000;
670
632
  var b; // the vector
671
- // you better choose a random vector before I count to five
672
633
 
634
+ // you better choose a random vector before I count to five
673
635
  var i = 0;
674
-
675
636
  while (true) {
676
637
  b = randomOrthogonalVector(N, orthog, type);
677
638
  b = usolve(A, b);
678
-
679
639
  if (larger(norm(b), largeNum)) {
680
640
  break;
681
641
  }
682
-
683
642
  if (++i >= 5) {
684
643
  return null;
685
644
  }
686
- } // you better converge before I count to ten
687
-
645
+ }
688
646
 
647
+ // you better converge before I count to ten
689
648
  i = 0;
690
-
691
649
  while (true) {
692
650
  var c = usolve(A, b);
693
-
694
651
  if (smaller(norm(orthogonalComplement(b, [c])), prec)) {
695
652
  break;
696
653
  }
697
-
698
654
  if (++i >= 10) {
699
655
  return null;
700
656
  }
701
-
702
657
  b = normalize(c);
703
658
  }
704
-
705
659
  return b;
706
660
  }
661
+
707
662
  /**
708
663
  * Generates a random unit vector of dimension N, orthogonal to each vector in the list
709
664
  * @template T
@@ -712,42 +667,38 @@ function createComplexEigs(_ref) {
712
667
  * @param {'number'|'BigNumber'|'Complex'} type
713
668
  * @returns {T[]} random vector
714
669
  */
715
-
716
-
717
670
  function randomOrthogonalVector(N, orthog, type) {
718
671
  var big = type === 'BigNumber';
719
- var cplx = type === 'Complex'; // generate random vector with the correct type
672
+ var cplx = type === 'Complex';
720
673
 
674
+ // generate random vector with the correct type
721
675
  var v = Array(N).fill(0).map(function (_) {
722
676
  return 2 * Math.random() - 1;
723
677
  });
724
-
725
678
  if (big) {
726
679
  v = v.map(function (n) {
727
680
  return bignumber(n);
728
681
  });
729
682
  }
730
-
731
683
  if (cplx) {
732
684
  v = v.map(function (n) {
733
685
  return complex(n);
734
686
  });
735
- } // project to orthogonal complement
736
-
687
+ }
737
688
 
738
- v = orthogonalComplement(v, orthog); // normalize
689
+ // project to orthogonal complement
690
+ v = orthogonalComplement(v, orthog);
739
691
 
692
+ // normalize
740
693
  return normalize(v, type);
741
694
  }
695
+
742
696
  /**
743
697
  * Project vector v to the orthogonal complement of an array of vectors
744
698
  */
745
-
746
-
747
699
  function orthogonalComplement(v, orthog) {
748
700
  var _iterator3 = _createForOfIteratorHelper(orthog),
749
- _step3;
750
-
701
+ _step3;
751
702
  try {
752
703
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
753
704
  var w = _step3.value;
@@ -759,19 +710,18 @@ function createComplexEigs(_ref) {
759
710
  } finally {
760
711
  _iterator3.f();
761
712
  }
762
-
763
713
  return v;
764
714
  }
715
+
765
716
  /**
766
717
  * Calculate the norm of a vector.
767
718
  * We can't use math.norm because factory can't handle circular dependency.
768
719
  * Seriously, I'm really fed up with factory.
769
720
  */
770
-
771
-
772
721
  function norm(v) {
773
722
  return abs(sqrt(dot(v, v)));
774
723
  }
724
+
775
725
  /**
776
726
  * Normalize a vector
777
727
  * @template T
@@ -779,14 +729,11 @@ function createComplexEigs(_ref) {
779
729
  * @param {'number'|'BigNumber'|'Complex'} type
780
730
  * @returns {T[]} normalized vec
781
731
  */
782
-
783
-
784
732
  function normalize(v, type) {
785
733
  var big = type === 'BigNumber';
786
734
  var cplx = type === 'Complex';
787
735
  var one = big ? bignumber(1) : cplx ? complex(1) : 1;
788
736
  return multiply(divideScalar(one, norm(v)), v);
789
737
  }
790
-
791
738
  return complexEigs;
792
739
  }