tomoto 0.2.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (369) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/README.md +8 -10
  4. data/ext/tomoto/ct.cpp +11 -11
  5. data/ext/tomoto/dmr.cpp +14 -13
  6. data/ext/tomoto/dt.cpp +14 -14
  7. data/ext/tomoto/extconf.rb +7 -5
  8. data/ext/tomoto/gdmr.cpp +7 -7
  9. data/ext/tomoto/hdp.cpp +9 -9
  10. data/ext/tomoto/hlda.cpp +13 -13
  11. data/ext/tomoto/hpa.cpp +5 -5
  12. data/ext/tomoto/lda.cpp +42 -39
  13. data/ext/tomoto/llda.cpp +6 -6
  14. data/ext/tomoto/mglda.cpp +15 -15
  15. data/ext/tomoto/pa.cpp +6 -6
  16. data/ext/tomoto/plda.cpp +6 -6
  17. data/ext/tomoto/slda.cpp +8 -8
  18. data/ext/tomoto/{ext.cpp → tomoto.cpp} +8 -8
  19. data/ext/tomoto/utils.h +16 -70
  20. data/lib/tomoto/version.rb +1 -1
  21. data/lib/tomoto.rb +5 -1
  22. data/vendor/EigenRand/EigenRand/Core.h +10 -10
  23. data/vendor/EigenRand/EigenRand/Dists/Basic.h +208 -9
  24. data/vendor/EigenRand/EigenRand/Dists/Discrete.h +52 -31
  25. data/vendor/EigenRand/EigenRand/Dists/GammaPoisson.h +9 -8
  26. data/vendor/EigenRand/EigenRand/Dists/NormalExp.h +28 -21
  27. data/vendor/EigenRand/EigenRand/EigenRand +11 -6
  28. data/vendor/EigenRand/EigenRand/Macro.h +13 -7
  29. data/vendor/EigenRand/EigenRand/MorePacketMath.h +348 -740
  30. data/vendor/EigenRand/EigenRand/MvDists/Multinomial.h +5 -3
  31. data/vendor/EigenRand/EigenRand/MvDists/MvNormal.h +9 -3
  32. data/vendor/EigenRand/EigenRand/PacketFilter.h +11 -253
  33. data/vendor/EigenRand/EigenRand/PacketRandomEngine.h +21 -47
  34. data/vendor/EigenRand/EigenRand/RandUtils.h +50 -344
  35. data/vendor/EigenRand/EigenRand/arch/AVX/MorePacketMath.h +619 -0
  36. data/vendor/EigenRand/EigenRand/arch/AVX/PacketFilter.h +149 -0
  37. data/vendor/EigenRand/EigenRand/arch/AVX/RandUtils.h +228 -0
  38. data/vendor/EigenRand/EigenRand/arch/NEON/MorePacketMath.h +473 -0
  39. data/vendor/EigenRand/EigenRand/arch/NEON/PacketFilter.h +142 -0
  40. data/vendor/EigenRand/EigenRand/arch/NEON/RandUtils.h +126 -0
  41. data/vendor/EigenRand/EigenRand/arch/SSE/MorePacketMath.h +501 -0
  42. data/vendor/EigenRand/EigenRand/arch/SSE/PacketFilter.h +133 -0
  43. data/vendor/EigenRand/EigenRand/arch/SSE/RandUtils.h +120 -0
  44. data/vendor/EigenRand/EigenRand/doc.h +24 -12
  45. data/vendor/EigenRand/README.md +57 -4
  46. data/vendor/eigen/COPYING.APACHE +203 -0
  47. data/vendor/eigen/COPYING.BSD +1 -1
  48. data/vendor/eigen/COPYING.MINPACK +51 -52
  49. data/vendor/eigen/Eigen/Cholesky +0 -1
  50. data/vendor/eigen/Eigen/Core +112 -265
  51. data/vendor/eigen/Eigen/Eigenvalues +2 -3
  52. data/vendor/eigen/Eigen/Geometry +5 -8
  53. data/vendor/eigen/Eigen/Householder +0 -1
  54. data/vendor/eigen/Eigen/Jacobi +0 -1
  55. data/vendor/eigen/Eigen/KLUSupport +41 -0
  56. data/vendor/eigen/Eigen/LU +2 -5
  57. data/vendor/eigen/Eigen/OrderingMethods +0 -3
  58. data/vendor/eigen/Eigen/PaStiXSupport +1 -0
  59. data/vendor/eigen/Eigen/PardisoSupport +0 -0
  60. data/vendor/eigen/Eigen/QR +2 -3
  61. data/vendor/eigen/Eigen/QtAlignedMalloc +0 -1
  62. data/vendor/eigen/Eigen/SVD +0 -1
  63. data/vendor/eigen/Eigen/Sparse +0 -2
  64. data/vendor/eigen/Eigen/SparseCholesky +0 -8
  65. data/vendor/eigen/Eigen/SparseLU +4 -0
  66. data/vendor/eigen/Eigen/SparseQR +0 -1
  67. data/vendor/eigen/Eigen/src/Cholesky/LDLT.h +42 -27
  68. data/vendor/eigen/Eigen/src/Cholesky/LLT.h +39 -23
  69. data/vendor/eigen/Eigen/src/CholmodSupport/CholmodSupport.h +90 -47
  70. data/vendor/eigen/Eigen/src/Core/ArithmeticSequence.h +413 -0
  71. data/vendor/eigen/Eigen/src/Core/Array.h +99 -11
  72. data/vendor/eigen/Eigen/src/Core/ArrayBase.h +3 -3
  73. data/vendor/eigen/Eigen/src/Core/ArrayWrapper.h +21 -21
  74. data/vendor/eigen/Eigen/src/Core/Assign.h +1 -1
  75. data/vendor/eigen/Eigen/src/Core/AssignEvaluator.h +125 -50
  76. data/vendor/eigen/Eigen/src/Core/Assign_MKL.h +10 -10
  77. data/vendor/eigen/Eigen/src/Core/BandMatrix.h +16 -16
  78. data/vendor/eigen/Eigen/src/Core/Block.h +56 -60
  79. data/vendor/eigen/Eigen/src/Core/BooleanRedux.h +29 -31
  80. data/vendor/eigen/Eigen/src/Core/CommaInitializer.h +7 -3
  81. data/vendor/eigen/Eigen/src/Core/CoreEvaluators.h +325 -272
  82. data/vendor/eigen/Eigen/src/Core/CoreIterators.h +5 -0
  83. data/vendor/eigen/Eigen/src/Core/CwiseBinaryOp.h +21 -22
  84. data/vendor/eigen/Eigen/src/Core/CwiseNullaryOp.h +153 -18
  85. data/vendor/eigen/Eigen/src/Core/CwiseUnaryOp.h +6 -6
  86. data/vendor/eigen/Eigen/src/Core/CwiseUnaryView.h +14 -10
  87. data/vendor/eigen/Eigen/src/Core/DenseBase.h +132 -42
  88. data/vendor/eigen/Eigen/src/Core/DenseCoeffsBase.h +25 -21
  89. data/vendor/eigen/Eigen/src/Core/DenseStorage.h +153 -71
  90. data/vendor/eigen/Eigen/src/Core/Diagonal.h +21 -23
  91. data/vendor/eigen/Eigen/src/Core/DiagonalMatrix.h +50 -2
  92. data/vendor/eigen/Eigen/src/Core/DiagonalProduct.h +1 -1
  93. data/vendor/eigen/Eigen/src/Core/Dot.h +10 -10
  94. data/vendor/eigen/Eigen/src/Core/EigenBase.h +10 -9
  95. data/vendor/eigen/Eigen/src/Core/ForceAlignedAccess.h +8 -4
  96. data/vendor/eigen/Eigen/src/Core/Fuzzy.h +3 -3
  97. data/vendor/eigen/Eigen/src/Core/GeneralProduct.h +20 -10
  98. data/vendor/eigen/Eigen/src/Core/GenericPacketMath.h +599 -152
  99. data/vendor/eigen/Eigen/src/Core/GlobalFunctions.h +40 -33
  100. data/vendor/eigen/Eigen/src/Core/IO.h +40 -7
  101. data/vendor/eigen/Eigen/src/Core/IndexedView.h +237 -0
  102. data/vendor/eigen/Eigen/src/Core/Inverse.h +9 -10
  103. data/vendor/eigen/Eigen/src/Core/Map.h +7 -7
  104. data/vendor/eigen/Eigen/src/Core/MapBase.h +10 -3
  105. data/vendor/eigen/Eigen/src/Core/MathFunctions.h +767 -125
  106. data/vendor/eigen/Eigen/src/Core/MathFunctionsImpl.h +118 -19
  107. data/vendor/eigen/Eigen/src/Core/Matrix.h +131 -25
  108. data/vendor/eigen/Eigen/src/Core/MatrixBase.h +21 -3
  109. data/vendor/eigen/Eigen/src/Core/NestByValue.h +25 -50
  110. data/vendor/eigen/Eigen/src/Core/NoAlias.h +4 -3
  111. data/vendor/eigen/Eigen/src/Core/NumTraits.h +107 -20
  112. data/vendor/eigen/Eigen/src/Core/PartialReduxEvaluator.h +232 -0
  113. data/vendor/eigen/Eigen/src/Core/PermutationMatrix.h +3 -31
  114. data/vendor/eigen/Eigen/src/Core/PlainObjectBase.h +152 -59
  115. data/vendor/eigen/Eigen/src/Core/Product.h +30 -25
  116. data/vendor/eigen/Eigen/src/Core/ProductEvaluators.h +192 -125
  117. data/vendor/eigen/Eigen/src/Core/Random.h +37 -1
  118. data/vendor/eigen/Eigen/src/Core/Redux.h +180 -170
  119. data/vendor/eigen/Eigen/src/Core/Ref.h +121 -23
  120. data/vendor/eigen/Eigen/src/Core/Replicate.h +8 -8
  121. data/vendor/eigen/Eigen/src/Core/Reshaped.h +454 -0
  122. data/vendor/eigen/Eigen/src/Core/ReturnByValue.h +7 -5
  123. data/vendor/eigen/Eigen/src/Core/Reverse.h +18 -12
  124. data/vendor/eigen/Eigen/src/Core/Select.h +8 -6
  125. data/vendor/eigen/Eigen/src/Core/SelfAdjointView.h +33 -20
  126. data/vendor/eigen/Eigen/src/Core/Solve.h +14 -14
  127. data/vendor/eigen/Eigen/src/Core/SolveTriangular.h +16 -16
  128. data/vendor/eigen/Eigen/src/Core/SolverBase.h +41 -3
  129. data/vendor/eigen/Eigen/src/Core/StableNorm.h +100 -70
  130. data/vendor/eigen/Eigen/src/Core/StlIterators.h +463 -0
  131. data/vendor/eigen/Eigen/src/Core/Stride.h +9 -4
  132. data/vendor/eigen/Eigen/src/Core/Swap.h +5 -4
  133. data/vendor/eigen/Eigen/src/Core/Transpose.h +88 -27
  134. data/vendor/eigen/Eigen/src/Core/Transpositions.h +26 -47
  135. data/vendor/eigen/Eigen/src/Core/TriangularMatrix.h +93 -75
  136. data/vendor/eigen/Eigen/src/Core/VectorBlock.h +5 -5
  137. data/vendor/eigen/Eigen/src/Core/VectorwiseOp.h +159 -70
  138. data/vendor/eigen/Eigen/src/Core/Visitor.h +137 -29
  139. data/vendor/eigen/Eigen/src/Core/arch/AVX/Complex.h +50 -129
  140. data/vendor/eigen/Eigen/src/Core/arch/AVX/MathFunctions.h +126 -337
  141. data/vendor/eigen/Eigen/src/Core/arch/AVX/PacketMath.h +1092 -155
  142. data/vendor/eigen/Eigen/src/Core/arch/AVX/TypeCasting.h +65 -1
  143. data/vendor/eigen/Eigen/src/Core/arch/AVX512/Complex.h +422 -0
  144. data/vendor/eigen/Eigen/src/Core/arch/AVX512/MathFunctions.h +207 -236
  145. data/vendor/eigen/Eigen/src/Core/arch/AVX512/PacketMath.h +1482 -495
  146. data/vendor/eigen/Eigen/src/Core/arch/AVX512/TypeCasting.h +89 -0
  147. data/vendor/eigen/Eigen/src/Core/arch/AltiVec/Complex.h +152 -165
  148. data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MathFunctions.h +19 -251
  149. data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2937 -0
  150. data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +221 -0
  151. data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +629 -0
  152. data/vendor/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h +2042 -392
  153. data/vendor/eigen/Eigen/src/Core/arch/CUDA/Complex.h +235 -80
  154. data/vendor/eigen/Eigen/src/Core/arch/Default/BFloat16.h +700 -0
  155. data/vendor/eigen/Eigen/src/Core/arch/Default/ConjHelper.h +102 -14
  156. data/vendor/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1649 -0
  157. data/vendor/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +110 -0
  158. data/vendor/eigen/Eigen/src/Core/arch/Default/Half.h +942 -0
  159. data/vendor/eigen/Eigen/src/Core/arch/Default/Settings.h +1 -1
  160. data/vendor/eigen/Eigen/src/Core/arch/Default/TypeCasting.h +120 -0
  161. data/vendor/eigen/Eigen/src/Core/arch/{CUDA → GPU}/MathFunctions.h +16 -4
  162. data/vendor/eigen/Eigen/src/Core/arch/GPU/PacketMath.h +1685 -0
  163. data/vendor/eigen/Eigen/src/Core/arch/GPU/TypeCasting.h +80 -0
  164. data/vendor/eigen/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
  165. data/vendor/eigen/Eigen/src/Core/arch/MSA/Complex.h +648 -0
  166. data/vendor/eigen/Eigen/src/Core/arch/MSA/MathFunctions.h +387 -0
  167. data/vendor/eigen/Eigen/src/Core/arch/MSA/PacketMath.h +1233 -0
  168. data/vendor/eigen/Eigen/src/Core/arch/NEON/Complex.h +313 -219
  169. data/vendor/eigen/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +183 -0
  170. data/vendor/eigen/Eigen/src/Core/arch/NEON/MathFunctions.h +54 -70
  171. data/vendor/eigen/Eigen/src/Core/arch/NEON/PacketMath.h +4376 -549
  172. data/vendor/eigen/Eigen/src/Core/arch/NEON/TypeCasting.h +1419 -0
  173. data/vendor/eigen/Eigen/src/Core/arch/SSE/Complex.h +59 -179
  174. data/vendor/eigen/Eigen/src/Core/arch/SSE/MathFunctions.h +65 -428
  175. data/vendor/eigen/Eigen/src/Core/arch/SSE/PacketMath.h +893 -283
  176. data/vendor/eigen/Eigen/src/Core/arch/SSE/TypeCasting.h +65 -0
  177. data/vendor/eigen/Eigen/src/Core/arch/SVE/MathFunctions.h +44 -0
  178. data/vendor/eigen/Eigen/src/Core/arch/SVE/PacketMath.h +752 -0
  179. data/vendor/eigen/Eigen/src/Core/arch/SVE/TypeCasting.h +49 -0
  180. data/vendor/eigen/Eigen/src/Core/arch/SYCL/InteropHeaders.h +232 -0
  181. data/vendor/eigen/Eigen/src/Core/arch/SYCL/MathFunctions.h +301 -0
  182. data/vendor/eigen/Eigen/src/Core/arch/SYCL/PacketMath.h +670 -0
  183. data/vendor/eigen/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +694 -0
  184. data/vendor/eigen/Eigen/src/Core/arch/SYCL/TypeCasting.h +85 -0
  185. data/vendor/eigen/Eigen/src/Core/arch/ZVector/Complex.h +212 -183
  186. data/vendor/eigen/Eigen/src/Core/arch/ZVector/MathFunctions.h +101 -5
  187. data/vendor/eigen/Eigen/src/Core/arch/ZVector/PacketMath.h +510 -395
  188. data/vendor/eigen/Eigen/src/Core/functors/AssignmentFunctors.h +11 -2
  189. data/vendor/eigen/Eigen/src/Core/functors/BinaryFunctors.h +112 -46
  190. data/vendor/eigen/Eigen/src/Core/functors/NullaryFunctors.h +31 -30
  191. data/vendor/eigen/Eigen/src/Core/functors/StlFunctors.h +32 -2
  192. data/vendor/eigen/Eigen/src/Core/functors/UnaryFunctors.h +355 -16
  193. data/vendor/eigen/Eigen/src/Core/products/GeneralBlockPanelKernel.h +1075 -586
  194. data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrix.h +49 -24
  195. data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +41 -35
  196. data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +6 -6
  197. data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +4 -2
  198. data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixVector.h +382 -483
  199. data/vendor/eigen/Eigen/src/Core/products/Parallelizer.h +22 -5
  200. data/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +53 -30
  201. data/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +16 -8
  202. data/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixVector.h +8 -6
  203. data/vendor/eigen/Eigen/src/Core/products/SelfadjointProduct.h +4 -4
  204. data/vendor/eigen/Eigen/src/Core/products/SelfadjointRank2Update.h +5 -4
  205. data/vendor/eigen/Eigen/src/Core/products/TriangularMatrixMatrix.h +33 -27
  206. data/vendor/eigen/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +14 -12
  207. data/vendor/eigen/Eigen/src/Core/products/TriangularSolverMatrix.h +36 -34
  208. data/vendor/eigen/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +8 -4
  209. data/vendor/eigen/Eigen/src/Core/products/TriangularSolverVector.h +13 -10
  210. data/vendor/eigen/Eigen/src/Core/util/BlasUtil.h +304 -119
  211. data/vendor/eigen/Eigen/src/Core/util/ConfigureVectorization.h +512 -0
  212. data/vendor/eigen/Eigen/src/Core/util/Constants.h +25 -9
  213. data/vendor/eigen/Eigen/src/Core/util/DisableStupidWarnings.h +26 -3
  214. data/vendor/eigen/Eigen/src/Core/util/ForwardDeclarations.h +29 -9
  215. data/vendor/eigen/Eigen/src/Core/util/IndexedViewHelper.h +186 -0
  216. data/vendor/eigen/Eigen/src/Core/util/IntegralConstant.h +272 -0
  217. data/vendor/eigen/Eigen/src/Core/util/MKL_support.h +8 -1
  218. data/vendor/eigen/Eigen/src/Core/util/Macros.h +709 -246
  219. data/vendor/eigen/Eigen/src/Core/util/Memory.h +222 -52
  220. data/vendor/eigen/Eigen/src/Core/util/Meta.h +355 -77
  221. data/vendor/eigen/Eigen/src/Core/util/ReenableStupidWarnings.h +5 -1
  222. data/vendor/eigen/Eigen/src/Core/util/ReshapedHelper.h +51 -0
  223. data/vendor/eigen/Eigen/src/Core/util/StaticAssert.h +8 -5
  224. data/vendor/eigen/Eigen/src/Core/util/SymbolicIndex.h +293 -0
  225. data/vendor/eigen/Eigen/src/Core/util/XprHelper.h +65 -30
  226. data/vendor/eigen/Eigen/src/Eigenvalues/ComplexEigenSolver.h +1 -1
  227. data/vendor/eigen/Eigen/src/Eigenvalues/ComplexSchur.h +7 -4
  228. data/vendor/eigen/Eigen/src/Eigenvalues/EigenSolver.h +2 -2
  229. data/vendor/eigen/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +1 -1
  230. data/vendor/eigen/Eigen/src/Eigenvalues/HessenbergDecomposition.h +2 -2
  231. data/vendor/eigen/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +2 -2
  232. data/vendor/eigen/Eigen/src/Eigenvalues/RealQZ.h +9 -6
  233. data/vendor/eigen/Eigen/src/Eigenvalues/RealSchur.h +21 -9
  234. data/vendor/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +77 -43
  235. data/vendor/eigen/Eigen/src/Eigenvalues/Tridiagonalization.h +20 -15
  236. data/vendor/eigen/Eigen/src/Geometry/AlignedBox.h +99 -5
  237. data/vendor/eigen/Eigen/src/Geometry/AngleAxis.h +4 -4
  238. data/vendor/eigen/Eigen/src/Geometry/EulerAngles.h +3 -3
  239. data/vendor/eigen/Eigen/src/Geometry/Homogeneous.h +15 -11
  240. data/vendor/eigen/Eigen/src/Geometry/Hyperplane.h +1 -1
  241. data/vendor/eigen/Eigen/src/Geometry/OrthoMethods.h +3 -2
  242. data/vendor/eigen/Eigen/src/Geometry/ParametrizedLine.h +39 -2
  243. data/vendor/eigen/Eigen/src/Geometry/Quaternion.h +70 -14
  244. data/vendor/eigen/Eigen/src/Geometry/Rotation2D.h +3 -3
  245. data/vendor/eigen/Eigen/src/Geometry/Scaling.h +23 -5
  246. data/vendor/eigen/Eigen/src/Geometry/Transform.h +88 -67
  247. data/vendor/eigen/Eigen/src/Geometry/Translation.h +6 -12
  248. data/vendor/eigen/Eigen/src/Geometry/Umeyama.h +1 -1
  249. data/vendor/eigen/Eigen/src/Geometry/arch/Geometry_SIMD.h +168 -0
  250. data/vendor/eigen/Eigen/src/Householder/BlockHouseholder.h +9 -2
  251. data/vendor/eigen/Eigen/src/Householder/Householder.h +8 -4
  252. data/vendor/eigen/Eigen/src/Householder/HouseholderSequence.h +123 -48
  253. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +15 -15
  254. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +7 -23
  255. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +5 -22
  256. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +41 -47
  257. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +51 -60
  258. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +70 -20
  259. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +2 -20
  260. data/vendor/eigen/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +11 -9
  261. data/vendor/eigen/Eigen/src/Jacobi/Jacobi.h +31 -10
  262. data/vendor/eigen/Eigen/src/KLUSupport/KLUSupport.h +358 -0
  263. data/vendor/eigen/Eigen/src/LU/Determinant.h +35 -19
  264. data/vendor/eigen/Eigen/src/LU/FullPivLU.h +29 -43
  265. data/vendor/eigen/Eigen/src/LU/InverseImpl.h +25 -8
  266. data/vendor/eigen/Eigen/src/LU/PartialPivLU.h +71 -58
  267. data/vendor/eigen/Eigen/src/LU/arch/InverseSize4.h +351 -0
  268. data/vendor/eigen/Eigen/src/OrderingMethods/Amd.h +7 -17
  269. data/vendor/eigen/Eigen/src/OrderingMethods/Eigen_Colamd.h +297 -277
  270. data/vendor/eigen/Eigen/src/OrderingMethods/Ordering.h +6 -10
  271. data/vendor/eigen/Eigen/src/PaStiXSupport/PaStiXSupport.h +1 -1
  272. data/vendor/eigen/Eigen/src/PardisoSupport/PardisoSupport.h +9 -7
  273. data/vendor/eigen/Eigen/src/QR/ColPivHouseholderQR.h +41 -20
  274. data/vendor/eigen/Eigen/src/QR/CompleteOrthogonalDecomposition.h +100 -27
  275. data/vendor/eigen/Eigen/src/QR/FullPivHouseholderQR.h +59 -22
  276. data/vendor/eigen/Eigen/src/QR/HouseholderQR.h +48 -23
  277. data/vendor/eigen/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +25 -3
  278. data/vendor/eigen/Eigen/src/SVD/BDCSVD.h +183 -63
  279. data/vendor/eigen/Eigen/src/SVD/JacobiSVD.h +22 -14
  280. data/vendor/eigen/Eigen/src/SVD/SVDBase.h +83 -22
  281. data/vendor/eigen/Eigen/src/SVD/UpperBidiagonalization.h +3 -3
  282. data/vendor/eigen/Eigen/src/SparseCholesky/SimplicialCholesky.h +17 -9
  283. data/vendor/eigen/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +12 -37
  284. data/vendor/eigen/Eigen/src/SparseCore/AmbiVector.h +3 -2
  285. data/vendor/eigen/Eigen/src/SparseCore/CompressedStorage.h +16 -0
  286. data/vendor/eigen/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +6 -6
  287. data/vendor/eigen/Eigen/src/SparseCore/SparseAssign.h +81 -27
  288. data/vendor/eigen/Eigen/src/SparseCore/SparseBlock.h +25 -57
  289. data/vendor/eigen/Eigen/src/SparseCore/SparseCompressedBase.h +40 -11
  290. data/vendor/eigen/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +11 -15
  291. data/vendor/eigen/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +4 -2
  292. data/vendor/eigen/Eigen/src/SparseCore/SparseDenseProduct.h +30 -8
  293. data/vendor/eigen/Eigen/src/SparseCore/SparseMatrix.h +126 -11
  294. data/vendor/eigen/Eigen/src/SparseCore/SparseMatrixBase.h +5 -12
  295. data/vendor/eigen/Eigen/src/SparseCore/SparseProduct.h +13 -1
  296. data/vendor/eigen/Eigen/src/SparseCore/SparseRef.h +7 -7
  297. data/vendor/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h +5 -2
  298. data/vendor/eigen/Eigen/src/SparseCore/SparseUtil.h +8 -0
  299. data/vendor/eigen/Eigen/src/SparseCore/SparseVector.h +1 -1
  300. data/vendor/eigen/Eigen/src/SparseCore/SparseView.h +1 -0
  301. data/vendor/eigen/Eigen/src/SparseLU/SparseLU.h +162 -12
  302. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_Memory.h +1 -1
  303. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +76 -2
  304. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_column_dfs.h +2 -2
  305. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +1 -1
  306. data/vendor/eigen/Eigen/src/SparseLU/SparseLU_panel_bmod.h +1 -1
  307. data/vendor/eigen/Eigen/src/SparseQR/SparseQR.h +19 -6
  308. data/vendor/eigen/Eigen/src/StlSupport/StdDeque.h +2 -12
  309. data/vendor/eigen/Eigen/src/StlSupport/StdList.h +2 -2
  310. data/vendor/eigen/Eigen/src/StlSupport/StdVector.h +2 -2
  311. data/vendor/eigen/Eigen/src/SuperLUSupport/SuperLUSupport.h +6 -8
  312. data/vendor/eigen/Eigen/src/UmfPackSupport/UmfPackSupport.h +175 -39
  313. data/vendor/eigen/Eigen/src/misc/lapacke.h +5 -4
  314. data/vendor/eigen/Eigen/src/plugins/ArrayCwiseBinaryOps.h +28 -2
  315. data/vendor/eigen/Eigen/src/plugins/ArrayCwiseUnaryOps.h +155 -11
  316. data/vendor/eigen/Eigen/src/plugins/BlockMethods.h +626 -242
  317. data/vendor/eigen/Eigen/src/plugins/CommonCwiseUnaryOps.h +14 -0
  318. data/vendor/eigen/Eigen/src/plugins/IndexedViewMethods.h +262 -0
  319. data/vendor/eigen/Eigen/src/plugins/MatrixCwiseBinaryOps.h +4 -4
  320. data/vendor/eigen/Eigen/src/plugins/MatrixCwiseUnaryOps.h +10 -0
  321. data/vendor/eigen/Eigen/src/plugins/ReshapedMethods.h +149 -0
  322. data/vendor/eigen/README.md +2 -0
  323. data/vendor/eigen/bench/btl/README +1 -1
  324. data/vendor/eigen/bench/tensors/README +6 -7
  325. data/vendor/eigen/ci/README.md +56 -0
  326. data/vendor/eigen/demos/mix_eigen_and_c/README +1 -1
  327. data/vendor/eigen/unsupported/Eigen/CXX11/src/Tensor/README.md +213 -158
  328. data/vendor/eigen/unsupported/README.txt +1 -1
  329. data/vendor/tomotopy/README.kr.rst +78 -0
  330. data/vendor/tomotopy/README.rst +75 -0
  331. data/vendor/tomotopy/src/Labeling/FoRelevance.cpp +2 -2
  332. data/vendor/tomotopy/src/Labeling/Phraser.hpp +4 -4
  333. data/vendor/tomotopy/src/TopicModel/CTModel.hpp +7 -3
  334. data/vendor/tomotopy/src/TopicModel/DMRModel.hpp +7 -3
  335. data/vendor/tomotopy/src/TopicModel/DTModel.hpp +6 -3
  336. data/vendor/tomotopy/src/TopicModel/GDMRModel.hpp +2 -2
  337. data/vendor/tomotopy/src/TopicModel/HDP.h +1 -0
  338. data/vendor/tomotopy/src/TopicModel/HDPModel.hpp +57 -6
  339. data/vendor/tomotopy/src/TopicModel/HLDAModel.hpp +6 -3
  340. data/vendor/tomotopy/src/TopicModel/HPAModel.hpp +3 -2
  341. data/vendor/tomotopy/src/TopicModel/LDA.h +3 -3
  342. data/vendor/tomotopy/src/TopicModel/LDACVB0Model.hpp +5 -5
  343. data/vendor/tomotopy/src/TopicModel/LDAModel.hpp +50 -19
  344. data/vendor/tomotopy/src/TopicModel/LLDAModel.hpp +6 -2
  345. data/vendor/tomotopy/src/TopicModel/MGLDAModel.hpp +3 -2
  346. data/vendor/tomotopy/src/TopicModel/PAModel.hpp +1 -1
  347. data/vendor/tomotopy/src/TopicModel/PLDAModel.hpp +6 -2
  348. data/vendor/tomotopy/src/TopicModel/PT.h +3 -1
  349. data/vendor/tomotopy/src/TopicModel/PTModel.hpp +36 -3
  350. data/vendor/tomotopy/src/TopicModel/SLDAModel.hpp +6 -3
  351. data/vendor/tomotopy/src/TopicModel/TopicModel.hpp +55 -26
  352. data/vendor/tomotopy/src/Utils/AliasMethod.hpp +5 -4
  353. data/vendor/tomotopy/src/Utils/Dictionary.h +2 -2
  354. data/vendor/tomotopy/src/Utils/EigenAddonOps.hpp +36 -1
  355. data/vendor/tomotopy/src/Utils/MultiNormalDistribution.hpp +1 -1
  356. data/vendor/tomotopy/src/Utils/TruncMultiNormal.hpp +1 -1
  357. data/vendor/tomotopy/src/Utils/exception.h +6 -0
  358. data/vendor/tomotopy/src/Utils/math.h +2 -2
  359. data/vendor/tomotopy/src/Utils/sample.hpp +14 -12
  360. data/vendor/tomotopy/src/Utils/serializer.hpp +30 -5
  361. data/vendor/tomotopy/src/Utils/sse_gamma.h +0 -3
  362. metadata +64 -18
  363. data/vendor/eigen/Eigen/CMakeLists.txt +0 -19
  364. data/vendor/eigen/Eigen/src/Core/arch/CUDA/Half.h +0 -674
  365. data/vendor/eigen/Eigen/src/Core/arch/CUDA/PacketMath.h +0 -333
  366. data/vendor/eigen/Eigen/src/Core/arch/CUDA/PacketMathHalf.h +0 -1124
  367. data/vendor/eigen/Eigen/src/Core/arch/CUDA/TypeCasting.h +0 -212
  368. data/vendor/eigen/Eigen/src/Geometry/arch/Geometry_SSE.h +0 -161
  369. data/vendor/eigen/Eigen/src/LU/arch/Inverse_SSE.h +0 -338
