@smake/eigen 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (431) hide show
  1. package/README.md +1 -1
  2. package/eigen/Eigen/AccelerateSupport +52 -0
  3. package/eigen/Eigen/Cholesky +18 -20
  4. package/eigen/Eigen/CholmodSupport +28 -28
  5. package/eigen/Eigen/Core +187 -120
  6. package/eigen/Eigen/Eigenvalues +16 -13
  7. package/eigen/Eigen/Geometry +18 -18
  8. package/eigen/Eigen/Householder +9 -7
  9. package/eigen/Eigen/IterativeLinearSolvers +8 -4
  10. package/eigen/Eigen/Jacobi +14 -13
  11. package/eigen/Eigen/KLUSupport +23 -21
  12. package/eigen/Eigen/LU +15 -16
  13. package/eigen/Eigen/MetisSupport +12 -12
  14. package/eigen/Eigen/OrderingMethods +54 -51
  15. package/eigen/Eigen/PaStiXSupport +23 -21
  16. package/eigen/Eigen/PardisoSupport +17 -14
  17. package/eigen/Eigen/QR +18 -20
  18. package/eigen/Eigen/QtAlignedMalloc +5 -12
  19. package/eigen/Eigen/SPQRSupport +21 -14
  20. package/eigen/Eigen/SVD +23 -17
  21. package/eigen/Eigen/Sparse +1 -2
  22. package/eigen/Eigen/SparseCholesky +18 -15
  23. package/eigen/Eigen/SparseCore +18 -17
  24. package/eigen/Eigen/SparseLU +9 -9
  25. package/eigen/Eigen/SparseQR +16 -14
  26. package/eigen/Eigen/StdDeque +5 -2
  27. package/eigen/Eigen/StdList +5 -2
  28. package/eigen/Eigen/StdVector +5 -2
  29. package/eigen/Eigen/SuperLUSupport +30 -24
  30. package/eigen/Eigen/ThreadPool +80 -0
  31. package/eigen/Eigen/UmfPackSupport +19 -17
  32. package/eigen/Eigen/Version +14 -0
  33. package/eigen/Eigen/src/AccelerateSupport/AccelerateSupport.h +423 -0
  34. package/eigen/Eigen/src/AccelerateSupport/InternalHeaderCheck.h +3 -0
  35. package/eigen/Eigen/src/Cholesky/InternalHeaderCheck.h +3 -0
  36. package/eigen/Eigen/src/Cholesky/LDLT.h +366 -405
  37. package/eigen/Eigen/src/Cholesky/LLT.h +323 -367
  38. package/eigen/Eigen/src/Cholesky/LLT_LAPACKE.h +81 -56
  39. package/eigen/Eigen/src/CholmodSupport/CholmodSupport.h +585 -529
  40. package/eigen/Eigen/src/CholmodSupport/InternalHeaderCheck.h +3 -0
  41. package/eigen/Eigen/src/Core/ArithmeticSequence.h +143 -317
  42. package/eigen/Eigen/src/Core/Array.h +329 -370
  43. package/eigen/Eigen/src/Core/ArrayBase.h +190 -203
  44. package/eigen/Eigen/src/Core/ArrayWrapper.h +126 -170
  45. package/eigen/Eigen/src/Core/Assign.h +30 -40
  46. package/eigen/Eigen/src/Core/AssignEvaluator.h +651 -604
  47. package/eigen/Eigen/src/Core/Assign_MKL.h +125 -120
  48. package/eigen/Eigen/src/Core/BandMatrix.h +267 -282
  49. package/eigen/Eigen/src/Core/Block.h +371 -390
  50. package/eigen/Eigen/src/Core/CommaInitializer.h +85 -100
  51. package/eigen/Eigen/src/Core/ConditionEstimator.h +51 -53
  52. package/eigen/Eigen/src/Core/CoreEvaluators.h +1214 -937
  53. package/eigen/Eigen/src/Core/CoreIterators.h +72 -63
  54. package/eigen/Eigen/src/Core/CwiseBinaryOp.h +112 -129
  55. package/eigen/Eigen/src/Core/CwiseNullaryOp.h +676 -702
  56. package/eigen/Eigen/src/Core/CwiseTernaryOp.h +77 -103
  57. package/eigen/Eigen/src/Core/CwiseUnaryOp.h +55 -67
  58. package/eigen/Eigen/src/Core/CwiseUnaryView.h +127 -92
  59. package/eigen/Eigen/src/Core/DenseBase.h +630 -658
  60. package/eigen/Eigen/src/Core/DenseCoeffsBase.h +511 -628
  61. package/eigen/Eigen/src/Core/DenseStorage.h +511 -590
  62. package/eigen/Eigen/src/Core/DeviceWrapper.h +153 -0
  63. package/eigen/Eigen/src/Core/Diagonal.h +168 -207
  64. package/eigen/Eigen/src/Core/DiagonalMatrix.h +346 -317
  65. package/eigen/Eigen/src/Core/DiagonalProduct.h +12 -10
  66. package/eigen/Eigen/src/Core/Dot.h +167 -217
  67. package/eigen/Eigen/src/Core/EigenBase.h +74 -85
  68. package/eigen/Eigen/src/Core/Fill.h +138 -0
  69. package/eigen/Eigen/src/Core/FindCoeff.h +464 -0
  70. package/eigen/Eigen/src/Core/ForceAlignedAccess.h +90 -113
  71. package/eigen/Eigen/src/Core/Fuzzy.h +82 -105
  72. package/eigen/Eigen/src/Core/GeneralProduct.h +315 -261
  73. package/eigen/Eigen/src/Core/GenericPacketMath.h +1182 -520
  74. package/eigen/Eigen/src/Core/GlobalFunctions.h +193 -157
  75. package/eigen/Eigen/src/Core/IO.h +131 -156
  76. package/eigen/Eigen/src/Core/IndexedView.h +209 -125
  77. package/eigen/Eigen/src/Core/InnerProduct.h +260 -0
  78. package/eigen/Eigen/src/Core/InternalHeaderCheck.h +3 -0
  79. package/eigen/Eigen/src/Core/Inverse.h +50 -59
  80. package/eigen/Eigen/src/Core/Map.h +123 -141
  81. package/eigen/Eigen/src/Core/MapBase.h +255 -282
  82. package/eigen/Eigen/src/Core/MathFunctions.h +1247 -1201
  83. package/eigen/Eigen/src/Core/MathFunctionsImpl.h +162 -99
  84. package/eigen/Eigen/src/Core/Matrix.h +463 -494
  85. package/eigen/Eigen/src/Core/MatrixBase.h +468 -470
  86. package/eigen/Eigen/src/Core/NestByValue.h +58 -52
  87. package/eigen/Eigen/src/Core/NoAlias.h +79 -86
  88. package/eigen/Eigen/src/Core/NumTraits.h +206 -206
  89. package/eigen/Eigen/src/Core/PartialReduxEvaluator.h +163 -142
  90. package/eigen/Eigen/src/Core/PermutationMatrix.h +461 -511
  91. package/eigen/Eigen/src/Core/PlainObjectBase.h +858 -972
  92. package/eigen/Eigen/src/Core/Product.h +246 -130
  93. package/eigen/Eigen/src/Core/ProductEvaluators.h +779 -671
  94. package/eigen/Eigen/src/Core/Random.h +153 -164
  95. package/eigen/Eigen/src/Core/RandomImpl.h +262 -0
  96. package/eigen/Eigen/src/Core/RealView.h +250 -0
  97. package/eigen/Eigen/src/Core/Redux.h +334 -314
  98. package/eigen/Eigen/src/Core/Ref.h +259 -257
  99. package/eigen/Eigen/src/Core/Replicate.h +92 -104
  100. package/eigen/Eigen/src/Core/Reshaped.h +215 -271
  101. package/eigen/Eigen/src/Core/ReturnByValue.h +47 -55
  102. package/eigen/Eigen/src/Core/Reverse.h +133 -148
  103. package/eigen/Eigen/src/Core/Select.h +68 -140
  104. package/eigen/Eigen/src/Core/SelfAdjointView.h +254 -290
  105. package/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h +23 -20
  106. package/eigen/Eigen/src/Core/SkewSymmetricMatrix3.h +382 -0
  107. package/eigen/Eigen/src/Core/Solve.h +88 -102
  108. package/eigen/Eigen/src/Core/SolveTriangular.h +126 -124
  109. package/eigen/Eigen/src/Core/SolverBase.h +132 -133
  110. package/eigen/Eigen/src/Core/StableNorm.h +113 -147
  111. package/eigen/Eigen/src/Core/StlIterators.h +404 -248
  112. package/eigen/Eigen/src/Core/Stride.h +90 -92
  113. package/eigen/Eigen/src/Core/Swap.h +70 -39
  114. package/eigen/Eigen/src/Core/Transpose.h +258 -295
  115. package/eigen/Eigen/src/Core/Transpositions.h +270 -333
  116. package/eigen/Eigen/src/Core/TriangularMatrix.h +642 -743
  117. package/eigen/Eigen/src/Core/VectorBlock.h +59 -72
  118. package/eigen/Eigen/src/Core/VectorwiseOp.h +653 -704
  119. package/eigen/Eigen/src/Core/Visitor.h +464 -308
  120. package/eigen/Eigen/src/Core/arch/AVX/Complex.h +380 -187
  121. package/eigen/Eigen/src/Core/arch/AVX/MathFunctions.h +65 -163
  122. package/eigen/Eigen/src/Core/arch/AVX/PacketMath.h +2145 -638
  123. package/eigen/Eigen/src/Core/arch/AVX/Reductions.h +353 -0
  124. package/eigen/Eigen/src/Core/arch/AVX/TypeCasting.h +253 -60
  125. package/eigen/Eigen/src/Core/arch/AVX512/Complex.h +278 -228
  126. package/eigen/Eigen/src/Core/arch/AVX512/GemmKernel.h +1245 -0
  127. package/eigen/Eigen/src/Core/arch/AVX512/MathFunctions.h +48 -269
  128. package/eigen/Eigen/src/Core/arch/AVX512/MathFunctionsFP16.h +75 -0
  129. package/eigen/Eigen/src/Core/arch/AVX512/PacketMath.h +1597 -754
  130. package/eigen/Eigen/src/Core/arch/AVX512/PacketMathFP16.h +1413 -0
  131. package/eigen/Eigen/src/Core/arch/AVX512/Reductions.h +297 -0
  132. package/eigen/Eigen/src/Core/arch/AVX512/TrsmKernel.h +1167 -0
  133. package/eigen/Eigen/src/Core/arch/AVX512/TrsmUnrolls.inc +1219 -0
  134. package/eigen/Eigen/src/Core/arch/AVX512/TypeCasting.h +229 -41
  135. package/eigen/Eigen/src/Core/arch/AVX512/TypeCastingFP16.h +130 -0
  136. package/eigen/Eigen/src/Core/arch/AltiVec/Complex.h +420 -184
  137. package/eigen/Eigen/src/Core/arch/AltiVec/MathFunctions.h +40 -49
  138. package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2962 -2213
  139. package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +196 -212
  140. package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +713 -441
  141. package/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMAbfloat16.h +742 -0
  142. package/eigen/Eigen/src/Core/arch/AltiVec/MatrixVectorProduct.inc +2818 -0
  143. package/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h +2380 -1362
  144. package/eigen/Eigen/src/Core/arch/AltiVec/TypeCasting.h +153 -0
  145. package/eigen/Eigen/src/Core/arch/Default/BFloat16.h +390 -224
  146. package/eigen/Eigen/src/Core/arch/Default/ConjHelper.h +78 -67
  147. package/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1784 -799
  148. package/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +167 -50
  149. package/eigen/Eigen/src/Core/arch/Default/Half.h +528 -379
  150. package/eigen/Eigen/src/Core/arch/Default/Settings.h +10 -12
  151. package/eigen/Eigen/src/Core/arch/GPU/Complex.h +244 -0
  152. package/eigen/Eigen/src/Core/arch/GPU/MathFunctions.h +41 -40
  153. package/eigen/Eigen/src/Core/arch/GPU/PacketMath.h +550 -523
  154. package/eigen/Eigen/src/Core/arch/GPU/Tuple.h +268 -0
  155. package/eigen/Eigen/src/Core/arch/GPU/TypeCasting.h +27 -30
  156. package/eigen/Eigen/src/Core/arch/HIP/hcc/math_constants.h +8 -8
  157. package/eigen/Eigen/src/Core/arch/HVX/PacketMath.h +1088 -0
  158. package/eigen/Eigen/src/Core/arch/LSX/Complex.h +520 -0
  159. package/eigen/Eigen/src/Core/arch/LSX/GeneralBlockPanelKernel.h +23 -0
  160. package/eigen/Eigen/src/Core/arch/LSX/MathFunctions.h +43 -0
  161. package/eigen/Eigen/src/Core/arch/LSX/PacketMath.h +2866 -0
  162. package/eigen/Eigen/src/Core/arch/LSX/TypeCasting.h +526 -0
  163. package/eigen/Eigen/src/Core/arch/MSA/Complex.h +54 -82
  164. package/eigen/Eigen/src/Core/arch/MSA/MathFunctions.h +84 -92
  165. package/eigen/Eigen/src/Core/arch/MSA/PacketMath.h +51 -47
  166. package/eigen/Eigen/src/Core/arch/NEON/Complex.h +454 -306
  167. package/eigen/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +175 -115
  168. package/eigen/Eigen/src/Core/arch/NEON/MathFunctions.h +23 -30
  169. package/eigen/Eigen/src/Core/arch/NEON/PacketMath.h +4366 -2857
  170. package/eigen/Eigen/src/Core/arch/NEON/TypeCasting.h +616 -393
  171. package/eigen/Eigen/src/Core/arch/NEON/UnaryFunctors.h +57 -0
  172. package/eigen/Eigen/src/Core/arch/SSE/Complex.h +350 -198
  173. package/eigen/Eigen/src/Core/arch/SSE/MathFunctions.h +38 -149
  174. package/eigen/Eigen/src/Core/arch/SSE/PacketMath.h +1791 -912
  175. package/eigen/Eigen/src/Core/arch/SSE/Reductions.h +324 -0
  176. package/eigen/Eigen/src/Core/arch/SSE/TypeCasting.h +128 -40
  177. package/eigen/Eigen/src/Core/arch/SVE/MathFunctions.h +10 -6
  178. package/eigen/Eigen/src/Core/arch/SVE/PacketMath.h +156 -234
  179. package/eigen/Eigen/src/Core/arch/SVE/TypeCasting.h +6 -3
  180. package/eigen/Eigen/src/Core/arch/SYCL/InteropHeaders.h +27 -32
  181. package/eigen/Eigen/src/Core/arch/SYCL/MathFunctions.h +119 -117
  182. package/eigen/Eigen/src/Core/arch/SYCL/PacketMath.h +325 -419
  183. package/eigen/Eigen/src/Core/arch/SYCL/TypeCasting.h +15 -17
  184. package/eigen/Eigen/src/Core/arch/ZVector/Complex.h +325 -181
  185. package/eigen/Eigen/src/Core/arch/ZVector/MathFunctions.h +94 -83
  186. package/eigen/Eigen/src/Core/arch/ZVector/PacketMath.h +811 -458
  187. package/eigen/Eigen/src/Core/functors/AssignmentFunctors.h +121 -124
  188. package/eigen/Eigen/src/Core/functors/BinaryFunctors.h +576 -370
  189. package/eigen/Eigen/src/Core/functors/NullaryFunctors.h +194 -109
  190. package/eigen/Eigen/src/Core/functors/StlFunctors.h +95 -112
  191. package/eigen/Eigen/src/Core/functors/TernaryFunctors.h +34 -7
  192. package/eigen/Eigen/src/Core/functors/UnaryFunctors.h +1038 -749
  193. package/eigen/Eigen/src/Core/products/GeneralBlockPanelKernel.h +1883 -1375
  194. package/eigen/Eigen/src/Core/products/GeneralMatrixMatrix.h +312 -370
  195. package/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +189 -176
  196. package/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +84 -81
  197. package/eigen/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +154 -73
  198. package/eigen/Eigen/src/Core/products/GeneralMatrixVector.h +292 -337
  199. package/eigen/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h +80 -77
  200. package/eigen/Eigen/src/Core/products/Parallelizer.h +207 -105
  201. package/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +327 -388
  202. package/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +206 -224
  203. package/eigen/Eigen/src/Core/products/SelfadjointMatrixVector.h +138 -147
  204. package/eigen/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h +58 -61
  205. package/eigen/Eigen/src/Core/products/SelfadjointProduct.h +71 -71
  206. package/eigen/Eigen/src/Core/products/SelfadjointRank2Update.h +48 -47
  207. package/eigen/Eigen/src/Core/products/TriangularMatrixMatrix.h +294 -369
  208. package/eigen/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +246 -238
  209. package/eigen/Eigen/src/Core/products/TriangularMatrixVector.h +244 -247
  210. package/eigen/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h +212 -192
  211. package/eigen/Eigen/src/Core/products/TriangularSolverMatrix.h +328 -277
  212. package/eigen/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +108 -109
  213. package/eigen/Eigen/src/Core/products/TriangularSolverVector.h +68 -94
  214. package/eigen/Eigen/src/Core/util/Assert.h +158 -0
  215. package/eigen/Eigen/src/Core/util/BlasUtil.h +342 -303
  216. package/eigen/Eigen/src/Core/util/ConfigureVectorization.h +348 -317
  217. package/eigen/Eigen/src/Core/util/Constants.h +297 -262
  218. package/eigen/Eigen/src/Core/util/DisableStupidWarnings.h +130 -90
  219. package/eigen/Eigen/src/Core/util/EmulateArray.h +270 -0
  220. package/eigen/Eigen/src/Core/util/ForwardDeclarations.h +449 -247
  221. package/eigen/Eigen/src/Core/util/GpuHipCudaDefines.inc +101 -0
  222. package/eigen/Eigen/src/Core/util/GpuHipCudaUndefines.inc +45 -0
  223. package/eigen/Eigen/src/Core/util/IndexedViewHelper.h +417 -116
  224. package/eigen/Eigen/src/Core/util/IntegralConstant.h +211 -204
  225. package/eigen/Eigen/src/Core/util/MKL_support.h +39 -37
  226. package/eigen/Eigen/src/Core/util/Macros.h +655 -773
  227. package/eigen/Eigen/src/Core/util/MaxSizeVector.h +139 -0
  228. package/eigen/Eigen/src/Core/util/Memory.h +970 -748
  229. package/eigen/Eigen/src/Core/util/Meta.h +581 -633
  230. package/eigen/Eigen/src/Core/util/MoreMeta.h +638 -0
  231. package/eigen/Eigen/src/Core/util/ReenableStupidWarnings.h +32 -19
  232. package/eigen/Eigen/src/Core/util/ReshapedHelper.h +17 -17
  233. package/eigen/Eigen/src/Core/util/Serializer.h +209 -0
  234. package/eigen/Eigen/src/Core/util/StaticAssert.h +50 -166
  235. package/eigen/Eigen/src/Core/util/SymbolicIndex.h +377 -225
  236. package/eigen/Eigen/src/Core/util/XprHelper.h +784 -547
  237. package/eigen/Eigen/src/Eigenvalues/ComplexEigenSolver.h +246 -277
  238. package/eigen/Eigen/src/Eigenvalues/ComplexSchur.h +299 -319
  239. package/eigen/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h +52 -48
  240. package/eigen/Eigen/src/Eigenvalues/EigenSolver.h +413 -456
  241. package/eigen/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +309 -325
  242. package/eigen/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +157 -171
  243. package/eigen/Eigen/src/Eigenvalues/HessenbergDecomposition.h +292 -310
  244. package/eigen/Eigen/src/Eigenvalues/InternalHeaderCheck.h +3 -0
  245. package/eigen/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +89 -105
  246. package/eigen/Eigen/src/Eigenvalues/RealQZ.h +537 -607
  247. package/eigen/Eigen/src/Eigenvalues/RealSchur.h +342 -381
  248. package/eigen/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h +41 -35
  249. package/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +541 -595
  250. package/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h +47 -44
  251. package/eigen/Eigen/src/Eigenvalues/Tridiagonalization.h +430 -462
  252. package/eigen/Eigen/src/Geometry/AlignedBox.h +226 -227
  253. package/eigen/Eigen/src/Geometry/AngleAxis.h +131 -133
  254. package/eigen/Eigen/src/Geometry/EulerAngles.h +163 -74
  255. package/eigen/Eigen/src/Geometry/Homogeneous.h +285 -333
  256. package/eigen/Eigen/src/Geometry/Hyperplane.h +151 -160
  257. package/eigen/Eigen/src/Geometry/InternalHeaderCheck.h +3 -0
  258. package/eigen/Eigen/src/Geometry/OrthoMethods.h +168 -146
  259. package/eigen/Eigen/src/Geometry/ParametrizedLine.h +127 -127
  260. package/eigen/Eigen/src/Geometry/Quaternion.h +566 -506
  261. package/eigen/Eigen/src/Geometry/Rotation2D.h +107 -105
  262. package/eigen/Eigen/src/Geometry/RotationBase.h +148 -145
  263. package/eigen/Eigen/src/Geometry/Scaling.h +113 -106
  264. package/eigen/Eigen/src/Geometry/Transform.h +858 -936
  265. package/eigen/Eigen/src/Geometry/Translation.h +94 -92
  266. package/eigen/Eigen/src/Geometry/Umeyama.h +79 -84
  267. package/eigen/Eigen/src/Geometry/arch/Geometry_SIMD.h +90 -104
  268. package/eigen/Eigen/src/Householder/BlockHouseholder.h +51 -46
  269. package/eigen/Eigen/src/Householder/Householder.h +102 -124
  270. package/eigen/Eigen/src/Householder/HouseholderSequence.h +412 -453
  271. package/eigen/Eigen/src/Householder/InternalHeaderCheck.h +3 -0
  272. package/eigen/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +149 -162
  273. package/eigen/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +124 -119
  274. package/eigen/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +92 -104
  275. package/eigen/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +251 -243
  276. package/eigen/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +224 -228
  277. package/eigen/Eigen/src/IterativeLinearSolvers/InternalHeaderCheck.h +3 -0
  278. package/eigen/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +178 -227
  279. package/eigen/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +79 -84
  280. package/eigen/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +54 -60
  281. package/eigen/Eigen/src/Jacobi/InternalHeaderCheck.h +3 -0
  282. package/eigen/Eigen/src/Jacobi/Jacobi.h +252 -308
  283. package/eigen/Eigen/src/KLUSupport/InternalHeaderCheck.h +3 -0
  284. package/eigen/Eigen/src/KLUSupport/KLUSupport.h +208 -227
  285. package/eigen/Eigen/src/LU/Determinant.h +50 -69
  286. package/eigen/Eigen/src/LU/FullPivLU.h +545 -596
  287. package/eigen/Eigen/src/LU/InternalHeaderCheck.h +3 -0
  288. package/eigen/Eigen/src/LU/InverseImpl.h +206 -285
  289. package/eigen/Eigen/src/LU/PartialPivLU.h +390 -428
  290. package/eigen/Eigen/src/LU/PartialPivLU_LAPACKE.h +54 -40
  291. package/eigen/Eigen/src/LU/arch/InverseSize4.h +72 -70
  292. package/eigen/Eigen/src/MetisSupport/InternalHeaderCheck.h +3 -0
  293. package/eigen/Eigen/src/MetisSupport/MetisSupport.h +81 -93
  294. package/eigen/Eigen/src/OrderingMethods/Amd.h +243 -265
  295. package/eigen/Eigen/src/OrderingMethods/Eigen_Colamd.h +831 -1004
  296. package/eigen/Eigen/src/OrderingMethods/InternalHeaderCheck.h +3 -0
  297. package/eigen/Eigen/src/OrderingMethods/Ordering.h +112 -119
  298. package/eigen/Eigen/src/PaStiXSupport/InternalHeaderCheck.h +3 -0
  299. package/eigen/Eigen/src/PaStiXSupport/PaStiXSupport.h +524 -570
  300. package/eigen/Eigen/src/PardisoSupport/InternalHeaderCheck.h +3 -0
  301. package/eigen/Eigen/src/PardisoSupport/PardisoSupport.h +385 -430
  302. package/eigen/Eigen/src/QR/ColPivHouseholderQR.h +479 -479
  303. package/eigen/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +120 -56
  304. package/eigen/Eigen/src/QR/CompleteOrthogonalDecomposition.h +166 -153
  305. package/eigen/Eigen/src/QR/FullPivHouseholderQR.h +495 -475
  306. package/eigen/Eigen/src/QR/HouseholderQR.h +394 -285
  307. package/eigen/Eigen/src/QR/HouseholderQR_LAPACKE.h +32 -23
  308. package/eigen/Eigen/src/QR/InternalHeaderCheck.h +3 -0
  309. package/eigen/Eigen/src/SPQRSupport/InternalHeaderCheck.h +3 -0
  310. package/eigen/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +244 -264
  311. package/eigen/Eigen/src/SVD/BDCSVD.h +817 -713
  312. package/eigen/Eigen/src/SVD/BDCSVD_LAPACKE.h +174 -0
  313. package/eigen/Eigen/src/SVD/InternalHeaderCheck.h +3 -0
  314. package/eigen/Eigen/src/SVD/JacobiSVD.h +577 -543
  315. package/eigen/Eigen/src/SVD/JacobiSVD_LAPACKE.h +85 -49
  316. package/eigen/Eigen/src/SVD/SVDBase.h +242 -182
  317. package/eigen/Eigen/src/SVD/UpperBidiagonalization.h +200 -235
  318. package/eigen/Eigen/src/SparseCholesky/InternalHeaderCheck.h +3 -0
  319. package/eigen/Eigen/src/SparseCholesky/SimplicialCholesky.h +765 -594
  320. package/eigen/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +308 -94
  321. package/eigen/Eigen/src/SparseCore/AmbiVector.h +202 -251
  322. package/eigen/Eigen/src/SparseCore/CompressedStorage.h +184 -252
  323. package/eigen/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +134 -178
  324. package/eigen/Eigen/src/SparseCore/InternalHeaderCheck.h +3 -0
  325. package/eigen/Eigen/src/SparseCore/SparseAssign.h +149 -140
  326. package/eigen/Eigen/src/SparseCore/SparseBlock.h +403 -440
  327. package/eigen/Eigen/src/SparseCore/SparseColEtree.h +100 -112
  328. package/eigen/Eigen/src/SparseCore/SparseCompressedBase.h +525 -303
  329. package/eigen/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +555 -339
  330. package/eigen/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +100 -108
  331. package/eigen/Eigen/src/SparseCore/SparseDenseProduct.h +169 -197
  332. package/eigen/Eigen/src/SparseCore/SparseDiagonalProduct.h +71 -71
  333. package/eigen/Eigen/src/SparseCore/SparseDot.h +49 -47
  334. package/eigen/Eigen/src/SparseCore/SparseFuzzy.h +13 -11
  335. package/eigen/Eigen/src/SparseCore/SparseMap.h +243 -253
  336. package/eigen/Eigen/src/SparseCore/SparseMatrix.h +1603 -1245
  337. package/eigen/Eigen/src/SparseCore/SparseMatrixBase.h +403 -350
  338. package/eigen/Eigen/src/SparseCore/SparsePermutation.h +186 -115
  339. package/eigen/Eigen/src/SparseCore/SparseProduct.h +94 -97
  340. package/eigen/Eigen/src/SparseCore/SparseRedux.h +22 -24
  341. package/eigen/Eigen/src/SparseCore/SparseRef.h +268 -295
  342. package/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h +370 -416
  343. package/eigen/Eigen/src/SparseCore/SparseSolverBase.h +78 -87
  344. package/eigen/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +81 -95
  345. package/eigen/Eigen/src/SparseCore/SparseTranspose.h +62 -71
  346. package/eigen/Eigen/src/SparseCore/SparseTriangularView.h +132 -144
  347. package/eigen/Eigen/src/SparseCore/SparseUtil.h +138 -115
  348. package/eigen/Eigen/src/SparseCore/SparseVector.h +426 -372
  349. package/eigen/Eigen/src/SparseCore/SparseView.h +164 -193
  350. package/eigen/Eigen/src/SparseCore/TriangularSolver.h +129 -170
  351. package/eigen/Eigen/src/SparseLU/InternalHeaderCheck.h +3 -0
  352. package/eigen/Eigen/src/SparseLU/SparseLU.h +756 -710
  353. package/eigen/Eigen/src/SparseLU/SparseLUImpl.h +61 -48
  354. package/eigen/Eigen/src/SparseLU/SparseLU_Memory.h +102 -118
  355. package/eigen/Eigen/src/SparseLU/SparseLU_Structs.h +38 -35
  356. package/eigen/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +245 -301
  357. package/eigen/Eigen/src/SparseLU/SparseLU_Utils.h +44 -49
  358. package/eigen/Eigen/src/SparseLU/SparseLU_column_bmod.h +104 -108
  359. package/eigen/Eigen/src/SparseLU/SparseLU_column_dfs.h +89 -100
  360. package/eigen/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +57 -58
  361. package/eigen/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +43 -55
  362. package/eigen/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +74 -71
  363. package/eigen/Eigen/src/SparseLU/SparseLU_panel_bmod.h +124 -132
  364. package/eigen/Eigen/src/SparseLU/SparseLU_panel_dfs.h +136 -159
  365. package/eigen/Eigen/src/SparseLU/SparseLU_pivotL.h +51 -52
  366. package/eigen/Eigen/src/SparseLU/SparseLU_pruneL.h +67 -73
  367. package/eigen/Eigen/src/SparseLU/SparseLU_relax_snode.h +24 -26
  368. package/eigen/Eigen/src/SparseQR/InternalHeaderCheck.h +3 -0
  369. package/eigen/Eigen/src/SparseQR/SparseQR.h +450 -502
  370. package/eigen/Eigen/src/StlSupport/StdDeque.h +28 -93
  371. package/eigen/Eigen/src/StlSupport/StdList.h +28 -84
  372. package/eigen/Eigen/src/StlSupport/StdVector.h +28 -108
  373. package/eigen/Eigen/src/StlSupport/details.h +48 -50
  374. package/eigen/Eigen/src/SuperLUSupport/InternalHeaderCheck.h +3 -0
  375. package/eigen/Eigen/src/SuperLUSupport/SuperLUSupport.h +634 -730
  376. package/eigen/Eigen/src/ThreadPool/Barrier.h +70 -0
  377. package/eigen/Eigen/src/ThreadPool/CoreThreadPoolDevice.h +336 -0
  378. package/eigen/Eigen/src/ThreadPool/EventCount.h +241 -0
  379. package/eigen/Eigen/src/ThreadPool/ForkJoin.h +140 -0
  380. package/eigen/Eigen/src/ThreadPool/InternalHeaderCheck.h +4 -0
  381. package/eigen/Eigen/src/ThreadPool/NonBlockingThreadPool.h +587 -0
  382. package/eigen/Eigen/src/ThreadPool/RunQueue.h +230 -0
  383. package/eigen/Eigen/src/ThreadPool/ThreadCancel.h +21 -0
  384. package/eigen/Eigen/src/ThreadPool/ThreadEnvironment.h +43 -0
  385. package/eigen/Eigen/src/ThreadPool/ThreadLocal.h +289 -0
  386. package/eigen/Eigen/src/ThreadPool/ThreadPoolInterface.h +50 -0
  387. package/eigen/Eigen/src/ThreadPool/ThreadYield.h +16 -0
  388. package/eigen/Eigen/src/UmfPackSupport/InternalHeaderCheck.h +3 -0
  389. package/eigen/Eigen/src/UmfPackSupport/UmfPackSupport.h +428 -464
  390. package/eigen/Eigen/src/misc/Image.h +41 -43
  391. package/eigen/Eigen/src/misc/InternalHeaderCheck.h +3 -0
  392. package/eigen/Eigen/src/misc/Kernel.h +39 -41
  393. package/eigen/Eigen/src/misc/RealSvd2x2.h +19 -21
  394. package/eigen/Eigen/src/misc/blas.h +83 -426
  395. package/eigen/Eigen/src/misc/lapacke.h +9972 -16179
  396. package/eigen/Eigen/src/misc/lapacke_helpers.h +163 -0
  397. package/eigen/Eigen/src/misc/lapacke_mangling.h +4 -5
  398. package/eigen/Eigen/src/plugins/ArrayCwiseBinaryOps.inc +344 -0
  399. package/eigen/Eigen/src/plugins/ArrayCwiseUnaryOps.inc +544 -0
  400. package/eigen/Eigen/src/plugins/{BlockMethods.h → BlockMethods.inc} +434 -506
  401. package/eigen/Eigen/src/plugins/CommonCwiseBinaryOps.inc +116 -0
  402. package/eigen/Eigen/src/plugins/{CommonCwiseUnaryOps.h → CommonCwiseUnaryOps.inc} +58 -68
  403. package/eigen/Eigen/src/plugins/IndexedViewMethods.inc +192 -0
  404. package/eigen/Eigen/src/plugins/InternalHeaderCheck.inc +3 -0
  405. package/eigen/Eigen/src/plugins/MatrixCwiseBinaryOps.inc +331 -0
  406. package/eigen/Eigen/src/plugins/MatrixCwiseUnaryOps.inc +118 -0
  407. package/eigen/Eigen/src/plugins/ReshapedMethods.inc +133 -0
  408. package/package.json +1 -1
  409. package/eigen/COPYING.APACHE +0 -203
  410. package/eigen/COPYING.BSD +0 -26
  411. package/eigen/COPYING.GPL +0 -674
  412. package/eigen/COPYING.LGPL +0 -502
  413. package/eigen/COPYING.MINPACK +0 -51
  414. package/eigen/COPYING.MPL2 +0 -373
  415. package/eigen/COPYING.README +0 -18
  416. package/eigen/Eigen/src/Core/BooleanRedux.h +0 -162
  417. package/eigen/Eigen/src/Core/arch/CUDA/Complex.h +0 -258
  418. package/eigen/Eigen/src/Core/arch/Default/TypeCasting.h +0 -120
  419. package/eigen/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +0 -694
  420. package/eigen/Eigen/src/Core/util/NonMPL2.h +0 -3
  421. package/eigen/Eigen/src/SparseCore/MappedSparseMatrix.h +0 -67
  422. package/eigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +0 -280
  423. package/eigen/Eigen/src/misc/lapack.h +0 -152
  424. package/eigen/Eigen/src/plugins/ArrayCwiseBinaryOps.h +0 -358
  425. package/eigen/Eigen/src/plugins/ArrayCwiseUnaryOps.h +0 -696
  426. package/eigen/Eigen/src/plugins/CommonCwiseBinaryOps.h +0 -115
  427. package/eigen/Eigen/src/plugins/IndexedViewMethods.h +0 -262
  428. package/eigen/Eigen/src/plugins/MatrixCwiseBinaryOps.h +0 -152
  429. package/eigen/Eigen/src/plugins/MatrixCwiseUnaryOps.h +0 -95
  430. package/eigen/Eigen/src/plugins/ReshapedMethods.h +0 -149
  431. package/eigen/README.md +0 -5
