@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
@@ -11,702 +11,615 @@
11
11
  #ifndef EIGEN_TRIANGULARMATRIX_H
12
12
  #define EIGEN_TRIANGULARMATRIX_H
13
13
 
14
+ // IWYU pragma: private
15
+ #include "./InternalHeaderCheck.h"
16
+
14
17
  namespace Eigen {
15
18
 
16
19
  namespace internal {
17
20
 
18
- template<int Side, typename TriangularType, typename Rhs> struct triangular_solve_retval;
21
+ template <int Side, typename TriangularType, typename Rhs>
22
+ struct triangular_solve_retval;
19
23
 
20
24
  }
21
25
 
22
26
  /** \class TriangularBase
23
- * \ingroup Core_Module
24
- *
25
- * \brief Base class for triangular part in a matrix
26
- */
27
- template<typename Derived> class TriangularBase : public EigenBase<Derived>
28
- {
29
- public:
30
-
31
- enum {
32
- Mode = internal::traits<Derived>::Mode,
33
- RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,
34
- ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,
35
- MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime,
36
- MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime,
37
-
38
- SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,
39
- internal::traits<Derived>::ColsAtCompileTime>::ret),
40
- /**< This is equal to the number of coefficients, i.e. the number of
41
- * rows times the number of columns, or to \a Dynamic if this is not
42
- * known at compile-time. \sa RowsAtCompileTime, ColsAtCompileTime */
43
-
44
- MaxSizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::MaxRowsAtCompileTime,
45
- internal::traits<Derived>::MaxColsAtCompileTime>::ret)
46
-
47
- };
48
- typedef typename internal::traits<Derived>::Scalar Scalar;
49
- typedef typename internal::traits<Derived>::StorageKind StorageKind;
50
- typedef typename internal::traits<Derived>::StorageIndex StorageIndex;
51
- typedef typename internal::traits<Derived>::FullMatrixType DenseMatrixType;
52
- typedef DenseMatrixType DenseType;
53
- typedef Derived const& Nested;
54
-
55
- EIGEN_DEVICE_FUNC
56
- inline TriangularBase() { eigen_assert(!((int(Mode) & int(UnitDiag)) && (int(Mode) & int(ZeroDiag)))); }
57
-
58
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
59
- inline Index rows() const EIGEN_NOEXCEPT { return derived().rows(); }
60
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
61
- inline Index cols() const EIGEN_NOEXCEPT { return derived().cols(); }
62
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
63
- inline Index outerStride() const EIGEN_NOEXCEPT { return derived().outerStride(); }
64
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
65
- inline Index innerStride() const EIGEN_NOEXCEPT { return derived().innerStride(); }
66
-
67
- // dummy resize function
68
- EIGEN_DEVICE_FUNC
69
- void resize(Index rows, Index cols)
70
- {
71
- EIGEN_UNUSED_VARIABLE(rows);
72
- EIGEN_UNUSED_VARIABLE(cols);
73
- eigen_assert(rows==this->rows() && cols==this->cols());
74
- }
27
+ * \ingroup Core_Module
28
+ *
29
+ * \brief Base class for triangular part in a matrix
30
+ */
31
+ template <typename Derived>
32
+ class TriangularBase : public EigenBase<Derived> {
33
+ public:
34
+ enum {
35
+ Mode = internal::traits<Derived>::Mode,
36
+ RowsAtCompileTime = internal::traits<Derived>::RowsAtCompileTime,
37
+ ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,
38
+ MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime,
39
+ MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime,
75
40
 
76
- EIGEN_DEVICE_FUNC
77
- inline Scalar coeff(Index row, Index col) const { return derived().coeff(row,col); }
78
- EIGEN_DEVICE_FUNC
79
- inline Scalar& coeffRef(Index row, Index col) { return derived().coeffRef(row,col); }
80
-
81
- /** \see MatrixBase::copyCoeff(row,col)
82
- */
83
- template<typename Other>
84
- EIGEN_DEVICE_FUNC
85
- EIGEN_STRONG_INLINE void copyCoeff(Index row, Index col, Other& other)
86
- {
87
- derived().coeffRef(row, col) = other.coeff(row, col);
88
- }
41
+ SizeAtCompileTime = (internal::size_of_xpr_at_compile_time<Derived>::ret),
42
+ /**< This is equal to the number of coefficients, i.e. the number of
43
+ * rows times the number of columns, or to \a Dynamic if this is not
44
+ * known at compile-time. \sa RowsAtCompileTime, ColsAtCompileTime */
89
45
 
90
- EIGEN_DEVICE_FUNC
91
- inline Scalar operator()(Index row, Index col) const
92
- {
93
- check_coordinates(row, col);
94
- return coeff(row,col);
95
- }
96
- EIGEN_DEVICE_FUNC
97
- inline Scalar& operator()(Index row, Index col)
98
- {
99
- check_coordinates(row, col);
100
- return coeffRef(row,col);
101
- }
46
+ MaxSizeAtCompileTime = internal::size_at_compile_time(internal::traits<Derived>::MaxRowsAtCompileTime,
47
+ internal::traits<Derived>::MaxColsAtCompileTime)
102
48
 
103
- #ifndef EIGEN_PARSED_BY_DOXYGEN
104
- EIGEN_DEVICE_FUNC
105
- inline const Derived& derived() const { return *static_cast<const Derived*>(this); }
106
- EIGEN_DEVICE_FUNC
107
- inline Derived& derived() { return *static_cast<Derived*>(this); }
108
- #endif // not EIGEN_PARSED_BY_DOXYGEN
109
-
110
- template<typename DenseDerived>
111
- EIGEN_DEVICE_FUNC
112
- void evalTo(MatrixBase<DenseDerived> &other) const;
113
- template<typename DenseDerived>
114
- EIGEN_DEVICE_FUNC
115
- void evalToLazy(MatrixBase<DenseDerived> &other) const;
116
-
117
- EIGEN_DEVICE_FUNC
118
- DenseMatrixType toDenseMatrix() const
119
- {
120
- DenseMatrixType res(rows(), cols());
121
- evalToLazy(res);
122
- return res;
123
- }
49
+ };
50
+ typedef typename internal::traits<Derived>::Scalar Scalar;
51
+ typedef typename internal::traits<Derived>::StorageKind StorageKind;
52
+ typedef typename internal::traits<Derived>::StorageIndex StorageIndex;
53
+ typedef typename internal::traits<Derived>::FullMatrixType DenseMatrixType;
54
+ typedef DenseMatrixType DenseType;
55
+ typedef Derived const& Nested;
56
+
57
+ EIGEN_DEVICE_FUNC inline TriangularBase() {
58
+ eigen_assert(!((int(Mode) & int(UnitDiag)) && (int(Mode) & int(ZeroDiag))));
59
+ }
124
60
 
125
- protected:
126
-
127
- void check_coordinates(Index row, Index col) const
128
- {
129
- EIGEN_ONLY_USED_FOR_DEBUG(row);
130
- EIGEN_ONLY_USED_FOR_DEBUG(col);
131
- eigen_assert(col>=0 && col<cols() && row>=0 && row<rows());
132
- const int mode = int(Mode) & ~SelfAdjoint;
133
- EIGEN_ONLY_USED_FOR_DEBUG(mode);
134
- eigen_assert((mode==Upper && col>=row)
135
- || (mode==Lower && col<=row)
136
- || ((mode==StrictlyUpper || mode==UnitUpper) && col>row)
137
- || ((mode==StrictlyLower || mode==UnitLower) && col<row));
138
- }
61
+ EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return derived().rows(); }
62
+ EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return derived().cols(); }
63
+ EIGEN_DEVICE_FUNC constexpr Index outerStride() const noexcept { return derived().outerStride(); }
64
+ EIGEN_DEVICE_FUNC constexpr Index innerStride() const noexcept { return derived().innerStride(); }
139
65
 
140
- #ifdef EIGEN_INTERNAL_DEBUGGING
141
- void check_coordinates_internal(Index row, Index col) const
142
- {
143
- check_coordinates(row, col);
144
- }
145
- #else
146
- void check_coordinates_internal(Index , Index ) const {}
147
- #endif
66
+ // dummy resize function
67
+ EIGEN_DEVICE_FUNC void resize(Index rows, Index cols) {
68
+ EIGEN_UNUSED_VARIABLE(rows);
69
+ EIGEN_UNUSED_VARIABLE(cols);
70
+ eigen_assert(rows == this->rows() && cols == this->cols());
71
+ }
72
+
73
+ EIGEN_DEVICE_FUNC inline Scalar coeff(Index row, Index col) const { return derived().coeff(row, col); }
74
+ EIGEN_DEVICE_FUNC inline Scalar& coeffRef(Index row, Index col) { return derived().coeffRef(row, col); }
75
+
76
+ /** \see MatrixBase::copyCoeff(row,col)
77
+ */
78
+ template <typename Other>
79
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void copyCoeff(Index row, Index col, Other& other) {
80
+ derived().coeffRef(row, col) = other.coeff(row, col);
81
+ }
82
+
83
+ EIGEN_DEVICE_FUNC inline Scalar operator()(Index row, Index col) const {
84
+ check_coordinates(row, col);
85
+ return coeff(row, col);
86
+ }
87
+ EIGEN_DEVICE_FUNC inline Scalar& operator()(Index row, Index col) {
88
+ check_coordinates(row, col);
89
+ return coeffRef(row, col);
90
+ }
91
+
92
+ #ifndef EIGEN_PARSED_BY_DOXYGEN
93
+ EIGEN_DEVICE_FUNC inline const Derived& derived() const { return *static_cast<const Derived*>(this); }
94
+ EIGEN_DEVICE_FUNC inline Derived& derived() { return *static_cast<Derived*>(this); }
95
+ #endif // not EIGEN_PARSED_BY_DOXYGEN
96
+
97
+ template <typename DenseDerived>
98
+ EIGEN_DEVICE_FUNC void evalTo(MatrixBase<DenseDerived>& other) const;
99
+ template <typename DenseDerived>
100
+ EIGEN_DEVICE_FUNC void evalToLazy(MatrixBase<DenseDerived>& other) const;
101
+
102
+ EIGEN_DEVICE_FUNC DenseMatrixType toDenseMatrix() const {
103
+ DenseMatrixType res(rows(), cols());
104
+ evalToLazy(res);
105
+ return res;
106
+ }
107
+
108
+ protected:
109
+ void check_coordinates(Index row, Index col) const {
110
+ EIGEN_ONLY_USED_FOR_DEBUG(row);
111
+ EIGEN_ONLY_USED_FOR_DEBUG(col);
112
+ eigen_assert(col >= 0 && col < cols() && row >= 0 && row < rows());
113
+ const int mode = int(Mode) & ~SelfAdjoint;
114
+ EIGEN_ONLY_USED_FOR_DEBUG(mode);
115
+ eigen_assert((mode == Upper && col >= row) || (mode == Lower && col <= row) ||
116
+ ((mode == StrictlyUpper || mode == UnitUpper) && col > row) ||
117
+ ((mode == StrictlyLower || mode == UnitLower) && col < row));
118
+ }
148
119
 
