ruby-eigen 0.0.9 → 0.0.10.pre1

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 (293) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +22 -0
  3. data/README.md +21 -0
  4. data/ext/eigen/eigen3/COPYING.BSD +26 -0
  5. data/ext/eigen/eigen3/COPYING.MPL2 +373 -0
  6. data/ext/eigen/eigen3/COPYING.README +18 -0
  7. data/ext/eigen/eigen3/Eigen/Array +11 -0
  8. data/ext/eigen/eigen3/Eigen/Cholesky +32 -0
  9. data/ext/eigen/eigen3/Eigen/CholmodSupport +45 -0
  10. data/ext/eigen/eigen3/Eigen/Core +376 -0
  11. data/ext/eigen/eigen3/Eigen/Dense +7 -0
  12. data/ext/eigen/eigen3/Eigen/Eigen +2 -0
  13. data/ext/eigen/eigen3/Eigen/Eigen2Support +95 -0
  14. data/ext/eigen/eigen3/Eigen/Eigenvalues +48 -0
  15. data/ext/eigen/eigen3/Eigen/Geometry +63 -0
  16. data/ext/eigen/eigen3/Eigen/Householder +23 -0
  17. data/ext/eigen/eigen3/Eigen/IterativeLinearSolvers +40 -0
  18. data/ext/eigen/eigen3/Eigen/Jacobi +26 -0
  19. data/ext/eigen/eigen3/Eigen/LU +41 -0
  20. data/ext/eigen/eigen3/Eigen/LeastSquares +32 -0
  21. data/ext/eigen/eigen3/Eigen/MetisSupport +28 -0
  22. data/ext/eigen/eigen3/Eigen/PaStiXSupport +46 -0
  23. data/ext/eigen/eigen3/Eigen/PardisoSupport +30 -0
  24. data/ext/eigen/eigen3/Eigen/QR +45 -0
  25. data/ext/eigen/eigen3/Eigen/QtAlignedMalloc +34 -0
  26. data/ext/eigen/eigen3/Eigen/SPQRSupport +29 -0
  27. data/ext/eigen/eigen3/Eigen/SVD +37 -0
  28. data/ext/eigen/eigen3/Eigen/Sparse +27 -0
  29. data/ext/eigen/eigen3/Eigen/SparseCore +64 -0
  30. data/ext/eigen/eigen3/Eigen/SparseLU +49 -0
  31. data/ext/eigen/eigen3/Eigen/SparseQR +33 -0
  32. data/ext/eigen/eigen3/Eigen/StdDeque +27 -0
  33. data/ext/eigen/eigen3/Eigen/StdList +26 -0
  34. data/ext/eigen/eigen3/Eigen/StdVector +27 -0
  35. data/ext/eigen/eigen3/Eigen/SuperLUSupport +59 -0
  36. data/ext/eigen/eigen3/Eigen/UmfPackSupport +36 -0
  37. data/ext/eigen/eigen3/Eigen/src/Cholesky/LDLT.h +611 -0
  38. data/ext/eigen/eigen3/Eigen/src/Cholesky/LLT.h +498 -0
  39. data/ext/eigen/eigen3/Eigen/src/Cholesky/LLT_MKL.h +102 -0
  40. data/ext/eigen/eigen3/Eigen/src/CholmodSupport/CholmodSupport.h +607 -0
  41. data/ext/eigen/eigen3/Eigen/src/Core/Array.h +323 -0
  42. data/ext/eigen/eigen3/Eigen/src/Core/ArrayBase.h +226 -0
  43. data/ext/eigen/eigen3/Eigen/src/Core/ArrayWrapper.h +264 -0
  44. data/ext/eigen/eigen3/Eigen/src/Core/Assign.h +590 -0
  45. data/ext/eigen/eigen3/Eigen/src/Core/Assign_MKL.h +224 -0
  46. data/ext/eigen/eigen3/Eigen/src/Core/BandMatrix.h +334 -0
  47. data/ext/eigen/eigen3/Eigen/src/Core/Block.h +406 -0
  48. data/ext/eigen/eigen3/Eigen/src/Core/BooleanRedux.h +154 -0
  49. data/ext/eigen/eigen3/Eigen/src/Core/CommaInitializer.h +154 -0
  50. data/ext/eigen/eigen3/Eigen/src/Core/CoreIterators.h +61 -0
  51. data/ext/eigen/eigen3/Eigen/src/Core/CwiseBinaryOp.h +230 -0
  52. data/ext/eigen/eigen3/Eigen/src/Core/CwiseNullaryOp.h +864 -0
  53. data/ext/eigen/eigen3/Eigen/src/Core/CwiseUnaryOp.h +126 -0
  54. data/ext/eigen/eigen3/Eigen/src/Core/CwiseUnaryView.h +139 -0
  55. data/ext/eigen/eigen3/Eigen/src/Core/DenseBase.h +521 -0
  56. data/ext/eigen/eigen3/Eigen/src/Core/DenseCoeffsBase.h +754 -0
  57. data/ext/eigen/eigen3/Eigen/src/Core/DenseStorage.h +434 -0
  58. data/ext/eigen/eigen3/Eigen/src/Core/Diagonal.h +237 -0
  59. data/ext/eigen/eigen3/Eigen/src/Core/DiagonalMatrix.h +313 -0
  60. data/ext/eigen/eigen3/Eigen/src/Core/DiagonalProduct.h +131 -0
  61. data/ext/eigen/eigen3/Eigen/src/Core/Dot.h +263 -0
  62. data/ext/eigen/eigen3/Eigen/src/Core/EigenBase.h +131 -0
  63. data/ext/eigen/eigen3/Eigen/src/Core/Flagged.h +140 -0
  64. data/ext/eigen/eigen3/Eigen/src/Core/ForceAlignedAccess.h +146 -0
  65. data/ext/eigen/eigen3/Eigen/src/Core/Functors.h +1026 -0
  66. data/ext/eigen/eigen3/Eigen/src/Core/Fuzzy.h +150 -0
  67. data/ext/eigen/eigen3/Eigen/src/Core/GeneralProduct.h +635 -0
  68. data/ext/eigen/eigen3/Eigen/src/Core/GenericPacketMath.h +350 -0
  69. data/ext/eigen/eigen3/Eigen/src/Core/GlobalFunctions.h +92 -0
  70. data/ext/eigen/eigen3/Eigen/src/Core/IO.h +250 -0
  71. data/ext/eigen/eigen3/Eigen/src/Core/Map.h +192 -0
  72. data/ext/eigen/eigen3/Eigen/src/Core/MapBase.h +247 -0
  73. data/ext/eigen/eigen3/Eigen/src/Core/MathFunctions.h +768 -0
  74. data/ext/eigen/eigen3/Eigen/src/Core/Matrix.h +420 -0
  75. data/ext/eigen/eigen3/Eigen/src/Core/MatrixBase.h +563 -0
  76. data/ext/eigen/eigen3/Eigen/src/Core/NestByValue.h +111 -0
  77. data/ext/eigen/eigen3/Eigen/src/Core/NoAlias.h +134 -0
  78. data/ext/eigen/eigen3/Eigen/src/Core/NumTraits.h +150 -0
  79. data/ext/eigen/eigen3/Eigen/src/Core/PermutationMatrix.h +721 -0
  80. data/ext/eigen/eigen3/Eigen/src/Core/PlainObjectBase.h +822 -0
  81. data/ext/eigen/eigen3/Eigen/src/Core/ProductBase.h +290 -0
  82. data/ext/eigen/eigen3/Eigen/src/Core/Random.h +152 -0
  83. data/ext/eigen/eigen3/Eigen/src/Core/Redux.h +409 -0
  84. data/ext/eigen/eigen3/Eigen/src/Core/Ref.h +278 -0
  85. data/ext/eigen/eigen3/Eigen/src/Core/Replicate.h +177 -0
  86. data/ext/eigen/eigen3/Eigen/src/Core/ReturnByValue.h +99 -0
  87. data/ext/eigen/eigen3/Eigen/src/Core/Reverse.h +224 -0
  88. data/ext/eigen/eigen3/Eigen/src/Core/Select.h +162 -0
  89. data/ext/eigen/eigen3/Eigen/src/Core/SelfAdjointView.h +314 -0
  90. data/ext/eigen/eigen3/Eigen/src/Core/SelfCwiseBinaryOp.h +191 -0
  91. data/ext/eigen/eigen3/Eigen/src/Core/SolveTriangular.h +260 -0
  92. data/ext/eigen/eigen3/Eigen/src/Core/StableNorm.h +203 -0
  93. data/ext/eigen/eigen3/Eigen/src/Core/Stride.h +108 -0
  94. data/ext/eigen/eigen3/Eigen/src/Core/Swap.h +126 -0
  95. data/ext/eigen/eigen3/Eigen/src/Core/Transpose.h +419 -0
  96. data/ext/eigen/eigen3/Eigen/src/Core/Transpositions.h +436 -0
  97. data/ext/eigen/eigen3/Eigen/src/Core/TriangularMatrix.h +839 -0
  98. data/ext/eigen/eigen3/Eigen/src/Core/VectorBlock.h +95 -0
  99. data/ext/eigen/eigen3/Eigen/src/Core/VectorwiseOp.h +642 -0
  100. data/ext/eigen/eigen3/Eigen/src/Core/Visitor.h +237 -0
  101. data/ext/eigen/eigen3/Eigen/src/Core/arch/AltiVec/Complex.h +217 -0
  102. data/ext/eigen/eigen3/Eigen/src/Core/arch/AltiVec/PacketMath.h +501 -0
  103. data/ext/eigen/eigen3/Eigen/src/Core/arch/Default/Settings.h +49 -0
  104. data/ext/eigen/eigen3/Eigen/src/Core/arch/NEON/Complex.h +253 -0
  105. data/ext/eigen/eigen3/Eigen/src/Core/arch/NEON/PacketMath.h +420 -0
  106. data/ext/eigen/eigen3/Eigen/src/Core/arch/SSE/Complex.h +442 -0
  107. data/ext/eigen/eigen3/Eigen/src/Core/arch/SSE/MathFunctions.h +475 -0
  108. data/ext/eigen/eigen3/Eigen/src/Core/arch/SSE/PacketMath.h +649 -0
  109. data/ext/eigen/eigen3/Eigen/src/Core/products/CoeffBasedProduct.h +476 -0
  110. data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h +1341 -0
  111. data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix.h +427 -0
  112. data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +278 -0
  113. data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_MKL.h +146 -0
  114. data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix_MKL.h +118 -0
  115. data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixVector.h +566 -0
  116. data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixVector_MKL.h +131 -0
  117. data/ext/eigen/eigen3/Eigen/src/Core/products/Parallelizer.h +162 -0
  118. data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +436 -0
  119. data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix_MKL.h +295 -0
  120. data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector.h +281 -0
  121. data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector_MKL.h +114 -0
  122. data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointProduct.h +123 -0
  123. data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointRank2Update.h +93 -0
  124. data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix.h +427 -0
  125. data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix_MKL.h +309 -0
  126. data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularMatrixVector.h +348 -0
  127. data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularMatrixVector_MKL.h +247 -0
  128. data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularSolverMatrix.h +332 -0
  129. data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularSolverMatrix_MKL.h +155 -0
  130. data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularSolverVector.h +139 -0
  131. data/ext/eigen/eigen3/Eigen/src/Core/util/BlasUtil.h +264 -0
  132. data/ext/eigen/eigen3/Eigen/src/Core/util/Constants.h +451 -0
  133. data/ext/eigen/eigen3/Eigen/src/Core/util/DisableStupidWarnings.h +40 -0
  134. data/ext/eigen/eigen3/Eigen/src/Core/util/ForwardDeclarations.h +302 -0
  135. data/ext/eigen/eigen3/Eigen/src/Core/util/MKL_support.h +158 -0
  136. data/ext/eigen/eigen3/Eigen/src/Core/util/Macros.h +451 -0
  137. data/ext/eigen/eigen3/Eigen/src/Core/util/Memory.h +977 -0
  138. data/ext/eigen/eigen3/Eigen/src/Core/util/Meta.h +243 -0
  139. data/ext/eigen/eigen3/Eigen/src/Core/util/NonMPL2.h +3 -0
  140. data/ext/eigen/eigen3/Eigen/src/Core/util/ReenableStupidWarnings.h +14 -0
  141. data/ext/eigen/eigen3/Eigen/src/Core/util/StaticAssert.h +208 -0
  142. data/ext/eigen/eigen3/Eigen/src/Core/util/XprHelper.h +469 -0
  143. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Block.h +126 -0
  144. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Cwise.h +192 -0
  145. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/CwiseOperators.h +298 -0
  146. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/AlignedBox.h +159 -0
  147. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/All.h +115 -0
  148. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/AngleAxis.h +214 -0
  149. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Hyperplane.h +254 -0
  150. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/ParametrizedLine.h +141 -0
  151. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Quaternion.h +495 -0
  152. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Rotation2D.h +145 -0
  153. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/RotationBase.h +123 -0
  154. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Scaling.h +167 -0
  155. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Transform.h +786 -0
  156. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Translation.h +184 -0
  157. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/LU.h +120 -0
  158. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Lazy.h +71 -0
  159. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/LeastSquares.h +169 -0
  160. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Macros.h +20 -0
  161. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/MathFunctions.h +57 -0
  162. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Memory.h +45 -0
  163. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Meta.h +75 -0
  164. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Minor.h +117 -0
  165. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/QR.h +67 -0
  166. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/SVD.h +637 -0
  167. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/TriangularSolver.h +42 -0
  168. data/ext/eigen/eigen3/Eigen/src/Eigen2Support/VectorBlock.h +94 -0
  169. data/ext/eigen/eigen3/Eigen/src/Eigenvalues/ComplexEigenSolver.h +341 -0
  170. data/ext/eigen/eigen3/Eigen/src/Eigenvalues/ComplexSchur.h +456 -0
  171. data/ext/eigen/eigen3/Eigen/src/Eigenvalues/ComplexSchur_MKL.h +94 -0
  172. data/ext/eigen/eigen3/Eigen/src/Eigenvalues/EigenSolver.h +607 -0
  173. data/ext/eigen/eigen3/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +350 -0
  174. data/ext/eigen/eigen3/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +227 -0
  175. data/ext/eigen/eigen3/Eigen/src/Eigenvalues/HessenbergDecomposition.h +373 -0
  176. data/ext/eigen/eigen3/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +160 -0
  177. data/ext/eigen/eigen3/Eigen/src/Eigenvalues/RealQZ.h +624 -0
  178. data/ext/eigen/eigen3/Eigen/src/Eigenvalues/RealSchur.h +525 -0
  179. data/ext/eigen/eigen3/Eigen/src/Eigenvalues/RealSchur_MKL.h +83 -0
  180. data/ext/eigen/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +801 -0
  181. data/ext/eigen/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_MKL.h +92 -0
  182. data/ext/eigen/eigen3/Eigen/src/Eigenvalues/Tridiagonalization.h +557 -0
  183. data/ext/eigen/eigen3/Eigen/src/Geometry/AlignedBox.h +392 -0
  184. data/ext/eigen/eigen3/Eigen/src/Geometry/AngleAxis.h +233 -0
  185. data/ext/eigen/eigen3/Eigen/src/Geometry/EulerAngles.h +104 -0
  186. data/ext/eigen/eigen3/Eigen/src/Geometry/Homogeneous.h +307 -0
  187. data/ext/eigen/eigen3/Eigen/src/Geometry/Hyperplane.h +280 -0
  188. data/ext/eigen/eigen3/Eigen/src/Geometry/OrthoMethods.h +218 -0
  189. data/ext/eigen/eigen3/Eigen/src/Geometry/ParametrizedLine.h +195 -0
  190. data/ext/eigen/eigen3/Eigen/src/Geometry/Quaternion.h +776 -0
  191. data/ext/eigen/eigen3/Eigen/src/Geometry/Rotation2D.h +160 -0
  192. data/ext/eigen/eigen3/Eigen/src/Geometry/RotationBase.h +206 -0
  193. data/ext/eigen/eigen3/Eigen/src/Geometry/Scaling.h +166 -0
  194. data/ext/eigen/eigen3/Eigen/src/Geometry/Transform.h +1455 -0
  195. data/ext/eigen/eigen3/Eigen/src/Geometry/Translation.h +206 -0
  196. data/ext/eigen/eigen3/Eigen/src/Geometry/Umeyama.h +177 -0
  197. data/ext/eigen/eigen3/Eigen/src/Geometry/arch/Geometry_SSE.h +115 -0
  198. data/ext/eigen/eigen3/Eigen/src/Householder/BlockHouseholder.h +68 -0
  199. data/ext/eigen/eigen3/Eigen/src/Householder/Householder.h +171 -0
  200. data/ext/eigen/eigen3/Eigen/src/Householder/HouseholderSequence.h +441 -0
  201. data/ext/eigen/eigen3/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +149 -0
  202. data/ext/eigen/eigen3/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +263 -0
  203. data/ext/eigen/eigen3/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +256 -0
  204. data/ext/eigen/eigen3/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +282 -0
  205. data/ext/eigen/eigen3/Eigen/src/Jacobi/Jacobi.h +433 -0
  206. data/ext/eigen/eigen3/Eigen/src/LU/Determinant.h +101 -0
  207. data/ext/eigen/eigen3/Eigen/src/LU/FullPivLU.h +751 -0
  208. data/ext/eigen/eigen3/Eigen/src/LU/Inverse.h +400 -0
  209. data/ext/eigen/eigen3/Eigen/src/LU/PartialPivLU.h +509 -0
  210. data/ext/eigen/eigen3/Eigen/src/LU/PartialPivLU_MKL.h +85 -0
  211. data/ext/eigen/eigen3/Eigen/src/LU/arch/Inverse_SSE.h +329 -0
  212. data/ext/eigen/eigen3/Eigen/src/MetisSupport/MetisSupport.h +137 -0
  213. data/ext/eigen/eigen3/Eigen/src/OrderingMethods/Amd.h +444 -0
  214. data/ext/eigen/eigen3/Eigen/src/OrderingMethods/Eigen_Colamd.h +1850 -0
  215. data/ext/eigen/eigen3/Eigen/src/PaStiXSupport/PaStiXSupport.h +721 -0
  216. data/ext/eigen/eigen3/Eigen/src/PardisoSupport/PardisoSupport.h +592 -0
  217. data/ext/eigen/eigen3/Eigen/src/QR/ColPivHouseholderQR.h +580 -0
  218. data/ext/eigen/eigen3/Eigen/src/QR/ColPivHouseholderQR_MKL.h +99 -0
  219. data/ext/eigen/eigen3/Eigen/src/QR/FullPivHouseholderQR.h +622 -0
  220. data/ext/eigen/eigen3/Eigen/src/QR/HouseholderQR.h +388 -0
  221. data/ext/eigen/eigen3/Eigen/src/QR/HouseholderQR_MKL.h +71 -0
  222. data/ext/eigen/eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +338 -0
  223. data/ext/eigen/eigen3/Eigen/src/SVD/JacobiSVD.h +976 -0
  224. data/ext/eigen/eigen3/Eigen/src/SVD/JacobiSVD_MKL.h +92 -0
  225. data/ext/eigen/eigen3/Eigen/src/SVD/UpperBidiagonalization.h +148 -0
  226. data/ext/eigen/eigen3/Eigen/src/SparseCholesky/SimplicialCholesky.h +671 -0
  227. data/ext/eigen/eigen3/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +199 -0
  228. data/ext/eigen/eigen3/Eigen/src/SparseCore/AmbiVector.h +373 -0
  229. data/ext/eigen/eigen3/Eigen/src/SparseCore/CompressedStorage.h +233 -0
  230. data/ext/eigen/eigen3/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +245 -0
  231. data/ext/eigen/eigen3/Eigen/src/SparseCore/MappedSparseMatrix.h +181 -0
  232. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseBlock.h +537 -0
  233. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseColEtree.h +206 -0
  234. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +325 -0
  235. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +163 -0
  236. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseDenseProduct.h +311 -0
  237. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseDiagonalProduct.h +196 -0
  238. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseDot.h +101 -0
  239. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseFuzzy.h +26 -0
  240. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseMatrix.h +1262 -0
  241. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseMatrixBase.h +461 -0
  242. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparsePermutation.h +148 -0
  243. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseProduct.h +188 -0
  244. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseRedux.h +45 -0
  245. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseSelfAdjointView.h +507 -0
  246. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +150 -0
  247. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseTranspose.h +63 -0
  248. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseTriangularView.h +179 -0
  249. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseUtil.h +172 -0
  250. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseVector.h +448 -0
  251. data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseView.h +99 -0
  252. data/ext/eigen/eigen3/Eigen/src/SparseCore/TriangularSolver.h +334 -0
  253. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU.h +806 -0
  254. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLUImpl.h +66 -0
  255. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_Memory.h +227 -0
  256. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_Structs.h +111 -0
  257. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +298 -0
  258. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_Utils.h +80 -0
  259. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_column_bmod.h +180 -0
  260. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_column_dfs.h +177 -0
  261. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +106 -0
  262. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +279 -0
  263. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +127 -0
  264. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +130 -0
  265. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_panel_bmod.h +223 -0
  266. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_panel_dfs.h +258 -0
  267. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_pivotL.h +137 -0
  268. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_pruneL.h +135 -0
  269. data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_relax_snode.h +83 -0
  270. data/ext/eigen/eigen3/Eigen/src/SparseQR/SparseQR.h +714 -0
  271. data/ext/eigen/eigen3/Eigen/src/StlSupport/StdDeque.h +134 -0
  272. data/ext/eigen/eigen3/Eigen/src/StlSupport/StdList.h +114 -0
  273. data/ext/eigen/eigen3/Eigen/src/StlSupport/StdVector.h +126 -0
  274. data/ext/eigen/eigen3/Eigen/src/StlSupport/details.h +84 -0
  275. data/ext/eigen/eigen3/Eigen/src/SuperLUSupport/SuperLUSupport.h +1026 -0
  276. data/ext/eigen/eigen3/Eigen/src/UmfPackSupport/UmfPackSupport.h +474 -0
  277. data/ext/eigen/eigen3/Eigen/src/misc/Image.h +84 -0
  278. data/ext/eigen/eigen3/Eigen/src/misc/Kernel.h +81 -0
  279. data/ext/eigen/eigen3/Eigen/src/misc/Solve.h +76 -0
  280. data/ext/eigen/eigen3/Eigen/src/misc/SparseSolve.h +128 -0
  281. data/ext/eigen/eigen3/Eigen/src/misc/blas.h +658 -0
  282. data/ext/eigen/eigen3/Eigen/src/plugins/ArrayCwiseBinaryOps.h +253 -0
  283. data/ext/eigen/eigen3/Eigen/src/plugins/ArrayCwiseUnaryOps.h +187 -0
  284. data/ext/eigen/eigen3/Eigen/src/plugins/BlockMethods.h +935 -0
  285. data/ext/eigen/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h +46 -0
  286. data/ext/eigen/eigen3/Eigen/src/plugins/CommonCwiseUnaryOps.h +172 -0
  287. data/ext/eigen/eigen3/Eigen/src/plugins/MatrixCwiseBinaryOps.h +143 -0
  288. data/ext/eigen/eigen3/Eigen/src/plugins/MatrixCwiseUnaryOps.h +52 -0
  289. data/ext/eigen/eigen3/signature_of_eigen3_matrix_library +1 -0
  290. data/ext/eigen/eigen_wrap.cxx +19420 -10396
  291. data/ext/eigen/extconf.rb +37 -2
  292. data/lib/eigen.rb +146 -3
  293. metadata +294 -7
