tomoto 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +8 -10
- data/ext/tomoto/ct.cpp +11 -11
- data/ext/tomoto/dmr.cpp +14 -13
- data/ext/tomoto/dt.cpp +14 -14
- data/ext/tomoto/extconf.rb +7 -5
- data/ext/tomoto/gdmr.cpp +7 -7
- data/ext/tomoto/hdp.cpp +9 -9
- data/ext/tomoto/hlda.cpp +13 -13
- data/ext/tomoto/hpa.cpp +5 -5
- data/ext/tomoto/lda.cpp +42 -39
- data/ext/tomoto/llda.cpp +6 -6
- data/ext/tomoto/mglda.cpp +15 -15
- data/ext/tomoto/pa.cpp +6 -6
- data/ext/tomoto/plda.cpp +6 -6
- data/ext/tomoto/slda.cpp +8 -8
- data/ext/tomoto/{ext.cpp → tomoto.cpp} +8 -8
- data/ext/tomoto/utils.h +16 -70
- data/lib/tomoto/version.rb +1 -1
- data/lib/tomoto.rb +5 -1
- data/vendor/EigenRand/EigenRand/Core.h +10 -10
- data/vendor/EigenRand/EigenRand/Dists/Basic.h +208 -9
- data/vendor/EigenRand/EigenRand/Dists/Discrete.h +52 -31
- data/vendor/EigenRand/EigenRand/Dists/GammaPoisson.h +9 -8
- data/vendor/EigenRand/EigenRand/Dists/NormalExp.h +28 -21
- data/vendor/EigenRand/EigenRand/EigenRand +11 -6
- data/vendor/EigenRand/EigenRand/Macro.h +13 -7
- data/vendor/EigenRand/EigenRand/MorePacketMath.h +348 -740
- data/vendor/EigenRand/EigenRand/MvDists/Multinomial.h +5 -3
- data/vendor/EigenRand/EigenRand/MvDists/MvNormal.h +9 -3
- data/vendor/EigenRand/EigenRand/PacketFilter.h +11 -253
- data/vendor/EigenRand/EigenRand/PacketRandomEngine.h +21 -47
- data/vendor/EigenRand/EigenRand/RandUtils.h +50 -344
- data/vendor/EigenRand/EigenRand/arch/AVX/MorePacketMath.h +619 -0
- data/vendor/EigenRand/EigenRand/arch/AVX/PacketFilter.h +149 -0
- data/vendor/EigenRand/EigenRand/arch/AVX/RandUtils.h +228 -0
- data/vendor/EigenRand/EigenRand/arch/NEON/MorePacketMath.h +473 -0
- data/vendor/EigenRand/EigenRand/arch/NEON/PacketFilter.h +142 -0
- data/vendor/EigenRand/EigenRand/arch/NEON/RandUtils.h +126 -0
- data/vendor/EigenRand/EigenRand/arch/SSE/MorePacketMath.h +501 -0
- data/vendor/EigenRand/EigenRand/arch/SSE/PacketFilter.h +133 -0
- data/vendor/EigenRand/EigenRand/arch/SSE/RandUtils.h +120 -0
- data/vendor/EigenRand/EigenRand/doc.h +24 -12
- data/vendor/EigenRand/README.md +57 -4
- data/vendor/eigen/COPYING.APACHE +203 -0
- data/vendor/eigen/COPYING.BSD +1 -1
- data/vendor/eigen/COPYING.MINPACK +51 -52
- data/vendor/eigen/Eigen/Cholesky +0 -1
- data/vendor/eigen/Eigen/Core +112 -265
- data/vendor/eigen/Eigen/Eigenvalues +2 -3
- data/vendor/eigen/Eigen/Geometry +5 -8
- data/vendor/eigen/Eigen/Householder +0 -1
- data/vendor/eigen/Eigen/Jacobi +0 -1
- data/vendor/eigen/Eigen/KLUSupport +41 -0
- data/vendor/eigen/Eigen/LU +2 -5
- data/vendor/eigen/Eigen/OrderingMethods +0 -3
- data/vendor/eigen/Eigen/PaStiXSupport +1 -0
- data/vendor/eigen/Eigen/PardisoSupport +0 -0
- data/vendor/eigen/Eigen/QR +2 -3
- data/vendor/eigen/Eigen/QtAlignedMalloc +0 -1
- data/vendor/eigen/Eigen/SVD +0 -1
- data/vendor/eigen/Eigen/Sparse +0 -2
- data/vendor/eigen/Eigen/SparseCholesky +0 -8
- data/vendor/eigen/Eigen/SparseLU +4 -0
- data/vendor/eigen/Eigen/SparseQR +0 -1
- data/vendor/eigen/Eigen/src/Cholesky/LDLT.h +42 -27
- data/vendor/eigen/Eigen/src/Cholesky/LLT.h +39 -23
- data/vendor/eigen/Eigen/src/CholmodSupport/CholmodSupport.h +90 -47
- data/vendor/eigen/Eigen/src/Core/ArithmeticSequence.h +413 -0
- data/vendor/eigen/Eigen/src/Core/Array.h +99 -11
- data/vendor/eigen/Eigen/src/Core/ArrayBase.h +3 -3
- data/vendor/eigen/Eigen/src/Core/ArrayWrapper.h +21 -21
- data/vendor/eigen/Eigen/src/Core/Assign.h +1 -1
- data/vendor/eigen/Eigen/src/Core/AssignEvaluator.h +125 -50
- data/vendor/eigen/Eigen/src/Core/Assign_MKL.h +10 -10
- data/vendor/eigen/Eigen/src/Core/BandMatrix.h +16 -16
- data/vendor/eigen/Eigen/src/Core/Block.h +56 -60
- data/vendor/eigen/Eigen/src/Core/BooleanRedux.h +29 -31
- data/vendor/eigen/Eigen/src/Core/CommaInitializer.h +7 -3
- data/vendor/eigen/Eigen/src/Core/CoreEvaluators.h +325 -272
- data/vendor/eigen/Eigen/src/Core/CoreIterators.h +5 -0
- data/vendor/eigen/Eigen/src/Core/CwiseBinaryOp.h +21 -22
- data/vendor/eigen/Eigen/src/Core/CwiseNullaryOp.h +153 -18
- data/vendor/eigen/Eigen/src/Core/CwiseUnaryOp.h +6 -6
- data/vendor/eigen/Eigen/src/Core/CwiseUnaryView.h +14 -10
- data/vendor/eigen/Eigen/src/Core/DenseBase.h +132 -42
- data/vendor/eigen/Eigen/src/Core/DenseCoeffsBase.h +25 -21
- data/vendor/eigen/Eigen/src/Core/DenseStorage.h +153 -71
- data/vendor/eigen/Eigen/src/Core/Diagonal.h +21 -23
- data/vendor/eigen/Eigen/src/Core/DiagonalMatrix.h +50 -2
- data/vendor/eigen/Eigen/src/Core/DiagonalProduct.h +1 -1
- data/vendor/eigen/Eigen/src/Core/Dot.h +10 -10
- data/vendor/eigen/Eigen/src/Core/EigenBase.h +10 -9
- data/vendor/eigen/Eigen/src/Core/ForceAlignedAccess.h +8 -4
- data/vendor/eigen/Eigen/src/Core/Fuzzy.h +3 -3
- data/vendor/eigen/Eigen/src/Core/GeneralProduct.h +20 -10
- data/vendor/eigen/Eigen/src/Core/GenericPacketMath.h +599 -152
- data/vendor/eigen/Eigen/src/Core/GlobalFunctions.h +40 -33
- data/vendor/eigen/Eigen/src/Core/IO.h +40 -7
- data/vendor/eigen/Eigen/src/Core/IndexedView.h +237 -0
- data/vendor/eigen/Eigen/src/Core/Inverse.h +9 -10
- data/vendor/eigen/Eigen/src/Core/Map.h +7 -7
- data/vendor/eigen/Eigen/src/Core/MapBase.h +10 -3
- data/vendor/eigen/Eigen/src/Core/MathFunctions.h +767 -125
- data/vendor/eigen/Eigen/src/Core/MathFunctionsImpl.h +118 -19
- data/vendor/eigen/Eigen/src/Core/Matrix.h +131 -25
- data/vendor/eigen/Eigen/src/Core/MatrixBase.h +21 -3
- data/vendor/eigen/Eigen/src/Core/NestByValue.h +25 -50
- data/vendor/eigen/Eigen/src/Core/NoAlias.h +4 -3
- data/vendor/eigen/Eigen/src/Core/NumTraits.h +107 -20
- data/vendor/eigen/Eigen/src/Core/PartialReduxEvaluator.h +232 -0
- data/vendor/eigen/Eigen/src/Core/PermutationMatrix.h +3 -31
- data/vendor/eigen/Eigen/src/Core/PlainObjectBase.h +152 -59
- data/vendor/eigen/Eigen/src/Core/Product.h +30 -25
- data/vendor/eigen/Eigen/src/Core/ProductEvaluators.h +192 -125
- data/vendor/eigen/Eigen/src/Core/Random.h +37 -1
- data/vendor/eigen/Eigen/src/Core/Redux.h +180 -170
- data/vendor/eigen/Eigen/src/Core/Ref.h +121 -23
- data/vendor/eigen/Eigen/src/Core/Replicate.h +8 -8
- data/vendor/eigen/Eigen/src/Core/Reshaped.h +454 -0
- data/vendor/eigen/Eigen/src/Core/ReturnByValue.h +7 -5
- data/vendor/eigen/Eigen/src/Core/Reverse.h +18 -12
- data/vendor/eigen/Eigen/src/Core/Select.h +8 -6
- data/vendor/eigen/Eigen/src/Core/SelfAdjointView.h +33 -20
- data/vendor/eigen/Eigen/src/Core/Solve.h +14 -14
- data/vendor/eigen/Eigen/src/Core/SolveTriangular.h +16 -16
- data/vendor/eigen/Eigen/src/Core/SolverBase.h +41 -3
- data/vendor/eigen/Eigen/src/Core/StableNorm.h +100 -70
- data/vendor/eigen/Eigen/src/Core/StlIterators.h +463 -0
- data/vendor/eigen/Eigen/src/Core/Stride.h +9 -4
- data/vendor/eigen/Eigen/src/Core/Swap.h +5 -4
- data/vendor/eigen/Eigen/src/Core/Transpose.h +88 -27
- data/vendor/eigen/Eigen/src/Core/Transpositions.h +26 -47
- data/vendor/eigen/Eigen/src/Core/TriangularMatrix.h +93 -75
- data/vendor/eigen/Eigen/src/Core/VectorBlock.h +5 -5
- data/vendor/eigen/Eigen/src/Core/VectorwiseOp.h +159 -70
- data/vendor/eigen/Eigen/src/Core/Visitor.h +137 -29
- data/vendor/eigen/Eigen/src/Core/arch/AVX/Complex.h +50 -129
- data/vendor/eigen/Eigen/src/Core/arch/AVX/MathFunctions.h +126 -337
- data/vendor/eigen/Eigen/src/Core/arch/AVX/PacketMath.h +1092 -155
- data/vendor/eigen/Eigen/src/Core/arch/AVX/TypeCasting.h +65 -1
- data/vendor/eigen/Eigen/src/Core/arch/AVX512/Complex.h +422 -0
- data/vendor/eigen/Eigen/src/Core/arch/AVX512/MathFunctions.h +207 -236
- data/vendor/eigen/Eigen/src/Core/arch/AVX512/PacketMath.h +1482 -495
- data/vendor/eigen/Eigen/src/Core/arch/AVX512/TypeCasting.h +89 -0
- data/vendor/eigen/Eigen/src/Core/arch/AltiVec/Complex.h +152 -165
- data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MathFunctions.h +19 -251
- data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +2937 -0
- data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +221 -0
- data/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +629 -0
- data/vendor/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h +2042 -392
- data/vendor/eigen/Eigen/src/Core/arch/CUDA/Complex.h +235 -80
- data/vendor/eigen/Eigen/src/Core/arch/Default/BFloat16.h +700 -0
- data/vendor/eigen/Eigen/src/Core/arch/Default/ConjHelper.h +102 -14
- data/vendor/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +1649 -0
- data/vendor/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +110 -0
- data/vendor/eigen/Eigen/src/Core/arch/Default/Half.h +942 -0
- data/vendor/eigen/Eigen/src/Core/arch/Default/Settings.h +1 -1
- data/vendor/eigen/Eigen/src/Core/arch/Default/TypeCasting.h +120 -0
- data/vendor/eigen/Eigen/src/Core/arch/{CUDA → GPU}/MathFunctions.h +16 -4
- data/vendor/eigen/Eigen/src/Core/arch/GPU/PacketMath.h +1685 -0
- data/vendor/eigen/Eigen/src/Core/arch/GPU/TypeCasting.h +80 -0
- data/vendor/eigen/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
- data/vendor/eigen/Eigen/src/Core/arch/MSA/Complex.h +648 -0
- data/vendor/eigen/Eigen/src/Core/arch/MSA/MathFunctions.h +387 -0
- data/vendor/eigen/Eigen/src/Core/arch/MSA/PacketMath.h +1233 -0
- data/vendor/eigen/Eigen/src/Core/arch/NEON/Complex.h +313 -219
- data/vendor/eigen/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +183 -0
- data/vendor/eigen/Eigen/src/Core/arch/NEON/MathFunctions.h +54 -70
- data/vendor/eigen/Eigen/src/Core/arch/NEON/PacketMath.h +4376 -549
- data/vendor/eigen/Eigen/src/Core/arch/NEON/TypeCasting.h +1419 -0
- data/vendor/eigen/Eigen/src/Core/arch/SSE/Complex.h +59 -179
- data/vendor/eigen/Eigen/src/Core/arch/SSE/MathFunctions.h +65 -428
- data/vendor/eigen/Eigen/src/Core/arch/SSE/PacketMath.h +893 -283
- data/vendor/eigen/Eigen/src/Core/arch/SSE/TypeCasting.h +65 -0
- data/vendor/eigen/Eigen/src/Core/arch/SVE/MathFunctions.h +44 -0
- data/vendor/eigen/Eigen/src/Core/arch/SVE/PacketMath.h +752 -0
- data/vendor/eigen/Eigen/src/Core/arch/SVE/TypeCasting.h +49 -0
- data/vendor/eigen/Eigen/src/Core/arch/SYCL/InteropHeaders.h +232 -0
- data/vendor/eigen/Eigen/src/Core/arch/SYCL/MathFunctions.h +301 -0
- data/vendor/eigen/Eigen/src/Core/arch/SYCL/PacketMath.h +670 -0
- data/vendor/eigen/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h +694 -0
- data/vendor/eigen/Eigen/src/Core/arch/SYCL/TypeCasting.h +85 -0
- data/vendor/eigen/Eigen/src/Core/arch/ZVector/Complex.h +212 -183
- data/vendor/eigen/Eigen/src/Core/arch/ZVector/MathFunctions.h +101 -5
- data/vendor/eigen/Eigen/src/Core/arch/ZVector/PacketMath.h +510 -395
- data/vendor/eigen/Eigen/src/Core/functors/AssignmentFunctors.h +11 -2
- data/vendor/eigen/Eigen/src/Core/functors/BinaryFunctors.h +112 -46
- data/vendor/eigen/Eigen/src/Core/functors/NullaryFunctors.h +31 -30
- data/vendor/eigen/Eigen/src/Core/functors/StlFunctors.h +32 -2
- data/vendor/eigen/Eigen/src/Core/functors/UnaryFunctors.h +355 -16
- data/vendor/eigen/Eigen/src/Core/products/GeneralBlockPanelKernel.h +1075 -586
- data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrix.h +49 -24
- data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +41 -35
- data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +6 -6
- data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +4 -2
- data/vendor/eigen/Eigen/src/Core/products/GeneralMatrixVector.h +382 -483
- data/vendor/eigen/Eigen/src/Core/products/Parallelizer.h +22 -5
- data/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +53 -30
- data/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +16 -8
- data/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixVector.h +8 -6
- data/vendor/eigen/Eigen/src/Core/products/SelfadjointProduct.h +4 -4
- data/vendor/eigen/Eigen/src/Core/products/SelfadjointRank2Update.h +5 -4
- data/vendor/eigen/Eigen/src/Core/products/TriangularMatrixMatrix.h +33 -27
- data/vendor/eigen/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +14 -12
- data/vendor/eigen/Eigen/src/Core/products/TriangularSolverMatrix.h +36 -34
- data/vendor/eigen/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +8 -4
- data/vendor/eigen/Eigen/src/Core/products/TriangularSolverVector.h +13 -10
- data/vendor/eigen/Eigen/src/Core/util/BlasUtil.h +304 -119
- data/vendor/eigen/Eigen/src/Core/util/ConfigureVectorization.h +512 -0
- data/vendor/eigen/Eigen/src/Core/util/Constants.h +25 -9
- data/vendor/eigen/Eigen/src/Core/util/DisableStupidWarnings.h +26 -3
- data/vendor/eigen/Eigen/src/Core/util/ForwardDeclarations.h +29 -9
- data/vendor/eigen/Eigen/src/Core/util/IndexedViewHelper.h +186 -0
- data/vendor/eigen/Eigen/src/Core/util/IntegralConstant.h +272 -0
- data/vendor/eigen/Eigen/src/Core/util/MKL_support.h +8 -1
- data/vendor/eigen/Eigen/src/Core/util/Macros.h +709 -246
- data/vendor/eigen/Eigen/src/Core/util/Memory.h +222 -52
- data/vendor/eigen/Eigen/src/Core/util/Meta.h +355 -77
- data/vendor/eigen/Eigen/src/Core/util/ReenableStupidWarnings.h +5 -1
- data/vendor/eigen/Eigen/src/Core/util/ReshapedHelper.h +51 -0
- data/vendor/eigen/Eigen/src/Core/util/StaticAssert.h +8 -5
- data/vendor/eigen/Eigen/src/Core/util/SymbolicIndex.h +293 -0
- data/vendor/eigen/Eigen/src/Core/util/XprHelper.h +65 -30
- data/vendor/eigen/Eigen/src/Eigenvalues/ComplexEigenSolver.h +1 -1
- data/vendor/eigen/Eigen/src/Eigenvalues/ComplexSchur.h +7 -4
- data/vendor/eigen/Eigen/src/Eigenvalues/EigenSolver.h +2 -2
- data/vendor/eigen/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +1 -1
- data/vendor/eigen/Eigen/src/Eigenvalues/HessenbergDecomposition.h +2 -2
- data/vendor/eigen/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +2 -2
- data/vendor/eigen/Eigen/src/Eigenvalues/RealQZ.h +9 -6
- data/vendor/eigen/Eigen/src/Eigenvalues/RealSchur.h +21 -9
- data/vendor/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +77 -43
- data/vendor/eigen/Eigen/src/Eigenvalues/Tridiagonalization.h +20 -15
- data/vendor/eigen/Eigen/src/Geometry/AlignedBox.h +99 -5
- data/vendor/eigen/Eigen/src/Geometry/AngleAxis.h +4 -4
- data/vendor/eigen/Eigen/src/Geometry/EulerAngles.h +3 -3
- data/vendor/eigen/Eigen/src/Geometry/Homogeneous.h +15 -11
- data/vendor/eigen/Eigen/src/Geometry/Hyperplane.h +1 -1
- data/vendor/eigen/Eigen/src/Geometry/OrthoMethods.h +3 -2
- data/vendor/eigen/Eigen/src/Geometry/ParametrizedLine.h +39 -2
- data/vendor/eigen/Eigen/src/Geometry/Quaternion.h +70 -14
- data/vendor/eigen/Eigen/src/Geometry/Rotation2D.h +3 -3
- data/vendor/eigen/Eigen/src/Geometry/Scaling.h +23 -5
- data/vendor/eigen/Eigen/src/Geometry/Transform.h +88 -67
- data/vendor/eigen/Eigen/src/Geometry/Translation.h +6 -12
- data/vendor/eigen/Eigen/src/Geometry/Umeyama.h +1 -1
- data/vendor/eigen/Eigen/src/Geometry/arch/Geometry_SIMD.h +168 -0
- data/vendor/eigen/Eigen/src/Householder/BlockHouseholder.h +9 -2
- data/vendor/eigen/Eigen/src/Householder/Householder.h +8 -4
- data/vendor/eigen/Eigen/src/Householder/HouseholderSequence.h +123 -48
- data/vendor/eigen/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +15 -15
- data/vendor/eigen/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +7 -23
- data/vendor/eigen/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +5 -22
- data/vendor/eigen/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +41 -47
- data/vendor/eigen/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +51 -60
- data/vendor/eigen/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +70 -20
- data/vendor/eigen/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +2 -20
- data/vendor/eigen/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +11 -9
- data/vendor/eigen/Eigen/src/Jacobi/Jacobi.h +31 -10
- data/vendor/eigen/Eigen/src/KLUSupport/KLUSupport.h +358 -0
- data/vendor/eigen/Eigen/src/LU/Determinant.h +35 -19
- data/vendor/eigen/Eigen/src/LU/FullPivLU.h +29 -43
- data/vendor/eigen/Eigen/src/LU/InverseImpl.h +25 -8
- data/vendor/eigen/Eigen/src/LU/PartialPivLU.h +71 -58
- data/vendor/eigen/Eigen/src/LU/arch/InverseSize4.h +351 -0
- data/vendor/eigen/Eigen/src/OrderingMethods/Amd.h +7 -17
- data/vendor/eigen/Eigen/src/OrderingMethods/Eigen_Colamd.h +297 -277
- data/vendor/eigen/Eigen/src/OrderingMethods/Ordering.h +6 -10
- data/vendor/eigen/Eigen/src/PaStiXSupport/PaStiXSupport.h +1 -1
- data/vendor/eigen/Eigen/src/PardisoSupport/PardisoSupport.h +9 -7
- data/vendor/eigen/Eigen/src/QR/ColPivHouseholderQR.h +41 -20
- data/vendor/eigen/Eigen/src/QR/CompleteOrthogonalDecomposition.h +100 -27
- data/vendor/eigen/Eigen/src/QR/FullPivHouseholderQR.h +59 -22
- data/vendor/eigen/Eigen/src/QR/HouseholderQR.h +48 -23
- data/vendor/eigen/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +25 -3
- data/vendor/eigen/Eigen/src/SVD/BDCSVD.h +183 -63
- data/vendor/eigen/Eigen/src/SVD/JacobiSVD.h +22 -14
- data/vendor/eigen/Eigen/src/SVD/SVDBase.h +83 -22
- data/vendor/eigen/Eigen/src/SVD/UpperBidiagonalization.h +3 -3
- data/vendor/eigen/Eigen/src/SparseCholesky/SimplicialCholesky.h +17 -9
- data/vendor/eigen/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +12 -37
- data/vendor/eigen/Eigen/src/SparseCore/AmbiVector.h +3 -2
- data/vendor/eigen/Eigen/src/SparseCore/CompressedStorage.h +16 -0
- data/vendor/eigen/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +6 -6
- data/vendor/eigen/Eigen/src/SparseCore/SparseAssign.h +81 -27
- data/vendor/eigen/Eigen/src/SparseCore/SparseBlock.h +25 -57
- data/vendor/eigen/Eigen/src/SparseCore/SparseCompressedBase.h +40 -11
- data/vendor/eigen/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +11 -15
- data/vendor/eigen/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +4 -2
- data/vendor/eigen/Eigen/src/SparseCore/SparseDenseProduct.h +30 -8
- data/vendor/eigen/Eigen/src/SparseCore/SparseMatrix.h +126 -11
- data/vendor/eigen/Eigen/src/SparseCore/SparseMatrixBase.h +5 -12
- data/vendor/eigen/Eigen/src/SparseCore/SparseProduct.h +13 -1
- data/vendor/eigen/Eigen/src/SparseCore/SparseRef.h +7 -7
- data/vendor/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h +5 -2
- data/vendor/eigen/Eigen/src/SparseCore/SparseUtil.h +8 -0
- data/vendor/eigen/Eigen/src/SparseCore/SparseVector.h +1 -1
- data/vendor/eigen/Eigen/src/SparseCore/SparseView.h +1 -0
- data/vendor/eigen/Eigen/src/SparseLU/SparseLU.h +162 -12
- data/vendor/eigen/Eigen/src/SparseLU/SparseLU_Memory.h +1 -1
- data/vendor/eigen/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +76 -2
- data/vendor/eigen/Eigen/src/SparseLU/SparseLU_column_dfs.h +2 -2
- data/vendor/eigen/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +1 -1
- data/vendor/eigen/Eigen/src/SparseLU/SparseLU_panel_bmod.h +1 -1
- data/vendor/eigen/Eigen/src/SparseQR/SparseQR.h +19 -6
- data/vendor/eigen/Eigen/src/StlSupport/StdDeque.h +2 -12
- data/vendor/eigen/Eigen/src/StlSupport/StdList.h +2 -2
- data/vendor/eigen/Eigen/src/StlSupport/StdVector.h +2 -2
- data/vendor/eigen/Eigen/src/SuperLUSupport/SuperLUSupport.h +6 -8
- data/vendor/eigen/Eigen/src/UmfPackSupport/UmfPackSupport.h +175 -39
- data/vendor/eigen/Eigen/src/misc/lapacke.h +5 -4
- data/vendor/eigen/Eigen/src/plugins/ArrayCwiseBinaryOps.h +28 -2
- data/vendor/eigen/Eigen/src/plugins/ArrayCwiseUnaryOps.h +155 -11
- data/vendor/eigen/Eigen/src/plugins/BlockMethods.h +626 -242
- data/vendor/eigen/Eigen/src/plugins/CommonCwiseUnaryOps.h +14 -0
- data/vendor/eigen/Eigen/src/plugins/IndexedViewMethods.h +262 -0
- data/vendor/eigen/Eigen/src/plugins/MatrixCwiseBinaryOps.h +4 -4
- data/vendor/eigen/Eigen/src/plugins/MatrixCwiseUnaryOps.h +10 -0
- data/vendor/eigen/Eigen/src/plugins/ReshapedMethods.h +149 -0
- data/vendor/eigen/README.md +2 -0
- data/vendor/eigen/bench/btl/README +1 -1
- data/vendor/eigen/bench/tensors/README +6 -7
- data/vendor/eigen/ci/README.md +56 -0
- data/vendor/eigen/demos/mix_eigen_and_c/README +1 -1
- data/vendor/eigen/unsupported/Eigen/CXX11/src/Tensor/README.md +213 -158
- data/vendor/eigen/unsupported/README.txt +1 -1
- data/vendor/tomotopy/README.kr.rst +78 -0
- data/vendor/tomotopy/README.rst +75 -0
- data/vendor/tomotopy/src/Labeling/FoRelevance.cpp +2 -2
- data/vendor/tomotopy/src/Labeling/Phraser.hpp +4 -4
- data/vendor/tomotopy/src/TopicModel/CTModel.hpp +7 -3
- data/vendor/tomotopy/src/TopicModel/DMRModel.hpp +7 -3
- data/vendor/tomotopy/src/TopicModel/DTModel.hpp +6 -3
- data/vendor/tomotopy/src/TopicModel/GDMRModel.hpp +2 -2
- data/vendor/tomotopy/src/TopicModel/HDP.h +1 -0
- data/vendor/tomotopy/src/TopicModel/HDPModel.hpp +57 -6
- data/vendor/tomotopy/src/TopicModel/HLDAModel.hpp +6 -3
- data/vendor/tomotopy/src/TopicModel/HPAModel.hpp +3 -2
- data/vendor/tomotopy/src/TopicModel/LDA.h +3 -3
- data/vendor/tomotopy/src/TopicModel/LDACVB0Model.hpp +5 -5
- data/vendor/tomotopy/src/TopicModel/LDAModel.hpp +50 -19
- data/vendor/tomotopy/src/TopicModel/LLDAModel.hpp +6 -2
- data/vendor/tomotopy/src/TopicModel/MGLDAModel.hpp +3 -2
- data/vendor/tomotopy/src/TopicModel/PAModel.hpp +1 -1
- data/vendor/tomotopy/src/TopicModel/PLDAModel.hpp +6 -2
- data/vendor/tomotopy/src/TopicModel/PT.h +3 -1
- data/vendor/tomotopy/src/TopicModel/PTModel.hpp +36 -3
- data/vendor/tomotopy/src/TopicModel/SLDAModel.hpp +6 -3
- data/vendor/tomotopy/src/TopicModel/TopicModel.hpp +55 -26
- data/vendor/tomotopy/src/Utils/AliasMethod.hpp +5 -4
- data/vendor/tomotopy/src/Utils/Dictionary.h +2 -2
- data/vendor/tomotopy/src/Utils/EigenAddonOps.hpp +36 -1
- data/vendor/tomotopy/src/Utils/MultiNormalDistribution.hpp +1 -1
- data/vendor/tomotopy/src/Utils/TruncMultiNormal.hpp +1 -1
- data/vendor/tomotopy/src/Utils/exception.h +6 -0
- data/vendor/tomotopy/src/Utils/math.h +2 -2
- data/vendor/tomotopy/src/Utils/sample.hpp +14 -12
- data/vendor/tomotopy/src/Utils/serializer.hpp +30 -5
- data/vendor/tomotopy/src/Utils/sse_gamma.h +0 -3
- metadata +64 -18
- data/vendor/eigen/Eigen/CMakeLists.txt +0 -19
- data/vendor/eigen/Eigen/src/Core/arch/CUDA/Half.h +0 -674
- data/vendor/eigen/Eigen/src/Core/arch/CUDA/PacketMath.h +0 -333
- data/vendor/eigen/Eigen/src/Core/arch/CUDA/PacketMathHalf.h +0 -1124
- data/vendor/eigen/Eigen/src/Core/arch/CUDA/TypeCasting.h +0 -212
- data/vendor/eigen/Eigen/src/Geometry/arch/Geometry_SSE.h +0 -161
- data/vendor/eigen/Eigen/src/LU/arch/Inverse_SSE.h +0 -338
@@ -11,12 +11,12 @@
|
|
11
11
|
#ifndef EIGEN_TRIANGULARMATRIX_H
|
12
12
|
#define EIGEN_TRIANGULARMATRIX_H
|
13
13
|
|
14
|
-
namespace Eigen {
|
14
|
+
namespace Eigen {
|
15
15
|
|
16
16
|
namespace internal {
|
17
|
-
|
17
|
+
|
18
18
|
template<int Side, typename TriangularType, typename Rhs> struct triangular_solve_retval;
|
19
|
-
|
19
|
+
|
20
20
|
}
|
21
21
|
|
22
22
|
/** \class TriangularBase
|
@@ -34,16 +34,16 @@ template<typename Derived> class TriangularBase : public EigenBase<Derived>
|
|
34
34
|
ColsAtCompileTime = internal::traits<Derived>::ColsAtCompileTime,
|
35
35
|
MaxRowsAtCompileTime = internal::traits<Derived>::MaxRowsAtCompileTime,
|
36
36
|
MaxColsAtCompileTime = internal::traits<Derived>::MaxColsAtCompileTime,
|
37
|
-
|
37
|
+
|
38
38
|
SizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::RowsAtCompileTime,
|
39
39
|
internal::traits<Derived>::ColsAtCompileTime>::ret),
|
40
40
|
/**< This is equal to the number of coefficients, i.e. the number of
|
41
41
|
* rows times the number of columns, or to \a Dynamic if this is not
|
42
42
|
* known at compile-time. \sa RowsAtCompileTime, ColsAtCompileTime */
|
43
|
-
|
43
|
+
|
44
44
|
MaxSizeAtCompileTime = (internal::size_at_compile_time<internal::traits<Derived>::MaxRowsAtCompileTime,
|
45
45
|
internal::traits<Derived>::MaxColsAtCompileTime>::ret)
|
46
|
-
|
46
|
+
|
47
47
|
};
|
48
48
|
typedef typename internal::traits<Derived>::Scalar Scalar;
|
49
49
|
typedef typename internal::traits<Derived>::StorageKind StorageKind;
|
@@ -53,18 +53,19 @@ template<typename Derived> class TriangularBase : public EigenBase<Derived>
|
|
53
53
|
typedef Derived const& Nested;
|
54
54
|
|
55
55
|
EIGEN_DEVICE_FUNC
|
56
|
-
inline TriangularBase() { eigen_assert(!((Mode&UnitDiag) && (Mode&ZeroDiag))); }
|
56
|
+
inline TriangularBase() { eigen_assert(!((int(Mode) & int(UnitDiag)) && (int(Mode) & int(ZeroDiag)))); }
|
57
|
+
|
58
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
59
|
+
inline Index rows() const EIGEN_NOEXCEPT { return derived().rows(); }
|
60
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
61
|
+
inline Index cols() const EIGEN_NOEXCEPT { return derived().cols(); }
|
62
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
63
|
+
inline Index outerStride() const EIGEN_NOEXCEPT { return derived().outerStride(); }
|
64
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
65
|
+
inline Index innerStride() const EIGEN_NOEXCEPT { return derived().innerStride(); }
|
57
66
|
|
58
|
-
EIGEN_DEVICE_FUNC
|
59
|
-
inline Index rows() const { return derived().rows(); }
|
60
|
-
EIGEN_DEVICE_FUNC
|
61
|
-
inline Index cols() const { return derived().cols(); }
|
62
|
-
EIGEN_DEVICE_FUNC
|
63
|
-
inline Index outerStride() const { return derived().outerStride(); }
|
64
|
-
EIGEN_DEVICE_FUNC
|
65
|
-
inline Index innerStride() const { return derived().innerStride(); }
|
66
|
-
|
67
67
|
// dummy resize function
|
68
|
+
EIGEN_DEVICE_FUNC
|
68
69
|
void resize(Index rows, Index cols)
|
69
70
|
{
|
70
71
|
EIGEN_UNUSED_VARIABLE(rows);
|
@@ -155,7 +156,7 @@ template<typename Derived> class TriangularBase : public EigenBase<Derived>
|
|
155
156
|
* \param MatrixType the type of the object in which we are taking the triangular part
|
156
157
|
* \param Mode the kind of triangular matrix expression to construct. Can be #Upper,
|
157
158
|
* #Lower, #UnitUpper, #UnitLower, #StrictlyUpper, or #StrictlyLower.
|
158
|
-
* This is in fact a bit field; it must have either #Upper or #Lower,
|
159
|
+
* This is in fact a bit field; it must have either #Upper or #Lower,
|
159
160
|
* and additionally it may have #UnitDiag or #ZeroDiag or neither.
|
160
161
|
*
|
161
162
|
* This class represents a triangular part of a matrix, not necessarily square. Strictly speaking, for rectangular
|
@@ -197,7 +198,8 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
|
|
197
198
|
typedef typename internal::traits<TriangularView>::MatrixTypeNestedNonRef MatrixTypeNestedNonRef;
|
198
199
|
|
199
200
|
typedef typename internal::remove_all<typename MatrixType::ConjugateReturnType>::type MatrixConjugateReturnType;
|
200
|
-
|
201
|
+
typedef TriangularView<typename internal::add_const<MatrixType>::type, _Mode> ConstTriangularView;
|
202
|
+
|
201
203
|
public:
|
202
204
|
|
203
205
|
typedef typename internal::traits<TriangularView>::StorageKind StorageKind;
|
@@ -216,17 +218,15 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
|
|
216
218
|
EIGEN_DEVICE_FUNC
|
217
219
|
explicit inline TriangularView(MatrixType& matrix) : m_matrix(matrix)
|
218
220
|
{}
|
219
|
-
|
220
|
-
|
221
|
-
TriangularView& operator=(const TriangularView &other)
|
222
|
-
{ return Base::operator=(other); }
|
221
|
+
|
222
|
+
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(TriangularView)
|
223
223
|
|
224
224
|
/** \copydoc EigenBase::rows() */
|
225
|
-
EIGEN_DEVICE_FUNC
|
226
|
-
inline Index rows() const { return m_matrix.rows(); }
|
225
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
226
|
+
inline Index rows() const EIGEN_NOEXCEPT { return m_matrix.rows(); }
|
227
227
|
/** \copydoc EigenBase::cols() */
|
228
|
-
EIGEN_DEVICE_FUNC
|
229
|
-
inline Index cols() const { return m_matrix.cols(); }
|
228
|
+
EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR
|
229
|
+
inline Index cols() const EIGEN_NOEXCEPT { return m_matrix.cols(); }
|
230
230
|
|
231
231
|
/** \returns a const reference to the nested expression */
|
232
232
|
EIGEN_DEVICE_FUNC
|
@@ -235,13 +235,25 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
|
|
235
235
|
/** \returns a reference to the nested expression */
|
236
236
|
EIGEN_DEVICE_FUNC
|
237
237
|
NestedExpression& nestedExpression() { return m_matrix; }
|
238
|
-
|
238
|
+
|
239
239
|
typedef TriangularView<const MatrixConjugateReturnType,Mode> ConjugateReturnType;
|
240
240
|
/** \sa MatrixBase::conjugate() const */
|
241
241
|
EIGEN_DEVICE_FUNC
|
242
242
|
inline const ConjugateReturnType conjugate() const
|
243
243
|
{ return ConjugateReturnType(m_matrix.conjugate()); }
|
244
244
|
|
245
|
+
/** \returns an expression of the complex conjugate of \c *this if Cond==true,
|
246
|
+
* returns \c *this otherwise.
|
247
|
+
*/
|
248
|
+
template<bool Cond>
|
249
|
+
EIGEN_DEVICE_FUNC
|
250
|
+
inline typename internal::conditional<Cond,ConjugateReturnType,ConstTriangularView>::type
|
251
|
+
conjugateIf() const
|
252
|
+
{
|
253
|
+
typedef typename internal::conditional<Cond,ConjugateReturnType,ConstTriangularView>::type ReturnType;
|
254
|
+
return ReturnType(m_matrix.template conjugateIf<Cond>());
|
255
|
+
}
|
256
|
+
|
245
257
|
typedef TriangularView<const typename MatrixType::AdjointReturnType,TransposeMode> AdjointReturnType;
|
246
258
|
/** \sa MatrixBase::adjoint() const */
|
247
259
|
EIGEN_DEVICE_FUNC
|
@@ -257,7 +269,7 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
|
|
257
269
|
typename MatrixType::TransposeReturnType tmp(m_matrix);
|
258
270
|
return TransposeReturnType(tmp);
|
259
271
|
}
|
260
|
-
|
272
|
+
|
261
273
|
typedef TriangularView<const typename MatrixType::ConstTransposeReturnType,TransposeMode> ConstTransposeReturnType;
|
262
274
|
/** \sa MatrixBase::transpose() const */
|
263
275
|
EIGEN_DEVICE_FUNC
|
@@ -268,10 +280,10 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
|
|
268
280
|
|
269
281
|
template<typename Other>
|
270
282
|
EIGEN_DEVICE_FUNC
|
271
|
-
inline const Solve<TriangularView, Other>
|
283
|
+
inline const Solve<TriangularView, Other>
|
272
284
|
solve(const MatrixBase<Other>& other) const
|
273
285
|
{ return Solve<TriangularView, Other>(*this, other.derived()); }
|
274
|
-
|
286
|
+
|
275
287
|
// workaround MSVC ICE
|
276
288
|
#if EIGEN_COMP_MSVC
|
277
289
|
template<int Side, typename Other>
|
@@ -315,7 +327,7 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
|
|
315
327
|
else
|
316
328
|
return m_matrix.diagonal().prod();
|
317
329
|
}
|
318
|
-
|
330
|
+
|
319
331
|
protected:
|
320
332
|
|
321
333
|
MatrixTypeNested m_matrix;
|
@@ -377,7 +389,7 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
|
|
377
389
|
internal::call_assignment_no_alias(derived(), other.derived(), internal::sub_assign_op<Scalar,typename Other::Scalar>());
|
378
390
|
return derived();
|
379
391
|
}
|
380
|
-
|
392
|
+
|
381
393
|
/** \sa MatrixBase::operator*=() */
|
382
394
|
EIGEN_DEVICE_FUNC
|
383
395
|
TriangularViewType& operator*=(const typename internal::traits<MatrixType>::Scalar& other) { return *this = derived().nestedExpression() * other; }
|
@@ -435,14 +447,14 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
|
|
435
447
|
TriangularViewType& operator=(const TriangularViewImpl& other)
|
436
448
|
{ return *this = other.derived().nestedExpression(); }
|
437
449
|
|
438
|
-
/** \deprecated */
|
439
450
|
template<typename OtherDerived>
|
440
|
-
|
451
|
+
/** \deprecated */
|
452
|
+
EIGEN_DEPRECATED EIGEN_DEVICE_FUNC
|
441
453
|
void lazyAssign(const TriangularBase<OtherDerived>& other);
|
442
454
|
|
443
|
-
/** \deprecated */
|
444
455
|
template<typename OtherDerived>
|
445
|
-
|
456
|
+
/** \deprecated */
|
457
|
+
EIGEN_DEPRECATED EIGEN_DEVICE_FUNC
|
446
458
|
void lazyAssign(const MatrixBase<OtherDerived>& other);
|
447
459
|
#endif
|
448
460
|
|
@@ -470,7 +482,7 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
|
|
470
482
|
* \a Side==OnTheLeft (the default), or the right-inverse-multiply \a other * inverse(\c *this) if
|
471
483
|
* \a Side==OnTheRight.
|
472
484
|
*
|
473
|
-
* Note that the template parameter \c Side can be
|
485
|
+
* Note that the template parameter \c Side can be omitted, in which case \c Side==OnTheLeft
|
474
486
|
*
|
475
487
|
* The matrix \c *this must be triangular and invertible (i.e., all the coefficients of the
|
476
488
|
* diagonal must be non zero). It works as a forward (resp. backward) substitution if \c *this
|
@@ -488,7 +500,6 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
|
|
488
500
|
* \sa TriangularView::solveInPlace()
|
489
501
|
*/
|
490
502
|
template<int Side, typename Other>
|
491
|
-
EIGEN_DEVICE_FUNC
|
492
503
|
inline const internal::triangular_solve_retval<Side,TriangularViewType, Other>
|
493
504
|
solve(const MatrixBase<Other>& other) const;
|
494
505
|
|
@@ -497,7 +508,7 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
|
|
497
508
|
* \warning The parameter is only marked 'const' to make the C++ compiler accept a temporary expression here.
|
498
509
|
* This function will const_cast it, so constness isn't honored here.
|
499
510
|
*
|
500
|
-
* Note that the template parameter \c Side can be
|
511
|
+
* Note that the template parameter \c Side can be omitted, in which case \c Side==OnTheLeft
|
501
512
|
*
|
502
513
|
* See TriangularView:solve() for the details.
|
503
514
|
*/
|
@@ -523,10 +534,10 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
|
|
523
534
|
call_assignment(derived(), other.const_cast_derived(), internal::swap_assign_op<Scalar>());
|
524
535
|
}
|
525
536
|
|
526
|
-
/** \
|
527
|
-
* Shortcut for \code (*this).swap(other.triangularView<(*this)::Mode>()) \endcode */
|
537
|
+
/** Shortcut for \code (*this).swap(other.triangularView<(*this)::Mode>()) \endcode */
|
528
538
|
template<typename OtherDerived>
|
529
|
-
|
539
|
+
/** \deprecated */
|
540
|
+
EIGEN_DEPRECATED EIGEN_DEVICE_FUNC
|
530
541
|
void swap(MatrixBase<OtherDerived> const & other)
|
531
542
|
{
|
532
543
|
EIGEN_STATIC_ASSERT_LVALUE(OtherDerived);
|
@@ -544,6 +555,10 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
|
|
544
555
|
template<typename ProductType>
|
545
556
|
EIGEN_DEVICE_FUNC
|
546
557
|
EIGEN_STRONG_INLINE TriangularViewType& _assignProduct(const ProductType& prod, const Scalar& alpha, bool beta);
|
558
|
+
protected:
|
559
|
+
EIGEN_DEFAULT_COPY_CONSTRUCTOR(TriangularViewImpl)
|
560
|
+
EIGEN_DEFAULT_EMPTY_CONSTRUCTOR_AND_DESTRUCTOR(TriangularViewImpl)
|
561
|
+
|
547
562
|
};
|
548
563
|
|
549
564
|
/***************************************************************************
|
@@ -554,7 +569,7 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularViewImpl<_Mat
|
|
554
569
|
// FIXME should we keep that possibility
|
555
570
|
template<typename MatrixType, unsigned int Mode>
|
556
571
|
template<typename OtherDerived>
|
557
|
-
inline TriangularView<MatrixType, Mode>&
|
572
|
+
EIGEN_DEVICE_FUNC inline TriangularView<MatrixType, Mode>&
|
558
573
|
TriangularViewImpl<MatrixType, Mode, Dense>::operator=(const MatrixBase<OtherDerived>& other)
|
559
574
|
{
|
560
575
|
internal::call_assignment_no_alias(derived(), other.derived(), internal::assign_op<Scalar,typename OtherDerived::Scalar>());
|
@@ -564,7 +579,7 @@ TriangularViewImpl<MatrixType, Mode, Dense>::operator=(const MatrixBase<OtherDer
|
|
564
579
|
// FIXME should we keep that possibility
|
565
580
|
template<typename MatrixType, unsigned int Mode>
|
566
581
|
template<typename OtherDerived>
|
567
|
-
void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const MatrixBase<OtherDerived>& other)
|
582
|
+
EIGEN_DEVICE_FUNC void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const MatrixBase<OtherDerived>& other)
|
568
583
|
{
|
569
584
|
internal::call_assignment_no_alias(derived(), other.template triangularView<Mode>());
|
570
585
|
}
|
@@ -573,7 +588,7 @@ void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const MatrixBase<Ot
|
|
573
588
|
|
574
589
|
template<typename MatrixType, unsigned int Mode>
|
575
590
|
template<typename OtherDerived>
|
576
|
-
inline TriangularView<MatrixType, Mode>&
|
591
|
+
EIGEN_DEVICE_FUNC inline TriangularView<MatrixType, Mode>&
|
577
592
|
TriangularViewImpl<MatrixType, Mode, Dense>::operator=(const TriangularBase<OtherDerived>& other)
|
578
593
|
{
|
579
594
|
eigen_assert(Mode == int(OtherDerived::Mode));
|
@@ -583,7 +598,7 @@ TriangularViewImpl<MatrixType, Mode, Dense>::operator=(const TriangularBase<Othe
|
|
583
598
|
|
584
599
|
template<typename MatrixType, unsigned int Mode>
|
585
600
|
template<typename OtherDerived>
|
586
|
-
void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const TriangularBase<OtherDerived>& other)
|
601
|
+
EIGEN_DEVICE_FUNC void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const TriangularBase<OtherDerived>& other)
|
587
602
|
{
|
588
603
|
eigen_assert(Mode == int(OtherDerived::Mode));
|
589
604
|
internal::call_assignment_no_alias(derived(), other.derived());
|
@@ -598,7 +613,7 @@ void TriangularViewImpl<MatrixType, Mode, Dense>::lazyAssign(const TriangularBas
|
|
598
613
|
* If the matrix is triangular, the opposite part is set to zero. */
|
599
614
|
template<typename Derived>
|
600
615
|
template<typename DenseDerived>
|
601
|
-
void TriangularBase<Derived>::evalTo(MatrixBase<DenseDerived> &other) const
|
616
|
+
EIGEN_DEVICE_FUNC void TriangularBase<Derived>::evalTo(MatrixBase<DenseDerived> &other) const
|
602
617
|
{
|
603
618
|
evalToLazy(other.derived());
|
604
619
|
}
|
@@ -624,6 +639,7 @@ void TriangularBase<Derived>::evalTo(MatrixBase<DenseDerived> &other) const
|
|
624
639
|
*/
|
625
640
|
template<typename Derived>
|
626
641
|
template<unsigned int Mode>
|
642
|
+
EIGEN_DEVICE_FUNC
|
627
643
|
typename MatrixBase<Derived>::template TriangularViewReturnType<Mode>::Type
|
628
644
|
MatrixBase<Derived>::triangularView()
|
629
645
|
{
|
@@ -633,6 +649,7 @@ MatrixBase<Derived>::triangularView()
|
|
633
649
|
/** This is the const version of MatrixBase::triangularView() */
|
634
650
|
template<typename Derived>
|
635
651
|
template<unsigned int Mode>
|
652
|
+
EIGEN_DEVICE_FUNC
|
636
653
|
typename MatrixBase<Derived>::template ConstTriangularViewReturnType<Mode>::Type
|
637
654
|
MatrixBase<Derived>::triangularView() const
|
638
655
|
{
|
@@ -698,7 +715,7 @@ bool MatrixBase<Derived>::isLowerTriangular(const RealScalar& prec) const
|
|
698
715
|
|
699
716
|
namespace internal {
|
700
717
|
|
701
|
-
|
718
|
+
|
702
719
|
// TODO currently a triangular expression has the form TriangularView<.,.>
|
703
720
|
// in the future triangular-ness should be defined by the expression traits
|
704
721
|
// such that Transpose<TriangularView<.,.> > is valid. (currently TriangularBase::transpose() is overloaded to make it work)
|
@@ -715,6 +732,7 @@ struct unary_evaluator<TriangularView<MatrixType,Mode>, IndexBased>
|
|
715
732
|
{
|
716
733
|
typedef TriangularView<MatrixType,Mode> XprType;
|
717
734
|
typedef evaluator<typename internal::remove_all<MatrixType>::type> Base;
|
735
|
+
EIGEN_DEVICE_FUNC
|
718
736
|
unary_evaluator(const XprType &xpr) : Base(xpr.nestedExpression()) {}
|
719
737
|
};
|
720
738
|
|
@@ -726,7 +744,7 @@ struct Dense2Triangular {};
|
|
726
744
|
|
727
745
|
template<typename Kernel, unsigned int Mode, int UnrollCount, bool ClearOpposite> struct triangular_assignment_loop;
|
728
746
|
|
729
|
-
|
747
|
+
|
730
748
|
/** \internal Specialization of the dense assignment kernel for triangular matrices.
|
731
749
|
* The main difference is that the triangular, diagonal, and opposite parts are processed through three different functions.
|
732
750
|
* \tparam UpLo must be either Lower or Upper
|
@@ -743,17 +761,17 @@ protected:
|
|
743
761
|
using Base::m_src;
|
744
762
|
using Base::m_functor;
|
745
763
|
public:
|
746
|
-
|
764
|
+
|
747
765
|
typedef typename Base::DstEvaluatorType DstEvaluatorType;
|
748
766
|
typedef typename Base::SrcEvaluatorType SrcEvaluatorType;
|
749
767
|
typedef typename Base::Scalar Scalar;
|
750
768
|
typedef typename Base::AssignmentTraits AssignmentTraits;
|
751
|
-
|
752
|
-
|
769
|
+
|
770
|
+
|
753
771
|
EIGEN_DEVICE_FUNC triangular_dense_assignment_kernel(DstEvaluatorType &dst, const SrcEvaluatorType &src, const Functor &func, DstXprType& dstExpr)
|
754
772
|
: Base(dst, src, func, dstExpr)
|
755
773
|
{}
|
756
|
-
|
774
|
+
|
757
775
|
#ifdef EIGEN_INTERNAL_DEBUGGING
|
758
776
|
EIGEN_DEVICE_FUNC void assignCoeff(Index row, Index col)
|
759
777
|
{
|
@@ -763,16 +781,16 @@ public:
|
|
763
781
|
#else
|
764
782
|
using Base::assignCoeff;
|
765
783
|
#endif
|
766
|
-
|
784
|
+
|
767
785
|
EIGEN_DEVICE_FUNC void assignDiagonalCoeff(Index id)
|
768
786
|
{
|
769
787
|
if(Mode==UnitDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(id,id), Scalar(1));
|
770
788
|
else if(Mode==ZeroDiag && SetOpposite) m_functor.assignCoeff(m_dst.coeffRef(id,id), Scalar(0));
|
771
789
|
else if(Mode==0) Base::assignCoeff(id,id);
|
772
790
|
}
|
773
|
-
|
791
|
+
|
774
792
|
EIGEN_DEVICE_FUNC void assignOppositeCoeff(Index row, Index col)
|
775
|
-
{
|
793
|
+
{
|
776
794
|
eigen_internal_assert(row!=col);
|
777
795
|
if(SetOpposite)
|
778
796
|
m_functor.assignCoeff(m_dst.coeffRef(row,col), Scalar(0));
|
@@ -793,17 +811,17 @@ void call_triangular_assignment_loop(DstXprType& dst, const SrcXprType& src, con
|
|
793
811
|
if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
|
794
812
|
dst.resize(dstRows, dstCols);
|
795
813
|
DstEvaluatorType dstEvaluator(dst);
|
796
|
-
|
814
|
+
|
797
815
|
typedef triangular_dense_assignment_kernel< Mode&(Lower|Upper),Mode&(UnitDiag|ZeroDiag|SelfAdjoint),SetOpposite,
|
798
816
|
DstEvaluatorType,SrcEvaluatorType,Functor> Kernel;
|
799
817
|
Kernel kernel(dstEvaluator, srcEvaluator, func, dst.const_cast_derived());
|
800
|
-
|
818
|
+
|
801
819
|
enum {
|
802
820
|
unroll = DstXprType::SizeAtCompileTime != Dynamic
|
803
821
|
&& SrcEvaluatorType::CoeffReadCost < HugeCost
|
804
|
-
&& DstXprType::SizeAtCompileTime * (DstEvaluatorType::CoeffReadCost+SrcEvaluatorType::CoeffReadCost) / 2 <= EIGEN_UNROLLING_LIMIT
|
822
|
+
&& DstXprType::SizeAtCompileTime * (int(DstEvaluatorType::CoeffReadCost) + int(SrcEvaluatorType::CoeffReadCost)) / 2 <= EIGEN_UNROLLING_LIMIT
|
805
823
|
};
|
806
|
-
|
824
|
+
|
807
825
|
triangular_assignment_loop<Kernel, Mode, unroll ? int(DstXprType::SizeAtCompileTime) : Dynamic, SetOpposite>::run(kernel);
|
808
826
|
}
|
809
827
|
|
@@ -825,8 +843,8 @@ struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Triangular>
|
|
825
843
|
EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)
|
826
844
|
{
|
827
845
|
eigen_assert(int(DstXprType::Mode) == int(SrcXprType::Mode));
|
828
|
-
|
829
|
-
call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
|
846
|
+
|
847
|
+
call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
|
830
848
|
}
|
831
849
|
};
|
832
850
|
|
@@ -835,7 +853,7 @@ struct Assignment<DstXprType, SrcXprType, Functor, Triangular2Dense>
|
|
835
853
|
{
|
836
854
|
EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)
|
837
855
|
{
|
838
|
-
call_triangular_assignment_loop<SrcXprType::Mode, (SrcXprType::Mode&SelfAdjoint)==0>(dst, src, func);
|
856
|
+
call_triangular_assignment_loop<SrcXprType::Mode, (int(SrcXprType::Mode) & int(SelfAdjoint)) == 0>(dst, src, func);
|
839
857
|
}
|
840
858
|
};
|
841
859
|
|
@@ -844,7 +862,7 @@ struct Assignment<DstXprType, SrcXprType, Functor, Dense2Triangular>
|
|
844
862
|
{
|
845
863
|
EIGEN_DEVICE_FUNC static void run(DstXprType &dst, const SrcXprType &src, const Functor &func)
|
846
864
|
{
|
847
|
-
call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
|
865
|
+
call_triangular_assignment_loop<DstXprType::Mode, false>(dst, src, func);
|
848
866
|
}
|
849
867
|
};
|
850
868
|
|
@@ -855,19 +873,19 @@ struct triangular_assignment_loop
|
|
855
873
|
// FIXME: this is not very clean, perhaps this information should be provided by the kernel?
|
856
874
|
typedef typename Kernel::DstEvaluatorType DstEvaluatorType;
|
857
875
|
typedef typename DstEvaluatorType::XprType DstXprType;
|
858
|
-
|
876
|
+
|
859
877
|
enum {
|
860
878
|
col = (UnrollCount-1) / DstXprType::RowsAtCompileTime,
|
861
879
|
row = (UnrollCount-1) % DstXprType::RowsAtCompileTime
|
862
880
|
};
|
863
|
-
|
881
|
+
|
864
882
|
typedef typename Kernel::Scalar Scalar;
|
865
883
|
|
866
884
|
EIGEN_DEVICE_FUNC
|
867
885
|
static inline void run(Kernel &kernel)
|
868
886
|
{
|
869
887
|
triangular_assignment_loop<Kernel, Mode, UnrollCount-1, SetOpposite>::run(kernel);
|
870
|
-
|
888
|
+
|
871
889
|
if(row==col)
|
872
890
|
kernel.assignDiagonalCoeff(row);
|
873
891
|
else if( ((Mode&Lower) && row>col) || ((Mode&Upper) && row<col) )
|
@@ -910,10 +928,10 @@ struct triangular_assignment_loop<Kernel, Mode, Dynamic, SetOpposite>
|
|
910
928
|
}
|
911
929
|
else
|
912
930
|
i = maxi;
|
913
|
-
|
931
|
+
|
914
932
|
if(i<kernel.rows()) // then i==j
|
915
933
|
kernel.assignDiagonalCoeff(i++);
|
916
|
-
|
934
|
+
|
917
935
|
if (((Mode&Upper) && SetOpposite) || (Mode&Lower))
|
918
936
|
{
|
919
937
|
for(; i < kernel.rows(); ++i)
|
@@ -930,14 +948,14 @@ struct triangular_assignment_loop<Kernel, Mode, Dynamic, SetOpposite>
|
|
930
948
|
* If the matrix is triangular, the opposite part is set to zero. */
|
931
949
|
template<typename Derived>
|
932
950
|
template<typename DenseDerived>
|
933
|
-
void TriangularBase<Derived>::evalToLazy(MatrixBase<DenseDerived> &other) const
|
951
|
+
EIGEN_DEVICE_FUNC void TriangularBase<Derived>::evalToLazy(MatrixBase<DenseDerived> &other) const
|
934
952
|
{
|
935
953
|
other.derived().resize(this->rows(), this->cols());
|
936
|
-
internal::call_triangular_assignment_loop<Derived::Mode,(Derived::Mode&SelfAdjoint)==0 /* SetOpposite */>(other.derived(), derived().nestedExpression());
|
954
|
+
internal::call_triangular_assignment_loop<Derived::Mode, (int(Derived::Mode) & int(SelfAdjoint)) == 0 /* SetOpposite */>(other.derived(), derived().nestedExpression());
|
937
955
|
}
|
938
956
|
|
939
957
|
namespace internal {
|
940
|
-
|
958
|
+
|
941
959
|
// Triangular = Product
|
942
960
|
template< typename DstXprType, typename Lhs, typename Rhs, typename Scalar>
|
943
961
|
struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::assign_op<Scalar,typename Product<Lhs,Rhs,DefaultProduct>::Scalar>, Dense2Triangular>
|
@@ -950,7 +968,7 @@ struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::assign_
|
|
950
968
|
if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
|
951
969
|
dst.resize(dstRows, dstCols);
|
952
970
|
|
953
|
-
dst._assignProduct(src, 1,
|
971
|
+
dst._assignProduct(src, Scalar(1), false);
|
954
972
|
}
|
955
973
|
};
|
956
974
|
|
@@ -961,7 +979,7 @@ struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::add_ass
|
|
961
979
|
typedef Product<Lhs,Rhs,DefaultProduct> SrcXprType;
|
962
980
|
static void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op<Scalar,typename SrcXprType::Scalar> &)
|
963
981
|
{
|
964
|
-
dst._assignProduct(src, 1,
|
982
|
+
dst._assignProduct(src, Scalar(1), true);
|
965
983
|
}
|
966
984
|
};
|
967
985
|
|
@@ -972,7 +990,7 @@ struct Assignment<DstXprType, Product<Lhs,Rhs,DefaultProduct>, internal::sub_ass
|
|
972
990
|
typedef Product<Lhs,Rhs,DefaultProduct> SrcXprType;
|
973
991
|
static void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op<Scalar,typename SrcXprType::Scalar> &)
|
974
992
|
{
|
975
|
-
dst._assignProduct(src, -1,
|
993
|
+
dst._assignProduct(src, Scalar(-1), true);
|
976
994
|
}
|
977
995
|
};
|
978
996
|
|
@@ -35,7 +35,7 @@ struct traits<VectorBlock<VectorType, Size> >
|
|
35
35
|
* It is the return type of DenseBase::segment(Index,Index) and DenseBase::segment<int>(Index) and
|
36
36
|
* most of the time this is the only way it is used.
|
37
37
|
*
|
38
|
-
* However, if you want to directly
|
38
|
+
* However, if you want to directly manipulate sub-vector expressions,
|
39
39
|
* for instance if you want to write a function returning such an expression, you
|
40
40
|
* will need to use this class.
|
41
41
|
*
|
@@ -71,8 +71,8 @@ template<typename VectorType, int Size> class VectorBlock
|
|
71
71
|
|
72
72
|
/** Dynamic-size constructor
|
73
73
|
*/
|
74
|
-
EIGEN_DEVICE_FUNC
|
75
|
-
|
74
|
+
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
75
|
+
VectorBlock(VectorType& vector, Index start, Index size)
|
76
76
|
: Base(vector,
|
77
77
|
IsColVector ? start : 0, IsColVector ? 0 : start,
|
78
78
|
IsColVector ? size : 1, IsColVector ? 1 : size)
|
@@ -82,8 +82,8 @@ template<typename VectorType, int Size> class VectorBlock
|
|
82
82
|
|
83
83
|
/** Fixed-size constructor
|
84
84
|
*/
|
85
|
-
EIGEN_DEVICE_FUNC
|
86
|
-
|
85
|
+
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
86
|
+
VectorBlock(VectorType& vector, Index start)
|
87
87
|
: Base(vector, IsColVector ? start : 0, IsColVector ? 0 : start)
|
88
88
|
{
|
89
89
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(VectorBlock);
|