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,137 @@
|
|
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 xpivotL.c file in SuperLU
|
13
|
+
|
14
|
+
* -- SuperLU routine (version 3.0) --
|
15
|
+
* Univ. of California Berkeley, Xerox Palo Alto Research Center,
|
16
|
+
* and Lawrence Berkeley National Lab.
|
17
|
+
* October 15, 2003
|
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_PIVOTL_H
|
31
|
+
#define SPARSELU_PIVOTL_H
|
32
|
+
|
33
|
+
namespace Eigen {
|
34
|
+
namespace internal {
|
35
|
+
|
36
|
+
/**
|
37
|
+
* \brief Performs the numerical pivotin on the current column of L, and the CDIV operation.
|
38
|
+
*
|
39
|
+
* Pivot policy :
|
40
|
+
* (1) Compute thresh = u * max_(i>=j) abs(A_ij);
|
41
|
+
* (2) IF user specifies pivot row k and abs(A_kj) >= thresh THEN
|
42
|
+
* pivot row = k;
|
43
|
+
* ELSE IF abs(A_jj) >= thresh THEN
|
44
|
+
* pivot row = j;
|
45
|
+
* ELSE
|
46
|
+
* pivot row = m;
|
47
|
+
*
|
48
|
+
* Note: If you absolutely want to use a given pivot order, then set u=0.0.
|
49
|
+
*
|
50
|
+
* \param jcol The current column of L
|
51
|
+
* \param diagpivotthresh diagonal pivoting threshold
|
52
|
+
* \param[in,out] perm_r Row permutation (threshold pivoting)
|
53
|
+
* \param[in] iperm_c column permutation - used to finf diagonal of Pc*A*Pc'
|
54
|
+
* \param[out] pivrow The pivot row
|
55
|
+
* \param glu Global LU data
|
56
|
+
* \return 0 if success, i > 0 if U(i,i) is exactly zero
|
57
|
+
*
|
58
|
+
*/
|
59
|
+
template <typename Scalar, typename StorageIndex>
|
60
|
+
Index SparseLUImpl<Scalar,StorageIndex>::pivotL(const Index jcol, const RealScalar& diagpivotthresh, IndexVector& perm_r, IndexVector& iperm_c, Index& pivrow, GlobalLU_t& glu)
|
61
|
+
{
|
62
|
+
|
63
|
+
Index fsupc = (glu.xsup)((glu.supno)(jcol)); // First column in the supernode containing the column jcol
|
64
|
+
Index nsupc = jcol - fsupc; // Number of columns in the supernode portion, excluding jcol; nsupc >=0
|
65
|
+
Index lptr = glu.xlsub(fsupc); // pointer to the starting location of the row subscripts for this supernode portion
|
66
|
+
Index nsupr = glu.xlsub(fsupc+1) - lptr; // Number of rows in the supernode
|
67
|
+
Index lda = glu.xlusup(fsupc+1) - glu.xlusup(fsupc); // leading dimension
|
68
|
+
Scalar* lu_sup_ptr = &(glu.lusup.data()[glu.xlusup(fsupc)]); // Start of the current supernode
|
69
|
+
Scalar* lu_col_ptr = &(glu.lusup.data()[glu.xlusup(jcol)]); // Start of jcol in the supernode
|
70
|
+
StorageIndex* lsub_ptr = &(glu.lsub.data()[lptr]); // Start of row indices of the supernode
|
71
|
+
|
72
|
+
// Determine the largest abs numerical value for partial pivoting
|
73
|
+
Index diagind = iperm_c(jcol); // diagonal index
|
74
|
+
RealScalar pivmax(-1.0);
|
75
|
+
Index pivptr = nsupc;
|
76
|
+
Index diag = emptyIdxLU;
|
77
|
+
RealScalar rtemp;
|
78
|
+
Index isub, icol, itemp, k;
|
79
|
+
for (isub = nsupc; isub < nsupr; ++isub) {
|
80
|
+
using std::abs;
|
81
|
+
rtemp = abs(lu_col_ptr[isub]);
|
82
|
+
if (rtemp > pivmax) {
|
83
|
+
pivmax = rtemp;
|
84
|
+
pivptr = isub;
|
85
|
+
}
|
86
|
+
if (lsub_ptr[isub] == diagind) diag = isub;
|
87
|
+
}
|
88
|
+
|
89
|
+
// Test for singularity
|
90
|
+
if ( pivmax <= RealScalar(0.0) ) {
|
91
|
+
// if pivmax == -1, the column is structurally empty, otherwise it is only numerically zero
|
92
|
+
pivrow = pivmax < RealScalar(0.0) ? diagind : lsub_ptr[pivptr];
|
93
|
+
perm_r(pivrow) = StorageIndex(jcol);
|
94
|
+
return (jcol+1);
|
95
|
+
}
|
96
|
+
|
97
|
+
RealScalar thresh = diagpivotthresh * pivmax;
|
98
|
+
|
99
|
+
// Choose appropriate pivotal element
|
100
|
+
|
101
|
+
{
|
102
|
+
// Test if the diagonal element can be used as a pivot (given the threshold value)
|
103
|
+
if (diag >= 0 )
|
104
|
+
{
|
105
|
+
// Diagonal element exists
|
106
|
+
using std::abs;
|
107
|
+
rtemp = abs(lu_col_ptr[diag]);
|
108
|
+
if (rtemp != RealScalar(0.0) && rtemp >= thresh) pivptr = diag;
|
109
|
+
}
|
110
|
+
pivrow = lsub_ptr[pivptr];
|
111
|
+
}
|
112
|
+
|
113
|
+
// Record pivot row
|
114
|
+
perm_r(pivrow) = StorageIndex(jcol);
|
115
|
+
// Interchange row subscripts
|
116
|
+
if (pivptr != nsupc )
|
117
|
+
{
|
118
|
+
std::swap( lsub_ptr[pivptr], lsub_ptr[nsupc] );
|
119
|
+
// Interchange numerical values as well, for the two rows in the whole snode
|
120
|
+
// such that L is indexed the same way as A
|
121
|
+
for (icol = 0; icol <= nsupc; icol++)
|
122
|
+
{
|
123
|
+
itemp = pivptr + icol * lda;
|
124
|
+
std::swap(lu_sup_ptr[itemp], lu_sup_ptr[nsupc + icol * lda]);
|
125
|
+
}
|
126
|
+
}
|
127
|
+
// cdiv operations
|
128
|
+
Scalar temp = Scalar(1.0) / lu_col_ptr[nsupc];
|
129
|
+
for (k = nsupc+1; k < nsupr; k++)
|
130
|
+
lu_col_ptr[k] *= temp;
|
131
|
+
return 0;
|
132
|
+
}
|
133
|
+
|
134
|
+
} // end namespace internal
|
135
|
+
} // end namespace Eigen
|
136
|
+
|
137
|
+
#endif // SPARSELU_PIVOTL_H
|
@@ -0,0 +1,136 @@
|
|
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]pruneL.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_PRUNEL_H
|
31
|
+
#define SPARSELU_PRUNEL_H
|
32
|
+
|
33
|
+
namespace Eigen {
|
34
|
+
namespace internal {
|
35
|
+
|
36
|
+
/**
|
37
|
+
* \brief Prunes the L-structure.
|
38
|
+
*
|
39
|
+
* It prunes the L-structure of supernodes whose L-structure contains the current pivot row "pivrow"
|
40
|
+
*
|
41
|
+
*
|
42
|
+
* \param jcol The current column of L
|
43
|
+
* \param[in] perm_r Row permutation
|
44
|
+
* \param[out] pivrow The pivot row
|
45
|
+
* \param nseg Number of segments
|
46
|
+
* \param segrep
|
47
|
+
* \param repfnz
|
48
|
+
* \param[out] xprune
|
49
|
+
* \param glu Global LU data
|
50
|
+
*
|
51
|
+
*/
|
52
|
+
template <typename Scalar, typename StorageIndex>
|
53
|
+
void SparseLUImpl<Scalar,StorageIndex>::pruneL(const Index jcol, const IndexVector& perm_r, const Index pivrow, const Index nseg,
|
54
|
+
const IndexVector& segrep, BlockIndexVector repfnz, IndexVector& xprune, GlobalLU_t& glu)
|
55
|
+
{
|
56
|
+
// For each supernode-rep irep in U(*,j]
|
57
|
+
Index jsupno = glu.supno(jcol);
|
58
|
+
Index i,irep,irep1;
|
59
|
+
bool movnum, do_prune = false;
|
60
|
+
Index kmin = 0, kmax = 0, minloc, maxloc,krow;
|
61
|
+
for (i = 0; i < nseg; i++)
|
62
|
+
{
|
63
|
+
irep = segrep(i);
|
64
|
+
irep1 = irep + 1;
|
65
|
+
do_prune = false;
|
66
|
+
|
67
|
+
// Don't prune with a zero U-segment
|
68
|
+
if (repfnz(irep) == emptyIdxLU) continue;
|
69
|
+
|
70
|
+
// If a snode overlaps with the next panel, then the U-segment
|
71
|
+
// is fragmented into two parts -- irep and irep1. We should let
|
72
|
+
// pruning occur at the rep-column in irep1s snode.
|
73
|
+
if (glu.supno(irep) == glu.supno(irep1) ) continue; // don't prune
|
74
|
+
|
75
|
+
// If it has not been pruned & it has a nonz in row L(pivrow,i)
|
76
|
+
if (glu.supno(irep) != jsupno )
|
77
|
+
{
|
78
|
+
if ( xprune (irep) >= glu.xlsub(irep1) )
|
79
|
+
{
|
80
|
+
kmin = glu.xlsub(irep);
|
81
|
+
kmax = glu.xlsub(irep1) - 1;
|
82
|
+
for (krow = kmin; krow <= kmax; krow++)
|
83
|
+
{
|
84
|
+
if (glu.lsub(krow) == pivrow)
|
85
|
+
{
|
86
|
+
do_prune = true;
|
87
|
+
break;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
if (do_prune)
|
93
|
+
{
|
94
|
+
// do a quicksort-type partition
|
95
|
+
// movnum=true means that the num values have to be exchanged
|
96
|
+
movnum = false;
|
97
|
+
if (irep == glu.xsup(glu.supno(irep)) ) // Snode of size 1
|
98
|
+
movnum = true;
|
99
|
+
|
100
|
+
while (kmin <= kmax)
|
101
|
+
{
|
102
|
+
if (perm_r(glu.lsub(kmax)) == emptyIdxLU)
|
103
|
+
kmax--;
|
104
|
+
else if ( perm_r(glu.lsub(kmin)) != emptyIdxLU)
|
105
|
+
kmin++;
|
106
|
+
else
|
107
|
+
{
|
108
|
+
// kmin below pivrow (not yet pivoted), and kmax
|
109
|
+
// above pivrow: interchange the two suscripts
|
110
|
+
std::swap(glu.lsub(kmin), glu.lsub(kmax));
|
111
|
+
|
112
|
+
// If the supernode has only one column, then we
|
113
|
+
// only keep one set of subscripts. For any subscript
|
114
|
+
// intercnahge performed, similar interchange must be
|
115
|
+
// done on the numerical values.
|
116
|
+
if (movnum)
|
117
|
+
{
|
118
|
+
minloc = glu.xlusup(irep) + ( kmin - glu.xlsub(irep) );
|
119
|
+
maxloc = glu.xlusup(irep) + ( kmax - glu.xlsub(irep) );
|
120
|
+
std::swap(glu.lusup(minloc), glu.lusup(maxloc));
|
121
|
+
}
|
122
|
+
kmin++;
|
123
|
+
kmax--;
|
124
|
+
}
|
125
|
+
} // end while
|
126
|
+
|
127
|
+
xprune(irep) = StorageIndex(kmin); //Pruning
|
128
|
+
} // end if do_prune
|
129
|
+
} // end pruning
|
130
|
+
} // End for each U-segment
|
131
|
+
}
|
132
|
+
|
133
|
+
} // end namespace internal
|
134
|
+
} // end namespace Eigen
|
135
|
+
|
136
|
+
#endif // SPARSELU_PRUNEL_H
|
@@ -0,0 +1,83 @@
|
|
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
|
+
/* This file is a modified version of heap_relax_snode.c file in SuperLU
|
11
|
+
* -- SuperLU routine (version 3.0) --
|
12
|
+
* Univ. of California Berkeley, Xerox Palo Alto Research Center,
|
13
|
+
* and Lawrence Berkeley National Lab.
|
14
|
+
* October 15, 2003
|
15
|
+
*
|
16
|
+
* Copyright (c) 1994 by Xerox Corporation. All rights reserved.
|
17
|
+
*
|
18
|
+
* THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY
|
19
|
+
* EXPRESSED OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
|
20
|
+
*
|
21
|
+
* Permission is hereby granted to use or copy this program for any
|
22
|
+
* purpose, provided the above notices are retained on all copies.
|
23
|
+
* Permission to modify the code and to distribute modified code is
|
24
|
+
* granted, provided the above notices are retained, and a notice that
|
25
|
+
* the code was modified is included with the above copyright notice.
|
26
|
+
*/
|
27
|
+
|
28
|
+
#ifndef SPARSELU_RELAX_SNODE_H
|
29
|
+
#define SPARSELU_RELAX_SNODE_H
|
30
|
+
|
31
|
+
namespace Eigen {
|
32
|
+
|
33
|
+
namespace internal {
|
34
|
+
|
35
|
+
/**
|
36
|
+
* \brief Identify the initial relaxed supernodes
|
37
|
+
*
|
38
|
+
* This routine is applied to a column elimination tree.
|
39
|
+
* It assumes that the matrix has been reordered according to the postorder of the etree
|
40
|
+
* \param n the number of columns
|
41
|
+
* \param et elimination tree
|
42
|
+
* \param relax_columns Maximum number of columns allowed in a relaxed snode
|
43
|
+
* \param descendants Number of descendants of each node in the etree
|
44
|
+
* \param relax_end last column in a supernode
|
45
|
+
*/
|
46
|
+
template <typename Scalar, typename StorageIndex>
|
47
|
+
void SparseLUImpl<Scalar,StorageIndex>::relax_snode (const Index n, IndexVector& et, const Index relax_columns, IndexVector& descendants, IndexVector& relax_end)
|
48
|
+
{
|
49
|
+
|
50
|
+
// compute the number of descendants of each node in the etree
|
51
|
+
Index parent;
|
52
|
+
relax_end.setConstant(emptyIdxLU);
|
53
|
+
descendants.setZero();
|
54
|
+
for (Index j = 0; j < n; j++)
|
55
|
+
{
|
56
|
+
parent = et(j);
|
57
|
+
if (parent != n) // not the dummy root
|
58
|
+
descendants(parent) += descendants(j) + 1;
|
59
|
+
}
|
60
|
+
// Identify the relaxed supernodes by postorder traversal of the etree
|
61
|
+
Index snode_start; // beginning of a snode
|
62
|
+
for (Index j = 0; j < n; )
|
63
|
+
{
|
64
|
+
parent = et(j);
|
65
|
+
snode_start = j;
|
66
|
+
while ( parent != n && descendants(parent) < relax_columns )
|
67
|
+
{
|
68
|
+
j = parent;
|
69
|
+
parent = et(j);
|
70
|
+
}
|
71
|
+
// Found a supernode in postordered etree, j is the last column
|
72
|
+
relax_end(snode_start) = StorageIndex(j); // Record last column
|
73
|
+
j++;
|
74
|
+
// Search for a new leaf
|
75
|
+
while (descendants(j) != 0 && j < n) j++;
|
76
|
+
} // End postorder traversal of the etree
|
77
|
+
|
78
|
+
}
|
79
|
+
|
80
|
+
} // end namespace internal
|
81
|
+
|
82
|
+
} // end namespace Eigen
|
83
|
+
#endif
|