120
+ #ifdef EIGEN_INTERNAL_DEBUGGING
121
+ void check_coordinates_internal(Index row, Index col) const { check_coordinates(row, col); }
122
+ #else
123
+ void check_coordinates_internal(Index, Index) const {}
124
+ #endif
149
125
  };
150
126
 
151
127
  /** \class TriangularView
152
- * \ingroup Core_Module
153
- *
154
- * \brief Expression of a triangular part in a matrix
155
- *
156
- * \param MatrixType the type of the object in which we are taking the triangular part
157
- * \param Mode the kind of triangular matrix expression to construct. Can be #Upper,
158
- * #Lower, #UnitUpper, #UnitLower, #StrictlyUpper, or #StrictlyLower.
159
- * This is in fact a bit field; it must have either #Upper or #Lower,
160
- * and additionally it may have #UnitDiag or #ZeroDiag or neither.
161
- *
162
- * This class represents a triangular part of a matrix, not necessarily square. Strictly speaking, for rectangular
163
- * matrices one should speak of "trapezoid" parts. This class is the return type
164
- * of MatrixBase::triangularView() and SparseMatrixBase::triangularView(), and most of the time this is the only way it is used.
165
- *
166
- * \sa MatrixBase::triangularView()
167
- */
128
+ * \ingroup Core_Module
129
+ *
130
+ * \brief Expression of a triangular part in a matrix
131
+ *
132
+ * \tparam MatrixType the type of the object in which we are taking the triangular part
133
+ * \tparam Mode the kind of triangular matrix expression to construct. Can be #Upper,
134
+ * #Lower, #UnitUpper, #UnitLower, #StrictlyUpper, or #StrictlyLower.
135
+ * This is in fact a bit field; it must have either #Upper or #Lower,
136
+ * and additionally it may have #UnitDiag or #ZeroDiag or neither.
137
+ *
138
+ * This class represents a triangular part of a matrix, not necessarily square. Strictly speaking, for rectangular
139
+ * matrices one should speak of "trapezoid" parts. This class is the return type
140
+ * of MatrixBase::triangularView() and SparseMatrixBase::triangularView(), and most of the time this is the only way it
141
+ * is used.
142
+ *
143
+ * \sa MatrixBase::triangularView()
144
+ */
168
145
  namespace internal {
169
- template<typename MatrixType, unsigned int _Mode>
170
- struct traits<TriangularView<MatrixType, _Mode> > : traits<MatrixType>
171
- {
146
+ template <typename MatrixType, unsigned int Mode_>
147
+ struct traits<TriangularView<MatrixType, Mode_>> : traits<MatrixType> {
172
148
  typedef typename ref_selector<MatrixType>::non_const_type MatrixTypeNested;
173
- typedef typename remove_reference<MatrixTypeNested>::type MatrixTypeNestedNonRef;
174
- typedef typename remove_all<MatrixTypeNested>::type MatrixTypeNestedCleaned;
149
+ typedef std::remove_reference_t<MatrixTypeNested> MatrixTypeNestedNonRef;
150
+ typedef remove_all_t<MatrixTypeNested> MatrixTypeNestedCleaned;
175
151
  typedef typename MatrixType::PlainObject FullMatrixType;
176
152
  typedef MatrixType ExpressionType;
177
153
  enum {
178
- Mode = _Mode,
154
+ Mode = Mode_,
179
155
  FlagsLvalueBit = is_lvalue<MatrixType>::value ? LvalueBit : 0,
180
- Flags = (MatrixTypeNestedCleaned::Flags & (HereditaryBits | FlagsLvalueBit) & (~(PacketAccessBit | DirectAccessBit | LinearAccessBit)))
156
+ Flags = (MatrixTypeNestedCleaned::Flags & (HereditaryBits | FlagsLvalueBit) &
157
+ (~(PacketAccessBit | DirectAccessBit | LinearAccessBit)))
181
158
  };
182
159
  };
183
- }
160
+ } // namespace internal
184
161
 
185
- template<typename _MatrixType, unsigned int _Mode, typename StorageKind> class TriangularViewImpl;
186
-
187
- template<typename _MatrixType, unsigned int _Mode> class TriangularView
188
- : public TriangularViewImpl<_MatrixType, _Mode, typename internal::traits<_MatrixType>::StorageKind >
189
- {
190
- public:
191
-
192
- typedef TriangularViewImpl<_MatrixType, _Mode, typename internal::traits<_MatrixType>::StorageKind > Base;
193
- typedef typename internal::traits<TriangularView>::Scalar Scalar;
194
- typedef _MatrixType MatrixType;
195
-
196
- protected:
197
- typedef typename internal::traits<TriangularView>::MatrixTypeNested MatrixTypeNested;
198
- typedef typename internal::traits<TriangularView>::MatrixTypeNestedNonRef MatrixTypeNestedNonRef;
199
-
200
- typedef typename internal::remove_all<typename MatrixType::ConjugateReturnType>::type MatrixConjugateReturnType;
201
- typedef TriangularView<typename internal::add_const<MatrixType>::type, _Mode> ConstTriangularView;
202
-
203
- public:
204
-
205
- typedef typename internal::traits<TriangularView>::StorageKind StorageKind;
206
- typedef typename internal::traits<TriangularView>::MatrixTypeNestedCleaned NestedExpression;
207
-
208
- enum {
209
- Mode = _Mode,
210
- Flags = internal::traits<TriangularView>::Flags,
211
- TransposeMode = (Mode & Upper ? Lower : 0)
212
- | (Mode & Lower ? Upper : 0)
213
- | (Mode & (UnitDiag))
214
- | (Mode & (ZeroDiag)),
215
- IsVectorAtCompileTime = false
216
- };
217
-
218
- EIGEN_DEVICE_FUNC
219
- explicit inline TriangularView(MatrixType& matrix) : m_matrix(matrix)
220
- {}
221
-
222
- EIGEN_INHERIT_ASSIGNMENT_OPERATORS(TriangularView)
223
-
224
- /** \copydoc EigenBase::rows() */
225
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
226
- inline Index rows() const EIGEN_NOEXCEPT { return m_matrix.rows(); }
227
- /** \copydoc EigenBase::cols() */
228
- EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
229
- inline Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); }
230
-
231
- /** \returns a const reference to the nested expression */
232
- EIGEN_DEVICE_FUNC
233
- const NestedExpression& nestedExpression() const { return m_matrix; }
234
-
235
- /** \returns a reference to the nested expression */
236
- EIGEN_DEVICE_FUNC
237
- NestedExpression& nestedExpression() { return m_matrix; }
238
-
239
- typedef TriangularView<const MatrixConjugateReturnType,Mode> ConjugateReturnType;
240
- /** \sa MatrixBase::conjugate() const */
241
- EIGEN_DEVICE_FUNC
242
- inline const ConjugateReturnType conjugate() const
243
- { return ConjugateReturnType(m_matrix.conjugate()); }
244
-
245
- /** \returns an expression of the complex conjugate of \c *this if Cond==true,
246
- * returns \c *this otherwise.
247
- */
248
- template<bool Cond>
249
- EIGEN_DEVICE_FUNC
250
- inline typename internal::conditional<Cond,ConjugateReturnType,ConstTriangularView>::type
251
- conjugateIf() const
252
- {
253
- typedef typename internal::conditional<Cond,ConjugateReturnType,ConstTriangularView>::type ReturnType;
254
- return ReturnType(m_matrix.template conjugateIf<Cond>());
255
- }
162
+ template <typename MatrixType_, unsigned int Mode_, typename StorageKind>
163
+ class TriangularViewImpl;
256
164
 