@@ -12,7 +12,7 @@
12
12
  #ifndef EIGEN_TRANSFORM_H
13
13
  #define EIGEN_TRANSFORM_H
14
14
 
15
- namespace Eigen {
15
+ namespace Eigen {
16
16
 
17
17
  namespace internal {
18
18
 
@@ -47,7 +47,7 @@ struct transform_left_product_impl;
47
47
 
48
48
  template< typename Lhs,
49
49
  typename Rhs,
50
- bool AnyProjective =
50
+ bool AnyProjective =
51
51
  transform_traits<Lhs>::IsProjective ||
52
52
  transform_traits<Rhs>::IsProjective>
53
53
  struct transform_transform_product_impl;
@@ -97,6 +97,9 @@ template<int Mode> struct transform_make_affine;
97
97
  * - #AffineCompact: the transformation is stored as a (Dim)x(Dim+1) matrix.
98
98
  * - #Projective: the transformation is stored as a (Dim+1)^2 matrix
99
99
  * without any assumption.
100
+ * - #Isometry: same as #Affine with the additional assumption that
101
+ * the linear part represents a rotation. This assumption is exploited
102
+ * to speed up some functions such as inverse() and rotation().
100
103
  * \tparam _Options has the same meaning as in class Matrix. It allows to specify DontAlign and/or RowMajor.
101
104
  * These Options are passed directly to the underlying matrix type.
102
105
  *
@@ -115,7 +118,7 @@ template<int Mode> struct transform_make_affine;
115
118
  * \end{array} \right) \f$
116
119
  *
117
120
  * Note that for a projective transformation the last row can be anything,
118
- * and then the interpretation of different parts might be sightly different.
121
+ * and then the interpretation of different parts might be slightly different.
119
122
  *
120
123
  * However, unlike a plain matrix, the Transform class provides many features
121
124
  * simplifying both its assembly and usage. In particular, it can be composed
@@ -220,9 +223,9 @@ public:
220
223
  /** type of the matrix used to represent the linear part of the transformation */
221
224
  typedef Matrix<Scalar,Dim,Dim,Options> LinearMatrixType;
222
225
  /** type of read/write reference to the linear part of the transformation */
223
- typedef Block<MatrixType,Dim,Dim,int(Mode)==(AffineCompact) && (Options&RowMajor)==0> LinearPart;
226
+ typedef Block<MatrixType,Dim,Dim,int(Mode)==(AffineCompact) && (int(Options)&RowMajor)==0> LinearPart;
224
227
  /** type of read reference to the linear part of the transformation */
225
- typedef const Block<ConstMatrixType,Dim,Dim,int(Mode)==(AffineCompact) && (Options&RowMajor)==0> ConstLinearPart;
228
+ typedef const Block<ConstMatrixType,Dim,Dim,int(Mode)==(AffineCompact) && (int(Options)&RowMajor)==0> ConstLinearPart;
226
229
  /** type of read/write reference to the affine part of the transformation */
227
230
  typedef typename internal::conditional<int(Mode)==int(AffineCompact),
228
231
  MatrixType&,
@@ -239,7 +242,7 @@ public:
239
242
  typedef const Block<ConstMatrixType,Dim,1,!(internal::traits<MatrixType>::Flags & RowMajorBit)> ConstTranslationPart;
240
243
  /** corresponding translation type */
241
244
  typedef Translation<Scalar,Dim> TranslationType;
242
-
245
+
243
246
  // this intermediate enum is needed to avoid an ICE with gcc 3.4 and 4.0
244
247
  enum { TransformTimeDiagonalMode = ((Mode==int(Isometry))?Affine:int(Mode)) };
245
248
  /** The return type of the product between a diagonal matrix and a transform */
@@ -252,17 +255,11 @@ protected:
252
255
  public:
253
256
 
254
257
  /** Default constructor without initialization of the meaningful coefficients.
255
- * If Mode==Affine, then the last row is set to [0 ... 0 1] */
258
+ * If Mode==Affine or Mode==Isometry, then the last row is set to [0 ... 0 1] */
256
259
  EIGEN_DEVICE_FUNC inline Transform()
257
260
  {
258
261
  check_template_params();
259
- internal::transform_make_affine<(int(Mode)==Affine) ? Affine : AffineCompact>::run(m_matrix);
260
- }
261
-
262
- EIGEN_DEVICE_FUNC inline Transform(const Transform& other)
263
- {
264
- check_template_params();
265
- m_matrix = other.m_matrix;
262
+ internal::transform_make_affine<(int(Mode)==Affine || int(Mode)==Isometry) ? Affine : AffineCompact>::run(m_matrix);
266
263
  }
267
264
 
268
265
  EIGEN_DEVICE_FUNC inline explicit Transform(const TranslationType& t)
@@ -282,9 +279,6 @@ public:
282
279
  *this = r;
283
280
  }
284
281
 
285
- EIGEN_DEVICE_FUNC inline Transform& operator=(const Transform& other)
286
- { m_matrix = other.m_matrix; return *this; }
287
-
288
282
  typedef internal::transform_take_affine_part<Transform> take_affine_part;
289
283
 
290
284
  /** Constructs and initializes a transformation from a Dim^2 or a (Dim+1)^2 matrix. */
@@ -308,7 +302,7 @@ public:
308
302
  internal::transform_construct_from_matrix<OtherDerived,Mode,Options,Dim,HDim>::run(this, other.derived());
309
303
  return *this;
310
304
  }
