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.
- checksums.yaml +4 -4
- data/LICENSE +22 -0
- data/README.md +21 -0
- data/ext/eigen/eigen3/COPYING.BSD +26 -0
- data/ext/eigen/eigen3/COPYING.MPL2 +373 -0
- data/ext/eigen/eigen3/COPYING.README +18 -0
- data/ext/eigen/eigen3/Eigen/Array +11 -0
- data/ext/eigen/eigen3/Eigen/Cholesky +32 -0
- data/ext/eigen/eigen3/Eigen/CholmodSupport +45 -0
- data/ext/eigen/eigen3/Eigen/Core +376 -0
- data/ext/eigen/eigen3/Eigen/Dense +7 -0
- data/ext/eigen/eigen3/Eigen/Eigen +2 -0
- data/ext/eigen/eigen3/Eigen/Eigen2Support +95 -0
- data/ext/eigen/eigen3/Eigen/Eigenvalues +48 -0
- data/ext/eigen/eigen3/Eigen/Geometry +63 -0
- data/ext/eigen/eigen3/Eigen/Householder +23 -0
- data/ext/eigen/eigen3/Eigen/IterativeLinearSolvers +40 -0
- data/ext/eigen/eigen3/Eigen/Jacobi +26 -0
- data/ext/eigen/eigen3/Eigen/LU +41 -0
- data/ext/eigen/eigen3/Eigen/LeastSquares +32 -0
- data/ext/eigen/eigen3/Eigen/MetisSupport +28 -0
- data/ext/eigen/eigen3/Eigen/PaStiXSupport +46 -0
- data/ext/eigen/eigen3/Eigen/PardisoSupport +30 -0
- data/ext/eigen/eigen3/Eigen/QR +45 -0
- data/ext/eigen/eigen3/Eigen/QtAlignedMalloc +34 -0
- data/ext/eigen/eigen3/Eigen/SPQRSupport +29 -0
- data/ext/eigen/eigen3/Eigen/SVD +37 -0
- data/ext/eigen/eigen3/Eigen/Sparse +27 -0
- data/ext/eigen/eigen3/Eigen/SparseCore +64 -0
- data/ext/eigen/eigen3/Eigen/SparseLU +49 -0
- data/ext/eigen/eigen3/Eigen/SparseQR +33 -0
- data/ext/eigen/eigen3/Eigen/StdDeque +27 -0
- data/ext/eigen/eigen3/Eigen/StdList +26 -0
- data/ext/eigen/eigen3/Eigen/StdVector +27 -0
- data/ext/eigen/eigen3/Eigen/SuperLUSupport +59 -0
- data/ext/eigen/eigen3/Eigen/UmfPackSupport +36 -0
- data/ext/eigen/eigen3/Eigen/src/Cholesky/LDLT.h +611 -0
- data/ext/eigen/eigen3/Eigen/src/Cholesky/LLT.h +498 -0
- data/ext/eigen/eigen3/Eigen/src/Cholesky/LLT_MKL.h +102 -0
- data/ext/eigen/eigen3/Eigen/src/CholmodSupport/CholmodSupport.h +607 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Array.h +323 -0
- data/ext/eigen/eigen3/Eigen/src/Core/ArrayBase.h +226 -0
- data/ext/eigen/eigen3/Eigen/src/Core/ArrayWrapper.h +264 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Assign.h +590 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Assign_MKL.h +224 -0
- data/ext/eigen/eigen3/Eigen/src/Core/BandMatrix.h +334 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Block.h +406 -0
- data/ext/eigen/eigen3/Eigen/src/Core/BooleanRedux.h +154 -0
- data/ext/eigen/eigen3/Eigen/src/Core/CommaInitializer.h +154 -0
- data/ext/eigen/eigen3/Eigen/src/Core/CoreIterators.h +61 -0
- data/ext/eigen/eigen3/Eigen/src/Core/CwiseBinaryOp.h +230 -0
- data/ext/eigen/eigen3/Eigen/src/Core/CwiseNullaryOp.h +864 -0
- data/ext/eigen/eigen3/Eigen/src/Core/CwiseUnaryOp.h +126 -0
- data/ext/eigen/eigen3/Eigen/src/Core/CwiseUnaryView.h +139 -0
- data/ext/eigen/eigen3/Eigen/src/Core/DenseBase.h +521 -0
- data/ext/eigen/eigen3/Eigen/src/Core/DenseCoeffsBase.h +754 -0
- data/ext/eigen/eigen3/Eigen/src/Core/DenseStorage.h +434 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Diagonal.h +237 -0
- data/ext/eigen/eigen3/Eigen/src/Core/DiagonalMatrix.h +313 -0
- data/ext/eigen/eigen3/Eigen/src/Core/DiagonalProduct.h +131 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Dot.h +263 -0
- data/ext/eigen/eigen3/Eigen/src/Core/EigenBase.h +131 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Flagged.h +140 -0
- data/ext/eigen/eigen3/Eigen/src/Core/ForceAlignedAccess.h +146 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Functors.h +1026 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Fuzzy.h +150 -0
- data/ext/eigen/eigen3/Eigen/src/Core/GeneralProduct.h +635 -0
- data/ext/eigen/eigen3/Eigen/src/Core/GenericPacketMath.h +350 -0
- data/ext/eigen/eigen3/Eigen/src/Core/GlobalFunctions.h +92 -0
- data/ext/eigen/eigen3/Eigen/src/Core/IO.h +250 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Map.h +192 -0
- data/ext/eigen/eigen3/Eigen/src/Core/MapBase.h +247 -0
- data/ext/eigen/eigen3/Eigen/src/Core/MathFunctions.h +768 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Matrix.h +420 -0
- data/ext/eigen/eigen3/Eigen/src/Core/MatrixBase.h +563 -0
- data/ext/eigen/eigen3/Eigen/src/Core/NestByValue.h +111 -0
- data/ext/eigen/eigen3/Eigen/src/Core/NoAlias.h +134 -0
- data/ext/eigen/eigen3/Eigen/src/Core/NumTraits.h +150 -0
- data/ext/eigen/eigen3/Eigen/src/Core/PermutationMatrix.h +721 -0
- data/ext/eigen/eigen3/Eigen/src/Core/PlainObjectBase.h +822 -0
- data/ext/eigen/eigen3/Eigen/src/Core/ProductBase.h +290 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Random.h +152 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Redux.h +409 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Ref.h +278 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Replicate.h +177 -0
- data/ext/eigen/eigen3/Eigen/src/Core/ReturnByValue.h +99 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Reverse.h +224 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Select.h +162 -0
- data/ext/eigen/eigen3/Eigen/src/Core/SelfAdjointView.h +314 -0
- data/ext/eigen/eigen3/Eigen/src/Core/SelfCwiseBinaryOp.h +191 -0
- data/ext/eigen/eigen3/Eigen/src/Core/SolveTriangular.h +260 -0
- data/ext/eigen/eigen3/Eigen/src/Core/StableNorm.h +203 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Stride.h +108 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Swap.h +126 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Transpose.h +419 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Transpositions.h +436 -0
- data/ext/eigen/eigen3/Eigen/src/Core/TriangularMatrix.h +839 -0
- data/ext/eigen/eigen3/Eigen/src/Core/VectorBlock.h +95 -0
- data/ext/eigen/eigen3/Eigen/src/Core/VectorwiseOp.h +642 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Visitor.h +237 -0
- data/ext/eigen/eigen3/Eigen/src/Core/arch/AltiVec/Complex.h +217 -0
- data/ext/eigen/eigen3/Eigen/src/Core/arch/AltiVec/PacketMath.h +501 -0
- data/ext/eigen/eigen3/Eigen/src/Core/arch/Default/Settings.h +49 -0
- data/ext/eigen/eigen3/Eigen/src/Core/arch/NEON/Complex.h +253 -0
- data/ext/eigen/eigen3/Eigen/src/Core/arch/NEON/PacketMath.h +420 -0
- data/ext/eigen/eigen3/Eigen/src/Core/arch/SSE/Complex.h +442 -0
- data/ext/eigen/eigen3/Eigen/src/Core/arch/SSE/MathFunctions.h +475 -0
- data/ext/eigen/eigen3/Eigen/src/Core/arch/SSE/PacketMath.h +649 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/CoeffBasedProduct.h +476 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h +1341 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix.h +427 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +278 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_MKL.h +146 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix_MKL.h +118 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixVector.h +566 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixVector_MKL.h +131 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/Parallelizer.h +162 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +436 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix_MKL.h +295 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector.h +281 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector_MKL.h +114 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointProduct.h +123 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointRank2Update.h +93 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix.h +427 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix_MKL.h +309 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularMatrixVector.h +348 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularMatrixVector_MKL.h +247 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularSolverMatrix.h +332 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularSolverMatrix_MKL.h +155 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularSolverVector.h +139 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/BlasUtil.h +264 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/Constants.h +451 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/DisableStupidWarnings.h +40 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/ForwardDeclarations.h +302 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/MKL_support.h +158 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/Macros.h +451 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/Memory.h +977 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/Meta.h +243 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/NonMPL2.h +3 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/ReenableStupidWarnings.h +14 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/StaticAssert.h +208 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/XprHelper.h +469 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Block.h +126 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Cwise.h +192 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/CwiseOperators.h +298 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/AlignedBox.h +159 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/All.h +115 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/AngleAxis.h +214 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Hyperplane.h +254 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/ParametrizedLine.h +141 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Quaternion.h +495 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Rotation2D.h +145 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/RotationBase.h +123 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Scaling.h +167 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Transform.h +786 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Translation.h +184 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/LU.h +120 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Lazy.h +71 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/LeastSquares.h +169 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Macros.h +20 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/MathFunctions.h +57 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Memory.h +45 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Meta.h +75 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Minor.h +117 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/QR.h +67 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/SVD.h +637 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/TriangularSolver.h +42 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/VectorBlock.h +94 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/ComplexEigenSolver.h +341 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/ComplexSchur.h +456 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/ComplexSchur_MKL.h +94 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/EigenSolver.h +607 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +350 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +227 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/HessenbergDecomposition.h +373 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +160 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/RealQZ.h +624 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/RealSchur.h +525 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/RealSchur_MKL.h +83 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +801 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_MKL.h +92 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/Tridiagonalization.h +557 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/AlignedBox.h +392 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/AngleAxis.h +233 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/EulerAngles.h +104 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/Homogeneous.h +307 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/Hyperplane.h +280 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/OrthoMethods.h +218 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/ParametrizedLine.h +195 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/Quaternion.h +776 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/Rotation2D.h +160 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/RotationBase.h +206 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/Scaling.h +166 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/Transform.h +1455 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/Translation.h +206 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/Umeyama.h +177 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/arch/Geometry_SSE.h +115 -0
- data/ext/eigen/eigen3/Eigen/src/Householder/BlockHouseholder.h +68 -0
- data/ext/eigen/eigen3/Eigen/src/Householder/Householder.h +171 -0
- data/ext/eigen/eigen3/Eigen/src/Householder/HouseholderSequence.h +441 -0
- data/ext/eigen/eigen3/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +149 -0
- data/ext/eigen/eigen3/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +263 -0
- data/ext/eigen/eigen3/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +256 -0
- data/ext/eigen/eigen3/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +282 -0
- data/ext/eigen/eigen3/Eigen/src/Jacobi/Jacobi.h +433 -0
- data/ext/eigen/eigen3/Eigen/src/LU/Determinant.h +101 -0
- data/ext/eigen/eigen3/Eigen/src/LU/FullPivLU.h +751 -0
- data/ext/eigen/eigen3/Eigen/src/LU/Inverse.h +400 -0
- data/ext/eigen/eigen3/Eigen/src/LU/PartialPivLU.h +509 -0
- data/ext/eigen/eigen3/Eigen/src/LU/PartialPivLU_MKL.h +85 -0
- data/ext/eigen/eigen3/Eigen/src/LU/arch/Inverse_SSE.h +329 -0
- data/ext/eigen/eigen3/Eigen/src/MetisSupport/MetisSupport.h +137 -0
- data/ext/eigen/eigen3/Eigen/src/OrderingMethods/Amd.h +444 -0
- data/ext/eigen/eigen3/Eigen/src/OrderingMethods/Eigen_Colamd.h +1850 -0
- data/ext/eigen/eigen3/Eigen/src/PaStiXSupport/PaStiXSupport.h +721 -0
- data/ext/eigen/eigen3/Eigen/src/PardisoSupport/PardisoSupport.h +592 -0
- data/ext/eigen/eigen3/Eigen/src/QR/ColPivHouseholderQR.h +580 -0
- data/ext/eigen/eigen3/Eigen/src/QR/ColPivHouseholderQR_MKL.h +99 -0
- data/ext/eigen/eigen3/Eigen/src/QR/FullPivHouseholderQR.h +622 -0
- data/ext/eigen/eigen3/Eigen/src/QR/HouseholderQR.h +388 -0
- data/ext/eigen/eigen3/Eigen/src/QR/HouseholderQR_MKL.h +71 -0
- data/ext/eigen/eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +338 -0
- data/ext/eigen/eigen3/Eigen/src/SVD/JacobiSVD.h +976 -0
- data/ext/eigen/eigen3/Eigen/src/SVD/JacobiSVD_MKL.h +92 -0
- data/ext/eigen/eigen3/Eigen/src/SVD/UpperBidiagonalization.h +148 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCholesky/SimplicialCholesky.h +671 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +199 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/AmbiVector.h +373 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/CompressedStorage.h +233 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +245 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/MappedSparseMatrix.h +181 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseBlock.h +537 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseColEtree.h +206 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +325 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +163 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseDenseProduct.h +311 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseDiagonalProduct.h +196 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseDot.h +101 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseFuzzy.h +26 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseMatrix.h +1262 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseMatrixBase.h +461 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparsePermutation.h +148 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseProduct.h +188 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseRedux.h +45 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseSelfAdjointView.h +507 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +150 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseTranspose.h +63 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseTriangularView.h +179 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseUtil.h +172 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseVector.h +448 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseView.h +99 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/TriangularSolver.h +334 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU.h +806 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLUImpl.h +66 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_Memory.h +227 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_Structs.h +111 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +298 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_Utils.h +80 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_column_bmod.h +180 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_column_dfs.h +177 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +106 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +279 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +127 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +130 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_panel_bmod.h +223 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_panel_dfs.h +258 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_pivotL.h +137 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_pruneL.h +135 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_relax_snode.h +83 -0
- data/ext/eigen/eigen3/Eigen/src/SparseQR/SparseQR.h +714 -0
- data/ext/eigen/eigen3/Eigen/src/StlSupport/StdDeque.h +134 -0
- data/ext/eigen/eigen3/Eigen/src/StlSupport/StdList.h +114 -0
- data/ext/eigen/eigen3/Eigen/src/StlSupport/StdVector.h +126 -0
- data/ext/eigen/eigen3/Eigen/src/StlSupport/details.h +84 -0
- data/ext/eigen/eigen3/Eigen/src/SuperLUSupport/SuperLUSupport.h +1026 -0
- data/ext/eigen/eigen3/Eigen/src/UmfPackSupport/UmfPackSupport.h +474 -0
- data/ext/eigen/eigen3/Eigen/src/misc/Image.h +84 -0
- data/ext/eigen/eigen3/Eigen/src/misc/Kernel.h +81 -0
- data/ext/eigen/eigen3/Eigen/src/misc/Solve.h +76 -0
- data/ext/eigen/eigen3/Eigen/src/misc/SparseSolve.h +128 -0
- data/ext/eigen/eigen3/Eigen/src/misc/blas.h +658 -0
- data/ext/eigen/eigen3/Eigen/src/plugins/ArrayCwiseBinaryOps.h +253 -0
- data/ext/eigen/eigen3/Eigen/src/plugins/ArrayCwiseUnaryOps.h +187 -0
- data/ext/eigen/eigen3/Eigen/src/plugins/BlockMethods.h +935 -0
- data/ext/eigen/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h +46 -0
- data/ext/eigen/eigen3/Eigen/src/plugins/CommonCwiseUnaryOps.h +172 -0
- data/ext/eigen/eigen3/Eigen/src/plugins/MatrixCwiseBinaryOps.h +143 -0
- data/ext/eigen/eigen3/Eigen/src/plugins/MatrixCwiseUnaryOps.h +52 -0
- data/ext/eigen/eigen3/signature_of_eigen3_matrix_library +1 -0
- data/ext/eigen/eigen_wrap.cxx +19420 -10396
- data/ext/eigen/extconf.rb +37 -2
- data/lib/eigen.rb +146 -3
- metadata +294 -7
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
// This file is part of Eigen, a lightweight C++ template library
|
|
2
|
+
// for linear algebra.
|
|
3
|
+
//
|
|
4
|
+
// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@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
|
+
#ifndef EIGEN_TRANSLATION_H
|
|
11
|
+
#define EIGEN_TRANSLATION_H
|
|
12
|
+
|
|
13
|
+
namespace Eigen {
|
|
14
|
+
|
|
15
|
+
/** \geometry_module \ingroup Geometry_Module
|
|
16
|
+
*
|
|
17
|
+
* \class Translation
|
|
18
|
+
*
|
|
19
|
+
* \brief Represents a translation transformation
|
|
20
|
+
*
|
|
21
|
+
* \param _Scalar the scalar type, i.e., the type of the coefficients.
|
|
22
|
+
* \param _Dim the dimension of the space, can be a compile time value or Dynamic
|
|
23
|
+
*
|
|
24
|
+
* \note This class is not aimed to be used to store a translation transformation,
|
|
25
|
+
* but rather to make easier the constructions and updates of Transform objects.
|
|
26
|
+
*
|
|
27
|
+
* \sa class Scaling, class Transform
|
|
28
|
+
*/
|
|
29
|
+
template<typename _Scalar, int _Dim>
|
|
30
|
+
class Translation
|
|
31
|
+
{
|
|
32
|
+
public:
|
|
33
|
+
EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_Dim)
|
|
34
|
+
/** dimension of the space */
|
|
35
|
+
enum { Dim = _Dim };
|
|
36
|
+
/** the scalar type of the coefficients */
|
|
37
|
+
typedef _Scalar Scalar;
|
|
38
|
+
/** corresponding vector type */
|
|
39
|
+
typedef Matrix<Scalar,Dim,1> VectorType;
|
|
40
|
+
/** corresponding linear transformation matrix type */
|
|
41
|
+
typedef Matrix<Scalar,Dim,Dim> LinearMatrixType;
|
|
42
|
+
/** corresponding affine transformation type */
|
|
43
|
+
typedef Transform<Scalar,Dim,Affine> AffineTransformType;
|
|
44
|
+
/** corresponding isometric transformation type */
|
|
45
|
+
typedef Transform<Scalar,Dim,Isometry> IsometryTransformType;
|
|
46
|
+
|
|
47
|
+
protected:
|
|
48
|
+
|
|
49
|
+
VectorType m_coeffs;
|
|
50
|
+
|
|
51
|
+
public:
|
|
52
|
+
|
|
53
|
+
/** Default constructor without initialization. */
|
|
54
|
+
Translation() {}
|
|
55
|
+
/** */
|
|
56
|
+
inline Translation(const Scalar& sx, const Scalar& sy)
|
|
57
|
+
{
|
|
58
|
+
eigen_assert(Dim==2);
|
|
59
|
+
m_coeffs.x() = sx;
|
|
60
|
+
m_coeffs.y() = sy;
|
|
61
|
+
}
|
|
62
|
+
/** */
|
|
63
|
+
inline Translation(const Scalar& sx, const Scalar& sy, const Scalar& sz)
|
|
64
|
+
{
|
|
65
|
+
eigen_assert(Dim==3);
|
|
66
|
+
m_coeffs.x() = sx;
|
|
67
|
+
m_coeffs.y() = sy;
|
|
68
|
+
m_coeffs.z() = sz;
|
|
69
|
+
}
|
|
70
|
+
/** Constructs and initialize the translation transformation from a vector of translation coefficients */
|
|
71
|
+
explicit inline Translation(const VectorType& vector) : m_coeffs(vector) {}
|
|
72
|
+
|
|
73
|
+
/** \brief Retruns the x-translation by value. **/
|
|
74
|
+
inline Scalar x() const { return m_coeffs.x(); }
|
|
75
|
+
/** \brief Retruns the y-translation by value. **/
|
|
76
|
+
inline Scalar y() const { return m_coeffs.y(); }
|
|
77
|
+
/** \brief Retruns the z-translation by value. **/
|
|
78
|
+
inline Scalar z() const { return m_coeffs.z(); }
|
|
79
|
+
|
|
80
|
+
/** \brief Retruns the x-translation as a reference. **/
|
|
81
|
+
inline Scalar& x() { return m_coeffs.x(); }
|
|
82
|
+
/** \brief Retruns the y-translation as a reference. **/
|
|
83
|
+
inline Scalar& y() { return m_coeffs.y(); }
|
|
84
|
+
/** \brief Retruns the z-translation as a reference. **/
|
|
85
|
+
inline Scalar& z() { return m_coeffs.z(); }
|
|
86
|
+
|
|
87
|
+
const VectorType& vector() const { return m_coeffs; }
|
|
88
|
+
VectorType& vector() { return m_coeffs; }
|
|
89
|
+
|
|
90
|
+
const VectorType& translation() const { return m_coeffs; }
|
|
91
|
+
VectorType& translation() { return m_coeffs; }
|
|
92
|
+
|
|
93
|
+
/** Concatenates two translation */
|
|
94
|
+
inline Translation operator* (const Translation& other) const
|
|
95
|
+
{ return Translation(m_coeffs + other.m_coeffs); }
|
|
96
|
+
|
|
97
|
+
/** Concatenates a translation and a uniform scaling */
|
|
98
|
+
inline AffineTransformType operator* (const UniformScaling<Scalar>& other) const;
|
|
99
|
+
|
|
100
|
+
/** Concatenates a translation and a linear transformation */
|
|
101
|
+
template<typename OtherDerived>
|
|
102
|
+
inline AffineTransformType operator* (const EigenBase<OtherDerived>& linear) const;
|
|
103
|
+
|
|
104
|
+
/** Concatenates a translation and a rotation */
|
|
105
|
+
template<typename Derived>
|
|
106
|
+
inline IsometryTransformType operator*(const RotationBase<Derived,Dim>& r) const
|
|
107
|
+
{ return *this * IsometryTransformType(r); }
|
|
108
|
+
|
|
109
|
+
/** \returns the concatenation of a linear transformation \a l with the translation \a t */
|
|
110
|
+
// its a nightmare to define a templated friend function outside its declaration
|
|
111
|
+
template<typename OtherDerived> friend
|
|
112
|
+
inline AffineTransformType operator*(const EigenBase<OtherDerived>& linear, const Translation& t)
|
|
113
|
+
{
|
|
114
|
+
AffineTransformType res;
|
|
115
|
+
res.matrix().setZero();
|
|
116
|
+
res.linear() = linear.derived();
|
|
117
|
+
res.translation() = linear.derived() * t.m_coeffs;
|
|
118
|
+
res.matrix().row(Dim).setZero();
|
|
119
|
+
res(Dim,Dim) = Scalar(1);
|
|
120
|
+
return res;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/** Concatenates a translation and a transformation */
|
|
124
|
+
template<int Mode, int Options>
|
|
125
|
+
inline Transform<Scalar,Dim,Mode> operator* (const Transform<Scalar,Dim,Mode,Options>& t) const
|
|
126
|
+
{
|
|
127
|
+
Transform<Scalar,Dim,Mode> res = t;
|
|
128
|
+
res.pretranslate(m_coeffs);
|
|
129
|
+
return res;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** Applies translation to vector */
|
|
133
|
+
inline VectorType operator* (const VectorType& other) const
|
|
134
|
+
{ return m_coeffs + other; }
|
|
135
|
+
|
|
136
|
+
/** \returns the inverse translation (opposite) */
|
|
137
|
+
Translation inverse() const { return Translation(-m_coeffs); }
|
|
138
|
+
|
|
139
|
+
Translation& operator=(const Translation& other)
|
|
140
|
+
{
|
|
141
|
+
m_coeffs = other.m_coeffs;
|
|
142
|
+
return *this;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
static const Translation Identity() { return Translation(VectorType::Zero()); }
|
|
146
|
+
|
|
147
|
+
/** \returns \c *this with scalar type casted to \a NewScalarType
|
|
148
|
+
*
|
|
149
|
+
* Note that if \a NewScalarType is equal to the current scalar type of \c *this
|
|
150
|
+
* then this function smartly returns a const reference to \c *this.
|
|
151
|
+
*/
|
|
152
|
+
template<typename NewScalarType>
|
|
153
|
+
inline typename internal::cast_return_type<Translation,Translation<NewScalarType,Dim> >::type cast() const
|
|
154
|
+
{ return typename internal::cast_return_type<Translation,Translation<NewScalarType,Dim> >::type(*this); }
|
|
155
|
+
|
|
156
|
+
/** Copy constructor with scalar type conversion */
|
|
157
|
+
template<typename OtherScalarType>
|
|
158
|
+
inline explicit Translation(const Translation<OtherScalarType,Dim>& other)
|
|
159
|
+
{ m_coeffs = other.vector().template cast<Scalar>(); }
|
|
160
|
+
|
|
161
|
+
/** \returns \c true if \c *this is approximately equal to \a other, within the precision
|
|
162
|
+
* determined by \a prec.
|
|
163
|
+
*
|
|
164
|
+
* \sa MatrixBase::isApprox() */
|
|
165
|
+
bool isApprox(const Translation& other, typename NumTraits<Scalar>::Real prec = NumTraits<Scalar>::dummy_precision()) const
|
|
166
|
+
{ return m_coeffs.isApprox(other.m_coeffs, prec); }
|
|
167
|
+
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
/** \addtogroup Geometry_Module */
|
|
171
|
+
//@{
|
|
172
|
+
typedef Translation<float, 2> Translation2f;
|
|
173
|
+
typedef Translation<double,2> Translation2d;
|
|
174
|
+
typedef Translation<float, 3> Translation3f;
|
|
175
|
+
typedef Translation<double,3> Translation3d;
|
|
176
|
+
//@}
|
|
177
|
+
|
|
178
|
+
template<typename Scalar, int Dim>
|
|
179
|
+
inline typename Translation<Scalar,Dim>::AffineTransformType
|
|
180
|
+
Translation<Scalar,Dim>::operator* (const UniformScaling<Scalar>& other) const
|
|
181
|
+
{
|
|
182
|
+
AffineTransformType res;
|
|
183
|
+
res.matrix().setZero();
|
|
184
|
+
res.linear().diagonal().fill(other.factor());
|
|
185
|
+
res.translation() = m_coeffs;
|
|
186
|
+
res(Dim,Dim) = Scalar(1);
|
|
187
|
+
return res;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
template<typename Scalar, int Dim>
|
|
191
|
+
template<typename OtherDerived>
|
|
192
|
+
inline typename Translation<Scalar,Dim>::AffineTransformType
|
|
193
|
+
Translation<Scalar,Dim>::operator* (const EigenBase<OtherDerived>& linear) const
|
|
194
|
+
{
|
|
195
|
+
AffineTransformType res;
|
|
196
|
+
res.matrix().setZero();
|
|
197
|
+
res.linear() = linear.derived();
|
|
198
|
+
res.translation() = m_coeffs;
|
|
199
|
+
res.matrix().row(Dim).setZero();
|
|
200
|
+
res(Dim,Dim) = Scalar(1);
|
|
201
|
+
return res;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
} // end namespace Eigen
|
|
205
|
+
|
|
206
|
+
#endif // EIGEN_TRANSLATION_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) 2009 Hauke Heibel <hauke.heibel@gmail.com>
|
|
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
|
+
#ifndef EIGEN_UMEYAMA_H
|
|
11
|
+
#define EIGEN_UMEYAMA_H
|
|
12
|
+
|
|
13
|
+
// This file requires the user to include
|
|
14
|
+
// * Eigen/Core
|
|
15
|
+
// * Eigen/LU
|
|
16
|
+
// * Eigen/SVD
|
|
17
|
+
// * Eigen/Array
|
|
18
|
+
|
|
19
|
+
namespace Eigen {
|
|
20
|
+
|
|
21
|
+
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
|
22
|
+
|
|
23
|
+
// These helpers are required since it allows to use mixed types as parameters
|
|
24
|
+
// for the Umeyama. The problem with mixed parameters is that the return type
|
|
25
|
+
// cannot trivially be deduced when float and double types are mixed.
|
|
26
|
+
namespace internal {
|
|
27
|
+
|
|
28
|
+
// Compile time return type deduction for different MatrixBase types.
|
|
29
|
+
// Different means here different alignment and parameters but the same underlying
|
|
30
|
+
// real scalar type.
|
|
31
|
+
template<typename MatrixType, typename OtherMatrixType>
|
|
32
|
+
struct umeyama_transform_matrix_type
|
|
33
|
+
{
|
|
34
|
+
enum {
|
|
35
|
+
MinRowsAtCompileTime = EIGEN_SIZE_MIN_PREFER_DYNAMIC(MatrixType::RowsAtCompileTime, OtherMatrixType::RowsAtCompileTime),
|
|
36
|
+
|
|
37
|
+
// When possible we want to choose some small fixed size value since the result
|
|
38
|
+
// is likely to fit on the stack. So here, EIGEN_SIZE_MIN_PREFER_DYNAMIC is not what we want.
|
|
39
|
+
HomogeneousDimension = int(MinRowsAtCompileTime) == Dynamic ? Dynamic : int(MinRowsAtCompileTime)+1
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
typedef Matrix<typename traits<MatrixType>::Scalar,
|
|
43
|
+
HomogeneousDimension,
|
|
44
|
+
HomogeneousDimension,
|
|
45
|
+
AutoAlign | (traits<MatrixType>::Flags & RowMajorBit ? RowMajor : ColMajor),
|
|
46
|
+
HomogeneousDimension,
|
|
47
|
+
HomogeneousDimension
|
|
48
|
+
> type;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
#endif
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* \geometry_module \ingroup Geometry_Module
|
|
57
|
+
*
|
|
58
|
+
* \brief Returns the transformation between two point sets.
|
|
59
|
+
*
|
|
60
|
+
* The algorithm is based on:
|
|
61
|
+
* "Least-squares estimation of transformation parameters between two point patterns",
|
|
62
|
+
* Shinji Umeyama, PAMI 1991, DOI: 10.1109/34.88573
|
|
63
|
+
*
|
|
64
|
+
* It estimates parameters \f$ c, \mathbf{R}, \f$ and \f$ \mathbf{t} \f$ such that
|
|
65
|
+
* \f{align*}
|
|
66
|
+
* \frac{1}{n} \sum_{i=1}^n \vert\vert y_i - (c\mathbf{R}x_i + \mathbf{t}) \vert\vert_2^2
|
|
67
|
+
* \f}
|
|
68
|
+
* is minimized.
|
|
69
|
+
*
|
|
70
|
+
* The algorithm is based on the analysis of the covariance matrix
|
|
71
|
+
* \f$ \Sigma_{\mathbf{x}\mathbf{y}} \in \mathbb{R}^{d \times d} \f$
|
|
72
|
+
* of the input point sets \f$ \mathbf{x} \f$ and \f$ \mathbf{y} \f$ where
|
|
73
|
+
* \f$d\f$ is corresponding to the dimension (which is typically small).
|
|
74
|
+
* The analysis is involving the SVD having a complexity of \f$O(d^3)\f$
|
|
75
|
+
* though the actual computational effort lies in the covariance
|
|
76
|
+
* matrix computation which has an asymptotic lower bound of \f$O(dm)\f$ when
|
|
77
|
+
* the input point sets have dimension \f$d \times m\f$.
|
|
78
|
+
*
|
|
79
|
+
* Currently the method is working only for floating point matrices.
|
|
80
|
+
*
|
|
81
|
+
* \todo Should the return type of umeyama() become a Transform?
|
|
82
|
+
*
|
|
83
|
+
* \param src Source points \f$ \mathbf{x} = \left( x_1, \hdots, x_n \right) \f$.
|
|
84
|
+
* \param dst Destination points \f$ \mathbf{y} = \left( y_1, \hdots, y_n \right) \f$.
|
|
85
|
+
* \param with_scaling Sets \f$ c=1 \f$ when <code>false</code> is passed.
|
|
86
|
+
* \return The homogeneous transformation
|
|
87
|
+
* \f{align*}
|
|
88
|
+
* T = \begin{bmatrix} c\mathbf{R} & \mathbf{t} \\ \mathbf{0} & 1 \end{bmatrix}
|
|
89
|
+
* \f}
|
|
90
|
+
* minimizing the resudiual above. This transformation is always returned as an
|
|
91
|
+
* Eigen::Matrix.
|
|
92
|
+
*/
|
|
93
|
+
template <typename Derived, typename OtherDerived>
|
|
94
|
+
typename internal::umeyama_transform_matrix_type<Derived, OtherDerived>::type
|
|
95
|
+
umeyama(const MatrixBase<Derived>& src, const MatrixBase<OtherDerived>& dst, bool with_scaling = true)
|
|
96
|
+
{
|
|
97
|
+
typedef typename internal::umeyama_transform_matrix_type<Derived, OtherDerived>::type TransformationMatrixType;
|
|
98
|
+
typedef typename internal::traits<TransformationMatrixType>::Scalar Scalar;
|
|
99
|
+
typedef typename NumTraits<Scalar>::Real RealScalar;
|
|
100
|
+
typedef typename Derived::Index Index;
|
|
101
|
+
|
|
102
|
+
EIGEN_STATIC_ASSERT(!NumTraits<Scalar>::IsComplex, NUMERIC_TYPE_MUST_BE_REAL)
|
|
103
|
+
EIGEN_STATIC_ASSERT((internal::is_same<Scalar, typename internal::traits<OtherDerived>::Scalar>::value),
|
|
104
|
+
YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY)
|
|
105
|
+
|
|
106
|
+
enum { Dimension = EIGEN_SIZE_MIN_PREFER_DYNAMIC(Derived::RowsAtCompileTime, OtherDerived::RowsAtCompileTime) };
|
|
107
|
+
|
|
108
|
+
typedef Matrix<Scalar, Dimension, 1> VectorType;
|
|
109
|
+
typedef Matrix<Scalar, Dimension, Dimension> MatrixType;
|
|
110
|
+
typedef typename internal::plain_matrix_type_row_major<Derived>::type RowMajorMatrixType;
|
|
111
|
+
|
|
112
|
+
const Index m = src.rows(); // dimension
|
|
113
|
+
const Index n = src.cols(); // number of measurements
|
|
114
|
+
|
|
115
|
+
// required for demeaning ...
|
|
116
|
+
const RealScalar one_over_n = RealScalar(1) / static_cast<RealScalar>(n);
|
|
117
|
+
|
|
118
|
+
// computation of mean
|
|
119
|
+
const VectorType src_mean = src.rowwise().sum() * one_over_n;
|
|
120
|
+
const VectorType dst_mean = dst.rowwise().sum() * one_over_n;
|
|
121
|
+
|
|
122
|
+
// demeaning of src and dst points
|
|
123
|
+
const RowMajorMatrixType src_demean = src.colwise() - src_mean;
|
|
124
|
+
const RowMajorMatrixType dst_demean = dst.colwise() - dst_mean;
|
|
125
|
+
|
|
126
|
+
// Eq. (36)-(37)
|
|
127
|
+
const Scalar src_var = src_demean.rowwise().squaredNorm().sum() * one_over_n;
|
|
128
|
+
|
|
129
|
+
// Eq. (38)
|
|
130
|
+
const MatrixType sigma = one_over_n * dst_demean * src_demean.transpose();
|
|
131
|
+
|
|
132
|
+
JacobiSVD<MatrixType> svd(sigma, ComputeFullU | ComputeFullV);
|
|
133
|
+
|
|
134
|
+
// Initialize the resulting transformation with an identity matrix...
|
|
135
|
+
TransformationMatrixType Rt = TransformationMatrixType::Identity(m+1,m+1);
|
|
136
|
+
|
|
137
|
+
// Eq. (39)
|
|
138
|
+
VectorType S = VectorType::Ones(m);
|
|
139
|
+
if (sigma.determinant()<Scalar(0)) S(m-1) = Scalar(-1);
|
|
140
|
+
|
|
141
|
+
// Eq. (40) and (43)
|
|
142
|
+
const VectorType& d = svd.singularValues();
|
|
143
|
+
Index rank = 0; for (Index i=0; i<m; ++i) if (!internal::isMuchSmallerThan(d.coeff(i),d.coeff(0))) ++rank;
|
|
144
|
+
if (rank == m-1) {
|
|
145
|
+
if ( svd.matrixU().determinant() * svd.matrixV().determinant() > Scalar(0) ) {
|
|
146
|
+
Rt.block(0,0,m,m).noalias() = svd.matrixU()*svd.matrixV().transpose();
|
|
147
|
+
} else {
|
|
148
|
+
const Scalar s = S(m-1); S(m-1) = Scalar(-1);
|
|
149
|
+
Rt.block(0,0,m,m).noalias() = svd.matrixU() * S.asDiagonal() * svd.matrixV().transpose();
|
|
150
|
+
S(m-1) = s;
|
|
151
|
+
}
|
|
152
|
+
} else {
|
|
153
|
+
Rt.block(0,0,m,m).noalias() = svd.matrixU() * S.asDiagonal() * svd.matrixV().transpose();
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (with_scaling)
|
|
157
|
+
{
|
|
158
|
+
// Eq. (42)
|
|
159
|
+
const Scalar c = Scalar(1)/src_var * svd.singularValues().dot(S);
|
|
160
|
+
|
|
161
|
+
// Eq. (41)
|
|
162
|
+
Rt.col(m).head(m) = dst_mean;
|
|
163
|
+
Rt.col(m).head(m).noalias() -= c*Rt.topLeftCorner(m,m)*src_mean;
|
|
164
|
+
Rt.block(0,0,m,m) *= c;
|
|
165
|
+
}
|
|
166
|
+
else
|
|
167
|
+
{
|
|
168
|
+
Rt.col(m).head(m) = dst_mean;
|
|
169
|
+
Rt.col(m).head(m).noalias() -= Rt.topLeftCorner(m,m)*src_mean;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
return Rt;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
} // end namespace Eigen
|
|
176
|
+
|
|
177
|
+
#endif // EIGEN_UMEYAMA_H
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// This file is part of Eigen, a lightweight C++ template library
|
|
2
|
+
// for linear algebra.
|
|
3
|
+
//
|
|
4
|
+
// Copyright (C) 2009 Rohit Garg <rpg.314@gmail.com>
|
|
5
|
+
// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
|
|
6
|
+
//
|
|
7
|
+
// This Source Code Form is subject to the terms of the Mozilla
|
|
8
|
+
// Public License v. 2.0. If a copy of the MPL was not distributed
|
|
9
|
+
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
10
|
+
|
|
11
|
+
#ifndef EIGEN_GEOMETRY_SSE_H
|
|
12
|
+
#define EIGEN_GEOMETRY_SSE_H
|
|
13
|
+
|
|
14
|
+
namespace Eigen {
|
|
15
|
+
|
|
16
|
+
namespace internal {
|
|
17
|
+
|
|
18
|
+
template<class Derived, class OtherDerived>
|
|
19
|
+
struct quat_product<Architecture::SSE, Derived, OtherDerived, float, Aligned>
|
|
20
|
+
{
|
|
21
|
+
static inline Quaternion<float> run(const QuaternionBase<Derived>& _a, const QuaternionBase<OtherDerived>& _b)
|
|
22
|
+
{
|
|
23
|
+
const __m128 mask = _mm_castsi128_ps(_mm_setr_epi32(0,0,0,0x80000000));
|
|
24
|
+
Quaternion<float> res;
|
|
25
|
+
__m128 a = _a.coeffs().template packet<Aligned>(0);
|
|
26
|
+
__m128 b = _b.coeffs().template packet<Aligned>(0);
|
|
27
|
+
__m128 flip1 = _mm_xor_ps(_mm_mul_ps(vec4f_swizzle1(a,1,2,0,2),
|
|
28
|
+
vec4f_swizzle1(b,2,0,1,2)),mask);
|
|
29
|
+
__m128 flip2 = _mm_xor_ps(_mm_mul_ps(vec4f_swizzle1(a,3,3,3,1),
|
|
30
|
+
vec4f_swizzle1(b,0,1,2,1)),mask);
|
|
31
|
+
pstore(&res.x(),
|
|
32
|
+
_mm_add_ps(_mm_sub_ps(_mm_mul_ps(a,vec4f_swizzle1(b,3,3,3,3)),
|
|
33
|
+
_mm_mul_ps(vec4f_swizzle1(a,2,0,1,0),
|
|
34
|
+
vec4f_swizzle1(b,1,2,0,0))),
|
|
35
|
+
_mm_add_ps(flip1,flip2)));
|
|
36
|
+
return res;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
template<typename VectorLhs,typename VectorRhs>
|
|
41
|
+
struct cross3_impl<Architecture::SSE,VectorLhs,VectorRhs,float,true>
|
|
42
|
+
{
|
|
43
|
+
static inline typename plain_matrix_type<VectorLhs>::type
|
|
44
|
+
run(const VectorLhs& lhs, const VectorRhs& rhs)
|
|
45
|
+
{
|
|
46
|
+
__m128 a = lhs.template packet<VectorLhs::Flags&AlignedBit ? Aligned : Unaligned>(0);
|
|
47
|
+
__m128 b = rhs.template packet<VectorRhs::Flags&AlignedBit ? Aligned : Unaligned>(0);
|
|
48
|
+
__m128 mul1=_mm_mul_ps(vec4f_swizzle1(a,1,2,0,3),vec4f_swizzle1(b,2,0,1,3));
|
|
49
|
+
__m128 mul2=_mm_mul_ps(vec4f_swizzle1(a,2,0,1,3),vec4f_swizzle1(b,1,2,0,3));
|
|
50
|
+
typename plain_matrix_type<VectorLhs>::type res;
|
|
51
|
+
pstore(&res.x(),_mm_sub_ps(mul1,mul2));
|
|
52
|
+
return res;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
template<class Derived, class OtherDerived>
|
|
60
|
+
struct quat_product<Architecture::SSE, Derived, OtherDerived, double, Aligned>
|
|
61
|
+
{
|
|
62
|
+
static inline Quaternion<double> run(const QuaternionBase<Derived>& _a, const QuaternionBase<OtherDerived>& _b)
|
|
63
|
+
{
|
|
64
|
+
const Packet2d mask = _mm_castsi128_pd(_mm_set_epi32(0x0,0x0,0x80000000,0x0));
|
|
65
|
+
|
|
66
|
+
Quaternion<double> res;
|
|
67
|
+
|
|
68
|
+
const double* a = _a.coeffs().data();
|
|
69
|
+
Packet2d b_xy = _b.coeffs().template packet<Aligned>(0);
|
|
70
|
+
Packet2d b_zw = _b.coeffs().template packet<Aligned>(2);
|
|
71
|
+
Packet2d a_xx = pset1<Packet2d>(a[0]);
|
|
72
|
+
Packet2d a_yy = pset1<Packet2d>(a[1]);
|
|
73
|
+
Packet2d a_zz = pset1<Packet2d>(a[2]);
|
|
74
|
+
Packet2d a_ww = pset1<Packet2d>(a[3]);
|
|
75
|
+
|
|
76
|
+
// two temporaries:
|
|
77
|
+
Packet2d t1, t2;
|
|
78
|
+
|
|
79
|
+
/*
|
|
80
|
+
* t1 = ww*xy + yy*zw
|
|
81
|
+
* t2 = zz*xy - xx*zw
|
|
82
|
+
* res.xy = t1 +/- swap(t2)
|
|
83
|
+
*/
|
|
84
|
+
t1 = padd(pmul(a_ww, b_xy), pmul(a_yy, b_zw));
|
|
85
|
+
t2 = psub(pmul(a_zz, b_xy), pmul(a_xx, b_zw));
|
|
86
|
+
#ifdef EIGEN_VECTORIZE_SSE3
|
|
87
|
+
EIGEN_UNUSED_VARIABLE(mask)
|
|
88
|
+
pstore(&res.x(), _mm_addsub_pd(t1, preverse(t2)));
|
|
89
|
+
#else
|
|
90
|
+
pstore(&res.x(), padd(t1, pxor(mask,preverse(t2))));
|
|
91
|
+
#endif
|
|
92
|
+
|
|
93
|
+
/*
|
|
94
|
+
* t1 = ww*zw - yy*xy
|
|
95
|
+
* t2 = zz*zw + xx*xy
|
|
96
|
+
* res.zw = t1 -/+ swap(t2) = swap( swap(t1) +/- t2)
|
|
97
|
+
*/
|
|
98
|
+
t1 = psub(pmul(a_ww, b_zw), pmul(a_yy, b_xy));
|
|
99
|
+
t2 = padd(pmul(a_zz, b_zw), pmul(a_xx, b_xy));
|
|
100
|
+
#ifdef EIGEN_VECTORIZE_SSE3
|
|
101
|
+
EIGEN_UNUSED_VARIABLE(mask)
|
|
102
|
+
pstore(&res.z(), preverse(_mm_addsub_pd(preverse(t1), t2)));
|
|
103
|
+
#else
|
|
104
|
+
pstore(&res.z(), psub(t1, pxor(mask,preverse(t2))));
|
|
105
|
+
#endif
|
|
106
|
+
|
|
107
|
+
return res;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
} // end namespace internal
|
|
112
|
+
|
|
113
|
+
} // end namespace Eigen
|
|
114
|
+
|
|
115
|
+
#endif // EIGEN_GEOMETRY_SSE_H
|