@@ -0,0 +1,80 @@
1
+ // This file is part of Eigen, a lightweight C++ template library
2
+ // for linear algebra.
3
+ //
4
+ // Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>
5
+ //
6
+ // This Source Code Form is subject to the terms of the Mozilla
7
+ // Public License v. 2.0. If a copy of the MPL was not distributed
8
+ // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
+
10
+
11
+ #ifndef EIGEN_SPARSELU_UTILS_H
12
+ #define EIGEN_SPARSELU_UTILS_H
13
+
14
+ namespace Eigen {
15
+ namespace internal {
16
+
17
+ /**
18
+ * \brief Count Nonzero elements in the factors
19
+ */
20
+ template <typename Scalar, typename Index>
21
+ void SparseLUImpl<Scalar,Index>::countnz(const Index n, Index& nnzL, Index& nnzU, GlobalLU_t& glu)
22
+ {
23
+ nnzL = 0;
24
+ nnzU = (glu.xusub)(n);
25
+ Index nsuper = (glu.supno)(n);
26
+ Index jlen;
27
+ Index i, j, fsupc;
28
+ if (n <= 0 ) return;
29
+ // For each supernode
30
+ for (i = 0; i <= nsuper; i++)
31
+ {
32
+ fsupc = glu.xsup(i);
33
+ jlen = glu.xlsub(fsupc+1) - glu.xlsub(fsupc);
34
+
35
+ for (j = fsupc; j < glu.xsup(i+1); j++)
36
+ {
37
+ nnzL += jlen;
38
+ nnzU += j - fsupc + 1;
39
+ jlen--;
40
+ }
41
+ }
42
+ }
43
+
44
+ /**
45
+ * \brief Fix up the data storage lsub for L-subscripts.
46
+ *
47
+ * It removes the subscripts sets for structural pruning,
48
+ * and applies permutation to the remaining subscripts
49
+ *
50
+ */
51
+ template <typename Scalar, typename Index>
52
+ void SparseLUImpl<Scalar,Index>::fixupL(const Index n, const IndexVector& perm_r, GlobalLU_t& glu)
53
+ {
54
+ Index fsupc, i, j, k, jstart;
55
+
56
+ Index nextl = 0;
57
+ Index nsuper = (glu.supno)(n);
58
+
59
+ // For each supernode
60
+ for (i = 0; i <= nsuper; i++)
61
+ {
62
+ fsupc = glu.xsup(i);
63
+ jstart = glu.xlsub(fsupc);
64
+ glu.xlsub(fsupc) = nextl;
65
+ for (j = jstart; j < glu.xlsub(fsupc + 1); j++)
66
+ {
67
+ glu.lsub(nextl) = perm_r(glu.lsub(j)); // Now indexed into P*A
68
+ nextl++;
69
+ }
70
+ for (k = fsupc+1; k < glu.xsup(i+1); k++)
71
+ glu.xlsub(k) = nextl; // other columns in supernode i
72
+ }
73
+
74
+ glu.xlsub(n) = nextl;
75
+ }
76
+
77
+ } // end namespace internal
78
+
79
+ } // end namespace Eigen
80
+ #endif // EIGEN_SPARSELU_UTILS_H
@@ -0,0 +1,180 @@
1
+ // This file is part of Eigen, a lightweight C++ template library
2
+ // for linear algebra.
3
+ //
4
+ // Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>
5
+ // Copyright (C) 2012 Gael Guennebaud <gael.guennebaud@inria.fr>
6
+ //
7
+ // This Source Code Form is subject to the terms of the Mozilla
8
+ // Public License v. 2.0. If a copy of the MPL was not distributed
9
+ // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10
+
11
+ /*
12
+
13
+ * NOTE: This file is the modified version of xcolumn_bmod.c file in SuperLU
14
+
15
+ * -- SuperLU routine (version 3.0) --
16
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
17
+ * and Lawrence Berkeley National Lab.
18
+ * October 15, 2003
19
+ *
20
+ * Copyright (c) 1994 by Xerox Corporation. All rights reserved.
21
+ *
22
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
23
+ * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
24
+ *
25
+ * Permission is hereby granted to use or copy this program for any
26
+ * purpose, provided the above notices are retained on all copies.
27
+ * Permission to modify the code and to distribute modified code is
28
+ * granted, provided the above notices are retained, and a notice that
29
+ * the code was modified is included with the above copyright notice.
30
+ */
31
+ #ifndef SPARSELU_COLUMN_BMOD_H
32
+ #define SPARSELU_COLUMN_BMOD_H
33
+
34
+ namespace Eigen {
35
+
36
+ namespace internal {
37
+ /**
38
+ * \brief Performs numeric block updates (sup-col) in topological order
39
+ *
40
+ * \param jcol current column to update
41
+ * \param nseg Number of segments in the U part
42
+ * \param dense Store the full representation of the column
43
+ * \param tempv working array
44
+ * \param segrep segment representative ...
45
+ * \param repfnz ??? First nonzero column in each row ??? ...
46
+ * \param fpanelc First column in the current panel
47
+ * \param glu Global LU data.
48
+ * \return 0 - successful return
49
+ * > 0 - number of bytes allocated when run out of space
50
+ *
51
+ */
52
+ template <typename Scalar, typename Index>
53
+ Index SparseLUImpl<Scalar,Index>::column_bmod(const Index jcol, const Index nseg, BlockScalarVector dense, ScalarVector& tempv, BlockIndexVector segrep, BlockIndexVector repfnz, Index fpanelc, GlobalLU_t& glu)
54
+ {
55
+ Index jsupno, k, ksub, krep, ksupno;
56
+ Index lptr, nrow, isub, irow, nextlu, new_next, ufirst;
57
+ Index fsupc, nsupc, nsupr, luptr, kfnz, no_zeros;
58
+ /* krep = representative of current k-th supernode
59
+ * fsupc = first supernodal column
60
+ * nsupc = number of columns in a supernode
61
+ * nsupr = number of rows in a supernode
62
+ * luptr = location of supernodal LU-block in storage
63
+ * kfnz = first nonz in the k-th supernodal segment
64
+ * no_zeros = no lf leading zeros in a supernodal U-segment
65
+ */
66
+
67
+ jsupno = glu.supno(jcol);
68
+ // For each nonzero supernode segment of U[*,j] in topological order
69
+ k = nseg - 1;
70
+ Index d_fsupc; // distance between the first column of the current panel and the
71
+ // first column of the current snode
72
+ Index fst_col; // First column within small LU update
73
+ Index segsize;
74
+ for (ksub = 0; ksub < nseg; ksub++)
75
+ {
76
+ krep = segrep(k); k--;
77
+ ksupno = glu.supno(krep);
78
+ if (jsupno != ksupno )
79
+ {
80
+ // outside the rectangular supernode
81
+ fsupc = glu.xsup(ksupno);
82
+ fst_col = (std::max)(fsupc, fpanelc);
83
+
84
+ // Distance from the current supernode to the current panel;
85
+ // d_fsupc = 0 if fsupc > fpanelc
86
+ d_fsupc = fst_col - fsupc;
87
+
88
+ luptr = glu.xlusup(fst_col) + d_fsupc;
89
+ lptr = glu.xlsub(fsupc) + d_fsupc;
90
+
91
+ kfnz = repfnz(krep);
92
+ kfnz = (std::max)(kfnz, fpanelc);
93
+
94
+ segsize = krep - kfnz + 1;
95
+ nsupc = krep - fst_col + 1;
96
+ nsupr = glu.xlsub(fsupc+1) - glu.xlsub(fsupc);
97
+ nrow = nsupr - d_fsupc - nsupc;
98
+ Index lda = glu.xlusup(fst_col+1) - glu.xlusup(fst_col);
99
+
100
+
101
+ // Perform a triangular solver and block update,
102
+ // then scatter the result of sup-col update to dense
103
+ no_zeros = kfnz - fst_col;
104
+ if(segsize==1)
105
+ LU_kernel_bmod<1>::run(segsize, dense, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros);
106
+ else
107
+ LU_kernel_bmod<Dynamic>::run(segsize, dense, tempv, glu.lusup, luptr, lda, nrow, glu.lsub, lptr, no_zeros);
108
+ } // end if jsupno
109
+ } // end for each segment
110
+
111
+ // Process the supernodal portion of L\U[*,j]
112
+ nextlu = glu.xlusup(jcol);
113
+ fsupc = glu.xsup(jsupno);
114
+
115
+ // copy the SPA dense into L\U[*,j]
116
+ Index mem;
117
+ new_next = nextlu + glu.xlsub(fsupc + 1) - glu.xlsub(fsupc);
118
+ Index offset = internal::first_multiple<Index>(new_next, internal::packet_traits<Scalar>::size) - new_next;
119
+ if(offset)
120
+ new_next += offset;
121
+ while (new_next > glu.nzlumax )
122
+ {
123
+ mem = memXpand<ScalarVector>(glu.lusup, glu.nzlumax, nextlu, LUSUP, glu.num_expansions);
124
+ if (mem) return mem;
125
+ }
126
+
127
+ for (isub = glu.xlsub(fsupc); isub < glu.xlsub(fsupc+1); isub++)
128
+ {
129
+ irow = glu.lsub(isub);
130
+ glu.lusup(nextlu) = dense(irow);
131
+ dense(irow) = Scalar(0.0);
132
+ ++nextlu;
133
+ }
134
+
135
+ if(offset)
136
+ {
137
+ glu.lusup.segment(nextlu,offset).setZero();
138
+ nextlu += offset;
139
+ }
140
+ glu.xlusup(jcol + 1) = nextlu; // close L\U(*,jcol);
141
+
142
+ /* For more updates within the panel (also within the current supernode),
143
+ * should start from the first column of the panel, or the first column
144
+ * of the supernode, whichever is bigger. There are two cases:
145
+ * 1) fsupc < fpanelc, then fst_col <-- fpanelc
146
+ * 2) fsupc >= fpanelc, then fst_col <-- fsupc
147
+ */
148
+ fst_col = (std::max)(fsupc, fpanelc);
149
+
150
+ if (fst_col < jcol)
151
+ {
152
+ // Distance between the current supernode and the current panel
153
+ // d_fsupc = 0 if fsupc >= fpanelc
154
+ d_fsupc = fst_col - fsupc;
155
+
156
+ lptr = glu.xlsub(fsupc) + d_fsupc;
157
+ luptr = glu.xlusup(fst_col) + d_fsupc;
158
+ nsupr = glu.xlsub(fsupc+1) - glu.xlsub(fsupc); // leading dimension
159
+ nsupc = jcol - fst_col; // excluding jcol
160
+ nrow = nsupr - d_fsupc - nsupc;
161
+
162
+ // points to the beginning of jcol in snode L\U(jsupno)
163
+ ufirst = glu.xlusup(jcol) + d_fsupc;
164
+ Index lda = glu.xlusup(jcol+1) - glu.xlusup(jcol);
165
+ MappedMatrixBlock A( &(glu.lusup.data()[luptr]), nsupc, nsupc, OuterStride<>(lda) );
166
+ VectorBlock<ScalarVector> u(glu.lusup, ufirst, nsupc);
167
+ u = A.template triangularView<UnitLower>().solve(u);
168
+
169
+ new (&A) MappedMatrixBlock ( &(glu.lusup.data()[luptr+nsupc]), nrow, nsupc, OuterStride<>(lda) );
170
+ VectorBlock<ScalarVector> l(glu.lusup, ufirst+nsupc, nrow);
171
+ l.noalias() -= A * u;
172
+
173
+ } // End if fst_col
174
+ return 0;
175
+ }
176
+
177
+ } // end namespace internal
178
+ } // end namespace Eigen
179
+
180
+ #endif // SPARSELU_COLUMN_BMOD_H
@@ -0,0 +1,177 @@
1
+ // This file is part of Eigen, a lightweight C++ template library
2
+ // for linear algebra.
3
+ //
4
+ // Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>
5
+ //
6
+ // This Source Code Form is subject to the terms of the Mozilla
7
+ // Public License v. 2.0. If a copy of the MPL was not distributed
8
+ // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
+
10
+ /*
11
+
12
+ * NOTE: This file is the modified version of [s,d,c,z]column_dfs.c file in SuperLU
13
+
14
+ * -- SuperLU routine (version 2.0) --
15
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
16
+ * and Lawrence Berkeley National Lab.
17
+ * November 15, 1997
18
+ *
19
+ * Copyright (c) 1994 by Xerox Corporation. All rights reserved.
20
+ *
21
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
22
+ * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
23
+ *
24
+ * Permission is hereby granted to use or copy this program for any
25
+ * purpose, provided the above notices are retained on all copies.
26
+ * Permission to modify the code and to distribute modified code is
27
+ * granted, provided the above notices are retained, and a notice that
28
+ * the code was modified is included with the above copyright notice.
29
+ */
30
+ #ifndef SPARSELU_COLUMN_DFS_H
31
+ #define SPARSELU_COLUMN_DFS_H
32
+
33
+ template <typename Scalar, typename Index> class SparseLUImpl;
34
+ namespace Eigen {
35
+
36
+ namespace internal {
37
+
38
+ template<typename IndexVector, typename ScalarVector>
39
+ struct column_dfs_traits : no_assignment_operator
40
+ {
41
+ typedef typename ScalarVector::Scalar Scalar;
42
+ typedef typename IndexVector::Scalar Index;
43
+ column_dfs_traits(Index jcol, Index& jsuper, typename SparseLUImpl<Scalar, Index>::GlobalLU_t& glu, SparseLUImpl<Scalar, Index>& luImpl)
44
+ : m_jcol(jcol), m_jsuper_ref(jsuper), m_glu(glu), m_luImpl(luImpl)
45
+ {}
46
+ bool update_segrep(Index /*krep*/, Index /*jj*/)
47
+ {
48
+ return true;
49
+ }
50
+ void mem_expand(IndexVector& lsub, Index& nextl, Index chmark)
51
+ {
52
+ if (nextl >= m_glu.nzlmax)
53
+ m_luImpl.memXpand(lsub, m_glu.nzlmax, nextl, LSUB, m_glu.num_expansions);
54
+ if (chmark != (m_jcol-1)) m_jsuper_ref = emptyIdxLU;
55
+ }
56
+ enum { ExpandMem = true };
57
+
58
+ Index m_jcol;
59
+ Index& m_jsuper_ref;
60
+ typename SparseLUImpl<Scalar, Index>::GlobalLU_t& m_glu;
61
+ SparseLUImpl<Scalar, Index>& m_luImpl;
62
+ };
63
+
64
+
65
+ /**
66
+ * \brief Performs a symbolic factorization on column jcol and decide the supernode boundary
67
+ *
68
+ * A supernode representative is the last column of a supernode.
69
+ * The nonzeros in U[*,j] are segments that end at supernodes representatives.
70
+ * The routine returns a list of the supernodal representatives
71
+ * in topological order of the dfs that generates them.
72
+ * The location of the first nonzero in each supernodal segment
73
+ * (supernodal entry location) is also returned.
74
+ *
75
+ * \param m number of rows in the matrix
76
+ * \param jcol Current column
77
+ * \param perm_r Row permutation
78
+ * \param maxsuper Maximum number of column allowed in a supernode
79
+ * \param [in,out] nseg Number of segments in current U[*,j] - new segments appended
80
+ * \param lsub_col defines the rhs vector to start the dfs
81
+ * \param [in,out] segrep Segment representatives - new segments appended
82
+ * \param repfnz First nonzero location in each row
83
+ * \param xprune
84
+ * \param marker marker[i] == jj, if i was visited during dfs of current column jj;
85
+ * \param parent
86
+ * \param xplore working array
87
+ * \param glu global LU data
88
+ * \return 0 success
89
+ * > 0 number of bytes allocated when run out of space
90
+ *
91
+ */
92
+ template <typename Scalar, typename Index>
93
+ Index SparseLUImpl<Scalar,Index>::column_dfs(const Index m, const Index jcol, IndexVector& perm_r, Index maxsuper, Index& nseg, BlockIndexVector lsub_col, IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, IndexVector& marker, IndexVector& parent, IndexVector& xplore, GlobalLU_t& glu)
94
+ {
95
+
96
+ Index jsuper = glu.supno(jcol);
97
+ Index nextl = glu.xlsub(jcol);
98
+ VectorBlock<IndexVector> marker2(marker, 2*m, m);
99
+
100
+
101
+ column_dfs_traits<IndexVector, ScalarVector> traits(jcol, jsuper, glu, *this);
102
+
103
+ // For each nonzero in A(*,jcol) do dfs
104
+ for (Index k = 0; ((k < m) ? lsub_col[k] != emptyIdxLU : false) ; k++)
105
+ {
106
+ Index krow = lsub_col(k);
107
+ lsub_col(k) = emptyIdxLU;
108
+ Index kmark = marker2(krow);
109
+
110
+ // krow was visited before, go to the next nonz;
111
+ if (kmark == jcol) continue;
112
+
113
+ dfs_kernel(jcol, perm_r, nseg, glu.lsub, segrep, repfnz, xprune, marker2, parent,
114
+ xplore, glu, nextl, krow, traits);
115
+ } // for each nonzero ...
116
+
117
+ Index fsupc, jptr, jm1ptr, ito, ifrom, istop;
118
+ Index nsuper = glu.supno(jcol);
119
+ Index jcolp1 = jcol + 1;
120
+ Index jcolm1 = jcol - 1;
121
+
122
+ // check to see if j belongs in the same supernode as j-1
123
+ if ( jcol == 0 )
124
+ { // Do nothing for column 0
125
+ nsuper = glu.supno(0) = 0 ;
126
+ }
127
+ else
128
+ {
129
+ fsupc = glu.xsup(nsuper);
130
+ jptr = glu.xlsub(jcol); // Not yet compressed
131
+ jm1ptr = glu.xlsub(jcolm1);
132
+
133
+ // Use supernodes of type T2 : see SuperLU paper
134
+ if ( (nextl-jptr != jptr-jm1ptr-1) ) jsuper = emptyIdxLU;
135
+
136
+ // Make sure the number of columns in a supernode doesn't
137
+ // exceed threshold
138
+ if ( (jcol - fsupc) >= maxsuper) jsuper = emptyIdxLU;
139
+
140
+ /* If jcol starts a new supernode, reclaim storage space in
141
+ * glu.lsub from previous supernode. Note we only store
142
+ * the subscript set of the first and last columns of
143
+ * a supernode. (first for num values, last for pruning)
144
+ */
145
+ if (jsuper == emptyIdxLU)
146
+ { // starts a new supernode
147
+ if ( (fsupc < jcolm1-1) )
148
+ { // >= 3 columns in nsuper
149
+ ito = glu.xlsub(fsupc+1);
150
+ glu.xlsub(jcolm1) = ito;
151
+ istop = ito + jptr - jm1ptr;
152
+ xprune(jcolm1) = istop; // intialize xprune(jcol-1)
153
+ glu.xlsub(jcol) = istop;
154
+
155
+ for (ifrom = jm1ptr; ifrom < nextl; ++ifrom, ++ito)
156
+ glu.lsub(ito) = glu.lsub(ifrom);
157
+ nextl = ito; // = istop + length(jcol)
158
+ }
159
+ nsuper++;
160
+ glu.supno(jcol) = nsuper;
161
+ } // if a new supernode
162
+ } // end else: jcol > 0
163
+
164
+ // Tidy up the pointers before exit
165
+ glu.xsup(nsuper+1) = jcolp1;
166
+ glu.supno(jcolp1) = nsuper;
167
+ xprune(jcol) = nextl; // Intialize upper bound for pruning
168
+ glu.xlsub(jcolp1) = nextl;
169
+
170
+ return 0;
171
+ }
172
+
173
+ } // end namespace internal
174
+
175
+ } // end namespace Eigen
176
+
177
+ #endif
@@ -0,0 +1,106 @@
1
+ // This file is part of Eigen, a lightweight C++ template library
2
+ // for linear algebra.
3
+ //
4
+ // Copyright (C) 2012 Désiré Nuentsa-Wakam <desire.nuentsa_wakam@inria.fr>
5
+ //
6
+ // This Source Code Form is subject to the terms of the Mozilla
7
+ // Public License v. 2.0. If a copy of the MPL was not distributed
8
+ // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
+ /*
10
+
11
+ * NOTE: This file is the modified version of [s,d,c,z]copy_to_ucol.c file in SuperLU
12
+
13
+ * -- SuperLU routine (version 2.0) --
14
+ * Univ. of California Berkeley, Xerox Palo Alto Research Center,
15
+ * and Lawrence Berkeley National Lab.
16
+ * November 15, 1997
17
+ *
18
+ * Copyright (c) 1994 by Xerox Corporation. All rights reserved.
19
+ *
20
+ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
21
+ * EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
22
+ *
23
+ * Permission is hereby granted to use or copy this program for any
24
+ * purpose, provided the above notices are retained on all copies.
25
+ * Permission to modify the code and to distribute modified code is
26
+ * granted, provided the above notices are retained, and a notice that
27
+ * the code was modified is included with the above copyright notice.
28
+ */
29
+ #ifndef SPARSELU_COPY_TO_UCOL_H
30
+ #define SPARSELU_COPY_TO_UCOL_H
31
+
32
+ namespace Eigen {
33
+ namespace internal {
34
+
35
+ /**
36
+ * \brief Performs numeric block updates (sup-col) in topological order
37
+ *
38
+ * \param jcol current column to update
39
+ * \param nseg Number of segments in the U part
40
+ * \param segrep segment representative ...
41
+ * \param repfnz First nonzero column in each row ...
42
+ * \param perm_r Row permutation
43
+ * \param dense Store the full representation of the column
44
+ * \param glu Global LU data.
45
+ * \return 0 - successful return
46
+ * > 0 - number of bytes allocated when run out of space
47
+ *
48
+ */
49
+ template <typename Scalar, typename Index>
50
+ Index SparseLUImpl<Scalar,Index>::copy_to_ucol(const Index jcol, const Index nseg, IndexVector& segrep, BlockIndexVector repfnz ,IndexVector& perm_r, BlockScalarVector dense, GlobalLU_t& glu)
51
+ {
52
+ Index ksub, krep, ksupno;
53
+
54
+ Index jsupno = glu.supno(jcol);
55
+
56
+ // For each nonzero supernode segment of U[*,j] in topological order
57
+ Index k = nseg - 1, i;
58
+ Index nextu = glu.xusub(jcol);
59
+ Index kfnz, isub, segsize;
60
+ Index new_next,irow;
61
+ Index fsupc, mem;
62
+ for (ksub = 0; ksub < nseg; ksub++)
63
+ {
64
+ krep = segrep(k); k--;
65
+ ksupno = glu.supno(krep);
66
+ if (jsupno != ksupno ) // should go into ucol();
67
+ {
68
+ kfnz = repfnz(krep);
69
+ if (kfnz != emptyIdxLU)
70
+ { // Nonzero U-segment
71
+ fsupc = glu.xsup(ksupno);
72
+ isub = glu.xlsub(fsupc) + kfnz - fsupc;
73
+ segsize = krep - kfnz + 1;
74
+ new_next = nextu + segsize;
75
+ while (new_next > glu.nzumax)
76
+ {
77
+ mem = memXpand<ScalarVector>(glu.ucol, glu.nzumax, nextu, UCOL, glu.num_expansions);
78
+ if (mem) return mem;
79
+ mem = memXpand<IndexVector>(glu.usub, glu.nzumax, nextu, USUB, glu.num_expansions);
80
+ if (mem) return mem;
81
+
82
+ }
83
+
84
+ for (i = 0; i < segsize; i++)
85
+ {
86
+ irow = glu.lsub(isub);
87
+ glu.usub(nextu) = perm_r(irow); // Unlike the L part, the U part is stored in its final order
88
+ glu.ucol(nextu) = dense(irow);
89
+ dense(irow) = Scalar(0.0);
90
+ nextu++;
91
+ isub++;
92
+ }
93
+
94
+ } // end nonzero U-segment
95
+
96
+ } // end if jsupno
97
+
98
+ } // end for each segment
99
+ glu.xusub(jcol + 1) = nextu; // close U(*,jcol)
100
+ return 0;
101
+ }
102
+
103
+ } // namespace internal
104
+ } // end namespace Eigen
105
+
106
+ #endif // SPARSELU_COPY_TO_UCOL_H