umappp 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +25 -0
- data/README.md +110 -0
- data/ext/umappp/extconf.rb +25 -0
- data/ext/umappp/numo.hpp +867 -0
- data/ext/umappp/umappp.cpp +225 -0
- data/lib/umappp/version.rb +5 -0
- data/lib/umappp.rb +41 -0
- data/vendor/Eigen/Cholesky +45 -0
- data/vendor/Eigen/CholmodSupport +48 -0
- data/vendor/Eigen/Core +384 -0
- data/vendor/Eigen/Dense +7 -0
- data/vendor/Eigen/Eigen +2 -0
- data/vendor/Eigen/Eigenvalues +60 -0
- data/vendor/Eigen/Geometry +59 -0
- data/vendor/Eigen/Householder +29 -0
- data/vendor/Eigen/IterativeLinearSolvers +48 -0
- data/vendor/Eigen/Jacobi +32 -0
- data/vendor/Eigen/KLUSupport +41 -0
- data/vendor/Eigen/LU +47 -0
- data/vendor/Eigen/MetisSupport +35 -0
- data/vendor/Eigen/OrderingMethods +70 -0
- data/vendor/Eigen/PaStiXSupport +49 -0
- data/vendor/Eigen/PardisoSupport +35 -0
- data/vendor/Eigen/QR +50 -0
- data/vendor/Eigen/QtAlignedMalloc +39 -0
- data/vendor/Eigen/SPQRSupport +34 -0
- data/vendor/Eigen/SVD +50 -0
- data/vendor/Eigen/Sparse +34 -0
- data/vendor/Eigen/SparseCholesky +37 -0
- data/vendor/Eigen/SparseCore +69 -0
- data/vendor/Eigen/SparseLU +50 -0
- data/vendor/Eigen/SparseQR +36 -0
- data/vendor/Eigen/StdDeque +27 -0
- data/vendor/Eigen/StdList +26 -0
- data/vendor/Eigen/StdVector +27 -0
- data/vendor/Eigen/SuperLUSupport +64 -0
- data/vendor/Eigen/UmfPackSupport +40 -0
- data/vendor/Eigen/src/Cholesky/LDLT.h +688 -0
- data/vendor/Eigen/src/Cholesky/LLT.h +558 -0
- data/vendor/Eigen/src/Cholesky/LLT_LAPACKE.h +99 -0
- data/vendor/Eigen/src/CholmodSupport/CholmodSupport.h +682 -0
- data/vendor/Eigen/src/Core/ArithmeticSequence.h +413 -0
- data/vendor/Eigen/src/Core/Array.h +417 -0
- data/vendor/Eigen/src/Core/ArrayBase.h +226 -0
- data/vendor/Eigen/src/Core/ArrayWrapper.h +209 -0
- data/vendor/Eigen/src/Core/Assign.h +90 -0
- data/vendor/Eigen/src/Core/AssignEvaluator.h +1010 -0
- data/vendor/Eigen/src/Core/Assign_MKL.h +178 -0
- data/vendor/Eigen/src/Core/BandMatrix.h +353 -0
- data/vendor/Eigen/src/Core/Block.h +448 -0
- data/vendor/Eigen/src/Core/BooleanRedux.h +162 -0
- data/vendor/Eigen/src/Core/CommaInitializer.h +164 -0
- data/vendor/Eigen/src/Core/ConditionEstimator.h +175 -0
- data/vendor/Eigen/src/Core/CoreEvaluators.h +1741 -0
- data/vendor/Eigen/src/Core/CoreIterators.h +132 -0
- data/vendor/Eigen/src/Core/CwiseBinaryOp.h +183 -0
- data/vendor/Eigen/src/Core/CwiseNullaryOp.h +1001 -0
- data/vendor/Eigen/src/Core/CwiseTernaryOp.h +197 -0
- data/vendor/Eigen/src/Core/CwiseUnaryOp.h +103 -0
- data/vendor/Eigen/src/Core/CwiseUnaryView.h +132 -0
- data/vendor/Eigen/src/Core/DenseBase.h +701 -0
- data/vendor/Eigen/src/Core/DenseCoeffsBase.h +685 -0
- data/vendor/Eigen/src/Core/DenseStorage.h +652 -0
- data/vendor/Eigen/src/Core/Diagonal.h +258 -0
- data/vendor/Eigen/src/Core/DiagonalMatrix.h +391 -0
- data/vendor/Eigen/src/Core/DiagonalProduct.h +28 -0
- data/vendor/Eigen/src/Core/Dot.h +318 -0
- data/vendor/Eigen/src/Core/EigenBase.h +160 -0
- data/vendor/Eigen/src/Core/ForceAlignedAccess.h +150 -0
- data/vendor/Eigen/src/Core/Fuzzy.h +155 -0
- data/vendor/Eigen/src/Core/GeneralProduct.h +465 -0
- data/vendor/Eigen/src/Core/GenericPacketMath.h +1040 -0
- data/vendor/Eigen/src/Core/GlobalFunctions.h +194 -0
- data/vendor/Eigen/src/Core/IO.h +258 -0
- data/vendor/Eigen/src/Core/IndexedView.h +237 -0
- data/vendor/Eigen/src/Core/Inverse.h +117 -0
- data/vendor/Eigen/src/Core/Map.h +171 -0
- data/vendor/Eigen/src/Core/MapBase.h +310 -0
- data/vendor/Eigen/src/Core/MathFunctions.h +2057 -0
- data/vendor/Eigen/src/Core/MathFunctionsImpl.h +200 -0
- data/vendor/Eigen/src/Core/Matrix.h +565 -0
- data/vendor/Eigen/src/Core/MatrixBase.h +547 -0
- data/vendor/Eigen/src/Core/NestByValue.h +85 -0
- data/vendor/Eigen/src/Core/NoAlias.h +109 -0
- data/vendor/Eigen/src/Core/NumTraits.h +335 -0
- data/vendor/Eigen/src/Core/PartialReduxEvaluator.h +232 -0
- data/vendor/Eigen/src/Core/PermutationMatrix.h +605 -0
- data/vendor/Eigen/src/Core/PlainObjectBase.h +1128 -0
- data/vendor/Eigen/src/Core/Product.h +191 -0
- data/vendor/Eigen/src/Core/ProductEvaluators.h +1179 -0
- data/vendor/Eigen/src/Core/Random.h +218 -0
- data/vendor/Eigen/src/Core/Redux.h +515 -0
- data/vendor/Eigen/src/Core/Ref.h +381 -0
- data/vendor/Eigen/src/Core/Replicate.h +142 -0
- data/vendor/Eigen/src/Core/Reshaped.h +454 -0
- data/vendor/Eigen/src/Core/ReturnByValue.h +119 -0
- data/vendor/Eigen/src/Core/Reverse.h +217 -0
- data/vendor/Eigen/src/Core/Select.h +164 -0
- data/vendor/Eigen/src/Core/SelfAdjointView.h +365 -0
- data/vendor/Eigen/src/Core/SelfCwiseBinaryOp.h +47 -0
- data/vendor/Eigen/src/Core/Solve.h +188 -0
- data/vendor/Eigen/src/Core/SolveTriangular.h +235 -0
- data/vendor/Eigen/src/Core/SolverBase.h +168 -0
- data/vendor/Eigen/src/Core/StableNorm.h +251 -0
- data/vendor/Eigen/src/Core/StlIterators.h +463 -0
- data/vendor/Eigen/src/Core/Stride.h +116 -0
- data/vendor/Eigen/src/Core/Swap.h +68 -0
- data/vendor/Eigen/src/Core/Transpose.h +464 -0
- data/vendor/Eigen/src/Core/Transpositions.h +386 -0
- data/vendor/Eigen/src/Core/TriangularMatrix.h +1001 -0
- data/vendor/Eigen/src/Core/VectorBlock.h +96 -0
- data/vendor/Eigen/src/Core/VectorwiseOp.h +784 -0
- data/vendor/Eigen/src/Core/Visitor.h +381 -0
- data/vendor/Eigen/src/Core/arch/AVX/Complex.h +372 -0
- data/vendor/Eigen/src/Core/arch/AVX/MathFunctions.h +228 -0
- data/vendor/Eigen/src/Core/arch/AVX/PacketMath.h +1574 -0
- data/vendor/Eigen/src/Core/arch/AVX/TypeCasting.h +115 -0
- data/vendor/Eigen/src/Core/arch/AVX512/Complex.h +422 -0
- data/vendor/Eigen/src/Core/arch/AVX512/MathFunctions.h +362 -0
- data/vendor/Eigen/src/Core/arch/AVX512/PacketMath.h +2303 -0
- data/vendor/Eigen/src/Core/arch/AVX512/TypeCasting.h +89 -0
- data/vendor/Eigen/src/Core/arch/AltiVec/Complex.h +417 -0
- data/vendor/Eigen/src/Core/arch/AltiVec/MathFunctions.h +90 -0
- data/vendor/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2937 -0
- data/vendor/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +221 -0
- data/vendor/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +629 -0
- data/vendor/Eigen/src/Core/arch/AltiVec/PacketMath.h +2711 -0
- data/vendor/Eigen/src/Core/arch/CUDA/Complex.h +258 -0
- data/vendor/Eigen/src/Core/arch/Default/BFloat16.h +700 -0
- data/vendor/Eigen/src/Core/arch/Default/ConjHelper.h +117 -0
- data/vendor/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1649 -0
- data/vendor/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +110 -0
- data/vendor/Eigen/src/Core/arch/Default/Half.h +942 -0
- data/vendor/Eigen/src/Core/arch/Default/Settings.h +49 -0
- data/vendor/Eigen/src/Core/arch/Default/TypeCasting.h +120 -0
- data/vendor/Eigen/src/Core/arch/GPU/MathFunctions.h +103 -0
- data/vendor/Eigen/src/Core/arch/GPU/PacketMath.h +1685 -0
- data/vendor/Eigen/src/Core/arch/GPU/TypeCasting.h +80 -0
- data/vendor/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
- data/vendor/Eigen/src/Core/arch/MSA/Complex.h +648 -0
- data/vendor/Eigen/src/Core/arch/MSA/MathFunctions.h +387 -0
- data/vendor/Eigen/src/Core/arch/MSA/PacketMath.h +1233 -0
- data/vendor/Eigen/src/Core/arch/NEON/Complex.h +584 -0
- data/vendor/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +183 -0
- data/vendor/Eigen/src/Core/arch/NEON/MathFunctions.h +75 -0
- data/vendor/Eigen/src/Core/arch/NEON/PacketMath.h +4587 -0
- data/vendor/Eigen/src/Core/arch/NEON/TypeCasting.h +1419 -0
- data/vendor/Eigen/src/Core/arch/SSE/Complex.h +351 -0
- data/vendor/Eigen/src/Core/arch/SSE/MathFunctions.h +199 -0
- data/vendor/Eigen/src/Core/arch/SSE/PacketMath.h +1505 -0
- data/vendor/Eigen/src/Core/arch/SSE/TypeCasting.h +142 -0
- data/vendor/Eigen/src/Core/arch/SVE/MathFunctions.h +44 -0
- data/vendor/Eigen/src/Core/arch/SVE/PacketMath.h +752 -0
- data/vendor/Eigen/src/Core/arch/SVE/TypeCasting.h +49 -0
- data/vendor/Eigen/src/Core/arch/SYCL/InteropHeaders.h +232 -0
- data/vendor/Eigen/src/Core/arch/SYCL/MathFunctions.h +301 -0
- data/vendor/Eigen/src/Core/arch/SYCL/PacketMath.h +670 -0
- data/vendor/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +694 -0
- data/vendor/Eigen/src/Core/arch/SYCL/TypeCasting.h +85 -0
- data/vendor/Eigen/src/Core/arch/ZVector/Complex.h +426 -0
- data/vendor/Eigen/src/Core/arch/ZVector/MathFunctions.h +233 -0
- data/vendor/Eigen/src/Core/arch/ZVector/PacketMath.h +1060 -0
- data/vendor/Eigen/src/Core/functors/AssignmentFunctors.h +177 -0
- data/vendor/Eigen/src/Core/functors/BinaryFunctors.h +541 -0
- data/vendor/Eigen/src/Core/functors/NullaryFunctors.h +189 -0
- data/vendor/Eigen/src/Core/functors/StlFunctors.h +166 -0
- data/vendor/Eigen/src/Core/functors/TernaryFunctors.h +25 -0
- data/vendor/Eigen/src/Core/functors/UnaryFunctors.h +1131 -0
- data/vendor/Eigen/src/Core/products/GeneralBlockPanelKernel.h +2645 -0
- data/vendor/Eigen/src/Core/products/GeneralMatrixMatrix.h +517 -0
- data/vendor/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +317 -0
- data/vendor/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +145 -0
- data/vendor/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +124 -0
- data/vendor/Eigen/src/Core/products/GeneralMatrixVector.h +518 -0
- data/vendor/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h +136 -0
- data/vendor/Eigen/src/Core/products/Parallelizer.h +180 -0
- data/vendor/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +544 -0
- data/vendor/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +295 -0
- data/vendor/Eigen/src/Core/products/SelfadjointMatrixVector.h +262 -0
- data/vendor/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h +118 -0
- data/vendor/Eigen/src/Core/products/SelfadjointProduct.h +133 -0
- data/vendor/Eigen/src/Core/products/SelfadjointRank2Update.h +94 -0
- data/vendor/Eigen/src/Core/products/TriangularMatrixMatrix.h +472 -0
- data/vendor/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +317 -0
- data/vendor/Eigen/src/Core/products/TriangularMatrixVector.h +350 -0
- data/vendor/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h +255 -0
- data/vendor/Eigen/src/Core/products/TriangularSolverMatrix.h +337 -0
- data/vendor/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +167 -0
- data/vendor/Eigen/src/Core/products/TriangularSolverVector.h +148 -0
- data/vendor/Eigen/src/Core/util/BlasUtil.h +583 -0
- data/vendor/Eigen/src/Core/util/ConfigureVectorization.h +512 -0
- data/vendor/Eigen/src/Core/util/Constants.h +563 -0
- data/vendor/Eigen/src/Core/util/DisableStupidWarnings.h +106 -0
- data/vendor/Eigen/src/Core/util/ForwardDeclarations.h +322 -0
- data/vendor/Eigen/src/Core/util/IndexedViewHelper.h +186 -0
- data/vendor/Eigen/src/Core/util/IntegralConstant.h +272 -0
- data/vendor/Eigen/src/Core/util/MKL_support.h +137 -0
- data/vendor/Eigen/src/Core/util/Macros.h +1464 -0
- data/vendor/Eigen/src/Core/util/Memory.h +1163 -0
- data/vendor/Eigen/src/Core/util/Meta.h +812 -0
- data/vendor/Eigen/src/Core/util/NonMPL2.h +3 -0
- data/vendor/Eigen/src/Core/util/ReenableStupidWarnings.h +31 -0
- data/vendor/Eigen/src/Core/util/ReshapedHelper.h +51 -0
- data/vendor/Eigen/src/Core/util/StaticAssert.h +221 -0
- data/vendor/Eigen/src/Core/util/SymbolicIndex.h +293 -0
- data/vendor/Eigen/src/Core/util/XprHelper.h +856 -0
- data/vendor/Eigen/src/Eigenvalues/ComplexEigenSolver.h +346 -0
- data/vendor/Eigen/src/Eigenvalues/ComplexSchur.h +462 -0
- data/vendor/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h +91 -0
- data/vendor/Eigen/src/Eigenvalues/EigenSolver.h +622 -0
- data/vendor/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +418 -0
- data/vendor/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +226 -0
- data/vendor/Eigen/src/Eigenvalues/HessenbergDecomposition.h +374 -0
- data/vendor/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +158 -0
- data/vendor/Eigen/src/Eigenvalues/RealQZ.h +657 -0
- data/vendor/Eigen/src/Eigenvalues/RealSchur.h +558 -0
- data/vendor/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h +77 -0
- data/vendor/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +904 -0
- data/vendor/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h +87 -0
- data/vendor/Eigen/src/Eigenvalues/Tridiagonalization.h +561 -0
- data/vendor/Eigen/src/Geometry/AlignedBox.h +486 -0
- data/vendor/Eigen/src/Geometry/AngleAxis.h +247 -0
- data/vendor/Eigen/src/Geometry/EulerAngles.h +114 -0
- data/vendor/Eigen/src/Geometry/Homogeneous.h +501 -0
- data/vendor/Eigen/src/Geometry/Hyperplane.h +282 -0
- data/vendor/Eigen/src/Geometry/OrthoMethods.h +235 -0
- data/vendor/Eigen/src/Geometry/ParametrizedLine.h +232 -0
- data/vendor/Eigen/src/Geometry/Quaternion.h +870 -0
- data/vendor/Eigen/src/Geometry/Rotation2D.h +199 -0
- data/vendor/Eigen/src/Geometry/RotationBase.h +206 -0
- data/vendor/Eigen/src/Geometry/Scaling.h +188 -0
- data/vendor/Eigen/src/Geometry/Transform.h +1563 -0
- data/vendor/Eigen/src/Geometry/Translation.h +202 -0
- data/vendor/Eigen/src/Geometry/Umeyama.h +166 -0
- data/vendor/Eigen/src/Geometry/arch/Geometry_SIMD.h +168 -0
- data/vendor/Eigen/src/Householder/BlockHouseholder.h +110 -0
- data/vendor/Eigen/src/Householder/Householder.h +176 -0
- data/vendor/Eigen/src/Householder/HouseholderSequence.h +545 -0
- data/vendor/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +226 -0
- data/vendor/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +212 -0
- data/vendor/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +229 -0
- data/vendor/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +394 -0
- data/vendor/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +453 -0
- data/vendor/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +444 -0
- data/vendor/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +198 -0
- data/vendor/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +117 -0
- data/vendor/Eigen/src/Jacobi/Jacobi.h +483 -0
- data/vendor/Eigen/src/KLUSupport/KLUSupport.h +358 -0
- data/vendor/Eigen/src/LU/Determinant.h +117 -0
- data/vendor/Eigen/src/LU/FullPivLU.h +877 -0
- data/vendor/Eigen/src/LU/InverseImpl.h +432 -0
- data/vendor/Eigen/src/LU/PartialPivLU.h +624 -0
- data/vendor/Eigen/src/LU/PartialPivLU_LAPACKE.h +83 -0
- data/vendor/Eigen/src/LU/arch/InverseSize4.h +351 -0
- data/vendor/Eigen/src/MetisSupport/MetisSupport.h +137 -0
- data/vendor/Eigen/src/OrderingMethods/Amd.h +435 -0
- data/vendor/Eigen/src/OrderingMethods/Eigen_Colamd.h +1863 -0
- data/vendor/Eigen/src/OrderingMethods/Ordering.h +153 -0
- data/vendor/Eigen/src/PaStiXSupport/PaStiXSupport.h +678 -0
- data/vendor/Eigen/src/PardisoSupport/PardisoSupport.h +545 -0
- data/vendor/Eigen/src/QR/ColPivHouseholderQR.h +674 -0
- data/vendor/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +97 -0
- data/vendor/Eigen/src/QR/CompleteOrthogonalDecomposition.h +635 -0
- data/vendor/Eigen/src/QR/FullPivHouseholderQR.h +713 -0
- data/vendor/Eigen/src/QR/HouseholderQR.h +434 -0
- data/vendor/Eigen/src/QR/HouseholderQR_LAPACKE.h +68 -0
- data/vendor/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +335 -0
- data/vendor/Eigen/src/SVD/BDCSVD.h +1366 -0
- data/vendor/Eigen/src/SVD/JacobiSVD.h +812 -0
- data/vendor/Eigen/src/SVD/JacobiSVD_LAPACKE.h +91 -0
- data/vendor/Eigen/src/SVD/SVDBase.h +376 -0
- data/vendor/Eigen/src/SVD/UpperBidiagonalization.h +414 -0
- data/vendor/Eigen/src/SparseCholesky/SimplicialCholesky.h +697 -0
- data/vendor/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +174 -0
- data/vendor/Eigen/src/SparseCore/AmbiVector.h +378 -0
- data/vendor/Eigen/src/SparseCore/CompressedStorage.h +274 -0
- data/vendor/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +352 -0
- data/vendor/Eigen/src/SparseCore/MappedSparseMatrix.h +67 -0
- data/vendor/Eigen/src/SparseCore/SparseAssign.h +270 -0
- data/vendor/Eigen/src/SparseCore/SparseBlock.h +571 -0
- data/vendor/Eigen/src/SparseCore/SparseColEtree.h +206 -0
- data/vendor/Eigen/src/SparseCore/SparseCompressedBase.h +370 -0
- data/vendor/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +722 -0
- data/vendor/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +150 -0
- data/vendor/Eigen/src/SparseCore/SparseDenseProduct.h +342 -0
- data/vendor/Eigen/src/SparseCore/SparseDiagonalProduct.h +138 -0
- data/vendor/Eigen/src/SparseCore/SparseDot.h +98 -0
- data/vendor/Eigen/src/SparseCore/SparseFuzzy.h +29 -0
- data/vendor/Eigen/src/SparseCore/SparseMap.h +305 -0
- data/vendor/Eigen/src/SparseCore/SparseMatrix.h +1518 -0
- data/vendor/Eigen/src/SparseCore/SparseMatrixBase.h +398 -0
- data/vendor/Eigen/src/SparseCore/SparsePermutation.h +178 -0
- data/vendor/Eigen/src/SparseCore/SparseProduct.h +181 -0
- data/vendor/Eigen/src/SparseCore/SparseRedux.h +49 -0
- data/vendor/Eigen/src/SparseCore/SparseRef.h +397 -0
- data/vendor/Eigen/src/SparseCore/SparseSelfAdjointView.h +659 -0
- data/vendor/Eigen/src/SparseCore/SparseSolverBase.h +124 -0
- data/vendor/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +198 -0
- data/vendor/Eigen/src/SparseCore/SparseTranspose.h +92 -0
- data/vendor/Eigen/src/SparseCore/SparseTriangularView.h +189 -0
- data/vendor/Eigen/src/SparseCore/SparseUtil.h +186 -0
- data/vendor/Eigen/src/SparseCore/SparseVector.h +478 -0
- data/vendor/Eigen/src/SparseCore/SparseView.h +254 -0
- data/vendor/Eigen/src/SparseCore/TriangularSolver.h +315 -0
- data/vendor/Eigen/src/SparseLU/SparseLU.h +923 -0
- data/vendor/Eigen/src/SparseLU/SparseLUImpl.h +66 -0
- data/vendor/Eigen/src/SparseLU/SparseLU_Memory.h +226 -0
- data/vendor/Eigen/src/SparseLU/SparseLU_Structs.h +110 -0
- data/vendor/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +375 -0
- data/vendor/Eigen/src/SparseLU/SparseLU_Utils.h +80 -0
- data/vendor/Eigen/src/SparseLU/SparseLU_column_bmod.h +181 -0
- data/vendor/Eigen/src/SparseLU/SparseLU_column_dfs.h +179 -0
- data/vendor/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +107 -0
- data/vendor/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +280 -0
- data/vendor/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +126 -0
- data/vendor/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +130 -0
- data/vendor/Eigen/src/SparseLU/SparseLU_panel_bmod.h +223 -0
- data/vendor/Eigen/src/SparseLU/SparseLU_panel_dfs.h +258 -0
- data/vendor/Eigen/src/SparseLU/SparseLU_pivotL.h +137 -0
- data/vendor/Eigen/src/SparseLU/SparseLU_pruneL.h +136 -0
- data/vendor/Eigen/src/SparseLU/SparseLU_relax_snode.h +83 -0
- data/vendor/Eigen/src/SparseQR/SparseQR.h +758 -0
- data/vendor/Eigen/src/StlSupport/StdDeque.h +116 -0
- data/vendor/Eigen/src/StlSupport/StdList.h +106 -0
- data/vendor/Eigen/src/StlSupport/StdVector.h +131 -0
- data/vendor/Eigen/src/StlSupport/details.h +84 -0
- data/vendor/Eigen/src/SuperLUSupport/SuperLUSupport.h +1025 -0
- data/vendor/Eigen/src/UmfPackSupport/UmfPackSupport.h +642 -0
- data/vendor/Eigen/src/misc/Image.h +82 -0
- data/vendor/Eigen/src/misc/Kernel.h +79 -0
- data/vendor/Eigen/src/misc/RealSvd2x2.h +55 -0
- data/vendor/Eigen/src/misc/blas.h +440 -0
- data/vendor/Eigen/src/misc/lapack.h +152 -0
- data/vendor/Eigen/src/misc/lapacke.h +16292 -0
- data/vendor/Eigen/src/misc/lapacke_mangling.h +17 -0
- data/vendor/Eigen/src/plugins/ArrayCwiseBinaryOps.h +358 -0
- data/vendor/Eigen/src/plugins/ArrayCwiseUnaryOps.h +696 -0
- data/vendor/Eigen/src/plugins/BlockMethods.h +1442 -0
- data/vendor/Eigen/src/plugins/CommonCwiseBinaryOps.h +115 -0
- data/vendor/Eigen/src/plugins/CommonCwiseUnaryOps.h +177 -0
- data/vendor/Eigen/src/plugins/IndexedViewMethods.h +262 -0
- data/vendor/Eigen/src/plugins/MatrixCwiseBinaryOps.h +152 -0
- data/vendor/Eigen/src/plugins/MatrixCwiseUnaryOps.h +95 -0
- data/vendor/Eigen/src/plugins/ReshapedMethods.h +149 -0
- data/vendor/aarand/aarand.hpp +114 -0
- data/vendor/annoy/annoylib.h +1495 -0
- data/vendor/annoy/kissrandom.h +120 -0
- data/vendor/annoy/mman.h +242 -0
- data/vendor/hnswlib/bruteforce.h +152 -0
- data/vendor/hnswlib/hnswalg.h +1192 -0
- data/vendor/hnswlib/hnswlib.h +108 -0
- data/vendor/hnswlib/space_ip.h +282 -0
- data/vendor/hnswlib/space_l2.h +281 -0
- data/vendor/hnswlib/visited_list_pool.h +79 -0
- data/vendor/irlba/irlba.hpp +575 -0
- data/vendor/irlba/lanczos.hpp +212 -0
- data/vendor/irlba/parallel.hpp +474 -0
- data/vendor/irlba/utils.hpp +224 -0
- data/vendor/irlba/wrappers.hpp +228 -0
- data/vendor/kmeans/Base.hpp +75 -0
- data/vendor/kmeans/Details.hpp +79 -0
- data/vendor/kmeans/HartiganWong.hpp +492 -0
- data/vendor/kmeans/InitializeKmeansPP.hpp +144 -0
- data/vendor/kmeans/InitializeNone.hpp +44 -0
- data/vendor/kmeans/InitializePCAPartition.hpp +309 -0
- data/vendor/kmeans/InitializeRandom.hpp +91 -0
- data/vendor/kmeans/Kmeans.hpp +161 -0
- data/vendor/kmeans/Lloyd.hpp +134 -0
- data/vendor/kmeans/MiniBatch.hpp +269 -0
- data/vendor/kmeans/QuickSearch.hpp +179 -0
- data/vendor/kmeans/compute_centroids.hpp +32 -0
- data/vendor/kmeans/compute_wcss.hpp +27 -0
- data/vendor/kmeans/is_edge_case.hpp +42 -0
- data/vendor/kmeans/random.hpp +55 -0
- data/vendor/knncolle/Annoy/Annoy.hpp +193 -0
- data/vendor/knncolle/BruteForce/BruteForce.hpp +120 -0
- data/vendor/knncolle/Hnsw/Hnsw.hpp +225 -0
- data/vendor/knncolle/Kmknn/Kmknn.hpp +286 -0
- data/vendor/knncolle/VpTree/VpTree.hpp +256 -0
- data/vendor/knncolle/knncolle.hpp +34 -0
- data/vendor/knncolle/utils/Base.hpp +100 -0
- data/vendor/knncolle/utils/NeighborQueue.hpp +94 -0
- data/vendor/knncolle/utils/distances.hpp +98 -0
- data/vendor/knncolle/utils/find_nearest_neighbors.hpp +112 -0
- data/vendor/powerit/PowerIterations.hpp +157 -0
- data/vendor/umappp/NeighborList.hpp +37 -0
- data/vendor/umappp/Umap.hpp +662 -0
- data/vendor/umappp/combine_neighbor_sets.hpp +95 -0
- data/vendor/umappp/find_ab.hpp +157 -0
- data/vendor/umappp/neighbor_similarities.hpp +136 -0
- data/vendor/umappp/optimize_layout.hpp +285 -0
- data/vendor/umappp/spectral_init.hpp +181 -0
- data/vendor/umappp/umappp.hpp +13 -0
- metadata +465 -0
@@ -0,0 +1,66 @@
|
|
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
|
+
#ifndef SPARSELU_IMPL_H
|
10
|
+
#define SPARSELU_IMPL_H
|
11
|
+
|
12
|
+
namespace Eigen {
|
13
|
+
namespace internal {
|
14
|
+
|
15
|
+
/** \ingroup SparseLU_Module
|
16
|
+
* \class SparseLUImpl
|
17
|
+
* Base class for sparseLU
|
18
|
+
*/
|
19
|
+
template <typename Scalar, typename StorageIndex>
|
20
|
+
class SparseLUImpl
|
21
|
+
{
|
22
|
+
public:
|
23
|
+
typedef Matrix<Scalar,Dynamic,1> ScalarVector;
|
24
|
+
typedef Matrix<StorageIndex,Dynamic,1> IndexVector;
|
25
|
+
typedef Matrix<Scalar,Dynamic,Dynamic,ColMajor> ScalarMatrix;
|
26
|
+
typedef Map<ScalarMatrix, 0, OuterStride<> > MappedMatrixBlock;
|
27
|
+
typedef typename ScalarVector::RealScalar RealScalar;
|
28
|
+
typedef Ref<Matrix<Scalar,Dynamic,1> > BlockScalarVector;
|
29
|
+
typedef Ref<Matrix<StorageIndex,Dynamic,1> > BlockIndexVector;
|
30
|
+
typedef LU_GlobalLU_t<IndexVector, ScalarVector> GlobalLU_t;
|
31
|
+
typedef SparseMatrix<Scalar,ColMajor,StorageIndex> MatrixType;
|
32
|
+
|
33
|
+
protected:
|
34
|
+
template <typename VectorType>
|
35
|
+
Index expand(VectorType& vec, Index& length, Index nbElts, Index keep_prev, Index& num_expansions);
|
36
|
+
Index memInit(Index m, Index n, Index annz, Index lwork, Index fillratio, Index panel_size, GlobalLU_t& glu);
|
37
|
+
template <typename VectorType>
|
38
|
+
Index memXpand(VectorType& vec, Index& maxlen, Index nbElts, MemType memtype, Index& num_expansions);
|
39
|
+
void heap_relax_snode (const Index n, IndexVector& et, const Index relax_columns, IndexVector& descendants, IndexVector& relax_end);
|
40
|
+
void relax_snode (const Index n, IndexVector& et, const Index relax_columns, IndexVector& descendants, IndexVector& relax_end);
|
41
|
+
Index snode_dfs(const Index jcol, const Index kcol,const MatrixType& mat, IndexVector& xprune, IndexVector& marker, GlobalLU_t& glu);
|
42
|
+
Index snode_bmod (const Index jcol, const Index fsupc, ScalarVector& dense, GlobalLU_t& glu);
|
43
|
+
Index pivotL(const Index jcol, const RealScalar& diagpivotthresh, IndexVector& perm_r, IndexVector& iperm_c, Index& pivrow, GlobalLU_t& glu);
|
44
|
+
template <typename Traits>
|
45
|
+
void dfs_kernel(const StorageIndex jj, IndexVector& perm_r,
|
46
|
+
Index& nseg, IndexVector& panel_lsub, IndexVector& segrep,
|
47
|
+
Ref<IndexVector> repfnz_col, IndexVector& xprune, Ref<IndexVector> marker, IndexVector& parent,
|
48
|
+
IndexVector& xplore, GlobalLU_t& glu, Index& nextl_col, Index krow, Traits& traits);
|
49
|
+
void panel_dfs(const Index m, const Index w, const Index jcol, MatrixType& A, IndexVector& perm_r, Index& nseg, ScalarVector& dense, IndexVector& panel_lsub, IndexVector& segrep, IndexVector& repfnz, IndexVector& xprune, IndexVector& marker, IndexVector& parent, IndexVector& xplore, GlobalLU_t& glu);
|
50
|
+
|
51
|
+
void panel_bmod(const Index m, const Index w, const Index jcol, const Index nseg, ScalarVector& dense, ScalarVector& tempv, IndexVector& segrep, IndexVector& repfnz, GlobalLU_t& glu);
|
52
|
+
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);
|
53
|
+
Index column_bmod(const Index jcol, const Index nseg, BlockScalarVector dense, ScalarVector& tempv, BlockIndexVector segrep, BlockIndexVector repfnz, Index fpanelc, GlobalLU_t& glu);
|
54
|
+
Index copy_to_ucol(const Index jcol, const Index nseg, IndexVector& segrep, BlockIndexVector repfnz ,IndexVector& perm_r, BlockScalarVector dense, GlobalLU_t& glu);
|
55
|
+
void pruneL(const Index jcol, const IndexVector& perm_r, const Index pivrow, const Index nseg, const IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, GlobalLU_t& glu);
|
56
|
+
void countnz(const Index n, Index& nnzL, Index& nnzU, GlobalLU_t& glu);
|
57
|
+
void fixupL(const Index n, const IndexVector& perm_r, GlobalLU_t& glu);
|
58
|
+
|
59
|
+
template<typename , typename >
|
60
|
+
friend struct column_dfs_traits;
|
61
|
+
};
|
62
|
+
|
63
|
+
} // end namespace internal
|
64
|
+
} // namespace Eigen
|
65
|
+
|
66
|
+
#endif
|
@@ -0,0 +1,226 @@
|
|
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]memory.c files in SuperLU
|
13
|
+
|
14
|
+
* -- SuperLU routine (version 3.1) --
|
15
|
+
* Univ. of California Berkeley, Xerox Palo Alto Research Center,
|
16
|
+
* and Lawrence Berkeley National Lab.
|
17
|
+
* August 1, 2008
|
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
|
+
|
31
|
+
#ifndef EIGEN_SPARSELU_MEMORY
|
32
|
+
#define EIGEN_SPARSELU_MEMORY
|
33
|
+
|
34
|
+
namespace Eigen {
|
35
|
+
namespace internal {
|
36
|
+
|
37
|
+
enum { LUNoMarker = 3 };
|
38
|
+
enum {emptyIdxLU = -1};
|
39
|
+
inline Index LUnumTempV(Index& m, Index& w, Index& t, Index& b)
|
40
|
+
{
|
41
|
+
return (std::max)(m, (t+b)*w);
|
42
|
+
}
|
43
|
+
|
44
|
+
template< typename Scalar>
|
45
|
+
inline Index LUTempSpace(Index&m, Index& w)
|
46
|
+
{
|
47
|
+
return (2*w + 4 + LUNoMarker) * m * sizeof(Index) + (w + 1) * m * sizeof(Scalar);
|
48
|
+
}
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
/**
|
54
|
+
* Expand the existing storage to accommodate more fill-ins
|
55
|
+
* \param vec Valid pointer to the vector to allocate or expand
|
56
|
+
* \param[in,out] length At input, contain the current length of the vector that is to be increased. At output, length of the newly allocated vector
|
57
|
+
* \param[in] nbElts Current number of elements in the factors
|
58
|
+
* \param keep_prev 1: use length and do not expand the vector; 0: compute new_len and expand
|
59
|
+
* \param[in,out] num_expansions Number of times the memory has been expanded
|
60
|
+
*/
|
61
|
+
template <typename Scalar, typename StorageIndex>
|
62
|
+
template <typename VectorType>
|
63
|
+
Index SparseLUImpl<Scalar,StorageIndex>::expand(VectorType& vec, Index& length, Index nbElts, Index keep_prev, Index& num_expansions)
|
64
|
+
{
|
65
|
+
|
66
|
+
float alpha = 1.5; // Ratio of the memory increase
|
67
|
+
Index new_len; // New size of the allocated memory
|
68
|
+
|
69
|
+
if(num_expansions == 0 || keep_prev)
|
70
|
+
new_len = length ; // First time allocate requested
|
71
|
+
else
|
72
|
+
new_len = (std::max)(length+1,Index(alpha * length));
|
73
|
+
|
74
|
+
VectorType old_vec; // Temporary vector to hold the previous values
|
75
|
+
if (nbElts > 0 )
|
76
|
+
old_vec = vec.segment(0,nbElts);
|
77
|
+
|
78
|
+
//Allocate or expand the current vector
|
79
|
+
#ifdef EIGEN_EXCEPTIONS
|
80
|
+
try
|
81
|
+
#endif
|
82
|
+
{
|
83
|
+
vec.resize(new_len);
|
84
|
+
}
|
85
|
+
#ifdef EIGEN_EXCEPTIONS
|
86
|
+
catch(std::bad_alloc& )
|
87
|
+
#else
|
88
|
+
if(!vec.size())
|
89
|
+
#endif
|
90
|
+
{
|
91
|
+
if (!num_expansions)
|
92
|
+
{
|
93
|
+
// First time to allocate from LUMemInit()
|
94
|
+
// Let LUMemInit() deals with it.
|
95
|
+
return -1;
|
96
|
+
}
|
97
|
+
if (keep_prev)
|
98
|
+
{
|
99
|
+
// In this case, the memory length should not not be reduced
|
100
|
+
return new_len;
|
101
|
+
}
|
102
|
+
else
|
103
|
+
{
|
104
|
+
// Reduce the size and increase again
|
105
|
+
Index tries = 0; // Number of attempts
|
106
|
+
do
|
107
|
+
{
|
108
|
+
alpha = (alpha + 1)/2;
|
109
|
+
new_len = (std::max)(length+1,Index(alpha * length));
|
110
|
+
#ifdef EIGEN_EXCEPTIONS
|
111
|
+
try
|
112
|
+
#endif
|
113
|
+
{
|
114
|
+
vec.resize(new_len);
|
115
|
+
}
|
116
|
+
#ifdef EIGEN_EXCEPTIONS
|
117
|
+
catch(std::bad_alloc& )
|
118
|
+
#else
|
119
|
+
if (!vec.size())
|
120
|
+
#endif
|
121
|
+
{
|
122
|
+
tries += 1;
|
123
|
+
if ( tries > 10) return new_len;
|
124
|
+
}
|
125
|
+
} while (!vec.size());
|
126
|
+
}
|
127
|
+
}
|
128
|
+
//Copy the previous values to the newly allocated space
|
129
|
+
if (nbElts > 0)
|
130
|
+
vec.segment(0, nbElts) = old_vec;
|
131
|
+
|
132
|
+
|
133
|
+
length = new_len;
|
134
|
+
if(num_expansions) ++num_expansions;
|
135
|
+
return 0;
|
136
|
+
}
|
137
|
+
|
138
|
+
/**
|
139
|
+
* \brief Allocate various working space for the numerical factorization phase.
|
140
|
+
* \param m number of rows of the input matrix
|
141
|
+
* \param n number of columns
|
142
|
+
* \param annz number of initial nonzeros in the matrix
|
143
|
+
* \param lwork if lwork=-1, this routine returns an estimated size of the required memory
|
144
|
+
* \param glu persistent data to facilitate multiple factors : will be deleted later ??
|
145
|
+
* \param fillratio estimated ratio of fill in the factors
|
146
|
+
* \param panel_size Size of a panel
|
147
|
+
* \return an estimated size of the required memory if lwork = -1; otherwise, return the size of actually allocated memory when allocation failed, and 0 on success
|
148
|
+
* \note Unlike SuperLU, this routine does not support successive factorization with the same pattern and the same row permutation
|
149
|
+
*/
|
150
|
+
template <typename Scalar, typename StorageIndex>
|
151
|
+
Index SparseLUImpl<Scalar,StorageIndex>::memInit(Index m, Index n, Index annz, Index lwork, Index fillratio, Index panel_size, GlobalLU_t& glu)
|
152
|
+
{
|
153
|
+
Index& num_expansions = glu.num_expansions; //No memory expansions so far
|
154
|
+
num_expansions = 0;
|
155
|
+
glu.nzumax = glu.nzlumax = (std::min)(fillratio * (annz+1) / n, m) * n; // estimated number of nonzeros in U
|
156
|
+
glu.nzlmax = (std::max)(Index(4), fillratio) * (annz+1) / 4; // estimated nnz in L factor
|
157
|
+
// Return the estimated size to the user if necessary
|
158
|
+
Index tempSpace;
|
159
|
+
tempSpace = (2*panel_size + 4 + LUNoMarker) * m * sizeof(Index) + (panel_size + 1) * m * sizeof(Scalar);
|
160
|
+
if (lwork == emptyIdxLU)
|
161
|
+
{
|
162
|
+
Index estimated_size;
|
163
|
+
estimated_size = (5 * n + 5) * sizeof(Index) + tempSpace
|
164
|
+
+ (glu.nzlmax + glu.nzumax) * sizeof(Index) + (glu.nzlumax+glu.nzumax) * sizeof(Scalar) + n;
|
165
|
+
return estimated_size;
|
166
|
+
}
|
167
|
+
|
168
|
+
// Setup the required space
|
169
|
+
|
170
|
+
// First allocate Integer pointers for L\U factors
|
171
|
+
glu.xsup.resize(n+1);
|
172
|
+
glu.supno.resize(n+1);
|
173
|
+
glu.xlsub.resize(n+1);
|
174
|
+
glu.xlusup.resize(n+1);
|
175
|
+
glu.xusub.resize(n+1);
|
176
|
+
|
177
|
+
// Reserve memory for L/U factors
|
178
|
+
do
|
179
|
+
{
|
180
|
+
if( (expand<ScalarVector>(glu.lusup, glu.nzlumax, 0, 0, num_expansions)<0)
|
181
|
+
|| (expand<ScalarVector>(glu.ucol, glu.nzumax, 0, 0, num_expansions)<0)
|
182
|
+
|| (expand<IndexVector> (glu.lsub, glu.nzlmax, 0, 0, num_expansions)<0)
|
183
|
+
|| (expand<IndexVector> (glu.usub, glu.nzumax, 0, 1, num_expansions)<0) )
|
184
|
+
{
|
185
|
+
//Reduce the estimated size and retry
|
186
|
+
glu.nzlumax /= 2;
|
187
|
+
glu.nzumax /= 2;
|
188
|
+
glu.nzlmax /= 2;
|
189
|
+
if (glu.nzlumax < annz ) return glu.nzlumax;
|
190
|
+
}
|
191
|
+
} while (!glu.lusup.size() || !glu.ucol.size() || !glu.lsub.size() || !glu.usub.size());
|
192
|
+
|
193
|
+
++num_expansions;
|
194
|
+
return 0;
|
195
|
+
|
196
|
+
} // end LuMemInit
|
197
|
+
|
198
|
+
/**
|
199
|
+
* \brief Expand the existing storage
|
200
|
+
* \param vec vector to expand
|
201
|
+
* \param[in,out] maxlen On input, previous size of vec (Number of elements to copy ). on output, new size
|
202
|
+
* \param nbElts current number of elements in the vector.
|
203
|
+
* \param memtype Type of the element to expand
|
204
|
+
* \param num_expansions Number of expansions
|
205
|
+
* \return 0 on success, > 0 size of the memory allocated so far
|
206
|
+
*/
|
207
|
+
template <typename Scalar, typename StorageIndex>
|
208
|
+
template <typename VectorType>
|
209
|
+
Index SparseLUImpl<Scalar,StorageIndex>::memXpand(VectorType& vec, Index& maxlen, Index nbElts, MemType memtype, Index& num_expansions)
|
210
|
+
{
|
211
|
+
Index failed_size;
|
212
|
+
if (memtype == USUB)
|
213
|
+
failed_size = this->expand<VectorType>(vec, maxlen, nbElts, 1, num_expansions);
|
214
|
+
else
|
215
|
+
failed_size = this->expand<VectorType>(vec, maxlen, nbElts, 0, num_expansions);
|
216
|
+
|
217
|
+
if (failed_size)
|
218
|
+
return failed_size;
|
219
|
+
|
220
|
+
return 0 ;
|
221
|
+
}
|
222
|
+
|
223
|
+
} // end namespace internal
|
224
|
+
|
225
|
+
} // end namespace Eigen
|
226
|
+
#endif // EIGEN_SPARSELU_MEMORY
|
@@ -0,0 +1,110 @@
|
|
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 comes from a partly modified version of files slu_[s,d,c,z]defs.h
|
12
|
+
* -- SuperLU routine (version 4.1) --
|
13
|
+
* Univ. of California Berkeley, Xerox Palo Alto Research Center,
|
14
|
+
* and Lawrence Berkeley National Lab.
|
15
|
+
* November, 2010
|
16
|
+
*
|
17
|
+
* Global data structures used in LU factorization -
|
18
|
+
*
|
19
|
+
* nsuper: #supernodes = nsuper + 1, numbered [0, nsuper].
|
20
|
+
* (xsup,supno): supno[i] is the supernode no to which i belongs;
|
21
|
+
* xsup(s) points to the beginning of the s-th supernode.
|
22
|
+
* e.g. supno 0 1 2 2 3 3 3 4 4 4 4 4 (n=12)
|
23
|
+
* xsup 0 1 2 4 7 12
|
24
|
+
* Note: dfs will be performed on supernode rep. relative to the new
|
25
|
+
* row pivoting ordering
|
26
|
+
*
|
27
|
+
* (xlsub,lsub): lsub[*] contains the compressed subscript of
|
28
|
+
* rectangular supernodes; xlsub[j] points to the starting
|
29
|
+
* location of the j-th column in lsub[*]. Note that xlsub
|
30
|
+
* is indexed by column.
|
31
|
+
* Storage: original row subscripts
|
32
|
+
*
|
33
|
+
* During the course of sparse LU factorization, we also use
|
34
|
+
* (xlsub,lsub) for the purpose of symmetric pruning. For each
|
35
|
+
* supernode {s,s+1,...,t=s+r} with first column s and last
|
36
|
+
* column t, the subscript set
|
37
|
+
* lsub[j], j=xlsub[s], .., xlsub[s+1]-1
|
38
|
+
* is the structure of column s (i.e. structure of this supernode).
|
39
|
+
* It is used for the storage of numerical values.
|
40
|
+
* Furthermore,
|
41
|
+
* lsub[j], j=xlsub[t], .., xlsub[t+1]-1
|
42
|
+
* is the structure of the last column t of this supernode.
|
43
|
+
* It is for the purpose of symmetric pruning. Therefore, the
|
44
|
+
* structural subscripts can be rearranged without making physical
|
45
|
+
* interchanges among the numerical values.
|
46
|
+
*
|
47
|
+
* However, if the supernode has only one column, then we
|
48
|
+
* only keep one set of subscripts. For any subscript interchange
|
49
|
+
* performed, similar interchange must be done on the numerical
|
50
|
+
* values.
|
51
|
+
*
|
52
|
+
* The last column structures (for pruning) will be removed
|
53
|
+
* after the numercial LU factorization phase.
|
54
|
+
*
|
55
|
+
* (xlusup,lusup): lusup[*] contains the numerical values of the
|
56
|
+
* rectangular supernodes; xlusup[j] points to the starting
|
57
|
+
* location of the j-th column in storage vector lusup[*]
|
58
|
+
* Note: xlusup is indexed by column.
|
59
|
+
* Each rectangular supernode is stored by column-major
|
60
|
+
* scheme, consistent with Fortran 2-dim array storage.
|
61
|
+
*
|
62
|
+
* (xusub,ucol,usub): ucol[*] stores the numerical values of
|
63
|
+
* U-columns outside the rectangular supernodes. The row
|
64
|
+
* subscript of nonzero ucol[k] is stored in usub[k].
|
65
|
+
* xusub[i] points to the starting location of column i in ucol.
|
66
|
+
* Storage: new row subscripts; that is subscripts of PA.
|
67
|
+
*/
|
68
|
+
|
69
|
+
#ifndef EIGEN_LU_STRUCTS
|
70
|
+
#define EIGEN_LU_STRUCTS
|
71
|
+
namespace Eigen {
|
72
|
+
namespace internal {
|
73
|
+
|
74
|
+
typedef enum {LUSUP, UCOL, LSUB, USUB, LLVL, ULVL} MemType;
|
75
|
+
|
76
|
+
template <typename IndexVector, typename ScalarVector>
|
77
|
+
struct LU_GlobalLU_t {
|
78
|
+
typedef typename IndexVector::Scalar StorageIndex;
|
79
|
+
IndexVector xsup; //First supernode column ... xsup(s) points to the beginning of the s-th supernode
|
80
|
+
IndexVector supno; // Supernode number corresponding to this column (column to supernode mapping)
|
81
|
+
ScalarVector lusup; // nonzero values of L ordered by columns
|
82
|
+
IndexVector lsub; // Compressed row indices of L rectangular supernodes.
|
83
|
+
IndexVector xlusup; // pointers to the beginning of each column in lusup
|
84
|
+
IndexVector xlsub; // pointers to the beginning of each column in lsub
|
85
|
+
Index nzlmax; // Current max size of lsub
|
86
|
+
Index nzlumax; // Current max size of lusup
|
87
|
+
ScalarVector ucol; // nonzero values of U ordered by columns
|
88
|
+
IndexVector usub; // row indices of U columns in ucol
|
89
|
+
IndexVector xusub; // Pointers to the beginning of each column of U in ucol
|
90
|
+
Index nzumax; // Current max size of ucol
|
91
|
+
Index n; // Number of columns in the matrix
|
92
|
+
Index num_expansions;
|
93
|
+
};
|
94
|
+
|
95
|
+
// Values to set for performance
|
96
|
+
struct perfvalues {
|
97
|
+
Index panel_size; // a panel consists of at most <panel_size> consecutive columns
|
98
|
+
Index relax; // To control degree of relaxing supernodes. If the number of nodes (columns)
|
99
|
+
// in a subtree of the elimination tree is less than relax, this subtree is considered
|
100
|
+
// as one supernode regardless of the row structures of those columns
|
101
|
+
Index maxsuper; // The maximum size for a supernode in complete LU
|
102
|
+
Index rowblk; // The minimum row dimension for 2-D blocking to be used;
|
103
|
+
Index colblk; // The minimum column dimension for 2-D blocking to be used;
|
104
|
+
Index fillfactor; // The estimated fills factors for L and U, compared with A
|
105
|
+
};
|
106
|
+
|
107
|
+
} // end namespace internal
|
108
|
+
|
109
|
+
} // end namespace Eigen
|
110
|
+
#endif // EIGEN_LU_STRUCTS
|