311
-
305
+
312
306
  template<int OtherOptions>
313
307
  EIGEN_DEVICE_FUNC inline Transform(const Transform<Scalar,Dim,Mode,OtherOptions>& other)
314
308
  {
@@ -335,7 +329,7 @@ public:
335
329
  OtherModeIsAffineCompact = OtherMode == int(AffineCompact)
336
330
  };
337
331
 
338
- if(ModeIsAffineCompact == OtherModeIsAffineCompact)
332
+ if(EIGEN_CONST_CONDITIONAL(ModeIsAffineCompact == OtherModeIsAffineCompact))
339
333
  {
340
334
  // We need the block expression because the code is compiled for all
341
335
  // combinations of transformations and will trigger a compile time error
@@ -343,7 +337,7 @@ public:
343
337
  m_matrix.template block<Dim,Dim+1>(0,0) = other.matrix().template block<Dim,Dim+1>(0,0);
344
338
  makeAffine();
345
339
  }
346
- else if(OtherModeIsAffineCompact)
340
+ else if(EIGEN_CONST_CONDITIONAL(OtherModeIsAffineCompact))
347
341
  {
348
342
  typedef typename Transform<Scalar,Dim,OtherMode,OtherOptions>::MatrixType OtherMatrixType;
349
343
  internal::transform_construct_from_matrix<OtherMatrixType,Mode,Options,Dim,HDim>::run(this, other.matrix());
@@ -380,9 +374,9 @@ public:
380
374
  inline Transform& operator=(const QTransform& other);
381
375
  inline QTransform toQTransform(void) const;
382
376
  #endif
383
-
384
- EIGEN_DEVICE_FUNC Index rows() const { return int(Mode)==int(Projective) ? m_matrix.cols() : (m_matrix.cols()-1); }
385
- EIGEN_DEVICE_FUNC Index cols() const { return m_matrix.cols(); }
377
+
378
+ EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT { return int(Mode)==int(Projective) ? m_matrix.cols() : (m_matrix.cols()-1); }
379
+ EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); }
386
380
 