257
- typedef TriangularView<const typename MatrixType::AdjointReturnType,TransposeMode> AdjointReturnType;
258
- /** \sa MatrixBase::adjoint() const */
259
- EIGEN_DEVICE_FUNC
260
- inline const AdjointReturnType adjoint() const
261
- { return AdjointReturnType(m_matrix.adjoint()); }
262
-
263
- typedef TriangularView<typename MatrixType::TransposeReturnType,TransposeMode> TransposeReturnType;
264
- /** \sa MatrixBase::transpose() */
265
- EIGEN_DEVICE_FUNC
266
- inline TransposeReturnType transpose()
267
- {
268
- EIGEN_STATIC_ASSERT_LVALUE(MatrixType)
269
- typename MatrixType::TransposeReturnType tmp(m_matrix);
270
- return TransposeReturnType(tmp);
271
- }
165
+ template <typename MatrixType_, unsigned int Mode_>
166
+ class TriangularView
167
+ : public TriangularViewImpl<MatrixType_, Mode_, typename internal::traits<MatrixType_>::StorageKind> {
168
+ public:
169
+ typedef TriangularViewImpl<MatrixType_, Mode_, typename internal::traits<MatrixType_>::StorageKind> Base;
170
+ typedef typename internal::traits<TriangularView>::Scalar Scalar;
171
+ typedef MatrixType_ MatrixType;
272
172
 
273
- typedef TriangularView<const typename MatrixType::ConstTransposeReturnType,TransposeMode> ConstTransposeReturnType;
274
- /** \sa MatrixBase::transpose() const */
275
- EIGEN_DEVICE_FUNC
276
- inline const ConstTransposeReturnType transpose() const
277
- {
278
- return ConstTransposeReturnType(m_matrix.transpose());
279
- }
173
+ protected:
174
+ typedef typename internal::traits<TriangularView>::MatrixTypeNested MatrixTypeNested;
175
+ typedef typename internal::traits<TriangularView>::MatrixTypeNestedNonRef MatrixTypeNestedNonRef;
280
176
 
281
- template<typename Other>
282
- EIGEN_DEVICE_FUNC
283
- inline const Solve<TriangularView, Other>
284
- solve(const MatrixBase<Other>& other) const
285
- { return Solve<TriangularView, Other>(*this, other.derived()); }
286
-
287
- // workaround MSVC ICE
288
- #if EIGEN_COMP_MSVC
289
- template<int Side, typename Other>
290
- EIGEN_DEVICE_FUNC
291
- inline const internal::triangular_solve_retval<Side,TriangularView, Other>
292
- solve(const MatrixBase<Other>& other) const
293
- { return Base::template solve<Side>(other); }
294
- #else
295
- using Base::solve;
296
- #endif
297
-
298
- /** \returns a selfadjoint view of the referenced triangular part which must be either \c #Upper or \c #Lower.
299
- *
300
- * This is a shortcut for \code this->nestedExpression().selfadjointView<(*this)::Mode>() \endcode
301
- * \sa MatrixBase::selfadjointView() */
302
- EIGEN_DEVICE_FUNC
303
- SelfAdjointView<MatrixTypeNestedNonRef,Mode> selfadjointView()
304
- {
305
- EIGEN_STATIC_ASSERT((Mode&(UnitDiag|ZeroDiag))==0,PROGRAMMING_ERROR);
306
- return SelfAdjointView<MatrixTypeNestedNonRef,Mode>(m_matrix);
307
- }
177
+ typedef internal::remove_all_t<typename MatrixType::ConjugateReturnType> MatrixConjugateReturnType;
178
+ typedef TriangularView<std::add_const_t<MatrixType>, Mode_> ConstTriangularView;
308
179
 
309
- /** This is the const version of selfadjointView() */
310
- EIGEN_DEVICE_FUNC
311
- const SelfAdjointView<MatrixTypeNestedNonRef,Mode> selfadjointView() const
312
- {
313
- EIGEN_STATIC_ASSERT((Mode&(UnitDiag|ZeroDiag))==0,PROGRAMMING_ERROR);
314
- return SelfAdjointView<MatrixTypeNestedNonRef,Mode>(m_matrix);
315
- }
180
+ public:
181
+ typedef typename internal::traits<TriangularView>::StorageKind StorageKind;
182
+ typedef typename internal::traits<TriangularView>::MatrixTypeNestedCleaned NestedExpression;
316
183
 
184
+ enum {
185
+ Mode = Mode_,
186
+ Flags = internal::traits<TriangularView>::Flags,
187
+ TransposeMode = (int(Mode) & int(Upper) ? Lower : 0) | (int(Mode) & int(Lower) ? Upper : 0) |
188
+ (int(Mode) & int(UnitDiag)) | (int(Mode) & int(ZeroDiag)),
189
+ IsVectorAtCompileTime = false
190
+ };
317
191
 
318
- /** \returns the determinant of the triangular matrix
319
- * \sa MatrixBase::determinant() */
320
- EIGEN_DEVICE_FUNC
321
- Scalar determinant() const
322
- {
323
- if (Mode & UnitDiag)
324
- return 1;
325
- else if (Mode & ZeroDiag)
326
- return 0;
327
- else
328
- return m_matrix.diagonal().prod();
329
- }
192
+ EIGEN_DEVICE_FUNC explicit inline TriangularView(MatrixType& matrix) : m_matrix(matrix) {}
193
+
194
+ EIGEN_INHERIT_ASSIGNMENT_OPERATORS(TriangularView)
195
+
196
+ /** \copydoc EigenBase::rows() */
197
+ EIGEN_DEVICE_FUNC constexpr Index rows() const noexcept { return m_matrix.rows(); }
198
+ /** \copydoc EigenBase::cols() */
199
+ EIGEN_DEVICE_FUNC constexpr Index cols() const noexcept { return m_matrix.cols(); }
200
+
201
+ /** \returns a const reference to the nested expression */
202
+ EIGEN_DEVICE_FUNC const NestedExpression& nestedExpression() const { return m_matrix; }
203
+
204
+ /** \returns a reference to the nested expression */
205
+ EIGEN_DEVICE_FUNC NestedExpression& nestedExpression() { return m_matrix; }
206
+
207
+ typedef TriangularView<const MatrixConjugateReturnType, Mode> ConjugateReturnType;
208
+ /** \sa MatrixBase::conjugate() const */
209
+ EIGEN_DEVICE_FUNC inline const ConjugateReturnType conjugate() const {
210
+ return ConjugateReturnType(m_matrix.conjugate());
211
+ }
212
+
213
+ /** \returns an expression of the complex conjugate of \c *this if Cond==true,
214
+ * returns \c *this otherwise.
215
+ */
216
+ template <bool Cond>
217
+ EIGEN_DEVICE_FUNC inline std::conditional_t<Cond, ConjugateReturnType, ConstTriangularView> conjugateIf() const {
218
+ typedef std::conditional_t<Cond, ConjugateReturnType, ConstTriangularView> ReturnType;
219
+ return ReturnType(m_matrix.template conjugateIf<Cond>());
220
+ }
221
+
222
+ typedef TriangularView<const typename MatrixType::AdjointReturnType, TransposeMode> AdjointReturnType;
223
+ /** \sa MatrixBase::adjoint() const */
224
+ EIGEN_DEVICE_FUNC inline const AdjointReturnType adjoint() const { return AdjointReturnType(m_matrix.adjoint()); }
225
+
226
+ typedef TriangularView<typename MatrixType::TransposeReturnType, TransposeMode> TransposeReturnType;
227
+ /** \sa MatrixBase::transpose() */
228
+ template <class Dummy = int>
229
+ EIGEN_DEVICE_FUNC inline TransposeReturnType transpose(
230
+ std::enable_if_t<Eigen::internal::is_lvalue<MatrixType>::value, Dummy*> = nullptr) {
231
+ typename MatrixType::TransposeReturnType tmp(m_matrix);
232
+ return TransposeReturnType(tmp);
233
+ }
234
+
235
+ typedef TriangularView<const typename MatrixType::ConstTransposeReturnType, TransposeMode> ConstTransposeReturnType;
236
+ /** \sa MatrixBase::transpose() const */
237
+ EIGEN_DEVICE_FUNC inline const ConstTransposeReturnType transpose() const {
238
+ return ConstTransposeReturnType(m_matrix.transpose());
239
+ }
240
+
241
+ template <typename Other>
242
+ EIGEN_DEVICE_FUNC inline const Solve<TriangularView, Other> solve(const MatrixBase<Other>& other) const {
243
+ return Solve<TriangularView, Other>(*this, other.derived());
244
+ }
245
+
246
+ // workaround MSVC ICE
247
+ #if EIGEN_COMP_MSVC
248
+ template <int Side, typename Other>
249
+ EIGEN_DEVICE_FUNC inline const internal::triangular_solve_retval<Side, TriangularView, Other> solve(
250
+ const MatrixBase<Other>& other) const {
251
+ return Base::template solve<Side>(other);
252
+ }
253
+ #else
254
+ using Base::solve;
255
+ #endif
256
+
257
+ /** \returns a selfadjoint view of the referenced triangular part which must be either \c #Upper or \c #Lower.
258
+ *
259
+ * This is a shortcut for \code this->nestedExpression().selfadjointView<(*this)::Mode>() \endcode
260
+ * \sa MatrixBase::selfadjointView() */
261
+ EIGEN_DEVICE_FUNC SelfAdjointView<MatrixTypeNestedNonRef, Mode> selfadjointView() {
262
+ EIGEN_STATIC_ASSERT((Mode & (UnitDiag | ZeroDiag)) == 0, PROGRAMMING_ERROR);
263
+ return SelfAdjointView<MatrixTypeNestedNonRef, Mode>(m_matrix);
264
+ }
265
+
266
+ /** This is the const version of selfadjointView() */
267
+ EIGEN_DEVICE_FUNC const SelfAdjointView<MatrixTypeNestedNonRef, Mode> selfadjointView() const {
268
+ EIGEN_STATIC_ASSERT((Mode & (UnitDiag | ZeroDiag)) == 0, PROGRAMMING_ERROR);
269
+ return SelfAdjointView<MatrixTypeNestedNonRef, Mode>(m_matrix);
270
+ }
330
271
 
331
- protected:
272
+ /** \returns the determinant of the triangular matrix
273
+ * \sa MatrixBase::determinant() */
274
+ EIGEN_DEVICE_FUNC Scalar determinant() const {
275
+ if (Mode & UnitDiag)
276
+ return 1;
277
+ else if (Mode & ZeroDiag)
278
+ return 0;
279
+ else
280
+ return m_matrix.diagonal().prod();
281
+ }
332
282
 
333
- MatrixTypeNested m_matrix;
283
+ protected:
284
+ MatrixTypeNested m_matrix;
334
285
  };
335
286
 