@@ -10,648 +10,578 @@
10
10
  #ifndef EIGEN_REAL_QZ_H
11
11
  #define EIGEN_REAL_QZ_H
12
12
 
13
+ // IWYU pragma: private
14
+ #include "./InternalHeaderCheck.h"
15
+
13
16
  namespace Eigen {
14
17
 
15
- /** \eigenvalues_module \ingroup Eigenvalues_Module
16
- *
17
- *
18
- * \class RealQZ
19
- *
20
- * \brief Performs a real QZ decomposition of a pair of square matrices
21
- *
22
- * \tparam _MatrixType the type of the matrix of which we are computing the
23
- * real QZ decomposition; this is expected to be an instantiation of the
24
- * Matrix class template.
25
- *
26
- * Given a real square matrices A and B, this class computes the real QZ
27
- * decomposition: \f$ A = Q S Z \f$, \f$ B = Q T Z \f$ where Q and Z are
28
- * real orthogonal matrixes, T is upper-triangular matrix, and S is upper
29
- * quasi-triangular matrix. An orthogonal matrix is a matrix whose
30
- * inverse is equal to its transpose, \f$ U^{-1} = U^T \f$. A quasi-triangular
31
- * matrix is a block-triangular matrix whose diagonal consists of 1-by-1
32
- * blocks and 2-by-2 blocks where further reduction is impossible due to
33
- * complex eigenvalues.
18
+ /** \eigenvalues_module \ingroup Eigenvalues_Module
19
+ *
20
+ *
21
+ * \class RealQZ
22
+ *
23
+ * \brief Performs a real QZ decomposition of a pair of square matrices
24
+ *
25
+ * \tparam MatrixType_ the type of the matrix of which we are computing the
26
+ * real QZ decomposition; this is expected to be an instantiation of the
27
+ * Matrix class template.
28
+ *
29
+ * Given a real square matrices A and B, this class computes the real QZ
30
+ * decomposition: \f$ A = Q S Z \f$, \f$ B = Q T Z \f$ where Q and Z are
31
+ * real orthogonal matrixes, T is upper-triangular matrix, and S is upper
32
+ * quasi-triangular matrix. An orthogonal matrix is a matrix whose
33
+ * inverse is equal to its transpose, \f$ U^{-1} = U^T \f$. A quasi-triangular
34
+ * matrix is a block-triangular matrix whose diagonal consists of 1-by-1
35
+ * blocks and 2-by-2 blocks where further reduction is impossible due to
36
+ * complex eigenvalues.
37
+ *
38
+ * The eigenvalues of the pencil \f$ A - z B \f$ can be obtained from
39
+ * 1x1 and 2x2 blocks on the diagonals of S and T.
40
+ *
41
+ * Call the function compute() to compute the real QZ decomposition of a
42
+ * given pair of matrices. Alternatively, you can use the
43
+ * RealQZ(const MatrixType& B, const MatrixType& B, bool computeQZ)
44
+ * constructor which computes the real QZ decomposition at construction
45
+ * time. Once the decomposition is computed, you can use the matrixS(),
46
+ * matrixT(), matrixQ() and matrixZ() functions to retrieve the matrices
47
+ * S, T, Q and Z in the decomposition. If computeQZ==false, some time
48
+ * is saved by not computing matrices Q and Z.
49
+ *
50
+ * Example: \include RealQZ_compute.cpp
51
+ * Output: \include RealQZ_compute.out
52
+ *
53
+ * \note The implementation is based on the algorithm in "Matrix Computations"
54
+ * by Gene H. Golub and Charles F. Van Loan, and a paper "An algorithm for
55
+ * generalized eigenvalue problems" by C.B.Moler and G.W.Stewart.
56
+ *
57
+ * \sa class RealSchur, class ComplexSchur, class EigenSolver, class ComplexEigenSolver
58
+ */
59
+
60
+ template <typename MatrixType_>
61
+ class RealQZ {
62
+ public:
63
+ typedef MatrixType_ MatrixType;
64
+ enum {
65
+ RowsAtCompileTime = MatrixType::RowsAtCompileTime,
66
+ ColsAtCompileTime = MatrixType::ColsAtCompileTime,
67
+ Options = internal::traits<MatrixType>::Options,
68
+ MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,
69
+ MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime
70
+ };
71
+ typedef typename MatrixType::Scalar Scalar;
72
+ typedef internal::make_complex_t<Scalar> ComplexScalar;
73
+ typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
74
+
75
+ typedef Matrix<ComplexScalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> EigenvalueType;
76
+ typedef Matrix<Scalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> ColumnVectorType;
77
+
78
+ /** \brief Default constructor.
34
79
  *
35
- * The eigenvalues of the pencil \f$ A - z B \f$ can be obtained from
36
- * 1x1 and 2x2 blocks on the diagonals of S and T.
80
+ * \param [in] size Positive integer, size of the matrix whose QZ decomposition will be computed.
37
81
  *
38
- * Call the function compute() to compute the real QZ decomposition of a
39
- * given pair of matrices. Alternatively, you can use the
40
- * RealQZ(const MatrixType& B, const MatrixType& B, bool computeQZ)
41
- * constructor which computes the real QZ decomposition at construction
42
- * time. Once the decomposition is computed, you can use the matrixS(),
43
- * matrixT(), matrixQ() and matrixZ() functions to retrieve the matrices
44
- * S, T, Q and Z in the decomposition. If computeQZ==false, some time
45
- * is saved by not computing matrices Q and Z.
82
+ * The default constructor is useful in cases in which the user intends to
83
+ * perform decompositions via compute(). The \p size parameter is only
84
+ * used as a hint. It is not an error to give a wrong \p size, but it may
85
+ * impair performance.
46
86
  *
47
- * Example: \include RealQZ_compute.cpp
48
- * Output: \include RealQZ_compute.out
49
- *
50
- * \note The implementation is based on the algorithm in "Matrix Computations"
51
- * by Gene H. Golub and Charles F. Van Loan, and a paper "An algorithm for
52
- * generalized eigenvalue problems" by C.B.Moler and G.W.Stewart.
53
- *
54
- * \sa class RealSchur, class ComplexSchur, class EigenSolver, class ComplexEigenSolver
87
+ * \sa compute() for an example.
55
88
  */
56
-
57
- template<typename _MatrixType> class RealQZ
58
- {
59
- public:
60
- typedef _MatrixType MatrixType;
61
- enum {
62
- RowsAtCompileTime = MatrixType::RowsAtCompileTime,
63
- ColsAtCompileTime = MatrixType::ColsAtCompileTime,
64
- Options = MatrixType::Options,
65
- MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime,
66
- MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime
67
- };
68
- typedef typename MatrixType::Scalar Scalar;
69
- typedef std::complex<typename NumTraits<Scalar>::Real> ComplexScalar;
70
- typedef Eigen::Index Index; ///< \deprecated since Eigen 3.3
71
-
72
- typedef Matrix<ComplexScalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> EigenvalueType;
73
- typedef Matrix<Scalar, ColsAtCompileTime, 1, Options & ~RowMajor, MaxColsAtCompileTime, 1> ColumnVectorType;
74
-
75
- /** \brief Default constructor.
76
- *
77
- * \param [in] size Positive integer, size of the matrix whose QZ decomposition will be computed.
78
- *
79
- * The default constructor is useful in cases in which the user intends to
80
- * perform decompositions via compute(). The \p size parameter is only
81
- * used as a hint. It is not an error to give a wrong \p size, but it may
82
- * impair performance.
83
- *
84
- * \sa compute() for an example.
85
- */
86
- explicit RealQZ(Index size = RowsAtCompileTime==Dynamic ? 1 : RowsAtCompileTime) :
87
- m_S(size, size),
89
+ explicit RealQZ(Index size = RowsAtCompileTime == Dynamic ? 1 : RowsAtCompileTime)
90
+ : m_S(size, size),
88
91
  m_T(size, size),
89
92
  m_Q(size, size),
90
93
  m_Z(size, size),
91
- m_workspace(size*2),
94
+ m_workspace(size * 2),
92
95
  m_maxIters(400),
93
96
  m_isInitialized(false),
94
- m_computeQZ(true)
95
- {}
96
-
97
- /** \brief Constructor; computes real QZ decomposition of given matrices
98
- *
99
- * \param[in] A Matrix A.
100
- * \param[in] B Matrix B.
101
- * \param[in] computeQZ If false, A and Z are not computed.
102
- *
103
- * This constructor calls compute() to compute the QZ decomposition.
104
- */
105
- RealQZ(const MatrixType& A, const MatrixType& B, bool computeQZ = true) :
106
- m_S(A.rows(),A.cols()),
107
- m_T(A.rows(),A.cols()),
108
- m_Q(A.rows(),A.cols()),
109
- m_Z(A.rows(),A.cols()),
110
- m_workspace(A.rows()*2),
97
+ m_computeQZ(true) {}
98
+
99
+ /** \brief Constructor; computes real QZ decomposition of given matrices
100
+ *
101
+ * \param[in] A Matrix A.
102
+ * \param[in] B Matrix B.
103
+ * \param[in] computeQZ If false, A and Z are not computed.
104
+ *
105
+ * This constructor calls compute() to compute the QZ decomposition.
106
+ */
107
+ RealQZ(const MatrixType& A, const MatrixType& B, bool computeQZ = true)
108
+ : m_S(A.rows(), A.cols()),
109
+ m_T(A.rows(), A.cols()),
110
+ m_Q(A.rows(), A.cols()),
111
+ m_Z(A.rows(), A.cols()),
112
+ m_workspace(A.rows() * 2),
111
113
  m_maxIters(400),
112
114
  m_isInitialized(false),
113
- m_computeQZ(true)
114
- {
115
- compute(A, B, computeQZ);
116
- }
117
-
118
- /** \brief Returns matrix Q in the QZ decomposition.
119
- *
120
- * \returns A const reference to the matrix Q.
121
- */
122
- const MatrixType& matrixQ() const {
123
- eigen_assert(m_isInitialized && "RealQZ is not initialized.");
124
- eigen_assert(m_computeQZ && "The matrices Q and Z have not been computed during the QZ decomposition.");
125
- return m_Q;
126
- }
115
+ m_computeQZ(true) {
116
+ compute(A, B, computeQZ);
117
+ }
127
118
 
128
- /** \brief Returns matrix Z in the QZ decomposition.
129
- *
130
- * \returns A const reference to the matrix Z.
131
- */
132
- const MatrixType& matrixZ() const {
133
- eigen_assert(m_isInitialized && "RealQZ is not initialized.");
134
- eigen_assert(m_computeQZ && "The matrices Q and Z have not been computed during the QZ decomposition.");
135
- return m_Z;
136
- }
119
+ /** \brief Returns matrix Q in the QZ decomposition.
120
+ *
121
+ * \returns A const reference to the matrix Q.
122
+ */
123
+ const MatrixType& matrixQ() const {
124
+ eigen_assert(m_isInitialized && "RealQZ is not initialized.");
125
+ eigen_assert(m_computeQZ && "The matrices Q and Z have not been computed during the QZ decomposition.");
126
+ return m_Q;
127
+ }
137
128
 
138
- /** \brief Returns matrix S in the QZ decomposition.
139
- *
140
- * \returns A const reference to the matrix S.
141
- */
142
- const MatrixType& matrixS() const {
143
- eigen_assert(m_isInitialized && "RealQZ is not initialized.");
144
- return m_S;
145
- }
129
+ /** \brief Returns matrix Z in the QZ decomposition.
130
+ *
131
+ * \returns A const reference to the matrix Z.
132
+ */
133
+ const MatrixType& matrixZ() const {
134
+ eigen_assert(m_isInitialized && "RealQZ is not initialized.");
135
+ eigen_assert(m_computeQZ && "The matrices Q and Z have not been computed during the QZ decomposition.");
136
+ return m_Z;
137
+ }
146
138
 
147
- /** \brief Returns matrix S in the QZ decomposition.
148
- *
149
- * \returns A const reference to the matrix S.
150
- */
151
- const MatrixType& matrixT() const {
152
- eigen_assert(m_isInitialized && "RealQZ is not initialized.");
153
- return m_T;
154
- }
139
+ /** \brief Returns matrix S in the QZ decomposition.
140
+ *
141
+ * \returns A const reference to the matrix S.
142
+ */
143
+ const MatrixType& matrixS() const {
144
+ eigen_assert(m_isInitialized && "RealQZ is not initialized.");
145
+ return m_S;
146
+ }
155
147
 
156
- /** \brief Computes QZ decomposition of given matrix.
157
- *
158
- * \param[in] A Matrix A.
159
- * \param[in] B Matrix B.
160
- * \param[in] computeQZ If false, A and Z are not computed.
161
- * \returns Reference to \c *this
162
- */
163
- RealQZ& compute(const MatrixType& A, const MatrixType& B, bool computeQZ = true);
164
-
165
- /** \brief Reports whether previous computation was successful.
166
- *
167
- * \returns \c Success if computation was successful, \c NoConvergence otherwise.
168
- */
169
- ComputationInfo info() const
170
- {
171
- eigen_assert(m_isInitialized && "RealQZ is not initialized.");
172
- return m_info;
173
- }
148
+ /** \brief Returns matrix S in the QZ decomposition.
149
+ *
150
+ * \returns A const reference to the matrix S.
151
+ */
152
+ const MatrixType& matrixT() const {
153
+ eigen_assert(m_isInitialized && "RealQZ is not initialized.");
154
+ return m_T;
155
+ }
174
156
 
175
- /** \brief Returns number of performed QR-like iterations.
176
- */
177
- Index iterations() const
178
- {
179
- eigen_assert(m_isInitialized && "RealQZ is not initialized.");
180
- return m_global_iter;
181
- }
157
+ /** \brief Computes QZ decomposition of given matrix.
158
+ *
159
+ * \param[in] A Matrix A.
160
+ * \param[in] B Matrix B.
161
+ * \param[in] computeQZ If false, A and Z are not computed.
162
+ * \returns Reference to \c *this
163
+ */
164
+ RealQZ& compute(const MatrixType& A, const MatrixType& B, bool computeQZ = true);
182
165
 
183
- /** Sets the maximal number of iterations allowed to converge to one eigenvalue
184
- * or decouple the problem.
185
- */
186
- RealQZ& setMaxIterations(Index maxIters)
187
- {
188
- m_maxIters = maxIters;
189
- return *this;
190
- }
166
+ /** \brief Reports whether previous computation was successful.
167
+ *
168
+ * \returns \c Success if computation was successful, \c NoConvergence otherwise.
169
+ */
170
+ ComputationInfo info() const {
171
+ eigen_assert(m_isInitialized && "RealQZ is not initialized.");
172
+ return m_info;
173
+ }
191
174
 
192
- private:
193
-
194
- MatrixType m_S, m_T, m_Q, m_Z;
195
- Matrix<Scalar,Dynamic,1> m_workspace;
196
- ComputationInfo m_info;
197
- Index m_maxIters;
198
- bool m_isInitialized;
199
- bool m_computeQZ;
200
- Scalar m_normOfT, m_normOfS;
201
- Index m_global_iter;
202
-
203
- typedef Matrix<Scalar,3,1> Vector3s;
204
- typedef Matrix<Scalar,2,1> Vector2s;
205
- typedef Matrix<Scalar,2,2> Matrix2s;
206
- typedef JacobiRotation<Scalar> JRs;
207
-
208
- void hessenbergTriangular();
209
- void computeNorms();
210
- Index findSmallSubdiagEntry(Index iu);
211
- Index findSmallDiagEntry(Index f, Index l);
212
- void splitOffTwoRows(Index i);
213
- void pushDownZero(Index z, Index f, Index l);
214
- void step(Index f, Index l, Index iter);
215
-
216
- }; // RealQZ
217
-
218
- /** \internal Reduces S and T to upper Hessenberg - triangular form */
219
- template<typename MatrixType>
220
- void RealQZ<MatrixType>::hessenbergTriangular()
221
- {
175
+ /** \brief Returns number of performed QR-like iterations.
176
+ */
177
+ Index iterations() const {
178
+ eigen_assert(m_isInitialized && "RealQZ is not initialized.");
179
+ return m_global_iter;
180
+ }
222
181
 
223
- const Index dim = m_S.cols();
224
-
225
- // perform QR decomposition of T, overwrite T with R, save Q
226
- HouseholderQR<MatrixType> qrT(m_T);
227
- m_T = qrT.matrixQR();
228
- m_T.template triangularView<StrictlyLower>().setZero();
229
- m_Q = qrT.householderQ();
230
- // overwrite S with Q* S
231
- m_S.applyOnTheLeft(m_Q.adjoint());
232
- // init Z as Identity
233
- if (m_computeQZ)
234
- m_Z = MatrixType::Identity(dim,dim);
235
- // reduce S to upper Hessenberg with Givens rotations
236
- for (Index j=0; j<=dim-3; j++) {
237
- for (Index i=dim-1; i>=j+2; i--) {
238
- JRs G;
239
- // kill S(i,j)
240
- if(m_S.coeff(i,j) != 0)
241
- {
242
- G.makeGivens(m_S.coeff(i-1,j), m_S.coeff(i,j), &m_S.coeffRef(i-1, j));
243
- m_S.coeffRef(i,j) = Scalar(0.0);
244
- m_S.rightCols(dim-j-1).applyOnTheLeft(i-1,i,G.adjoint());
245
- m_T.rightCols(dim-i+1).applyOnTheLeft(i-1,i,G.adjoint());
246
- // update Q
247
- if (m_computeQZ)
248
- m_Q.applyOnTheRight(i-1,i,G);
249
- }
250
- // kill T(i,i-1)
251
- if(m_T.coeff(i,i-1)!=Scalar(0))
252
- {
253
- G.makeGivens(m_T.coeff(i,i), m_T.coeff(i,i-1), &m_T.coeffRef(i,i));
254
- m_T.coeffRef(i,i-1) = Scalar(0.0);
255
- m_S.applyOnTheRight(i,i-1,G);
256
- m_T.topRows(i).applyOnTheRight(i,i-1,G);
257
- // update Z
258
- if (m_computeQZ)
259
- m_Z.applyOnTheLeft(i,i-1,G.adjoint());
260
- }
261
- }
182
+ /** Sets the maximal number of iterations allowed to converge to one eigenvalue
183
+ * or decouple the problem.
184
+ */
185
+ RealQZ& setMaxIterations(Index maxIters) {
186
+ m_maxIters = maxIters;
187
+ return *this;
188
+ }
189
+
190
+ private:
191
+ MatrixType m_S, m_T, m_Q, m_Z;
192
+ Matrix<Scalar, Dynamic, 1> m_workspace;
193
+ ComputationInfo m_info;
194
+ Index m_maxIters;
195
+ bool m_isInitialized;
196
+ bool m_computeQZ;
197
+ Scalar m_normOfT, m_normOfS;
198
+ Index m_global_iter;
199
+
200
+ typedef Matrix<Scalar, 3, 1> Vector3s;
201
+ typedef Matrix<Scalar, 2, 1> Vector2s;
202
+ typedef Matrix<Scalar, 2, 2> Matrix2s;
203
+ typedef JacobiRotation<Scalar> JRs;
204
+
205
+ void hessenbergTriangular();
206
+ void computeNorms();
207
+ Index findSmallSubdiagEntry(Index iu);
208
+ Index findSmallDiagEntry(Index f, Index l);
209
+ void splitOffTwoRows(Index i);
210
+ void pushDownZero(Index z, Index f, Index l);
211
+ void step(Index f, Index l, Index iter);
212
+
213
+ }; // RealQZ
214
+
215
+ /** \internal Reduces S and T to upper Hessenberg - triangular form */
216
+ template <typename MatrixType>
217
+ void RealQZ<MatrixType>::hessenbergTriangular() {
218
+ const Index dim = m_S.cols();
219
+
220
+ // perform QR decomposition of T, overwrite T with R, save Q
221
+ HouseholderQR<MatrixType> qrT(m_T);
222
+ m_T = qrT.matrixQR();
223
+ m_T.template triangularView<StrictlyLower>().setZero();
224
+ m_Q = qrT.householderQ();
225
+ // overwrite S with Q* S
226
+ m_S.applyOnTheLeft(m_Q.adjoint());
227
+ // init Z as Identity
228
+ if (m_computeQZ) m_Z = MatrixType::Identity(dim, dim);
229
+ // reduce S to upper Hessenberg with Givens rotations
230
+ for (Index j = 0; j <= dim - 3; j++) {
231
+ for (Index i = dim - 1; i >= j + 2; i--) {
232
+ JRs G;
233
+ // kill S(i,j)
234
+ if (!numext::is_exactly_zero(m_S.coeff(i, j))) {
235
+ G.makeGivens(m_S.coeff(i - 1, j), m_S.coeff(i, j), &m_S.coeffRef(i - 1, j));
236
+ m_S.coeffRef(i, j) = Scalar(0.0);
237
+ m_S.rightCols(dim - j - 1).applyOnTheLeft(i - 1, i, G.adjoint());
238
+ m_T.rightCols(dim - i + 1).applyOnTheLeft(i - 1, i, G.adjoint());
239
+ // update Q
240
+ if (m_computeQZ) m_Q.applyOnTheRight(i - 1, i, G);
262
241
  }
263
- }
264
-
265
- /** \internal Computes vector L1 norms of S and T when in Hessenberg-Triangular form already */
266
- template<typename MatrixType>
267
- inline void RealQZ<MatrixType>::computeNorms()
268
- {
269
- const Index size = m_S.cols();
270
- m_normOfS = Scalar(0.0);
271
- m_normOfT = Scalar(0.0);
272
- for (Index j = 0; j < size; ++j)
273
- {
274
- m_normOfS += m_S.col(j).segment(0, (std::min)(size,j+2)).cwiseAbs().sum();
275
- m_normOfT += m_T.row(j).segment(j, size - j).cwiseAbs().sum();
242
+ // kill T(i,i-1)
243
+ if (!numext::is_exactly_zero(m_T.coeff(i, i - 1))) {
244
+ G.makeGivens(m_T.coeff(i, i), m_T.coeff(i, i - 1), &m_T.coeffRef(i, i));
245
+ m_T.coeffRef(i, i - 1) = Scalar(0.0);
246
+ m_S.applyOnTheRight(i, i - 1, G);
247
+ m_T.topRows(i).applyOnTheRight(i, i - 1, G);
248
+ // update Z
249
+ if (m_computeQZ) m_Z.applyOnTheLeft(i, i - 1, G.adjoint());
276
250
  }
277
251
  }
252
+ }
253
+ }
254
+
255
+ /** \internal Computes vector L1 norms of S and T when in Hessenberg-Triangular form already */
256
+ template <typename MatrixType>
257
+ inline void RealQZ<MatrixType>::computeNorms() {
258
+ const Index size = m_S.cols();
259
+ m_normOfS = Scalar(0.0);
260
+ m_normOfT = Scalar(0.0);
261
+ for (Index j = 0; j < size; ++j) {
262
+ m_normOfS += m_S.col(j).segment(0, (std::min)(size, j + 2)).cwiseAbs().sum();
263
+ m_normOfT += m_T.row(j).segment(j, size - j).cwiseAbs().sum();
264
+ }
265
+ }
266
+
267
+ /** \internal Look for single small sub-diagonal element S(res, res-1) and return res (or 0) */
268
+ template <typename MatrixType>
269
+ inline Index RealQZ<MatrixType>::findSmallSubdiagEntry(Index iu) {
270
+ using std::abs;
271
+ Index res = iu;
272
+ while (res > 0) {
273
+ Scalar s = abs(m_S.coeff(res - 1, res - 1)) + abs(m_S.coeff(res, res));
274
+ if (numext::is_exactly_zero(s)) s = m_normOfS;
275
+ if (abs(m_S.coeff(res, res - 1)) < NumTraits<Scalar>::epsilon() * s) break;
276
+ res--;
277
+ }
278
+ return res;
279
+ }
280
+
281
+ /** \internal Look for single small diagonal element T(res, res) for res between f and l, and return res (or f-1) */
282
+ template <typename MatrixType>
283
+ inline Index RealQZ<MatrixType>::findSmallDiagEntry(Index f, Index l) {
284
+ using std::abs;
285
+ Index res = l;
286
+ while (res >= f) {
287
+ if (abs(m_T.coeff(res, res)) <= NumTraits<Scalar>::epsilon() * m_normOfT) break;
288
+ res--;
289
+ }
290
+ return res;
291
+ }
292
+
293
+ /** \internal decouple 2x2 diagonal block in rows i, i+1 if eigenvalues are real */
294
+ template <typename MatrixType>
295
+ inline void RealQZ<MatrixType>::splitOffTwoRows(Index i) {
296
+ using std::abs;
297
+ using std::sqrt;
298
+ const Index dim = m_S.cols();
299
+ if (numext::is_exactly_zero(abs(m_S.coeff(i + 1, i)))) return;
300
+ Index j = findSmallDiagEntry(i, i + 1);
301
+ if (j == i - 1) {
302
+ // block of (S T^{-1})
303
+ Matrix2s STi = m_T.template block<2, 2>(i, i).template triangularView<Upper>().template solve<OnTheRight>(
304
+ m_S.template block<2, 2>(i, i));
305
+ Scalar p = Scalar(0.5) * (STi(0, 0) - STi(1, 1));
306
+ Scalar q = p * p + STi(1, 0) * STi(0, 1);
307
+ if (q >= 0) {
308
+ Scalar z = sqrt(q);
309
+ // one QR-like iteration for ABi - lambda I
310
+ // is enough - when we know exact eigenvalue in advance,
311
+ // convergence is immediate
312
+ JRs G;
313
+ if (p >= 0)
314
+ G.makeGivens(p + z, STi(1, 0));
315
+ else
316
+ G.makeGivens(p - z, STi(1, 0));
317
+ m_S.rightCols(dim - i).applyOnTheLeft(i, i + 1, G.adjoint());
318
+ m_T.rightCols(dim - i).applyOnTheLeft(i, i + 1, G.adjoint());
319
+ // update Q
320
+ if (m_computeQZ) m_Q.applyOnTheRight(i, i + 1, G);
321
+
322
+ G.makeGivens(m_T.coeff(i + 1, i + 1), m_T.coeff(i + 1, i));
323
+ m_S.topRows(i + 2).applyOnTheRight(i + 1, i, G);
324
+ m_T.topRows(i + 2).applyOnTheRight(i + 1, i, G);
325
+ // update Z
326
+ if (m_computeQZ) m_Z.applyOnTheLeft(i + 1, i, G.adjoint());
278
327
 
279
-
280
- /** \internal Look for single small sub-diagonal element S(res, res-1) and return res (or 0) */
281
- template<typename MatrixType>
282
- inline Index RealQZ<MatrixType>::findSmallSubdiagEntry(Index iu)
283
- {
284
- using std::abs;
285
- Index res = iu;
286
- while (res > 0)
287
- {
288
- Scalar s = abs(m_S.coeff(res-1,res-1)) + abs(m_S.coeff(res,res));
289
- if (s == Scalar(0.0))
290
- s = m_normOfS;
291
- if (abs(m_S.coeff(res,res-1)) < NumTraits<Scalar>::epsilon() * s)
292
- break;
293
- res--;
294
- }
295
- return res;
328
+ m_S.coeffRef(i + 1, i) = Scalar(0.0);
329
+ m_T.coeffRef(i + 1, i) = Scalar(0.0);
296
330
  }
297
-
298
- /** \internal Look for single small diagonal element T(res, res) for res between f and l, and return res (or f-1) */
299
- template<typename MatrixType>
300
- inline Index RealQZ<MatrixType>::findSmallDiagEntry(Index f, Index l)
301
- {
302
- using std::abs;
303
- Index res = l;
304
- while (res >= f) {
305
- if (abs(m_T.coeff(res,res)) <= NumTraits<Scalar>::epsilon() * m_normOfT)
306
- break;
307
- res--;
308
- }
309
- return res;
331
+ } else {
332
+ pushDownZero(j, i, i + 1);
333
+ }
334
+ }
335
+
336
+ /** \internal use zero in T(z,z) to zero S(l,l-1), working in block f..l */
337
+ template <typename MatrixType>
338
+ inline void RealQZ<MatrixType>::pushDownZero(Index z, Index f, Index l) {
339
+ JRs G;
340
+ const Index dim = m_S.cols();
341
+ for (Index zz = z; zz < l; zz++) {
342
+ // push 0 down
343
+ Index firstColS = zz > f ? (zz - 1) : zz;
344
+ G.makeGivens(m_T.coeff(zz, zz + 1), m_T.coeff(zz + 1, zz + 1));
345
+ m_S.rightCols(dim - firstColS).applyOnTheLeft(zz, zz + 1, G.adjoint());
346
+ m_T.rightCols(dim - zz).applyOnTheLeft(zz, zz + 1, G.adjoint());
347
+ m_T.coeffRef(zz + 1, zz + 1) = Scalar(0.0);
348
+ // update Q
349
+ if (m_computeQZ) m_Q.applyOnTheRight(zz, zz + 1, G);
350
+ // kill S(zz+1, zz-1)
351
+ if (zz > f) {
352
+ G.makeGivens(m_S.coeff(zz + 1, zz), m_S.coeff(zz + 1, zz - 1));
353
+ m_S.topRows(zz + 2).applyOnTheRight(zz, zz - 1, G);
354
+ m_T.topRows(zz + 1).applyOnTheRight(zz, zz - 1, G);
355
+ m_S.coeffRef(zz + 1, zz - 1) = Scalar(0.0);
356
+ // update Z
357
+ if (m_computeQZ) m_Z.applyOnTheLeft(zz, zz - 1, G.adjoint());
310
358
  }
311
-
312
- /** \internal decouple 2x2 diagonal block in rows i, i+1 if eigenvalues are real */
313
- template<typename MatrixType>
314
- inline void RealQZ<MatrixType>::splitOffTwoRows(Index i)
359
+ }
360
+ // finally kill S(l,l-1)
361
+ G.makeGivens(m_S.coeff(l, l), m_S.coeff(l, l - 1));
362
+ m_S.applyOnTheRight(l, l - 1, G);
363
+ m_T.applyOnTheRight(l, l - 1, G);
364
+ m_S.coeffRef(l, l - 1) = Scalar(0.0);
365
+ // update Z
366
+ if (m_computeQZ) m_Z.applyOnTheLeft(l, l - 1, G.adjoint());
367
+ }
368
+
369
+ /** \internal QR-like iterative step for block f..l */
370
+ template <typename MatrixType>
371
+ inline void RealQZ<MatrixType>::step(Index f, Index l, Index iter) {
372
+ using std::abs;
373
+ const Index dim = m_S.cols();
374
+
375
+ // x, y, z
376
+ Scalar x, y, z;
377
+ if (iter == 10) {
378
+ // Wilkinson ad hoc shift
379
+ const Scalar a11 = m_S.coeff(f + 0, f + 0), a12 = m_S.coeff(f + 0, f + 1), a21 = m_S.coeff(f + 1, f + 0),
380
+ a22 = m_S.coeff(f + 1, f + 1), a32 = m_S.coeff(f + 2, f + 1), b12 = m_T.coeff(f + 0, f + 1),
381
+ b11i = Scalar(1.0) / m_T.coeff(f + 0, f + 0), b22i = Scalar(1.0) / m_T.coeff(f + 1, f + 1),
382
+ a87 = m_S.coeff(l - 1, l - 2), a98 = m_S.coeff(l - 0, l - 1),
383
+ b77i = Scalar(1.0) / m_T.coeff(l - 2, l - 2), b88i = Scalar(1.0) / m_T.coeff(l - 1, l - 1);
384
+ Scalar ss = abs(a87 * b77i) + abs(a98 * b88i), lpl = Scalar(1.5) * ss, ll = ss * ss;
385
+ x = ll + a11 * a11 * b11i * b11i - lpl * a11 * b11i + a12 * a21 * b11i * b22i -
386
+ a11 * a21 * b12 * b11i * b11i * b22i;
387
+ y = a11 * a21 * b11i * b11i - lpl * a21 * b11i + a21 * a22 * b11i * b22i - a21 * a21 * b12 * b11i * b11i * b22i;
388
+ z = a21 * a32 * b11i * b22i;
389
+ } else if (iter == 16) {
390
+ // another exceptional shift
391
+ x = m_S.coeff(f, f) / m_T.coeff(f, f) - m_S.coeff(l, l) / m_T.coeff(l, l) +
392
+ m_S.coeff(l, l - 1) * m_T.coeff(l - 1, l) / (m_T.coeff(l - 1, l - 1) * m_T.coeff(l, l));
393
+ y = m_S.coeff(f + 1, f) / m_T.coeff(f, f);
394
+ z = 0;
395
+ } else if (iter > 23 && !(iter % 8)) {
396
+ // extremely exceptional shift
397
+ x = internal::random<Scalar>(-1.0, 1.0);
398
+ y = internal::random<Scalar>(-1.0, 1.0);
399
+ z = internal::random<Scalar>(-1.0, 1.0);
400
+ } else {
401
+ // Compute the shifts: (x,y,z,0...) = (AB^-1 - l1 I) (AB^-1 - l2 I) e1
402
+ // where l1 and l2 are the eigenvalues of the 2x2 matrix C = U V^-1 where
403
+ // U and V are 2x2 bottom right sub matrices of A and B. Thus:
404
+ // = AB^-1AB^-1 + l1 l2 I - (l1+l2)(AB^-1)
405
+ // = AB^-1AB^-1 + det(M) - tr(M)(AB^-1)
406
+ // Since we are only interested in having x, y, z with a correct ratio, we have:
407
+ const Scalar a11 = m_S.coeff(f, f), a12 = m_S.coeff(f, f + 1), a21 = m_S.coeff(f + 1, f),
408
+ a22 = m_S.coeff(f + 1, f + 1), a32 = m_S.coeff(f + 2, f + 1),
409
+
410
+ a88 = m_S.coeff(l - 1, l - 1), a89 = m_S.coeff(l - 1, l), a98 = m_S.coeff(l, l - 1),
411
+ a99 = m_S.coeff(l, l),
412
+
413
+ b11 = m_T.coeff(f, f), b12 = m_T.coeff(f, f + 1), b22 = m_T.coeff(f + 1, f + 1),
414
+
415
+ b88 = m_T.coeff(l - 1, l - 1), b89 = m_T.coeff(l - 1, l), b99 = m_T.coeff(l, l);
416
+
417
+ x = ((a88 / b88 - a11 / b11) * (a99 / b99 - a11 / b11) - (a89 / b99) * (a98 / b88) +
418
+ (a98 / b88) * (b89 / b99) * (a11 / b11)) *
419
+ (b11 / a21) +
420
+ a12 / b22 - (a11 / b11) * (b12 / b22);
421
+ y = (a22 / b22 - a11 / b11) - (a21 / b11) * (b12 / b22) - (a88 / b88 - a11 / b11) - (a99 / b99 - a11 / b11) +
422
+ (a98 / b88) * (b89 / b99);
423
+ z = a32 / b22;
424
+ }
425
+
426
+ JRs G;
427
+
428
+ for (Index k = f; k <= l - 2; k++) {
429
+ // variables for Householder reflections
430
+ Vector2s essential2;
431
+ Scalar tau, beta;
432
+
433
+ Vector3s hr(x, y, z);
434
+
435
+ // Q_k to annihilate S(k+1,k-1) and S(k+2,k-1)
436
+ hr.makeHouseholderInPlace(tau, beta);
437
+ essential2 = hr.template bottomRows<2>();
438
+ Index fc = (std::max)(k - 1, Index(0)); // first col to update
439
+ m_S.template middleRows<3>(k).rightCols(dim - fc).applyHouseholderOnTheLeft(essential2, tau, m_workspace.data());
440
+ m_T.template middleRows<3>(k).rightCols(dim - fc).applyHouseholderOnTheLeft(essential2, tau, m_workspace.data());
441
+ if (m_computeQZ) m_Q.template middleCols<3>(k).applyHouseholderOnTheRight(essential2, tau, m_workspace.data());
442
+ if (k > f) m_S.coeffRef(k + 2, k - 1) = m_S.coeffRef(k + 1, k - 1) = Scalar(0.0);
443
+
444
+ // Z_{k1} to annihilate T(k+2,k+1) and T(k+2,k)
445
+ hr << m_T.coeff(k + 2, k + 2), m_T.coeff(k + 2, k), m_T.coeff(k + 2, k + 1);
446
+ hr.makeHouseholderInPlace(tau, beta);
447
+ essential2 = hr.template bottomRows<2>();
315
448
  {
316
- using std::abs;
317
- using std::sqrt;
318
- const Index dim=m_S.cols();
319
- if (abs(m_S.coeff(i+1,i))==Scalar(0))
320
- return;
321
- Index j = findSmallDiagEntry(i,i+1);
322
- if (j==i-1)
323
- {
324
- // block of (S T^{-1})
325
- Matrix2s STi = m_T.template block<2,2>(i,i).template triangularView<Upper>().
326
- template solve<OnTheRight>(m_S.template block<2,2>(i,i));
327
- Scalar p = Scalar(0.5)*(STi(0,0)-STi(1,1));
328
- Scalar q = p*p + STi(1,0)*STi(0,1);
329
- if (q>=0) {
330
- Scalar z = sqrt(q);
331
- // one QR-like iteration for ABi - lambda I
332
- // is enough - when we know exact eigenvalue in advance,
333
- // convergence is immediate
334
- JRs G;
335
- if (p>=0)
336
- G.makeGivens(p + z, STi(1,0));
337
- else
338
- G.makeGivens(p - z, STi(1,0));
339
- m_S.rightCols(dim-i).applyOnTheLeft(i,i+1,G.adjoint());
340
- m_T.rightCols(dim-i).applyOnTheLeft(i,i+1,G.adjoint());
341
- // update Q
342
- if (m_computeQZ)
343
- m_Q.applyOnTheRight(i,i+1,G);
344
-
345
- G.makeGivens(m_T.coeff(i+1,i+1), m_T.coeff(i+1,i));
346
- m_S.topRows(i+2).applyOnTheRight(i+1,i,G);
347
- m_T.topRows(i+2).applyOnTheRight(i+1,i,G);
348
- // update Z
349
- if (m_computeQZ)
350
- m_Z.applyOnTheLeft(i+1,i,G.adjoint());
351
-
352
- m_S.coeffRef(i+1,i) = Scalar(0.0);
353
- m_T.coeffRef(i+1,i) = Scalar(0.0);
354
- }
355
- }
356
- else
357
- {
358
- pushDownZero(j,i,i+1);
359
- }
449
+ Index lr = (std::min)(k + 4, dim); // last row to update
450
+ Map<Matrix<Scalar, Dynamic, 1> > tmp(m_workspace.data(), lr);
451
+ // S
452
+ tmp.noalias() = m_S.template middleCols<2>(k).topRows(lr) * essential2;
453
+ tmp += m_S.col(k + 2).head(lr);
454
+ m_S.col(k + 2).head(lr) -= tau * tmp;
455
+ m_S.template middleCols<2>(k).topRows(lr).noalias() -= (tau * tmp) * essential2.adjoint();
456
+ // T
457
+ tmp = m_T.template middleCols<2>(k).topRows(lr) * essential2;
458
+ tmp += m_T.col(k + 2).head(lr);
459
+ m_T.col(k + 2).head(lr) -= tau * tmp;
460
+ m_T.template middleCols<2>(k).topRows(lr).noalias() -= (tau * tmp) * essential2.adjoint();
360
461
  }
361
-
362
- /** \internal use zero in T(z,z) to zero S(l,l-1), working in block f..l */
363
- template<typename MatrixType>
364
- inline void RealQZ<MatrixType>::pushDownZero(Index z, Index f, Index l)
365
- {
366
- JRs G;
367
- const Index dim = m_S.cols();
368
- for (Index zz=z; zz<l; zz++)
369
- {
370
- // push 0 down
371
- Index firstColS = zz>f ? (zz-1) : zz;
372
- G.makeGivens(m_T.coeff(zz, zz+1), m_T.coeff(zz+1, zz+1));
373
- m_S.rightCols(dim-firstColS).applyOnTheLeft(zz,zz+1,G.adjoint());
374
- m_T.rightCols(dim-zz).applyOnTheLeft(zz,zz+1,G.adjoint());
375
- m_T.coeffRef(zz+1,zz+1) = Scalar(0.0);
376
- // update Q
377
- if (m_computeQZ)
378
- m_Q.applyOnTheRight(zz,zz+1,G);
379
- // kill S(zz+1, zz-1)
380
- if (zz>f)
381
- {
382
- G.makeGivens(m_S.coeff(zz+1, zz), m_S.coeff(zz+1,zz-1));
383
- m_S.topRows(zz+2).applyOnTheRight(zz, zz-1,G);
384
- m_T.topRows(zz+1).applyOnTheRight(zz, zz-1,G);
385
- m_S.coeffRef(zz+1,zz-1) = Scalar(0.0);
386
- // update Z
387
- if (m_computeQZ)
388
- m_Z.applyOnTheLeft(zz,zz-1,G.adjoint());
389
- }
390
- }
391
- // finally kill S(l,l-1)
392
- G.makeGivens(m_S.coeff(l,l), m_S.coeff(l,l-1));
393
- m_S.applyOnTheRight(l,l-1,G);
394
- m_T.applyOnTheRight(l,l-1,G);
395
- m_S.coeffRef(l,l-1)=Scalar(0.0);
396
- // update Z
397
- if (m_computeQZ)
398
- m_Z.applyOnTheLeft(l,l-1,G.adjoint());
462
+ if (m_computeQZ) {
463
+ // Z
464
+ Map<Matrix<Scalar, 1, Dynamic> > tmp(m_workspace.data(), dim);
465
+ tmp.noalias() = essential2.adjoint() * (m_Z.template middleRows<2>(k));
466
+ tmp += m_Z.row(k + 2);
467
+ m_Z.row(k + 2) -= tau * tmp;
468
+ m_Z.template middleRows<2>(k).noalias() -= essential2 * (tau * tmp);
399
469
  }
400
-
401
- /** \internal QR-like iterative step for block f..l */
402
- template<typename MatrixType>
403
- inline void RealQZ<MatrixType>::step(Index f, Index l, Index iter)
470
+ m_T.coeffRef(k + 2, k) = m_T.coeffRef(k + 2, k + 1) = Scalar(0.0);
471
+
472
+ // Z_{k2} to annihilate T(k+1,k)
473
+ G.makeGivens(m_T.coeff(k + 1, k + 1), m_T.coeff(k + 1, k));
474
+ m_S.applyOnTheRight(k + 1, k, G);
475
+ m_T.applyOnTheRight(k + 1, k, G);
476
+ // update Z
477
+ if (m_computeQZ) m_Z.applyOnTheLeft(k + 1, k, G.adjoint());
478
+ m_T.coeffRef(k + 1, k) = Scalar(0.0);
479
+
480
+ // update x,y,z
481
+ x = m_S.coeff(k + 1, k);
482
+ y = m_S.coeff(k + 2, k);
483
+ if (k < l - 2) z = m_S.coeff(k + 3, k);
484
+ } // loop over k
485
+
486
+ // Q_{n-1} to annihilate y = S(l,l-2)
487
+ G.makeGivens(x, y);
488
+ m_S.applyOnTheLeft(l - 1, l, G.adjoint());
489
+ m_T.applyOnTheLeft(l - 1, l, G.adjoint());
490
+ if (m_computeQZ) m_Q.applyOnTheRight(l - 1, l, G);
491
+ m_S.coeffRef(l, l - 2) = Scalar(0.0);
492
+
493
+ // Z_{n-1} to annihilate T(l,l-1)
494
+ G.makeGivens(m_T.coeff(l, l), m_T.coeff(l, l - 1));
495
+ m_S.applyOnTheRight(l, l - 1, G);
496
+ m_T.applyOnTheRight(l, l - 1, G);
497
+ if (m_computeQZ) m_Z.applyOnTheLeft(l, l - 1, G.adjoint());
498
+ m_T.coeffRef(l, l - 1) = Scalar(0.0);
499
+ }
500
+
501
+ template <typename MatrixType>
502
+ RealQZ<MatrixType>& RealQZ<MatrixType>::compute(const MatrixType& A_in, const MatrixType& B_in, bool computeQZ) {
503
+ const Index dim = A_in.cols();
504
+
505
+ eigen_assert(A_in.rows() == dim && A_in.cols() == dim && B_in.rows() == dim && B_in.cols() == dim &&
506
+ "Need square matrices of the same dimension");
507
+
508
+ m_isInitialized = true;
509
+ m_computeQZ = computeQZ;
510
+ m_S = A_in;
511
+ m_T = B_in;
512
+ m_workspace.resize(dim * 2);
513
+ m_global_iter = 0;
514
+
515
+ // entrance point: hessenberg triangular decomposition
516
+ hessenbergTriangular();
517
+ // compute L1 vector norms of T, S into m_normOfS, m_normOfT
518
+ computeNorms();
519
+
520
+ Index l = dim - 1, f, local_iter = 0;
521
+
522
+ while (l > 0 && local_iter < m_maxIters) {
523
+ f = findSmallSubdiagEntry(l);
524
+ // now rows and columns f..l (including) decouple from the rest of the problem
525
+ if (f > 0) m_S.coeffRef(f, f - 1) = Scalar(0.0);
526
+ if (f == l) // One root found
404
527
  {
405
- using std::abs;
406
- const Index dim = m_S.cols();
407
-
408
- // x, y, z
409
- Scalar x, y, z;
410
- if (iter==10)
411
- {
412
- // Wilkinson ad hoc shift
413
- const Scalar
414
- a11=m_S.coeff(f+0,f+0), a12=m_S.coeff(f+0,f+1),
415
- a21=m_S.coeff(f+1,f+0), a22=m_S.coeff(f+1,f+1), a32=m_S.coeff(f+2,f+1),
416
- b12=m_T.coeff(f+0,f+1),
417
- b11i=Scalar(1.0)/m_T.coeff(f+0,f+0),
418
- b22i=Scalar(1.0)/m_T.coeff(f+1,f+1),
419
- a87=m_S.coeff(l-1,l-2),
420
- a98=m_S.coeff(l-0,l-1),
421
- b77i=Scalar(1.0)/m_T.coeff(l-2,l-2),
422
- b88i=Scalar(1.0)/m_T.coeff(l-1,l-1);
423
- Scalar ss = abs(a87*b77i) + abs(a98*b88i),
424
- lpl = Scalar(1.5)*ss,
425
- ll = ss*ss;
426
- x = ll + a11*a11*b11i*b11i - lpl*a11*b11i + a12*a21*b11i*b22i
427
- - a11*a21*b12*b11i*b11i*b22i;
428
- y = a11*a21*b11i*b11i - lpl*a21*b11i + a21*a22*b11i*b22i
429
- - a21*a21*b12*b11i*b11i*b22i;
430
- z = a21*a32*b11i*b22i;
431
- }
432
- else if (iter==16)
433
- {
434
- // another exceptional shift
435
- x = m_S.coeff(f,f)/m_T.coeff(f,f)-m_S.coeff(l,l)/m_T.coeff(l,l) + m_S.coeff(l,l-1)*m_T.coeff(l-1,l) /
436
- (m_T.coeff(l-1,l-1)*m_T.coeff(l,l));
437
- y = m_S.coeff(f+1,f)/m_T.coeff(f,f);
438
- z = 0;
439
- }
440
- else if (iter>23 && !(iter%8))
441
- {
442
- // extremely exceptional shift
443
- x = internal::random<Scalar>(-1.0,1.0);
444
- y = internal::random<Scalar>(-1.0,1.0);
445
- z = internal::random<Scalar>(-1.0,1.0);
446
- }
447
- else
448
- {
449
- // Compute the shifts: (x,y,z,0...) = (AB^-1 - l1 I) (AB^-1 - l2 I) e1
450
- // where l1 and l2 are the eigenvalues of the 2x2 matrix C = U V^-1 where
451
- // U and V are 2x2 bottom right sub matrices of A and B. Thus:
452
- // = AB^-1AB^-1 + l1 l2 I - (l1+l2)(AB^-1)
453
- // = AB^-1AB^-1 + det(M) - tr(M)(AB^-1)
454
- // Since we are only interested in having x, y, z with a correct ratio, we have:
455
- const Scalar
456
- a11 = m_S.coeff(f,f), a12 = m_S.coeff(f,f+1),
457
- a21 = m_S.coeff(f+1,f), a22 = m_S.coeff(f+1,f+1),
458
- a32 = m_S.coeff(f+2,f+1),
459
-
460
- a88 = m_S.coeff(l-1,l-1), a89 = m_S.coeff(l-1,l),
461
- a98 = m_S.coeff(l,l-1), a99 = m_S.coeff(l,l),
462
-
463
- b11 = m_T.coeff(f,f), b12 = m_T.coeff(f,f+1),
464
- b22 = m_T.coeff(f+1,f+1),
465
-
466
- b88 = m_T.coeff(l-1,l-1), b89 = m_T.coeff(l-1,l),
467
- b99 = m_T.coeff(l,l);
468
-
469
- x = ( (a88/b88 - a11/b11)*(a99/b99 - a11/b11) - (a89/b99)*(a98/b88) + (a98/b88)*(b89/b99)*(a11/b11) ) * (b11/a21)
470
- + a12/b22 - (a11/b11)*(b12/b22);
471
- y = (a22/b22-a11/b11) - (a21/b11)*(b12/b22) - (a88/b88-a11/b11) - (a99/b99-a11/b11) + (a98/b88)*(b89/b99);
472
- z = a32/b22;
473
- }
474
-
475
- JRs G;
476
-
477
- for (Index k=f; k<=l-2; k++)
478
- {
479
- // variables for Householder reflections
480
- Vector2s essential2;
481
- Scalar tau, beta;
482
-
483
- Vector3s hr(x,y,z);
484
-
485
- // Q_k to annihilate S(k+1,k-1) and S(k+2,k-1)
486
- hr.makeHouseholderInPlace(tau, beta);
487
- essential2 = hr.template bottomRows<2>();
488
- Index fc=(std::max)(k-1,Index(0)); // first col to update
489
- m_S.template middleRows<3>(k).rightCols(dim-fc).applyHouseholderOnTheLeft(essential2, tau, m_workspace.data());
490
- m_T.template middleRows<3>(k).rightCols(dim-fc).applyHouseholderOnTheLeft(essential2, tau, m_workspace.data());
491
- if (m_computeQZ)
492
- m_Q.template middleCols<3>(k).applyHouseholderOnTheRight(essential2, tau, m_workspace.data());
493
- if (k>f)
494
- m_S.coeffRef(k+2,k-1) = m_S.coeffRef(k+1,k-1) = Scalar(0.0);
495
-
496
- // Z_{k1} to annihilate T(k+2,k+1) and T(k+2,k)
497
- hr << m_T.coeff(k+2,k+2),m_T.coeff(k+2,k),m_T.coeff(k+2,k+1);
498
- hr.makeHouseholderInPlace(tau, beta);
499
- essential2 = hr.template bottomRows<2>();
500
- {
501
- Index lr = (std::min)(k+4,dim); // last row to update
502
- Map<Matrix<Scalar,Dynamic,1> > tmp(m_workspace.data(),lr);
503
- // S
504
- tmp = m_S.template middleCols<2>(k).topRows(lr) * essential2;
505
- tmp += m_S.col(k+2).head(lr);
506
- m_S.col(k+2).head(lr) -= tau*tmp;
507
- m_S.template middleCols<2>(k).topRows(lr) -= (tau*tmp) * essential2.adjoint();
508
- // T
509
- tmp = m_T.template middleCols<2>(k).topRows(lr) * essential2;
510
- tmp += m_T.col(k+2).head(lr);
511
- m_T.col(k+2).head(lr) -= tau*tmp;
512
- m_T.template middleCols<2>(k).topRows(lr) -= (tau*tmp) * essential2.adjoint();
513
- }
514
- if (m_computeQZ)
515
- {
516
- // Z
517
- Map<Matrix<Scalar,1,Dynamic> > tmp(m_workspace.data(),dim);
518
- tmp = essential2.adjoint()*(m_Z.template middleRows<2>(k));
519
- tmp += m_Z.row(k+2);
520
- m_Z.row(k+2) -= tau*tmp;
521
- m_Z.template middleRows<2>(k) -= essential2 * (tau*tmp);
522
- }
523
- m_T.coeffRef(k+2,k) = m_T.coeffRef(k+2,k+1) = Scalar(0.0);
524
-
525
- // Z_{k2} to annihilate T(k+1,k)
526
- G.makeGivens(m_T.coeff(k+1,k+1), m_T.coeff(k+1,k));
527
- m_S.applyOnTheRight(k+1,k,G);
528
- m_T.applyOnTheRight(k+1,k,G);
529
- // update Z
530
- if (m_computeQZ)
531
- m_Z.applyOnTheLeft(k+1,k,G.adjoint());
532
- m_T.coeffRef(k+1,k) = Scalar(0.0);
533
-
534
- // update x,y,z
535
- x = m_S.coeff(k+1,k);
536
- y = m_S.coeff(k+2,k);
537
- if (k < l-2)
538
- z = m_S.coeff(k+3,k);
539
- } // loop over k
540
-
541
- // Q_{n-1} to annihilate y = S(l,l-2)
542
- G.makeGivens(x,y);
543
- m_S.applyOnTheLeft(l-1,l,G.adjoint());
544
- m_T.applyOnTheLeft(l-1,l,G.adjoint());
545
- if (m_computeQZ)
546
- m_Q.applyOnTheRight(l-1,l,G);
547
- m_S.coeffRef(l,l-2) = Scalar(0.0);
548
-
549
- // Z_{n-1} to annihilate T(l,l-1)
550
- G.makeGivens(m_T.coeff(l,l),m_T.coeff(l,l-1));
551
- m_S.applyOnTheRight(l,l-1,G);
552
- m_T.applyOnTheRight(l,l-1,G);
553
- if (m_computeQZ)
554
- m_Z.applyOnTheLeft(l,l-1,G.adjoint());
555
- m_T.coeffRef(l,l-1) = Scalar(0.0);
556
- }
557
-
558
- template<typename MatrixType>
559
- RealQZ<MatrixType>& RealQZ<MatrixType>::compute(const MatrixType& A_in, const MatrixType& B_in, bool computeQZ)
528
+ l--;
529
+ local_iter = 0;
530
+ } else if (f == l - 1) // Two roots found
560
531
  {
561
-
562
- const Index dim = A_in.cols();
563
-
564
- eigen_assert (A_in.rows()==dim && A_in.cols()==dim
565
- && B_in.rows()==dim && B_in.cols()==dim
566
- && "Need square matrices of the same dimension");
567
-
568
- m_isInitialized = true;
569
- m_computeQZ = computeQZ;
570
- m_S = A_in; m_T = B_in;
571
- m_workspace.resize(dim*2);
572
- m_global_iter = 0;
573
-
574
- // entrance point: hessenberg triangular decomposition
575
- hessenbergTriangular();
576
- // compute L1 vector norms of T, S into m_normOfS, m_normOfT
577
- computeNorms();
578
-
579
- Index l = dim-1,
580
- f,
581
- local_iter = 0;
582
-
583
- while (l>0 && local_iter<m_maxIters)
584
- {
585
- f = findSmallSubdiagEntry(l);
586
- // now rows and columns f..l (including) decouple from the rest of the problem
587
- if (f>0) m_S.coeffRef(f,f-1) = Scalar(0.0);
588
- if (f == l) // One root found
589
- {
590
- l--;
591
- local_iter = 0;
592
- }
593
- else if (f == l-1) // Two roots found
594
- {
595
- splitOffTwoRows(f);
596
- l -= 2;
597
- local_iter = 0;
598
- }
599
- else // No convergence yet
600
- {
601
- // if there's zero on diagonal of T, we can isolate an eigenvalue with Givens rotations
602
- Index z = findSmallDiagEntry(f,l);
603
- if (z>=f)
604
- {
605
- // zero found
606
- pushDownZero(z,f,l);
607
- }
608
- else
609
- {
610
- // We are sure now that S.block(f,f, l-f+1,l-f+1) is underuced upper-Hessenberg
611
- // and T.block(f,f, l-f+1,l-f+1) is invertible uper-triangular, which allows to
612
- // apply a QR-like iteration to rows and columns f..l.
613
- step(f,l, local_iter);
614
- local_iter++;
615
- m_global_iter++;
616
- }
617
- }
532
+ splitOffTwoRows(f);
533
+ l -= 2;
534
+ local_iter = 0;
535
+ } else // No convergence yet
536
+ {
537
+ // if there's zero on diagonal of T, we can isolate an eigenvalue with Givens rotations
538
+ Index z = findSmallDiagEntry(f, l);
539
+ if (z >= f) {
540
+ // zero found
541
+ pushDownZero(z, f, l);
542
+ } else {
543
+ // We are sure now that S.block(f,f, l-f+1,l-f+1) is underuced upper-Hessenberg
544
+ // and T.block(f,f, l-f+1,l-f+1) is invertible uper-triangular, which allows to
545
+ // apply a QR-like iteration to rows and columns f..l.
546
+ step(f, l, local_iter);
547
+ local_iter++;
548
+ m_global_iter++;
618
549
  }
619
- // check if we converged before reaching iterations limit
620
- m_info = (local_iter<m_maxIters) ? Success : NoConvergence;
621
-
622
- // For each non triangular 2x2 diagonal block of S,
623
- // reduce the respective 2x2 diagonal block of T to positive diagonal form using 2x2 SVD.
624
- // This step is not mandatory for QZ, but it does help further extraction of eigenvalues/eigenvectors,
625
- // and is in par with Lapack/Matlab QZ.
626
- if(m_info==Success)
627
- {
628
- for(Index i=0; i<dim-1; ++i)
629
- {
630
- if(m_S.coeff(i+1, i) != Scalar(0))
631
- {
632
- JacobiRotation<Scalar> j_left, j_right;
633
- internal::real_2x2_jacobi_svd(m_T, i, i+1, &j_left, &j_right);
634
-
635
- // Apply resulting Jacobi rotations
636
- m_S.applyOnTheLeft(i,i+1,j_left);
637
- m_S.applyOnTheRight(i,i+1,j_right);
638
- m_T.applyOnTheLeft(i,i+1,j_left);
639
- m_T.applyOnTheRight(i,i+1,j_right);
640
- m_T(i+1,i) = m_T(i,i+1) = Scalar(0);
641
-
642
- if(m_computeQZ) {
643
- m_Q.applyOnTheRight(i,i+1,j_left.transpose());
644
- m_Z.applyOnTheLeft(i,i+1,j_right.transpose());
645
- }
646
-
647
- i++;
648
- }
550
+ }
551
+ }
552
+ // check if we converged before reaching iterations limit
553
+ m_info = (local_iter < m_maxIters) ? Success : NoConvergence;
554
+
555
+ // For each non triangular 2x2 diagonal block of S,
556
+ // reduce the respective 2x2 diagonal block of T to positive diagonal form using 2x2 SVD.
557
+ // This step is not mandatory for QZ, but it does help further extraction of eigenvalues/eigenvectors,
558
+ // and is in par with Lapack/Matlab QZ.
559
+ if (m_info == Success) {
560
+ for (Index i = 0; i < dim - 1; ++i) {
561
+ if (!numext::is_exactly_zero(m_S.coeff(i + 1, i))) {
562
+ JacobiRotation<Scalar> j_left, j_right;
563
+ internal::real_2x2_jacobi_svd(m_T, i, i + 1, &j_left, &j_right);
564
+
565
+ // Apply resulting Jacobi rotations
566
+ m_S.applyOnTheLeft(i, i + 1, j_left);
567
+ m_S.applyOnTheRight(i, i + 1, j_right);
568
+ m_T.applyOnTheLeft(i, i + 1, j_left);
569
+ m_T.applyOnTheRight(i, i + 1, j_right);
570
+ m_T(i + 1, i) = m_T(i, i + 1) = Scalar(0);
571
+
572
+ if (m_computeQZ) {
573
+ m_Q.applyOnTheRight(i, i + 1, j_left.transpose());
574
+ m_Z.applyOnTheLeft(i, i + 1, j_right.transpose());
649
575
  }
576
+
577
+ i++;
650
578
  }
579
+ }
580
+ }
651
581
 
652
- return *this;
653
- } // end compute
582
+ return *this;
583
+ } // end compute
654
584
 
655
- } // end namespace Eigen
585
+ } // end namespace Eigen
656
586
 
657
- #endif //EIGEN_REAL_QZ
587
+ #endif // EIGEN_REAL_QZ