387
381
  /** shortcut for m_matrix(row,col);
388
382
  * \sa MatrixBase::operator(Index,Index) const */
@@ -456,7 +450,7 @@ public:
456
450
  /** \returns The product expression of a transform \a a times a diagonal matrix \a b
457
451
  *
458
452
  * The rhs diagonal matrix is interpreted as an affine scaling transformation. The
459
- * product results in a Transform of the same type (mode) as the lhs only if the lhs
453
+ * product results in a Transform of the same type (mode) as the lhs only if the lhs
460
454
  * mode is no isometry. In that case, the returned transform is an affinity.
461
455
  */
462
456
  template<typename DiagonalDerived>
@@ -471,7 +465,7 @@ public:
471
465
  /** \returns The product expression of a diagonal matrix \a a times a transform \a b
472
466
  *
473
467
  * The lhs diagonal matrix is interpreted as an affine scaling transformation. The
474
- * product results in a Transform of the same type (mode) as the lhs only if the lhs
468
+ * product results in a Transform of the same type (mode) as the lhs only if the lhs
475
469
  * mode is no isometry. In that case, the returned transform is an affinity.
476
470
  */
477
471
  template<typename DiagonalDerived>
@@ -481,7 +475,7 @@ public:
481
475
  TransformTimeDiagonalReturnType res;