336
287
  /** \ingroup Core_Module
337
- *
338
- * \brief Base class for a triangular part in a \b dense matrix
339
- *
340
- * This class is an abstract base class of class TriangularView, and objects of type TriangularViewImpl cannot be instantiated.
341
- * It extends class TriangularView with additional methods which available for dense expressions only.
342
- *
343
- * \sa class TriangularView, MatrixBase::triangularView()
344
- */
345
- template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_MatrixType,_Mode,Dense>
346
- : public TriangularBase<TriangularView<_MatrixType, _Mode> >
347
- {
348
- public:
349
-
350
- typedef TriangularView<_MatrixType, _Mode> TriangularViewType;
351
- typedef TriangularBase<TriangularViewType> Base;
352
- typedef typename internal::traits<TriangularViewType>::Scalar Scalar;
353
-
354
- typedef _MatrixType MatrixType;
355
- typedef typename MatrixType::PlainObject DenseMatrixType;
356
- typedef DenseMatrixType PlainObject;
357
-
358
- public:
359
- using Base::evalToLazy;
360
- using Base::derived;
361
-
362
- typedef typename internal::traits<TriangularViewType>::StorageKind StorageKind;
363
-
364
- enum {
365
- Mode = _Mode,
366
- Flags = internal::traits<TriangularViewType>::Flags
367
- };
368
-
369
- /** \returns the outer-stride of the underlying dense matrix
370
- * \sa DenseCoeffsBase::outerStride() */
371
- EIGEN_DEVICE_FUNC
372
- inline Index outerStride() const { return derived().nestedExpression().outerStride(); }
373
- /** \returns the inner-stride of the underlying dense matrix
374
- * \sa DenseCoeffsBase::innerStride() */
375
- EIGEN_DEVICE_FUNC
376
- inline Index innerStride() const { return derived().nestedExpression().innerStride(); }
377
-
378
- /** \sa MatrixBase::operator+=() */
379
- template<typename Other>
380
- EIGEN_DEVICE_FUNC
381
- TriangularViewType& operator+=(const DenseBase<Other>& other) {
382
- internal::call_assignment_no_alias(derived(), other.derived(), internal::add_assign_op<Scalar,typename Other::Scalar>());
383
- return derived();
384
- }
385
- /** \sa MatrixBase::operator-=() */
386
- template<typename Other>
387
- EIGEN_DEVICE_FUNC
388
- TriangularViewType& operator-=(const DenseBase<Other>& other) {
389
- internal::call_assignment_no_alias(derived(), other.derived(), internal::sub_assign_op<Scalar,typename Other::Scalar>());
390
- return derived();
391
- }
288
+ *
289
+ * \brief Base class for a triangular part in a \b dense matrix
290
+ *
291
+ * This class is an abstract base class of class TriangularView, and objects of type TriangularViewImpl cannot be
292
+ * instantiated. It extends class TriangularView with additional methods which available for dense expressions only.
293
+ *
294
+ * \sa class TriangularView, MatrixBase::triangularView()
295
+ */
296
+ template <typename MatrixType_, unsigned int Mode_>
297
+ class TriangularViewImpl<MatrixType_, Mode_, Dense> : public TriangularBase<TriangularView<MatrixType_, Mode_>> {
298
+ public:
299
+ typedef TriangularView<MatrixType_, Mode_> TriangularViewType;
300
+
301
+ typedef TriangularBase<TriangularViewType> Base;
302
+ typedef typename internal::traits<TriangularViewType>::Scalar Scalar;
303
+
304
+ typedef MatrixType_ MatrixType;
305
+ typedef typename MatrixType::PlainObject DenseMatrixType;
306
+ typedef DenseMatrixType PlainObject;
307
+
308
+ public:
309
+ using Base::derived;
310
+ using Base::evalToLazy;
311
+
312
+ typedef typename internal::traits<TriangularViewType>::StorageKind StorageKind;
313
+
314
+ enum { Mode = Mode_, Flags = internal::traits<TriangularViewType>::Flags };
315
+
316
+ /** \returns the outer-stride of the underlying dense matrix
317
+ * \sa DenseCoeffsBase::outerStride() */
318
+ EIGEN_DEVICE_FUNC inline Index outerStride() const { return derived().nestedExpression().outerStride(); }
319
+ /** \returns the inner-stride of the underlying dense matrix
320
+ * \sa DenseCoeffsBase::innerStride() */
321
+ EIGEN_DEVICE_FUNC inline Index innerStride() const { return derived().nestedExpression().innerStride(); }
322
+
323
+ /** \sa MatrixBase::operator+=() */
324
+ template <typename Other>
325
+ EIGEN_DEVICE_FUNC TriangularViewType& operator+=(const DenseBase<Other>& other) {
326
+ internal::call_assignment_no_alias(derived(), other.derived(),
327
+ internal::add_assign_op<Scalar, typename Other::Scalar>());
328
+ return derived();
329
+ }
330
+ /** \sa MatrixBase::operator-=() */
331
+ template <typename Other>
332
+ EIGEN_DEVICE_FUNC TriangularViewType& operator-=(const DenseBase<Other>& other) {
333
+ internal::call_assignment_no_alias(derived(), other.derived(),
334
+ internal::sub_assign_op<Scalar, typename Other::Scalar>());
335
+ return derived();
336
+ }
392
337
 
393
- /** \sa MatrixBase::operator*=() */
394
- EIGEN_DEVICE_FUNC
395
- TriangularViewType& operator*=(const typename internal::traits<MatrixType>::Scalar& other) { return *this = derived().nestedExpression() * other; }
396
- /** \sa DenseBase::operator/=() */
397
- EIGEN_DEVICE_FUNC
398
- TriangularViewType& operator/=(const typename internal::traits<MatrixType>::Scalar& other) { return *this = derived().nestedExpression() / other; }
399
-
400
- /** \sa MatrixBase::fill() */
401
- EIGEN_DEVICE_FUNC
402
- void fill(const Scalar& value) { setConstant(value); }
403
- /** \sa MatrixBase::setConstant() */
404
- EIGEN_DEVICE_FUNC
405
- TriangularViewType& setConstant(const Scalar& value)
406
- { return *this = MatrixType::Constant(derived().rows(), derived().cols(), value); }
407
- /** \sa MatrixBase::setZero() */
408
- EIGEN_DEVICE_FUNC
409
- TriangularViewType& setZero() { return setConstant(Scalar(0)); }
410
- /** \sa MatrixBase::setOnes() */
411
- EIGEN_DEVICE_FUNC
412
- TriangularViewType& setOnes() { return setConstant(Scalar(1)); }
413
-
414
- /** \sa MatrixBase::coeff()
415
- * \warning the coordinates must fit into the referenced triangular part
416
- */
417
- EIGEN_DEVICE_FUNC
418
- inline Scalar coeff(Index row, Index col) const
419
- {
420
- Base::check_coordinates_internal(row, col);
421
- return derived().nestedExpression().coeff(row, col);
422
- }
338
+ /** \sa MatrixBase::operator*=() */
339
+ EIGEN_DEVICE_FUNC TriangularViewType& operator*=(const typename internal::traits<MatrixType>::Scalar& other) {
340
+ return *this = derived().nestedExpression() * other;
341
+ }
342
+ /** \sa DenseBase::operator/=() */
343
+ EIGEN_DEVICE_FUNC TriangularViewType& operator/=(const typename internal::traits<MatrixType>::Scalar& other) {
344
+ return *this = derived().nestedExpression() / other;
345
+ }
423
346
 
424
- /** \sa MatrixBase::coeffRef()
425
- * \warning the coordinates must fit into the referenced triangular part
426
- */
427
- EIGEN_DEVICE_FUNC
428
- inline Scalar& coeffRef(Index row, Index col)
429
- {
430
- EIGEN_STATIC_ASSERT_LVALUE(TriangularViewType);
431
- Base::check_coordinates_internal(row, col);
432
- return derived().nestedExpression().coeffRef(row, col);
433
- }
347
+ /** \sa MatrixBase::fill() */
348
+ EIGEN_DEVICE_FUNC void fill(const Scalar& value) { setConstant(value); }
349
+ /** \sa MatrixBase::setConstant() */
350
+ EIGEN_DEVICE_FUNC TriangularViewType& setConstant(const Scalar& value) {
351
+ return *this = MatrixType::Constant(derived().rows(), derived().cols(), value);
352
+ }
353
+ /** \sa MatrixBase::setZero() */
354
+ EIGEN_DEVICE_FUNC TriangularViewType& setZero() { return setConstant(Scalar(0)); }
355
+ /** \sa MatrixBase::setOnes() */
356
+ EIGEN_DEVICE_FUNC TriangularViewType& setOnes() { return setConstant(Scalar(1)); }
357
+
358
+ /** \sa MatrixBase::coeff()
359
+ * \warning the coordinates must fit into the referenced triangular part
360
+ */
361
+ EIGEN_DEVICE_FUNC inline Scalar coeff(Index row, Index col) const {
362
+ Base::check_coordinates_internal(row, col);
363
+ return derived().nestedExpression().coeff(row, col);
364
+ }
434
365
 
435
- /** Assigns a triangular matrix to a triangular part of a dense matrix */
436
- template<typename OtherDerived>
437
- EIGEN_DEVICE_FUNC
438
- TriangularViewType& operator=(const TriangularBase<OtherDerived>& other);
366
+ /** \sa MatrixBase::coeffRef()
367
+ * \warning the coordinates must fit into the referenced triangular part
368
+ */
369
+ EIGEN_DEVICE_FUNC inline Scalar& coeffRef(Index row, Index col) {
370
+ EIGEN_STATIC_ASSERT_LVALUE(TriangularViewType);
371
+ Base::check_coordinates_internal(row, col);
372
+ return derived().nestedExpression().coeffRef(row, col);
373
+ }
374
+
375
+ /** Assigns a triangular matrix to a triangular part of a dense matrix */
376
+ template <typename OtherDerived>
377
+ EIGEN_DEVICE_FUNC TriangularViewType& operator=(const TriangularBase<OtherDerived>& other);
439
378
 
440
- /** Shortcut for\code *this = other.other.triangularView<(*this)::Mode>() \endcode */
441
- template<typename OtherDerived>
442
- EIGEN_DEVICE_FUNC
443
- TriangularViewType& operator=(const MatrixBase<OtherDerived>& other);
379
+ /** Shortcut for\code *this = other.other.triangularView<(*this)::Mode>() \endcode */
380
+ template <typename OtherDerived>
381
+ EIGEN_DEVICE_FUNC TriangularViewType& operator=(const MatrixBase<OtherDerived>& other);
444
382
 
445
383
  #ifndef EIGEN_PARSED_BY_DOXYGEN
446
- EIGEN_DEVICE_FUNC
447
- TriangularViewType& operator=(const TriangularViewImpl& other)
448
- { return *this = other.derived().nestedExpression(); }
449
-
450
- template<typename OtherDerived>
451
- /** \deprecated */
452
- EIGEN_DEPRECATED EIGEN_DEVICE_FUNC
453
- void lazyAssign(const TriangularBase<OtherDerived>& other);
454
-
455
- template<typename OtherDerived>
456
- /** \deprecated */
457
- EIGEN_DEPRECATED EIGEN_DEVICE_FUNC
458
- void lazyAssign(const MatrixBase<OtherDerived>& other);
384
+ EIGEN_DEVICE_FUNC TriangularViewType& operator=(const TriangularViewImpl& other) {
385
+ return *this = other.derived().nestedExpression();
386
+ }
387
+
388
+ template <typename OtherDerived>
389
+ /** \deprecated */
390
+ EIGEN_DEPRECATED EIGEN_DEVICE_FUNC void lazyAssign(const TriangularBase<OtherDerived>& other);
391
+
392
+ template <typename OtherDerived>
393
+ /** \deprecated */
394
+ EIGEN_DEPRECATED EIGEN_DEVICE_FUNC void lazyAssign(const MatrixBase<OtherDerived>& other);
459
395
  #endif
460
396
 
461
- /** Efficient triangular matrix times vector/matrix product */
462
- template<typename OtherDerived>
463
- EIGEN_DEVICE_FUNC
464
- const Product<TriangularViewType,OtherDerived>
465
- operator*(const MatrixBase<OtherDerived>& rhs) const
466
- {
467
- return Product<TriangularViewType,OtherDerived>(derived(), rhs.derived());
468
- }
397
+ /** Efficient triangular matrix times vector/matrix product */
398
+ template <typename OtherDerived>
399
+ EIGEN_DEVICE_FUNC const Product<TriangularViewType, OtherDerived> operator*(
400
+ const MatrixBase<OtherDerived>& rhs) const {
401
+ return Product<TriangularViewType, OtherDerived>(derived(), rhs.derived());
402
+ }
469
403
 
470
- /** Efficient vector/matrix times triangular matrix product */
471
- template<typename OtherDerived> friend
472
- EIGEN_DEVICE_FUNC
473
- const Product<OtherDerived,TriangularViewType>
474
- operator*(const MatrixBase<OtherDerived>& lhs, const TriangularViewImpl& rhs)
475
- {
476
- return Product<OtherDerived,TriangularViewType>(lhs.derived(),rhs.derived());
477
- }
404
+ /** Efficient vector/matrix times triangular matrix product */
405
+ template <typename OtherDerived>
406
+ friend EIGEN_DEVICE_FUNC const Product<OtherDerived, TriangularViewType> operator*(
407
+ const MatrixBase<OtherDerived>& lhs, const TriangularViewImpl& rhs) {
408
+ return Product<OtherDerived, TriangularViewType>(lhs.derived(), rhs.derived());
409
+ }
410
+
411
+ /** \returns the product of the inverse of \c *this with \a other, \a *this being triangular.
412
+ *
413
+ * This function computes the inverse-matrix matrix product inverse(\c *this) * \a other if
414
+ * \a Side==OnTheLeft (the default), or the right-inverse-multiply \a other * inverse(\c *this) if
415
+ * \a Side==OnTheRight.
416
+ *
417
+ * Note that the template parameter \c Side can be omitted, in which case \c Side==OnTheLeft
418
+ *
419
+ * The matrix \c *this must be triangular and invertible (i.e., all the coefficients of the
420
+ * diagonal must be non zero). It works as a forward (resp. backward) substitution if \c *this
421
+ * is an upper (resp. lower) triangular matrix.
422
+ *
423
+ * Example: \include Triangular_solve.cpp
424
+ * Output: \verbinclude Triangular_solve.out
425
+ *
426
+ * This function returns an expression of the inverse-multiply and can works in-place if it is assigned
427
+ * to the same matrix or vector \a other.
428
+ *
429
+ * For users coming from BLAS, this function (and more specifically solveInPlace()) offer
430
+ * all the operations supported by the \c *TRSV and \c *TRSM BLAS routines.
431
+ *
432
+ * \sa TriangularView::solveInPlace()
433
+ */
434
+ template <int Side, typename Other>
435
+ inline const internal::triangular_solve_retval<Side, TriangularViewType, Other> solve(
436
+ const MatrixBase<Other>& other) const;
437
+
438
+ /** "in-place" version of TriangularView::solve() where the result is written in \a other
439
+ *
440
+ * \warning The parameter is only marked 'const' to make the C++ compiler accept a temporary expression here.
441
+ * This function will const_cast it, so constness isn't honored here.
442
+ *
443
+ * Note that the template parameter \c Side can be omitted, in which case \c Side==OnTheLeft
444
+ *
445
+ * See TriangularView:solve() for the details.
446
+ */
447
+ template <int Side, typename OtherDerived>
448
+ EIGEN_DEVICE_FUNC void solveInPlace(const MatrixBase<OtherDerived>& other) const;
449
+
450
+ template <typename OtherDerived>
451
+ EIGEN_DEVICE_FUNC void solveInPlace(const MatrixBase<OtherDerived>& other) const {
452
+ return solveInPlace<OnTheLeft>(other);
453
+ }
478
454
 
479
- /** \returns the product of the inverse of \c *this with \a other, \a *this being triangular.
480
- *
481
- * This function computes the inverse-matrix matrix product inverse(\c *this) * \a other if
482
- * \a Side==OnTheLeft (the default), or the right-inverse-multiply \a other * inverse(\c *this) if
483
- * \a Side==OnTheRight.
484
- *
485
- * Note that the template parameter \c Side can be omitted, in which case \c Side==OnTheLeft
486
- *
487
- * The matrix \c *this must be triangular and invertible (i.e., all the coefficients of the
488
- * diagonal must be non zero). It works as a forward (resp. backward) substitution if \c *this
489
- * is an upper (resp. lower) triangular matrix.
490
- *
491
- * Example: \include Triangular_solve.cpp
492
- * Output: \verbinclude Triangular_solve.out
493
- *
494
- * This function returns an expression of the inverse-multiply and can works in-place if it is assigned
495
- * to the same matrix or vector \a other.
496
- *
497
- * For users coming from BLAS, this function (and more specifically solveInPlace()) offer
498
- * all the operations supported by the \c *TRSV and \c *TRSM BLAS routines.
499
- *
500
- * \sa TriangularView::solveInPlace()
501
- */
502
- template<int Side, typename Other>
503
- inline const internal::triangular_solve_retval<Side,TriangularViewType, Other>
504
- solve(const MatrixBase<Other>& other) const;
505
-
506
- /** "in-place" version of TriangularView::solve() where the result is written in \a other
507
- *
508
- * \warning The parameter is only marked 'const' to make the C++ compiler accept a temporary expression here.
509
- * This function will const_cast it, so constness isn't honored here.
510
- *
511
- * Note that the template parameter \c Side can be omitted, in which case \c Side==OnTheLeft
512
- *
513
- * See TriangularView:solve() for the details.
514
- */
515
- template<int Side, typename OtherDerived>
516
- EIGEN_DEVICE_FUNC
517
- void solveInPlace(const MatrixBase<OtherDerived>& other) const;
518
-
519
- template<typename OtherDerived>
520
- EIGEN_DEVICE_FUNC
521
- void solveInPlace(const MatrixBase<OtherDerived>& other) const
522
- { return solveInPlace<OnTheLeft>(other); }
523
-
524
- /** Swaps the coefficients of the common triangular parts of two matrices */
525
- template<typename OtherDerived>
526
- EIGEN_DEVICE_FUNC
455
+ /** Swaps the coefficients of the common triangular parts of two matrices */
456
+ template <typename OtherDerived>
457
+ EIGEN_DEVICE_FUNC
527
458
  #ifdef EIGEN_PARSED_BY_DOXYGEN
528
- void swap(TriangularBase<OtherDerived> &other)
459
+ void
460
+ swap(TriangularBase<OtherDerived>& other)
529
461
  #else
530
- void swap(TriangularBase<OtherDerived> const & other)
462
+ void
463
+ swap(TriangularBase<OtherDerived> const& other)
531
464
  #endif
532
- {
533
- EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);
534
- call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
535
- }
465
+ {
466
+ EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);
467
+ call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
468
+ }
536
469
 