482
476
  res.linear().noalias() = a*b.linear();
483
477
  res.translation().noalias() = a*b.translation();
484
- if (Mode!=int(AffineCompact))
478
+ if (EIGEN_CONST_CONDITIONAL(Mode!=int(AffineCompact)))
485
479
  res.matrix().row(Dim) = b.matrix().row(Dim);
486
480
  return res;
487
481
  }
@@ -494,7 +488,7 @@ public:
494
488
  {
495
489
  return internal::transform_transform_product_impl<Transform,Transform>::run(*this,other);
496
490
  }
497
-
491
+
498
492
  #if EIGEN_COMP_ICC
499
493
  private:
500
494
  // this intermediate structure permits to workaround a bug in ICC 11:
@@ -503,13 +497,13 @@ private:
503
497
  // (the meaning of a name may have changed since the template declaration -- the type of the template is:
504
498
  // "Eigen::internal::transform_transform_product_impl<Eigen::Transform<double, 3, 32, 0>,
505
499
  // Eigen::Transform<double, 3, Mode, Options>, <expression>>::ResultType (const Eigen::Transform<double, 3, Mode, Options> &) const")
506
- //
500
+ //
507
501
  template<int OtherMode,int OtherOptions> struct icc_11_workaround
508
502
  {
509
503
  typedef internal::transform_transform_product_impl<Transform,Transform<Scalar,Dim,OtherMode,OtherOptions> > ProductType;
510
504
  typedef typename ProductType::ResultType ResultType;
511
505
  };
512
-
506
+
513
507
  public:
514
508
  /** Concatenates two different transformations */
515
509
  template<int OtherMode,int OtherOptions>
@@ -542,7 +536,7 @@ public:
542
536
  }
543
537
 
544
538
  template<typename OtherDerived>
545
- EIGEN_DEVICE_FUNC
539
+ EIGEN_DEVICE_FUNC
546
540
  inline Transform& scale(const MatrixBase<OtherDerived> &other);
547
541
 
548
542
  template<typename OtherDerived>
@@ -572,18 +566,18 @@ public:
572
566
  EIGEN_DEVICE_FUNC Transform& preshear(const Scalar& sx, const Scalar& sy);
573
567
 
574
568
  EIGEN_DEVICE_FUNC inline Transform& operator=(const TranslationType& t);
575
-
569
+
576
570
  EIGEN_DEVICE_FUNC
577
571
  inline Transform& operator*=(const TranslationType& t) { return translate(t.vector()); }
578
-
572
+
579
573
  EIGEN_DEVICE_FUNC inline Transform operator*(const TranslationType& t) const;
580
574
 
581
- EIGEN_DEVICE_FUNC
575
+ EIGEN_DEVICE_FUNC
582
576
  inline Transform& operator=(const UniformScaling<Scalar>& t);
583
-
577
+
584
578
  EIGEN_DEVICE_FUNC
585
579
  inline Transform& operator*=(const UniformScaling<Scalar>& s) { return scale(s.factor()); }
586
-
580
+
587
581
  EIGEN_DEVICE_FUNC
588
582
  inline TransformTimeDiagonalReturnType operator*(const UniformScaling<Scalar>& s) const