537
- /** Shortcut for \code (*this).swap(other.triangularView<(*this)::Mode>()) \endcode */
538
- template<typename OtherDerived>
539
- /** \deprecated */
540
- EIGEN_DEPRECATED EIGEN_DEVICE_FUNC
541
- void swap(MatrixBase<OtherDerived> const & other)
542
- {
543
- EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);
544
- call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
545
- }
470
+ /** Shortcut for \code (*this).swap(other.triangularView<(*this)::Mode>()) \endcode */
471
+ template <typename OtherDerived>
472
+ /** \deprecated */
473
+ EIGEN_DEPRECATED EIGEN_DEVICE_FUNC void swap(MatrixBase<OtherDerived> const& other) {
474
+ EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);
475
+ call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
476
+ }
546
477
 
547
- template<typename RhsType, typename DstType>
548
- EIGEN_DEVICE_FUNC
549
- EIGEN_STRONG_INLINE void _solve_impl(const RhsType &rhs, DstType &dst) const {
550
- if(!internal::is_same_dense(dst,rhs))
551
- dst = rhs;
552
- this->solveInPlace(dst);
553
- }
478
+ template <typename RhsType, typename DstType>
479
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void _solve_impl(const RhsType& rhs, DstType& dst) const {
480
+ if (!internal::is_same_dense(dst, rhs)) dst = rhs;
481
+ this->solveInPlace(dst);
482
+ }
554
483
 
555
- template<typename ProductType>
556
- EIGEN_DEVICE_FUNC
557
- EIGEN_STRONG_INLINE TriangularViewType& _assignProduct(const ProductType& prod, const Scalar& alpha, bool beta);
558
- protected:
559
- EIGEN_DEFAULT_COPY_CONSTRUCTOR(TriangularViewImpl)
560
- EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(TriangularViewImpl)
484
+ template <typename ProductType>
485
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TriangularViewType& _assignProduct(const ProductType& prod, const Scalar& alpha,
486
+ bool beta);
561
487
 
488
+ protected:
489
+ EIGEN_DEFAULT_COPY_CONSTRUCTOR(TriangularViewImpl)
490
+ EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(TriangularViewImpl)
562
491
  };
563
492
 
564
493
  /***************************************************************************
565
- * Implementation of triangular evaluation/assignment
566
- ***************************************************************************/
494
+ * Implementation of triangular evaluation/assignment
495
+ ***************************************************************************/
567
496
 
568
497
  #ifndef EIGEN_PARSED_BY_DOXYGEN
569
498
  // FIXME should we keep that possibility
570
- template<typename MatrixType, unsigned int Mode>
571
- template<typename OtherDerived>
572
- EIGEN_DEVICE_FUNC inline TriangularView<MatrixType, Mode>&
573
- TriangularViewImpl<MatrixType, Mode, Dense>::operator=(const MatrixBase<OtherDerived>& other)
574
- {
575
- internal::call_assignment_no_alias(derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());
499
+ template <typename MatrixType, unsigned int Mode>
500
+ template <typename OtherDerived>
501
+ EIGEN_DEVICE_FUNC inline TriangularView<MatrixType, Mode>& TriangularViewImpl<MatrixType, Mode, Dense>::operator=(
502
+ const MatrixBase<OtherDerived>& other) {
503
+ internal::call_assignment_no_alias(derived(), other.derived(),
504
+ internal::assign_op<Scalar, typename OtherDerived::Scalar>());
576
505
  return derived();
577
506
  }
578
507
 
579
508
  // FIXME should we keep that possibility
580
- template<typename MatrixType, unsigned int Mode>
581
- template<typename OtherDerived>
582
- EIGEN_DEVICE_FUNC void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const MatrixBase<OtherDerived>& other)
583
- {
509
+ template <typename MatrixType, unsigned int Mode>
510
+ template <typename OtherDerived>
511
+ EIGEN_DEVICE_FUNC void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const MatrixBase<OtherDerived>& other) {
584
512
  internal::call_assignment_no_alias(derived(), other.template triangularView<Mode>());
585
513
  }
586
514
 
587
-
588
-
589
- template<typename MatrixType, unsigned int Mode>
590
- template<typename OtherDerived>
591
- EIGEN_DEVICE_FUNC inline TriangularView<MatrixType, Mode>&
592
- TriangularViewImpl<MatrixType, Mode, Dense>::operator=(const TriangularBase<OtherDerived>& other)
593
- {
515
+ template <typename MatrixType, unsigned int Mode>
516
+ template <typename OtherDerived>
517
+ EIGEN_DEVICE_FUNC inline TriangularView<MatrixType, Mode>& TriangularViewImpl<MatrixType, Mode, Dense>::operator=(
518
+ const TriangularBase<OtherDerived>& other) {
594
519
  eigen_assert(Mode == int(OtherDerived::Mode));
595
520
  internal::call_assignment(derived(), other.derived());
596
521
  return derived();
597
522
  }
598
523
 
599
- template<typename MatrixType, unsigned int Mode>
600
- template<typename OtherDerived>
601
- EIGEN_DEVICE_FUNC void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const TriangularBase<OtherDerived>& other)
602
- {
524
+ template <typename MatrixType, unsigned int Mode>
525
+ template <typename OtherDerived>
526
+ EIGEN_DEVICE_FUNC void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(
527
+ const TriangularBase<OtherDerived>& other) {
603
528
  eigen_assert(Mode == int(OtherDerived::Mode));
604
529
  internal::call_assignment_no_alias(derived(), other.derived());
605
530
  }
606
531
  #endif
607
532
 
608
533
  /***************************************************************************
609
- * Implementation of TriangularBase methods
610
- ***************************************************************************/
534
+ * Implementation of TriangularBase methods
535
+ ***************************************************************************/
611
536
 
612
537
  /** Assigns a triangular or selfadjoint matrix to a dense matrix.
613
- * If the matrix is triangular, the opposite part is set to zero. */
614
- template<typename Derived>
615
- template<typename DenseDerived>
616
- EIGEN_DEVICE_FUNC void TriangularBase<Derived>::evalTo(MatrixBase<DenseDerived> &other) const
617
- {
538
+ * If the matrix is triangular, the opposite part is set to zero. */
539
+ template <typename Derived>
540
+ template <typename DenseDerived>
541
+ EIGEN_DEVICE_FUNC void TriangularBase<Derived>::evalTo(MatrixBase<DenseDerived>& other) const {
618
542
  evalToLazy(other.derived());
619
543
  }
620
544
 
621
545
  /***************************************************************************
622
- * Implementation of TriangularView methods
623
- ***************************************************************************/
546
+ * Implementation of TriangularView methods
547
+ ***************************************************************************/
624
548
 
625
549
  /***************************************************************************
626
- * Implementation of MatrixBase methods
627
- ***************************************************************************/
550
+ * Implementation of MatrixBase methods
551
+ ***************************************************************************/
628
552
 
629
553
  /**
630
- * \returns an expression of a triangular view extracted from the current matrix
631
- *
632
- * The parameter \a Mode can have the following values: \c #Upper, \c #StrictlyUpper, \c #UnitUpper,
633
- * \c #Lower, \c #StrictlyLower, \c #UnitLower.
634
- *
635
- * Example: \include MatrixBase_triangularView.cpp
636
- * Output: \verbinclude MatrixBase_triangularView.out
637
- *
638
- * \sa class TriangularView
639
- */
640
- template<typename Derived>
641
- template<unsigned int Mode>
642
- EIGEN_DEVICE_FUNC
643
- typename MatrixBase<Derived>::template TriangularViewReturnType<Mode>::Type
644
- MatrixBase<Derived>::triangularView()
645
- {
554
+ * \returns an expression of a triangular view extracted from the current matrix
555
+ *
556
+ * The parameter \a Mode can have the following values: \c #Upper, \c #StrictlyUpper, \c #UnitUpper,
557
+ * \c #Lower, \c #StrictlyLower, \c #UnitLower.
558
+ *
559
+ * Example: \include MatrixBase_triangularView.cpp
560
+ * Output: \verbinclude MatrixBase_triangularView.out
561
+ *
562
+ * \sa class TriangularView
563
+ */
564
+ template <typename Derived>
565
+ template <unsigned int Mode>
566
+ EIGEN_DEVICE_FUNC typename MatrixBase<Derived>::template TriangularViewReturnType<Mode>::Type
567
+ MatrixBase<Derived>::triangularView() {
646
568
  return typename TriangularViewReturnType<Mode>::Type(derived());
647
569
  }
648
570
 
649
571
  /** This is the const version of MatrixBase::triangularView() */
650
- template<typename Derived>
651
- template<unsigned int Mode>
652
- EIGEN_DEVICE_FUNC
653
- typename MatrixBase<Derived>::template ConstTriangularViewReturnType<Mode>::Type
654
- MatrixBase<Derived>::triangularView() const
655
- {
572
+ template <typename Derived>
573
+ template <unsigned int Mode>
574
+ EIGEN_DEVICE_FUNC typename MatrixBase<Derived>::template ConstTriangularViewReturnType<Mode>::Type
575
+ MatrixBase<Derived>::triangularView() const {
656
576
  return typename ConstTriangularViewReturnType<Mode>::Type(derived());
657
577
  }
658
578
 
659
579
  /** \returns true if *this is approximately equal to an upper triangular matrix,
660
- * within the precision given by \a prec.
661
- *
662
- * \sa isLowerTriangular()
663
- */
664
- template<typename Derived>
665
- bool MatrixBase<Derived>::isUpperTriangular(const RealScalar& prec) const
666
- {
580
+ * within the precision given by \a prec.
581
+ *
582
+ * \sa isLowerTriangular()
583
+ */
584
+ template <typename Derived>
585
+ bool MatrixBase<Derived>::isUpperTriangular(const RealScalar& prec) const {
667
586
  RealScalar maxAbsOnUpperPart = static_cast<RealScalar>(-1);
668
- for(Index j = 0; j < cols(); ++j)
669
- {
670
- Index maxi = numext::mini(j, rows()-1);
671
- for(Index i = 0; i <= maxi; ++i)
672
- {
673
- RealScalar absValue = numext::abs(coeff(i,j));
674
- if(absValue > maxAbsOnUpperPart) maxAbsOnUpperPart = absValue;
587
+ for (Index j = 0; j < cols(); ++j) {
588
+ Index maxi = numext::mini(j, rows() - 1);
589
+ for (Index i = 0; i <= maxi; ++i) {
590
+ RealScalar absValue = numext::abs(coeff(i, j));
591
+ if (absValue > maxAbsOnUpperPart) maxAbsOnUpperPart = absValue;
675
592
  }
676
593
  }
677
594
  RealScalar threshold = maxAbsOnUpperPart * prec;
678
- for(Index j = 0; j < cols(); ++j)
679
- for(Index i = j+1; i < rows(); ++i)
680
- if(numext::abs(coeff(i, j)) > threshold) return false;
595
+ for (Index j = 0; j < cols(); ++j)
596
+ for (Index i = j + 1; i < rows(); ++i)
597
+ if (numext::abs(coeff(i, j)) > threshold) return false;
681
598
  return true;
682
599
  }
683
600
 
684
601
  /** \returns true if *this is approximately equal to a lower triangular matrix,
685
- * within the precision given by \a prec.
686
- *
687
- * \sa isUpperTriangular()
688
- */
689
- template<typename Derived>
690
- bool MatrixBase<Derived>::isLowerTriangular(const RealScalar& prec) const
691
- {
602
+ * within the precision given by \a prec.
603
+ *
604
+ * \sa isUpperTriangular()
605
+ */
606
+ template <typename Derived>
607
+ bool MatrixBase<Derived>::isLowerTriangular(const RealScalar& prec) const {
692
608
  RealScalar maxAbsOnLowerPart = static_cast<RealScalar>(-1);
693
- for(Index j = 0; j < cols(); ++j)
694
- for(Index i = j; i < rows(); ++i)
695
- {
696
- RealScalar absValue = numext::abs(coeff(i,j));
697
- if(absValue > maxAbsOnLowerPart) maxAbsOnLowerPart = absValue;
609
+ for (Index j = 0; j < cols(); ++j)
610
+ for (Index i = j; i < rows(); ++i) {
611
+ RealScalar absValue = numext::abs(coeff(i, j));
612
+ if (absValue > maxAbsOnLowerPart) maxAbsOnLowerPart = absValue;
698
613
  }
699
614
  RealScalar threshold = maxAbsOnLowerPart * prec;
700
- for(Index j = 1; j < cols(); ++j)
701
- {
702
- Index maxi = numext::mini(j, rows()-1);
703
- for(Index i = 0; i < maxi; ++i)
704
- if(numext::abs(coeff(i, j)) > threshold) return false;
615
+ for (Index j = 1; j < cols(); ++j) {
616
+ Index maxi = numext::mini(j, rows() - 1);
617
+ for (Index i = 0; i < maxi; ++i)
618
+ if (numext::abs(coeff(i, j)) > threshold) return false;
705
619
  }
706
620
  return true;
707
621
  }
708
622
 
709
-
710
623
  /***************************************************************************
711
624
  ****************************************************************************
712
625
  * Evaluators and Assignment of triangular expressions
@@ -715,92 +628,85 @@ bool MatrixBase<Derived>::isLowerTriangular(const RealScalar& prec) const
715
628
 
716
629
  namespace internal {
717
630
 
718
-
719
631
  // TODO currently a triangular expression has the form TriangularView<.,.>
720
632
  // in the future triangular-ness should be defined by the expression traits
721
- // such that Transpose<TriangularView<.,.> > is valid. (currently TriangularBase::transpose() is overloaded to make it work)
722
- template<typename MatrixType, unsigned int Mode>
723
- struct evaluator_traits<TriangularView<MatrixType,Mode> >
724
- {
633
+ // such that Transpose<TriangularView<.,.> > is valid. (currently TriangularBase::transpose() is overloaded to make
634
+ // it work)
635
+ template <typename MatrixType, unsigned int Mode>
636
+ struct evaluator_traits<TriangularView<MatrixType, Mode>> {
725
637
  typedef typename storage_kind_to_evaluator_kind<typename MatrixType::StorageKind>::Kind Kind;
726
638
  typedef typename glue_shapes<typename evaluator_traits<MatrixType>::Shape, TriangularShape>::type Shape;
727
639
  };
728
640
 
729
- template<typename MatrixType, unsigned int Mode>
730
- struct unary_evaluator<TriangularView<MatrixType,Mode>, IndexBased>
731
- : evaluator<typename internal::remove_all<MatrixType>::type>
732
- {
733
- typedef TriangularView<MatrixType,Mode> XprType;
734
- typedef evaluator<typename internal::remove_all<MatrixType>::type> Base;
735
- EIGEN_DEVICE_FUNC
736
- unary_evaluator(const XprType &xpr) : Base(xpr.nestedExpression()) {}
641
+ template <typename MatrixType, unsigned int Mode>
642
+ struct unary_evaluator<TriangularView<MatrixType, Mode>, IndexBased> : evaluator<internal::remove_all_t<MatrixType>> {
643
+ typedef TriangularView<MatrixType, Mode> XprType;
644
+ typedef evaluator<internal::remove_all_t<MatrixType>> Base;
645
+ EIGEN_DEVICE_FUNC unary_evaluator(const XprType& xpr) : Base(xpr.nestedExpression()) {}
737
646
  };
738
647
 
739
648
  // Additional assignment kinds:
740
- struct Triangular2Triangular {};
741
- struct Triangular2Dense {};
742
- struct Dense2Triangular {};
743
-
744
-
745
- template<typename Kernel, unsigned int Mode, int UnrollCount, bool ClearOpposite> struct triangular_assignment_loop;
649
+ struct Triangular2Triangular {};
650
+ struct Triangular2Dense {};
651
+ struct Dense2Triangular {};
746
652
 
653
+ template <typename Kernel, unsigned int Mode, int UnrollCount, bool ClearOpposite>
654
+ struct triangular_assignment_loop;
747
655
 
748
656
  /** \internal Specialization of the dense assignment kernel for triangular matrices.
749
- * The main difference is that the triangular, diagonal, and opposite parts are processed through three different functions.
750
- * \tparam UpLo must be either Lower or Upper
751
- * \tparam Mode must be either 0, UnitDiag, ZeroDiag, or SelfAdjoint
752
- */
753
- template<int UpLo, int Mode, int SetOpposite, typename DstEvaluatorTypeT, typename SrcEvaluatorTypeT, typename Functor, int Version = Specialized>
754
- class triangular_dense_assignment_kernel : public generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>
755
- {
756
- protected:
657
+ * The main difference is that the triangular, diagonal, and opposite parts are processed through three different
658
+ * functions. \tparam UpLo must be either Lower or Upper \tparam Mode must be either 0, UnitDiag, ZeroDiag, or
659
+ * SelfAdjoint
660
+ */
661
+ template <int UpLo, int Mode, int SetOpposite, typename DstEvaluatorTypeT, typename SrcEvaluatorTypeT, typename Functor,
662
+ int Version = Specialized>
663
+ class triangular_dense_assignment_kernel
664
+ : public generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version> {
665
+ protected:
757
666
  typedef generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version> Base;
758
667
  typedef typename Base::DstXprType DstXprType;
759
668
  typedef typename Base::SrcXprType SrcXprType;
760
669
  using Base::m_dst;
761
- using Base::m_src;
762
670
  using Base::m_functor;
763
- public:
671
+ using Base::m_src;
764
672
 
673
+ public:
765
674
  typedef typename Base::DstEvaluatorType DstEvaluatorType;
766
675
  typedef typename Base::SrcEvaluatorType SrcEvaluatorType;
767
676
  typedef typename Base::Scalar Scalar;
768
677
  typedef typename Base::AssignmentTraits AssignmentTraits;
769
678
 
770
-
771
- EIGEN_DEVICE_FUNC triangular_dense_assignment_kernel(DstEvaluatorType &dst, const SrcEvaluatorType &src, const Functor &func, DstXprType& dstExpr)
772
- : Base(dst, src, func, dstExpr)
773
- {}
679
+ EIGEN_DEVICE_FUNC triangular_dense_assignment_kernel(DstEvaluatorType& dst, const SrcEvaluatorType& src,
680
+ const Functor& func, DstXprType& dstExpr)
681
+ : Base(dst, src, func, dstExpr) {}
774
682
 
775
683
  #ifdef EIGEN_INTERNAL_DEBUGGING
776
- EIGEN_DEVICE_FUNC void assignCoeff(Index row, Index col)
777
- {
778
- eigen_internal_assert(row!=col);
779
- Base::assignCoeff(row,col);
684
+ EIGEN_DEVICE_FUNC void assignCoeff(Index row, Index col) {
685
+ eigen_internal_assert(row != col);
686
+ Base::assignCoeff(row, col);
780
687
  }
781
688
  #else
782
689
  using Base::assignCoeff;
783
690
  #endif
784
691
 
785
- EIGEN_DEVICE_FUNC void assignDiagonalCoeff(Index id)
786
- {
787
- if(Mode==UnitDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(id,id), Scalar(1));
788
- else if(Mode==ZeroDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(id,id), Scalar(0));
789
- else if(Mode==0) Base::assignCoeff(id,id);
692
+ EIGEN_DEVICE_FUNC void assignDiagonalCoeff(Index id) {
693
+ if (Mode == UnitDiag && SetOpposite)
694
+ m_functor.assignCoeff(m_dst.coeffRef(id, id), Scalar(1));
695
+ else if (Mode == ZeroDiag && SetOpposite)
696
+ m_functor.assignCoeff(m_dst.coeffRef(id, id), Scalar(0));
697
+ else if (Mode == 0)
698
+ Base::assignCoeff(id, id);
790
699
  }
791
700
 
792
- EIGEN_DEVICE_FUNC void assignOppositeCoeff(Index row, Index col)
793
- {
794
- eigen_internal_assert(row!=col);
795
- if(SetOpposite)
796
- m_functor.assignCoeff(m_dst.coeffRef(row,col), Scalar(0));
701
+ EIGEN_DEVICE_FUNC void assignOppositeCoeff(Index row, Index col) {
702
+ eigen_internal_assert(row != col);
703
+ if (SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(row, col), Scalar(0));
797
704
  }
798
705
  };
799
706
 
800
- template<int Mode, bool SetOpposite, typename DstXprType, typename SrcXprType, typename Functor>
801
- EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
802
- void call_triangular_assignment_loop(DstXprType& dst, const SrcXprType& src, const Functor &func)
803
- {
707
+ template <int Mode, bool SetOpposite, typename DstXprType, typename SrcXprType, typename Functor>
708
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_triangular_assignment_loop(DstXprType& dst, const SrcXprType& src,
709
+ const Functor& func) {
804
710
  typedef evaluator<DstXprType> DstEvaluatorType;
805
711
  typedef evaluator<SrcXprType> SrcEvaluatorType;
806
712
 
@@ -808,194 +714,187 @@ void call_triangular_assignment_loop(DstXprType& dst, const SrcXprType& src, con
808
714
 
809
715
  Index dstRows = src.rows();
810
716
  Index dstCols = src.cols();
811
- if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
812
- dst.resize(dstRows, dstCols);
717
+ if ((dst.rows() != dstRows) || (dst.cols() != dstCols)) dst.resize(dstRows, dstCols);
813
718
  DstEvaluatorType dstEvaluator(dst);
814
719
 
815
- typedef triangular_dense_assignment_kernel< Mode&(Lower|Upper),Mode&(UnitDiag|ZeroDiag|SelfAdjoint),SetOpposite,
816
- DstEvaluatorType,SrcEvaluatorType,Functor> Kernel;
720
+ typedef triangular_dense_assignment_kernel<Mode&(Lower | Upper), Mode&(UnitDiag | ZeroDiag | SelfAdjoint),
721
+ SetOpposite, DstEvaluatorType, SrcEvaluatorType, Functor>
722
+ Kernel;
817
723
  Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());
818
724
 
819
725
  enum {
820
- unroll = DstXprType::SizeAtCompileTime != Dynamic
821
- && SrcEvaluatorType::CoeffReadCost < HugeCost
822
- && DstXprType::SizeAtCompileTime * (int(DstEvaluatorType::CoeffReadCost) + int(SrcEvaluatorType::CoeffReadCost)) / 2 <= EIGEN_UNROLLING_LIMIT
823
- };
726
+ unroll = DstXprType::SizeAtCompileTime != Dynamic && SrcEvaluatorType::CoeffReadCost < HugeCost &&
727
+ DstXprType::SizeAtCompileTime *
728
+ (int(DstEvaluatorType::CoeffReadCost) + int(SrcEvaluatorType::CoeffReadCost)) / 2 <=
729
+ EIGEN_UNROLLING_LIMIT
730
+ };
824
731
 
825
- triangular_assignment_loop<Kernel, Mode, unroll ? int(DstXprType::SizeAtCompileTime) : Dynamic, SetOpposite>::run(kernel);
732
+ triangular_assignment_loop<Kernel, Mode, unroll ? int(DstXprType::SizeAtCompileTime) : Dynamic, SetOpposite>::run(
733
+ kernel);
826
734
  }
827
735
 
828
- template<int Mode, bool SetOpposite, typename DstXprType, typename SrcXprType>
829
- EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
830
- void call_triangular_assignment_loop(DstXprType& dst, const SrcXprType& src)
831
- {
832
- call_triangular_assignment_loop<Mode,SetOpposite>(dst, src, internal::assign_op<typename DstXprType::Scalar,typename SrcXprType::Scalar>());
736
+ template <int Mode, bool SetOpposite, typename DstXprType, typename SrcXprType>
737
+ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void call_triangular_assignment_loop(DstXprType& dst, const SrcXprType& src) {
738
+ call_triangular_assignment_loop<Mode, SetOpposite>(
739
+ dst, src, internal::assign_op<typename DstXprType::Scalar, typename SrcXprType::Scalar>());
833
740
  }
834
741
 
835
- template<> struct AssignmentKind<TriangularShape,TriangularShape> { typedef Triangular2Triangular Kind; };
836
- template<> struct AssignmentKind<DenseShape,TriangularShape> { typedef Triangular2Dense Kind; };
837
- template<> struct AssignmentKind<TriangularShape,DenseShape> { typedef Dense2Triangular Kind; };
838
-
742
+ template <>
743
+ struct AssignmentKind<TriangularShape, TriangularShape> {
744
+ typedef Triangular2Triangular Kind;
745
+ };
746
+ template <>
747
+ struct AssignmentKind<DenseShape, TriangularShape> {
748
+ typedef Triangular2Dense Kind;
749
+ };
750
+ template <>
751
+ struct AssignmentKind<TriangularShape, DenseShape> {
752
+ typedef Dense2Triangular Kind;
753
+ };
839
754
 
840
- template< typename DstXprType, typename SrcXprType, typename Functor>
841
- struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Triangular>
842
- {
843
- EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)
844
- {
755
+ template <typename DstXprType, typename SrcXprType, typename Functor>
756
+ struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Triangular> {
757
+ EIGEN_DEVICE_FUNC static void run(DstXprType& dst, const SrcXprType& src, const Functor& func) {
845
758
  eigen_assert(int(DstXprType::Mode) == int(SrcXprType::Mode));
846
759
 
847
760
  call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
848
761
  }
849
762
  };
850
763
 
851
- template< typename DstXprType, typename SrcXprType, typename Functor>
852
- struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Dense>
853
- {
854
- EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)
855
- {
764
+ template <typename DstXprType, typename SrcXprType, typename Functor>
765
+ struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Dense> {
766
+ EIGEN_DEVICE_FUNC static void run(DstXprType& dst, const SrcXprType& src, const Functor& func) {
856
767
  call_triangular_assignment_loop<SrcXprType::Mode, (int(SrcXprType::Mode) & int(SelfAdjoint)) == 0>(dst, src, func);
857
768
  }
858
769
  };
859
770
 
860
- template< typename DstXprType, typename SrcXprType, typename Functor>
861
- struct Assignment<DstXprType, SrcXprType, Functor, Dense2Triangular>
862
- {
863
- EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)
864
- {
771
+ template <typename DstXprType, typename SrcXprType, typename Functor>
772
+ struct Assignment<DstXprType, SrcXprType, Functor, Dense2Triangular> {
773
+ EIGEN_DEVICE_FUNC static void run(DstXprType& dst, const SrcXprType& src, const Functor& func) {
865
774
  call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
866
775
  }
867
776
  };
868
777
 
869
-
870
- template<typename Kernel, unsigned int Mode, int UnrollCount, bool SetOpposite>
871
- struct triangular_assignment_loop
872
- {
778
+ template <typename Kernel, unsigned int Mode, int UnrollCount, bool SetOpposite>
779
+ struct triangular_assignment_loop {
873
780
  // FIXME: this is not very clean, perhaps this information should be provided by the kernel?
874
781
  typedef typename Kernel::DstEvaluatorType DstEvaluatorType;
875
782
  typedef typename DstEvaluatorType::XprType DstXprType;
876
783
 
877
784
  enum {
878
- col = (UnrollCount-1) / DstXprType::RowsAtCompileTime,
879
- row = (UnrollCount-1) % DstXprType::RowsAtCompileTime
785
+ col = (UnrollCount - 1) / DstXprType::RowsAtCompileTime,
786
+ row = (UnrollCount - 1) % DstXprType::RowsAtCompileTime
880
787
  };
881
788
 
882
789
  typedef typename Kernel::Scalar Scalar;
883
790
 
884
- EIGEN_DEVICE_FUNC
885
- static inline void run(Kernel &kernel)
886
- {
887
- triangular_assignment_loop<Kernel, Mode, UnrollCount-1, SetOpposite>::run(kernel);
791
+ EIGEN_DEVICE_FUNC static inline void run(Kernel& kernel) {
792
+ triangular_assignment_loop<Kernel, Mode, UnrollCount - 1, SetOpposite>::run(kernel);
888
793
 
889
- if(row==col)
794
+ if (row == col)
890
795
  kernel.assignDiagonalCoeff(row);
891
- else if( ((Mode&Lower) && row>col) || ((Mode&Upper) && row<col) )
892
- kernel.assignCoeff(row,col);
893
- else if(SetOpposite)
894
- kernel.assignOppositeCoeff(row,col);
796
+ else if (((Mode & Lower) && row > col) || ((Mode & Upper) && row < col))
797
+ kernel.assignCoeff(row, col);
798
+ else if (SetOpposite)
799
+ kernel.assignOppositeCoeff(row, col);
895
800
  }
896
801
  };
897
802
 
898
803
  // prevent buggy user code from causing an infinite recursion
899
- template<typename Kernel, unsigned int Mode, bool SetOpposite>
900
- struct triangular_assignment_loop<Kernel, Mode, 0, SetOpposite>
901
- {
902
- EIGEN_DEVICE_FUNC
903
- static inline void run(Kernel &) {}
804
+ template <typename Kernel, unsigned int Mode, bool SetOpposite>
805
+ struct triangular_assignment_loop<Kernel, Mode, 0, SetOpposite> {
806
+ EIGEN_DEVICE_FUNC static inline void run(Kernel&) {}
904
807
  };
905
808
 
906
-
907
-
908
809
  // TODO: experiment with a recursive assignment procedure splitting the current
909
810
  // triangular part into one rectangular and two triangular parts.
910
811
 
911
-
912
- template<typename Kernel, unsigned int Mode, bool SetOpposite>
913
- struct triangular_assignment_loop<Kernel, Mode, Dynamic, SetOpposite>
914
- {
812
+ template <typename Kernel, unsigned int Mode, bool SetOpposite>
813
+ struct triangular_assignment_loop<Kernel, Mode, Dynamic, SetOpposite> {
915
814
  typedef typename Kernel::Scalar Scalar;
916
- EIGEN_DEVICE_FUNC
917
- static inline void run(Kernel &kernel)
918
- {
919
- for(Index j = 0; j < kernel.cols(); ++j)
920
- {
815
+ EIGEN_DEVICE_FUNC static inline void run(Kernel& kernel) {
816
+ for (Index j = 0; j < kernel.cols(); ++j) {
921
817
  Index maxi = numext::mini(j, kernel.rows());
922
818
  Index i = 0;
923
- if (((Mode&Lower) && SetOpposite) || (Mode&Upper))
924
- {
925
- for(; i < maxi; ++i)
926
- if(Mode&Upper) kernel.assignCoeff(i, j);
927
- else kernel.assignOppositeCoeff(i, j);
928
- }
929
- else
819
+ if (((Mode & Lower) && SetOpposite) || (Mode & Upper)) {
820
+ for (; i < maxi; ++i)
821
+ if (Mode & Upper)
822
+ kernel.assignCoeff(i, j);
823
+ else
824
+ kernel.assignOppositeCoeff(i, j);
825
+ } else
930
826
  i = maxi;
931
827
 
932
- if(i<kernel.rows()) // then i==j
828
+ if (i < kernel.rows()) // then i==j
933
829
  kernel.assignDiagonalCoeff(i++);
934
830
 
935
- if (((Mode&Upper) && SetOpposite) || (Mode&Lower))
936
- {
937
- for(; i < kernel.rows(); ++i)
938
- if(Mode&Lower) kernel.assignCoeff(i, j);
939
- else kernel.assignOppositeCoeff(i, j);
831
+ if (((Mode & Upper) && SetOpposite) || (Mode & Lower)) {
832
+ for (; i < kernel.rows(); ++i)
833
+ if (Mode & Lower)
834
+ kernel.assignCoeff(i, j);
835
+ else
836
+ kernel.assignOppositeCoeff(i, j);
940
837
  }
941
838
  }
942
839
  }
943
840
  };
944
841
 
945
- } // end namespace internal
842
+ } // end namespace internal
946
843
 
947
844
  /** Assigns a triangular or selfadjoint matrix to a dense matrix.
948
- * If the matrix is triangular, the opposite part is set to zero. */
949
- template<typename Derived>
950
- template<typename DenseDerived>
951
- EIGEN_DEVICE_FUNC void TriangularBase<Derived>::evalToLazy(MatrixBase<DenseDerived> &other) const
952
- {
845
+ * If the matrix is triangular, the opposite part is set to zero. */
846
+ template <typename Derived>
847
+ template <typename DenseDerived>
848
+ EIGEN_DEVICE_FUNC void TriangularBase<Derived>::evalToLazy(MatrixBase<DenseDerived>& other) const {
953
849
  other.derived().resize(this->rows(), this->cols());
954
- internal::call_triangular_assignment_loop<Derived::Mode, (int(Derived::Mode) & int(SelfAdjoint)) == 0 /* SetOpposite */>(other.derived(), derived().nestedExpression());
850
+ internal::call_triangular_assignment_loop<Derived::Mode,
851
+ (int(Derived::Mode) & int(SelfAdjoint)) == 0 /* SetOpposite */>(
852
+ other.derived(), derived().nestedExpression());
955
853
  }
956
854
 
957
855
  namespace internal {
958
856
 
959
857
  // Triangular = Product
960
- template< typename DstXprType, typename Lhs, typename Rhs, typename Scalar>
961
- struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
962
- {
963
- typedef Product<Lhs,Rhs,DefaultProduct> SrcXprType;
964
- static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op<Scalar,typename SrcXprType::Scalar> &)
965
- {
858
+ template <typename DstXprType, typename Lhs, typename Rhs, typename Scalar>
859
+ struct Assignment<DstXprType, Product<Lhs, Rhs, DefaultProduct>,
860
+ internal::assign_op<Scalar, typename Product<Lhs, Rhs, DefaultProduct>::Scalar>, Dense2Triangular> {
861
+ typedef Product<Lhs, Rhs, DefaultProduct> SrcXprType;
862
+ static void run(DstXprType& dst, const SrcXprType& src,
863
+ const internal::assign_op<Scalar, typename SrcXprType::Scalar>&) {
966
864
  Index dstRows = src.rows();
967
865
  Index dstCols = src.cols();
968
- if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
969
- dst.resize(dstRows, dstCols);
866
+ if ((dst.rows() != dstRows) || (dst.cols() != dstCols)) dst.resize(dstRows, dstCols);
970
867
 
971
868
  dst._assignProduct(src, Scalar(1), false);
972
869
  }
973
870
  };
974
871
 
975
872
  // Triangular += Product
976
- template< typename DstXprType, typename Lhs, typename Rhs, typename Scalar>
977
- struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::add_assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
978
- {
979
- typedef Product<Lhs,Rhs,DefaultProduct> SrcXprType;
980
- static void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op<Scalar,typename SrcXprType::Scalar> &)
981
- {
873
+ template <typename DstXprType, typename Lhs, typename Rhs, typename Scalar>
874
+ struct Assignment<DstXprType, Product<Lhs, Rhs, DefaultProduct>,
875
+ internal::add_assign_op<Scalar, typename Product<Lhs, Rhs, DefaultProduct>::Scalar>,
876
+ Dense2Triangular> {
877
+ typedef Product<Lhs, Rhs, DefaultProduct> SrcXprType;
878
+ static void run(DstXprType& dst, const SrcXprType& src,
879
+ const internal::add_assign_op<Scalar, typename SrcXprType::Scalar>&) {
982
880
  dst._assignProduct(src, Scalar(1), true);
983
881
  }
984
882
  };
985
883
 
986
884
  // Triangular -= Product
987
- template< typename DstXprType, typename Lhs, typename Rhs, typename Scalar>
988
- struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::sub_assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
989
- {
990
- typedef Product<Lhs,Rhs,DefaultProduct> SrcXprType;
991
- static void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op<Scalar,typename SrcXprType::Scalar> &)
992
- {
885
+ template <typename DstXprType, typename Lhs, typename Rhs, typename Scalar>
886
+ struct Assignment<DstXprType, Product<Lhs, Rhs, DefaultProduct>,
887
+ internal::sub_assign_op<Scalar, typename Product<Lhs, Rhs, DefaultProduct>::Scalar>,
888
+ Dense2Triangular> {
889
+ typedef Product<Lhs, Rhs, DefaultProduct> SrcXprType;
890
+ static void run(DstXprType& dst, const SrcXprType& src,
891
+ const internal::sub_assign_op<Scalar, typename SrcXprType::Scalar>&) {
993
892
  dst._assignProduct(src, Scalar(-1), true);
994
893
  }
995
894
  };
996
895
 
997
- } // end namespace internal
896
+ } // end namespace internal
998
897
 
999
- } // end namespace Eigen
898
+ } // end namespace Eigen
1000
899
 
1001
- #endif // EIGEN_TRIANGULARMATRIX_H
900
+ #endif // EIGEN_TRIANGULARMATRIX_H