589
583
  {
@@ -602,7 +596,9 @@ public:
602
596
  template<typename Derived>
603
597
  EIGEN_DEVICE_FUNC inline Transform operator*(const RotationBase<Derived,Dim>& r) const;
604
598
 
605
- EIGEN_DEVICE_FUNC const LinearMatrixType rotation() const;
599
+ typedef typename internal::conditional<int(Mode)==Isometry,ConstLinearPart,const LinearMatrixType>::type RotationReturnType;
600
+ EIGEN_DEVICE_FUNC RotationReturnType rotation() const;
601
+
606
602
  template<typename RotationMatrixType, typename ScalingMatrixType>
607
603
  EIGEN_DEVICE_FUNC
608
604
  void computeRotationScaling(RotationMatrixType *rotation, ScalingMatrixType *scaling) const;
@@ -684,7 +680,7 @@ public:
684
680
  #ifdef EIGEN_TRANSFORM_PLUGIN
685
681
  #include EIGEN_TRANSFORM_PLUGIN
686
682
  #endif
687
-
683
+
688
684
  protected:
689
685
  #ifndef EIGEN_PARSED_BY_DOXYGEN
690
686
  EIGEN_DEVICE_FUNC static EIGEN_STRONG_INLINE void check_template_params()
@@ -755,7 +751,7 @@ template<typename Scalar, int Dim, int Mode,int Options>
755
751
  Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator=(const QMatrix& other)
756
752
  {
757
753
  EIGEN_STATIC_ASSERT(Dim==2, YOU_MADE_A_PROGRAMMING_MISTAKE)
758
- if (Mode == int(AffineCompact))
754
+ if (EIGEN_CONST_CONDITIONAL(Mode == int(AffineCompact)))
759
755
  m_matrix << other.m11(), other.m21(), other.dx(),
760
756
  other.m12(), other.m22(), other.dy();
761
757
  else
@@ -801,7 +797,7 @@ Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::operator
801
797
  {
802
798
  check_template_params();
803
799
  EIGEN_STATIC_ASSERT(Dim==2, YOU_MADE_A_PROGRAMMING_MISTAKE)
804
- if (Mode == int(AffineCompact))
800
+ if (EIGEN_CONST_CONDITIONAL(Mode == int(AffineCompact)))
805
801
  m_matrix << other.m11(), other.m21(), other.dx(),
806
802
  other.m12(), other.m22(), other.dy();
807
803
  else
@@ -819,7 +815,7 @@ template<typename Scalar, int Dim, int Mode, int Options>
819
815
  QTransform Transform<Scalar,Dim,Mode,Options>::toQTransform(void) const
820
816
  {
821
817
  EIGEN_STATIC_ASSERT(Dim==2, YOU_MADE_A_PROGRAMMING_MISTAKE)
822
- if (Mode == int(AffineCompact))
818
+ if (EIGEN_CONST_CONDITIONAL(Mode == int(AffineCompact)))
823
819
  return QTransform(m_matrix.coeff(0,0), m_matrix.coeff(1,0),
824
820
  m_matrix.coeff(0,1), m_matrix.coeff(1,1),
825
821
  m_matrix.coeff(0,2), m_matrix.coeff(1,2));
@@ -912,7 +908,7 @@ EIGEN_DEVICE_FUNC Transform<Scalar,Dim,Mode,Options>&
912
908
  Transform<Scalar,Dim,Mode,Options>::pretranslate(const MatrixBase<OtherDerived> &other)
913
909
  {
914
910
  EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(OtherDerived,int(Dim))
915
- if(int(Mode)==int(Projective))
911
+ if(EIGEN_CONST_CONDITIONAL(int(Mode)==int(Projective)))
916
912
  affine() += other * m_matrix.row(Dim);
917
913
  else
918
914
  translation() += other;
@@ -1046,20 +1042,43 @@ EIGEN_DEVICE_FUNC inline Transform<Scalar,Dim,Mode,Options> Transform<Scalar,Dim
1046
1042
  *** Special functions ***
1047
1043
  ************************/
1048
1044
 
1045
+ namespace internal {
1046
+ template<int Mode> struct transform_rotation_impl {
1047
+ template<typename TransformType>
1048
+ EIGEN_DEVICE_FUNC static inline
1049
+ const typename TransformType::LinearMatrixType run(const TransformType& t)
1050
+ {
1051
+ typedef typename TransformType::LinearMatrixType LinearMatrixType;
1052
+ LinearMatrixType result;
1053
+ t.computeRotationScaling(&result, (LinearMatrixType*)0);
1054
+ return result;
1055
+ }
1056
+ };
1057
+ template<> struct transform_rotation_impl<Isometry> {
1058
+ template<typename TransformType>
1059
+ EIGEN_DEVICE_FUNC static inline
1060
+ typename TransformType::ConstLinearPart run(const TransformType& t)
1061
+ {
1062
+ return t.linear();
1063
+ }
1064
+ };
1065
+ }
1049
1066
  /** \returns the rotation part of the transformation
1050
1067
  *
1068
+ * If Mode==Isometry, then this method is an alias for linear(),
1069
+ * otherwise it calls computeRotationScaling() to extract the rotation
1070
+ * through a SVD decomposition.
1051
1071
  *
1052
1072
  * \svd_module
1053
1073
  *
1054
1074
  * \sa computeRotationScaling(), computeScalingRotation(), class SVD
1055
1075
  */
1056
1076
  template<typename Scalar, int Dim, int Mode, int Options>
1057
- EIGEN_DEVICE_FUNC const typename Transform<Scalar,Dim,Mode,Options>::LinearMatrixType
1077
+ EIGEN_DEVICE_FUNC
1078
+ typename Transform<Scalar,Dim,Mode,Options>::RotationReturnType
1058
1079
  Transform<Scalar,Dim,Mode,Options>::rotation() const
1059
1080
  {
1060
- LinearMatrixType result;
1061
- computeRotationScaling(&result, (LinearMatrixType*)0);
1062
- return result;
1081
+ return internal::transform_rotation_impl<Mode>::run(*this);
1063
1082
  }
1064
1083
 
1065
1084
 
@@ -1078,17 +1097,18 @@ template<typename Scalar, int Dim, int Mode, int Options>
1078
1097
  template<typename RotationMatrixType, typename ScalingMatrixType>
1079
1098
  EIGEN_DEVICE_FUNC void Transform<Scalar,Dim,Mode,Options>::computeRotationScaling(RotationMatrixType *rotation, ScalingMatrixType *scaling) const
1080
1099
  {
1100
+ // Note that JacobiSVD is faster than BDCSVD for small matrices.
1081
1101
  JacobiSVD<LinearMatrixType> svd(linear(), ComputeFullU | ComputeFullV);
1082
1102
 
1083
- Scalar x = (svd.matrixU() * svd.matrixV().adjoint()).determinant(); // so x has absolute value 1
1103
+ Scalar x = (svd.matrixU() * svd.matrixV().adjoint()).determinant() < Scalar(0) ? Scalar(-1) : Scalar(1); // so x has absolute value 1
1084
1104
  VectorType sv(svd.singularValues());
1085
- sv.coeffRef(0) *= x;
1086
- if(scaling) scaling->lazyAssign(svd.matrixV() * sv.asDiagonal() * svd.matrixV().adjoint());
1105
+ sv.coeffRef(Dim-1) *= x;
1106
+ if(scaling) *scaling = svd.matrixV() * sv.asDiagonal() * svd.matrixV().adjoint();
1087
1107
  if(rotation)
1088
1108
  {
1089
1109
  LinearMatrixType m(svd.matrixU());
1090
- m.col(0) /= x;
1091
- rotation->lazyAssign(m * svd.matrixV().adjoint());
1110
+ m.col(Dim-1) *= x;
1111
+ *rotation = m * svd.matrixV().adjoint();
1092
1112
  }
1093
1113
  }
1094
1114
 
@@ -1107,17 +1127,18 @@ template<typename Scalar, int Dim, int Mode, int Options>
1107
1127
  template<typename ScalingMatrixType, typename RotationMatrixType>
1108
1128
  EIGEN_DEVICE_FUNC void Transform<Scalar,Dim,Mode,Options>::computeScalingRotation(ScalingMatrixType *scaling, RotationMatrixType *rotation) const
1109
1129
  {
1130
+ // Note that JacobiSVD is faster than BDCSVD for small matrices.
1110
1131
  JacobiSVD<LinearMatrixType> svd(linear(), ComputeFullU | ComputeFullV);
1111
1132
 
1112
- Scalar x = (svd.matrixU() * svd.matrixV().adjoint()).determinant(); // so x has absolute value 1
1133
+ Scalar x = (svd.matrixU() * svd.matrixV().adjoint()).determinant() < Scalar(0) ? Scalar(-1) : Scalar(1); // so x has absolute value 1
1113
1134
  VectorType sv(svd.singularValues());
1114
- sv.coeffRef(0) *= x;
1115
- if(scaling) scaling->lazyAssign(svd.matrixU() * sv.asDiagonal() * svd.matrixU().adjoint());
1135
+ sv.coeffRef(Dim-1) *= x;
1136
+ if(scaling) *scaling = svd.matrixU() * sv.asDiagonal() * svd.matrixU().adjoint();
1116
1137
  if(rotation)
1117
1138
  {
1118
1139
  LinearMatrixType m(svd.matrixU());
1119
- m.col(0) /= x;
1120
- rotation->lazyAssign(m * svd.matrixV().adjoint());
1140
+ m.col(Dim-1) *= x;
1141
+ *rotation = m * svd.matrixV().adjoint();
1121
1142
  }
1122
1143
  }
1123
1144
 
@@ -1156,7 +1177,7 @@ struct transform_make_affine<AffineCompact>
1156
1177
  {
1157
1178
  template<typename MatrixType> EIGEN_DEVICE_FUNC static void run(MatrixType &) { }
1158
1179
  };
1159
-
1180
+
1160
1181
  // selector needed to avoid taking the inverse of a 3x4 matrix
1161
1182
  template<typename TransformType, int Mode=TransformType::Mode>
1162
1183
  struct projective_transform_inverse
@@ -1297,8 +1318,8 @@ struct transform_construct_from_matrix<Other, AffineCompact,Options,Dim,HDim, HD
1297
1318
  template<int LhsMode,int RhsMode>
1298
1319
  struct transform_product_result
1299
1320
  {
1300
- enum
1301
- {
1321
+ enum
1322
+ {
1302
1323
  Mode =
1303
1324
  (LhsMode == (int)Projective || RhsMode == (int)Projective ) ? Projective :
1304
1325
  (LhsMode == (int)Affine || RhsMode == (int)Affine ) ? Affine :
@@ -1312,7 +1333,7 @@ struct transform_right_product_impl< TransformType, MatrixType, 0, RhsCols>
1312
1333
  {
1313
1334
  typedef typename MatrixType::PlainObject ResultType;
1314
1335
 
1315
- static EIGEN_STRONG_INLINE ResultType run(const TransformType& T, const MatrixType& other)
1336
+ static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ResultType run(const TransformType& T, const MatrixType& other)
1316
1337
  {
1317
1338
  return T.matrix() * other;
1318
1339
  }
@@ -1321,8 +1342,8 @@ struct transform_right_product_impl< TransformType, MatrixType, 0, RhsCols>
1321
1342
  template< typename TransformType, typename MatrixType, int RhsCols>
1322
1343
  struct transform_right_product_impl< TransformType, MatrixType, 1, RhsCols>
1323
1344
  {
1324
- enum {
1325
- Dim = TransformType::Dim,
1345
+ enum {
1346
+ Dim = TransformType::Dim,
1326
1347
  HDim = TransformType::HDim,
1327
1348
  OtherRows = MatrixType::RowsAtCompileTime,
1328
1349
  OtherCols = MatrixType::ColsAtCompileTime
@@ -1330,7 +1351,7 @@ struct transform_right_product_impl< TransformType, MatrixType, 1, RhsCols>
1330
1351
 
1331
1352
  typedef typename MatrixType::PlainObject ResultType;
1332
1353
 
1333
- static EIGEN_STRONG_INLINE ResultType run(const TransformType& T, const MatrixType& other)
1354
+ static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ResultType run(const TransformType& T, const MatrixType& other)
1334
1355
  {
1335
1356
  EIGEN_STATIC_ASSERT(OtherRows==HDim, YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES);
1336
1357
 
@@ -1339,7 +1360,7 @@ struct transform_right_product_impl< TransformType, MatrixType, 1, RhsCols>
1339
1360
  ResultType res(other.rows(),other.cols());
1340
1361
  TopLeftLhs(res, 0, 0, Dim, other.cols()).noalias() = T.affine() * other;
1341
1362
  res.row(OtherRows-1) = other.row(OtherRows-1);
1342
-
1363
+
1343
1364
  return res;
1344
1365
  }
1345
1366
  };
@@ -1347,8 +1368,8 @@ struct transform_right_product_impl< TransformType, MatrixType, 1, RhsCols>
1347
1368
  template< typename TransformType, typename MatrixType, int RhsCols>
1348
1369
  struct transform_right_product_impl< TransformType, MatrixType, 2, RhsCols>
1349
1370
  {
1350
- enum {
1351
- Dim = TransformType::Dim,
1371
+ enum {
1372
+ Dim = TransformType::Dim,
1352
1373
  HDim = TransformType::HDim,
1353
1374
  OtherRows = MatrixType::RowsAtCompileTime,
1354
1375
  OtherCols = MatrixType::ColsAtCompileTime
@@ -1356,7 +1377,7 @@ struct transform_right_product_impl< TransformType, MatrixType, 2, RhsCols>
1356
1377
 
1357
1378
  typedef typename MatrixType::PlainObject ResultType;
1358
1379
 
1359
- static EIGEN_STRONG_INLINE ResultType run(const TransformType& T, const MatrixType& other)
1380
+ static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ResultType run(const TransformType& T, const MatrixType& other)
1360
1381
  {
1361
1382
  EIGEN_STATIC_ASSERT(OtherRows==Dim, YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES);
1362
1383
 
@@ -1381,7 +1402,7 @@ struct transform_right_product_impl< TransformType, MatrixType, 2, 1> // rhs is
1381
1402
 
1382
1403
  typedef typename MatrixType::PlainObject ResultType;
1383
1404
 
1384
- static EIGEN_STRONG_INLINE ResultType run(const TransformType& T, const MatrixType& other)
1405
+ static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ResultType run(const TransformType& T, const MatrixType& other)
1385
1406
  {
1386
1407
  EIGEN_STATIC_ASSERT(OtherRows==Dim, YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES);
1387
1408
 
@@ -70,18 +70,18 @@ public:
70
70
  /** Constructs and initialize the translation transformation from a vector of translation coefficients */
71
71
  EIGEN_DEVICE_FUNC explicit inline Translation(const VectorType& vector) : m_coeffs(vector) {}
72
72
 
73
- /** \brief Retruns the x-translation by value. **/
73
+ /** \brief Returns the x-translation by value. **/
74
74
  EIGEN_DEVICE_FUNC inline Scalar x() const { return m_coeffs.x(); }
75
- /** \brief Retruns the y-translation by value. **/
75
+ /** \brief Returns the y-translation by value. **/
76
76
  EIGEN_DEVICE_FUNC inline Scalar y() const { return m_coeffs.y(); }
77
- /** \brief Retruns the z-translation by value. **/
77
+ /** \brief Returns the z-translation by value. **/
78
78
  EIGEN_DEVICE_FUNC inline Scalar z() const { return m_coeffs.z(); }
79
79
 
80
- /** \brief Retruns the x-translation as a reference. **/
80
+ /** \brief Returns the x-translation as a reference. **/
81
81
  EIGEN_DEVICE_FUNC inline Scalar& x() { return m_coeffs.x(); }
82
- /** \brief Retruns the y-translation as a reference. **/
82
+ /** \brief Returns the y-translation as a reference. **/
83
83
  EIGEN_DEVICE_FUNC inline Scalar& y() { return m_coeffs.y(); }
84
- /** \brief Retruns the z-translation as a reference. **/
84
+ /** \brief Returns the z-translation as a reference. **/
85
85
  EIGEN_DEVICE_FUNC inline Scalar& z() { return m_coeffs.z(); }
86
86
 
87
87
  EIGEN_DEVICE_FUNC const VectorType& vector() const { return m_coeffs; }
@@ -138,12 +138,6 @@ public:
138
138
  /** \returns the inverse translation (opposite) */
139
139
  Translation inverse() const { return Translation(-m_coeffs); }
140
140
 
141
- Translation& operator=(const Translation& other)
142
- {
143
- m_coeffs = other.m_coeffs;
144
- return *this;
145
- }
146
-
147
141
  static const Translation Identity() { return Translation(VectorType::Zero()); }
148
142
 
149
143
  /** \returns \c *this with scalar type casted to \a NewScalarType
@@ -87,7 +87,7 @@ struct umeyama_transform_matrix_type
87
87
  * \f{align*}
88
88
  * T = \begin{bmatrix} c\mathbf{R} & \mathbf{t} \\ \mathbf{0} & 1 \end{bmatrix}
89
89
  * \f}
90
- * minimizing the resudiual above. This transformation is always returned as an
90
+ * minimizing the residual above. This transformation is always returned as an
91
91
  * Eigen::Matrix.
92
92
  */
93
93
  template <typename Derived, typename OtherDerived>
@@ -0,0 +1,168 @@
1
+ // This file is part of Eigen, a lightweight C++ template library
2
+ // for linear algebra.
3
+ //
4
+ // Copyright (C) 2009 Rohit Garg <rpg.314@gmail.com>
5
+ // Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
6
+ //
7
+ // This Source Code Form is subject to the terms of the Mozilla
8
+ // Public License v. 2.0. If a copy of the MPL was not distributed
9
+ // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10
+
11
+ #ifndef EIGEN_GEOMETRY_SIMD_H
12
+ #define EIGEN_GEOMETRY_SIMD_H
13
+
14
+ namespace Eigen {
15
+
16
+ namespace internal {
17
+
18
+ template<class Derived, class OtherDerived>
19
+ struct quat_product<Architecture::Target, Derived, OtherDerived, float>
20
+ {
21
+ enum {
22
+ AAlignment = traits<Derived>::Alignment,
23
+ BAlignment = traits<OtherDerived>::Alignment,
24
+ ResAlignment = traits<Quaternion<float> >::Alignment
25
+ };
26
+ static inline Quaternion<float> run(const QuaternionBase<Derived>& _a, const QuaternionBase<OtherDerived>& _b)
27
+ {
28
+ evaluator<typename Derived::Coefficients> ae(_a.coeffs());
29
+ evaluator<typename OtherDerived::Coefficients> be(_b.coeffs());
30
+ Quaternion<float> res;
31
+ const float neg_zero = numext::bit_cast<float>(0x80000000u);
32
+ const float arr[4] = {0.f, 0.f, 0.f, neg_zero};
33
+ const Packet4f mask = ploadu<Packet4f>(arr);
34
+ Packet4f a = ae.template packet<AAlignment,Packet4f>(0);
35
+ Packet4f b = be.template packet<BAlignment,Packet4f>(0);
36
+ Packet4f s1 = pmul(vec4f_swizzle1(a,1,2,0,2),vec4f_swizzle1(b,2,0,1,2));
37
+ Packet4f s2 = pmul(vec4f_swizzle1(a,3,3,3,1),vec4f_swizzle1(b,0,1,2,1));
38
+ pstoret<float,Packet4f,ResAlignment>(
39
+ &res.x(),
40
+ padd(psub(pmul(a,vec4f_swizzle1(b,3,3,3,3)),
41
+ pmul(vec4f_swizzle1(a,2,0,1,0),
42
+ vec4f_swizzle1(b,1,2,0,0))),
43
+ pxor(mask,padd(s1,s2))));
44
+
45
+ return res;
46
+ }
47
+ };
48
+
49
+ template<class Derived>
50
+ struct quat_conj<Architecture::Target, Derived, float>
51
+ {
52
+ enum {
53
+ ResAlignment = traits<Quaternion<float> >::Alignment
54
+ };
55
+ static inline Quaternion<float> run(const QuaternionBase<Derived>& q)
56
+ {
57
+ evaluator<typename Derived::Coefficients> qe(q.coeffs());
58
+ Quaternion<float> res;
59
+ const float neg_zero = numext::bit_cast<float>(0x80000000u);
60
+ const float arr[4] = {neg_zero, neg_zero, neg_zero,0.f};
61
+ const Packet4f mask = ploadu<Packet4f>(arr);
62
+ pstoret<float,Packet4f,ResAlignment>(&res.x(), pxor(mask, qe.template packet<traits<Derived>::Alignment,Packet4f>(0)));
63
+ return res;
64
+ }
65
+ };
66
+
67
+
68
+ template<typename VectorLhs,typename VectorRhs>
69
+ struct cross3_impl<Architecture::Target,VectorLhs,VectorRhs,float,true>
70
+ {
71
+ enum {
72
+ ResAlignment = traits<typename plain_matrix_type<VectorLhs>::type>::Alignment
73
+ };
74
+ static inline typename plain_matrix_type<VectorLhs>::type
75
+ run(const VectorLhs& lhs, const VectorRhs& rhs)
76
+ {
77
+ evaluator<VectorLhs> lhs_eval(lhs);
78
+ evaluator<VectorRhs> rhs_eval(rhs);
79
+ Packet4f a = lhs_eval.template packet<traits<VectorLhs>::Alignment,Packet4f>(0);
80
+ Packet4f b = rhs_eval.template packet<traits<VectorRhs>::Alignment,Packet4f>(0);
81
+ Packet4f mul1 = pmul(vec4f_swizzle1(a,1,2,0,3),vec4f_swizzle1(b,2,0,1,3));
82
+ Packet4f mul2 = pmul(vec4f_swizzle1(a,2,0,1,3),vec4f_swizzle1(b,1,2,0,3));
83
+ typename plain_matrix_type<VectorLhs>::type res;
84
+ pstoret<float,Packet4f,ResAlignment>(&res.x(),psub(mul1,mul2));
85
+ return res;
86
+ }
87
+ };
88
+
89
+
90
+
91
+ #if (defined EIGEN_VECTORIZE_SSE) || (EIGEN_ARCH_ARM64)
92
+
93
+ template<class Derived, class OtherDerived>
94
+ struct quat_product<Architecture::Target, Derived, OtherDerived, double>
95
+ {
96
+ enum {
97
+ BAlignment = traits<OtherDerived>::Alignment,
98
+ ResAlignment = traits<Quaternion<double> >::Alignment
99
+ };
100
+
101
+ static inline Quaternion<double> run(const QuaternionBase<Derived>& _a, const QuaternionBase<OtherDerived>& _b)
102
+ {
103
+ Quaternion<double> res;
104
+
105
+ evaluator<typename Derived::Coefficients> ae(_a.coeffs());
106
+ evaluator<typename OtherDerived::Coefficients> be(_b.coeffs());
107
+
108
+ const double* a = _a.coeffs().data();
109
+ Packet2d b_xy = be.template packet<BAlignment,Packet2d>(0);
110
+ Packet2d b_zw = be.template packet<BAlignment,Packet2d>(2);
111
+ Packet2d a_xx = pset1<Packet2d>(a[0]);
112
+ Packet2d a_yy = pset1<Packet2d>(a[1]);
113
+ Packet2d a_zz = pset1<Packet2d>(a[2]);
114
+ Packet2d a_ww = pset1<Packet2d>(a[3]);
115
+
116
+ // two temporaries:
117
+ Packet2d t1, t2;
118
+
119
+ /*
120
+ * t1 = ww*xy + yy*zw
121
+ * t2 = zz*xy - xx*zw
122
+ * res.xy = t1 +/- swap(t2)
123
+ */
124
+ t1 = padd(pmul(a_ww, b_xy), pmul(a_yy, b_zw));
125
+ t2 = psub(pmul(a_zz, b_xy), pmul(a_xx, b_zw));
126
+ pstoret<double,Packet2d,ResAlignment>(&res.x(), paddsub(t1, preverse(t2)));
127
+
128
+ /*
129
+ * t1 = ww*zw - yy*xy
130
+ * t2 = zz*zw + xx*xy
131
+ * res.zw = t1 -/+ swap(t2) = swap( swap(t1) +/- t2)
132
+ */
133
+ t1 = psub(pmul(a_ww, b_zw), pmul(a_yy, b_xy));
134
+ t2 = padd(pmul(a_zz, b_zw), pmul(a_xx, b_xy));
135
+ pstoret<double,Packet2d,ResAlignment>(&res.z(), preverse(paddsub(preverse(t1), t2)));
136
+
137
+ return res;
138
+ }
139
+ };
140
+
141
+ template<class Derived>
142
+ struct quat_conj<Architecture::Target, Derived, double>
143
+ {
144
+ enum {
145
+ ResAlignment = traits<Quaternion<double> >::Alignment
146
+ };
147
+ static inline Quaternion<double> run(const QuaternionBase<Derived>& q)
148
+ {
149
+ evaluator<typename Derived::Coefficients> qe(q.coeffs());
150
+ Quaternion<double> res;
151
+ const double neg_zero = numext::bit_cast<double>(0x8000000000000000ull);
152
+ const double arr1[2] = {neg_zero, neg_zero};
153
+ const double arr2[2] = {neg_zero, 0.0};
154
+ const Packet2d mask0 = ploadu<Packet2d>(arr1);
155
+ const Packet2d mask2 = ploadu<Packet2d>(arr2);
156
+ pstoret<double,Packet2d,ResAlignment>(&res.x(), pxor(mask0, qe.template packet<traits<Derived>::Alignment,Packet2d>(0)));
157
+ pstoret<double,Packet2d,ResAlignment>(&res.z(), pxor(mask2, qe.template packet<traits<Derived>::Alignment,Packet2d>(2)));
158
+ return res;
159
+ }
160
+ };
161
+
162
+ #endif // end EIGEN_VECTORIZE_SSE_OR_EIGEN_ARCH_ARM64
163
+
164
+ } // end namespace internal
165
+
166
+ } // end namespace Eigen
167
+
168
+ #endif // EIGEN_GEOMETRY_SIMD_H
@@ -63,8 +63,15 @@ void make_block_householder_triangular_factor(TriangularFactorType& triFactor, c
63
63
  triFactor.row(i).tail(rt).noalias() = -hCoeffs(i) * vectors.col(i).tail(rs).adjoint()
64
64
  * vectors.bottomRightCorner(rs, rt).template triangularView<UnitLower>();
65
65
 
66
- // FIXME add .noalias() once the triangular product can work inplace
67
- triFactor.row(i).tail(rt) = triFactor.row(i).tail(rt) * triFactor.bottomRightCorner(rt,rt).template triangularView<Upper>();
66
+ // FIXME use the following line with .noalias() once the triangular product can work inplace
67
+ // triFactor.row(i).tail(rt) = triFactor.row(i).tail(rt) * triFactor.bottomRightCorner(rt,rt).template triangularView<Upper>();
68
+ for(Index j=nbVecs-1; j>i; --j)
69
+ {
70
+ typename TriangularFactorType::Scalar z = triFactor(i,j);
71
+ triFactor(i,j) = z * triFactor(j,j);
72
+ if(nbVecs-j-1>0)
73
+ triFactor.row(i).tail(nbVecs-j-1) += z * triFactor.row(j).tail(nbVecs-j-1);
74
+ }
68
75
 
69
76
  }
70
77
  triFactor(i,i) = hCoeffs(i);