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,31 @@
|
|
1
|
+
#ifdef EIGEN_WARNINGS_DISABLED_2
|
2
|
+
// "DisableStupidWarnings.h" was included twice recursively: Do not reenable warnings yet!
|
3
|
+
# undef EIGEN_WARNINGS_DISABLED_2
|
4
|
+
|
5
|
+
#elif defined(EIGEN_WARNINGS_DISABLED)
|
6
|
+
#undef EIGEN_WARNINGS_DISABLED
|
7
|
+
|
8
|
+
#ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS
|
9
|
+
#ifdef _MSC_VER
|
10
|
+
#pragma warning( pop )
|
11
|
+
#elif defined __INTEL_COMPILER
|
12
|
+
#pragma warning pop
|
13
|
+
#elif defined __clang__
|
14
|
+
#pragma clang diagnostic pop
|
15
|
+
#elif defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
|
16
|
+
#pragma GCC diagnostic pop
|
17
|
+
#endif
|
18
|
+
|
19
|
+
#if defined __NVCC__
|
20
|
+
// Don't reenable the diagnostic messages, as it turns out these messages need
|
21
|
+
// to be disabled at the point of the template instantiation (i.e the user code)
|
22
|
+
// otherwise they'll be triggered by nvcc.
|
23
|
+
// #pragma diag_default code_is_unreachable
|
24
|
+
// #pragma diag_default initialization_not_reachable
|
25
|
+
// #pragma diag_default 2651
|
26
|
+
// #pragma diag_default 2653
|
27
|
+
#endif
|
28
|
+
|
29
|
+
#endif
|
30
|
+
|
31
|
+
#endif // EIGEN_WARNINGS_DISABLED
|
@@ -0,0 +1,51 @@
|
|
1
|
+
// This file is part of Eigen, a lightweight C++ template library
|
2
|
+
// for linear algebra.
|
3
|
+
//
|
4
|
+
// Copyright (C) 2017 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
|
+
|
11
|
+
#ifndef EIGEN_RESHAPED_HELPER_H
|
12
|
+
#define EIGEN_RESHAPED_HELPER_H
|
13
|
+
|
14
|
+
namespace Eigen {
|
15
|
+
|
16
|
+
enum AutoSize_t { AutoSize };
|
17
|
+
const int AutoOrder = 2;
|
18
|
+
|
19
|
+
namespace internal {
|
20
|
+
|
21
|
+
template<typename SizeType,typename OtherSize, int TotalSize>
|
22
|
+
struct get_compiletime_reshape_size {
|
23
|
+
enum { value = get_fixed_value<SizeType>::value };
|
24
|
+
};
|
25
|
+
|
26
|
+
template<typename SizeType>
|
27
|
+
Index get_runtime_reshape_size(SizeType size, Index /*other*/, Index /*total*/) {
|
28
|
+
return internal::get_runtime_value(size);
|
29
|
+
}
|
30
|
+
|
31
|
+
template<typename OtherSize, int TotalSize>
|
32
|
+
struct get_compiletime_reshape_size<AutoSize_t,OtherSize,TotalSize> {
|
33
|
+
enum {
|
34
|
+
other_size = get_fixed_value<OtherSize>::value,
|
35
|
+
value = (TotalSize==Dynamic || other_size==Dynamic) ? Dynamic : TotalSize / other_size };
|
36
|
+
};
|
37
|
+
|
38
|
+
inline Index get_runtime_reshape_size(AutoSize_t /*size*/, Index other, Index total) {
|
39
|
+
return total/other;
|
40
|
+
}
|
41
|
+
|
42
|
+
template<int Flags, int Order>
|
43
|
+
struct get_compiletime_reshape_order {
|
44
|
+
enum { value = Order == AutoOrder ? Flags & RowMajorBit : Order };
|
45
|
+
};
|
46
|
+
|
47
|
+
}
|
48
|
+
|
49
|
+
} // end namespace Eigen
|
50
|
+
|
51
|
+
#endif // EIGEN_RESHAPED_HELPER_H
|
@@ -0,0 +1,221 @@
|
|
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
|
+
// Copyright (C) 2008 Benoit Jacob <jacob.benoit.1@gmail.com>
|
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_STATIC_ASSERT_H
|
12
|
+
#define EIGEN_STATIC_ASSERT_H
|
13
|
+
|
14
|
+
/* Some notes on Eigen's static assertion mechanism:
|
15
|
+
*
|
16
|
+
* - in EIGEN_STATIC_ASSERT(CONDITION,MSG) the parameter CONDITION must be a compile time boolean
|
17
|
+
* expression, and MSG an enum listed in struct internal::static_assertion<true>
|
18
|
+
*
|
19
|
+
* - define EIGEN_NO_STATIC_ASSERT to disable them (and save compilation time)
|
20
|
+
* in that case, the static assertion is converted to the following runtime assert:
|
21
|
+
* eigen_assert(CONDITION && "MSG")
|
22
|
+
*
|
23
|
+
* - currently EIGEN_STATIC_ASSERT can only be used in function scope
|
24
|
+
*
|
25
|
+
*/
|
26
|
+
|
27
|
+
#ifndef EIGEN_STATIC_ASSERT
|
28
|
+
#ifndef EIGEN_NO_STATIC_ASSERT
|
29
|
+
|
30
|
+
#if EIGEN_MAX_CPP_VER>=11 && (__has_feature(cxx_static_assert) || (EIGEN_COMP_CXXVER >= 11) || (EIGEN_COMP_MSVC >= 1600))
|
31
|
+
|
32
|
+
// if native static_assert is enabled, let's use it
|
33
|
+
#define EIGEN_STATIC_ASSERT(X,MSG) static_assert(X,#MSG);
|
34
|
+
|
35
|
+
#else // not CXX0X
|
36
|
+
|
37
|
+
namespace Eigen {
|
38
|
+
|
39
|
+
namespace internal {
|
40
|
+
|
41
|
+
template<bool condition>
|
42
|
+
struct static_assertion {};
|
43
|
+
|
44
|
+
template<>
|
45
|
+
struct static_assertion<true>
|
46
|
+
{
|
47
|
+
enum {
|
48
|
+
YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX=1,
|
49
|
+
YOU_MIXED_VECTORS_OF_DIFFERENT_SIZES=1,
|
50
|
+
YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES=1,
|
51
|
+
THIS_METHOD_IS_ONLY_FOR_VECTORS_OF_A_SPECIFIC_SIZE=1,
|
52
|
+
THIS_METHOD_IS_ONLY_FOR_MATRICES_OF_A_SPECIFIC_SIZE=1,
|
53
|
+
THIS_METHOD_IS_ONLY_FOR_OBJECTS_OF_A_SPECIFIC_SIZE=1,
|
54
|
+
OUT_OF_RANGE_ACCESS=1,
|
55
|
+
YOU_MADE_A_PROGRAMMING_MISTAKE=1,
|
56
|
+
EIGEN_INTERNAL_ERROR_PLEASE_FILE_A_BUG_REPORT=1,
|
57
|
+
EIGEN_INTERNAL_COMPILATION_ERROR_OR_YOU_MADE_A_PROGRAMMING_MISTAKE=1,
|
58
|
+
YOU_CALLED_A_FIXED_SIZE_METHOD_ON_A_DYNAMIC_SIZE_MATRIX_OR_VECTOR=1,
|
59
|
+
YOU_CALLED_A_DYNAMIC_SIZE_METHOD_ON_A_FIXED_SIZE_MATRIX_OR_VECTOR=1,
|
60
|
+
UNALIGNED_LOAD_AND_STORE_OPERATIONS_UNIMPLEMENTED_ON_ALTIVEC=1,
|
61
|
+
THIS_FUNCTION_IS_NOT_FOR_INTEGER_NUMERIC_TYPES=1,
|
62
|
+
FLOATING_POINT_ARGUMENT_PASSED__INTEGER_WAS_EXPECTED=1,
|
63
|
+
NUMERIC_TYPE_MUST_BE_REAL=1,
|
64
|
+
COEFFICIENT_WRITE_ACCESS_TO_SELFADJOINT_NOT_SUPPORTED=1,
|
65
|
+
WRITING_TO_TRIANGULAR_PART_WITH_UNIT_DIAGONAL_IS_NOT_SUPPORTED=1,
|
66
|
+
THIS_METHOD_IS_ONLY_FOR_FIXED_SIZE=1,
|
67
|
+
INVALID_MATRIX_PRODUCT=1,
|
68
|
+
INVALID_VECTOR_VECTOR_PRODUCT__IF_YOU_WANTED_A_DOT_OR_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTIONS=1,
|
69
|
+
INVALID_MATRIX_PRODUCT__IF_YOU_WANTED_A_COEFF_WISE_PRODUCT_YOU_MUST_USE_THE_EXPLICIT_FUNCTION=1,
|
70
|
+
YOU_MIXED_DIFFERENT_NUMERIC_TYPES__YOU_NEED_TO_USE_THE_CAST_METHOD_OF_MATRIXBASE_TO_CAST_NUMERIC_TYPES_EXPLICITLY=1,
|
71
|
+
THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES=1,
|
72
|
+
THIS_METHOD_IS_ONLY_FOR_ROW_MAJOR_MATRICES=1,
|
73
|
+
INVALID_MATRIX_TEMPLATE_PARAMETERS=1,
|
74
|
+
INVALID_MATRIXBASE_TEMPLATE_PARAMETERS=1,
|
75
|
+
BOTH_MATRICES_MUST_HAVE_THE_SAME_STORAGE_ORDER=1,
|
76
|
+
THIS_METHOD_IS_ONLY_FOR_DIAGONAL_MATRIX=1,
|
77
|
+
THE_MATRIX_OR_EXPRESSION_THAT_YOU_PASSED_DOES_NOT_HAVE_THE_EXPECTED_TYPE=1,
|
78
|
+
THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_WITH_DIRECT_MEMORY_ACCESS_SUCH_AS_MAP_OR_PLAIN_MATRICES=1,
|
79
|
+
YOU_ALREADY_SPECIFIED_THIS_STRIDE=1,
|
80
|
+
INVALID_STORAGE_ORDER_FOR_THIS_VECTOR_EXPRESSION=1,
|
81
|
+
THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD=1,
|
82
|
+
PACKET_ACCESS_REQUIRES_TO_HAVE_INNER_STRIDE_FIXED_TO_1=1,
|
83
|
+
THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS=1,
|
84
|
+
YOU_CANNOT_MIX_ARRAYS_AND_MATRICES=1,
|
85
|
+
YOU_PERFORMED_AN_INVALID_TRANSFORMATION_CONVERSION=1,
|
86
|
+
THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY=1,
|
87
|
+
YOU_ARE_TRYING_TO_USE_AN_INDEX_BASED_ACCESSOR_ON_AN_EXPRESSION_THAT_DOES_NOT_SUPPORT_THAT=1,
|
88
|
+
THIS_METHOD_IS_ONLY_FOR_1x1_EXPRESSIONS=1,
|
89
|
+
THIS_METHOD_IS_ONLY_FOR_INNER_OR_LAZY_PRODUCTS=1,
|
90
|
+
THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL=1,
|
91
|
+
THIS_METHOD_IS_ONLY_FOR_ARRAYS_NOT_MATRICES=1,
|
92
|
+
YOU_PASSED_A_ROW_VECTOR_BUT_A_COLUMN_VECTOR_WAS_EXPECTED=1,
|
93
|
+
YOU_PASSED_A_COLUMN_VECTOR_BUT_A_ROW_VECTOR_WAS_EXPECTED=1,
|
94
|
+
THE_INDEX_TYPE_MUST_BE_A_SIGNED_TYPE=1,
|
95
|
+
THE_STORAGE_ORDER_OF_BOTH_SIDES_MUST_MATCH=1,
|
96
|
+
OBJECT_ALLOCATED_ON_STACK_IS_TOO_BIG=1,
|
97
|
+
IMPLICIT_CONVERSION_TO_SCALAR_IS_FOR_INNER_PRODUCT_ONLY=1,
|
98
|
+
STORAGE_LAYOUT_DOES_NOT_MATCH=1,
|
99
|
+
EIGEN_INTERNAL_ERROR_PLEASE_FILE_A_BUG_REPORT__INVALID_COST_VALUE=1,
|
100
|
+
THIS_COEFFICIENT_ACCESSOR_TAKING_ONE_ACCESS_IS_ONLY_FOR_EXPRESSIONS_ALLOWING_LINEAR_ACCESS=1,
|
101
|
+
MATRIX_FREE_CONJUGATE_GRADIENT_IS_COMPATIBLE_WITH_UPPER_UNION_LOWER_MODE_ONLY=1,
|
102
|
+
THIS_TYPE_IS_NOT_SUPPORTED=1,
|
103
|
+
STORAGE_KIND_MUST_MATCH=1,
|
104
|
+
STORAGE_INDEX_MUST_MATCH=1,
|
105
|
+
CHOLMOD_SUPPORTS_DOUBLE_PRECISION_ONLY=1,
|
106
|
+
SELFADJOINTVIEW_ACCEPTS_UPPER_AND_LOWER_MODE_ONLY=1,
|
107
|
+
INVALID_TEMPLATE_PARAMETER=1,
|
108
|
+
GPU_TENSOR_CONTRACTION_DOES_NOT_SUPPORT_OUTPUT_KERNELS=1,
|
109
|
+
THE_ARRAY_SIZE_SHOULD_EQUAL_WITH_PACKET_SIZE=1
|
110
|
+
};
|
111
|
+
};
|
112
|
+
|
113
|
+
} // end namespace internal
|
114
|
+
|
115
|
+
} // end namespace Eigen
|
116
|
+
|
117
|
+
// Specialized implementation for MSVC to avoid "conditional
|
118
|
+
// expression is constant" warnings. This implementation doesn't
|
119
|
+
// appear to work under GCC, hence the multiple implementations.
|
120
|
+
#if EIGEN_COMP_MSVC
|
121
|
+
|
122
|
+
#define EIGEN_STATIC_ASSERT(CONDITION,MSG) \
|
123
|
+
{Eigen::internal::static_assertion<bool(CONDITION)>::MSG;}
|
124
|
+
|
125
|
+
#else
|
126
|
+
// In some cases clang interprets bool(CONDITION) as function declaration
|
127
|
+
#define EIGEN_STATIC_ASSERT(CONDITION,MSG) \
|
128
|
+
if (Eigen::internal::static_assertion<static_cast<bool>(CONDITION)>::MSG) {}
|
129
|
+
|
130
|
+
#endif
|
131
|
+
|
132
|
+
#endif // not CXX0X
|
133
|
+
|
134
|
+
#else // EIGEN_NO_STATIC_ASSERT
|
135
|
+
|
136
|
+
#define EIGEN_STATIC_ASSERT(CONDITION,MSG) eigen_assert((CONDITION) && #MSG);
|
137
|
+
|
138
|
+
#endif // EIGEN_NO_STATIC_ASSERT
|
139
|
+
#endif // EIGEN_STATIC_ASSERT
|
140
|
+
|
141
|
+
// static assertion failing if the type \a TYPE is not a vector type
|
142
|
+
#define EIGEN_STATIC_ASSERT_VECTOR_ONLY(TYPE) \
|
143
|
+
EIGEN_STATIC_ASSERT(TYPE::IsVectorAtCompileTime, \
|
144
|
+
YOU_TRIED_CALLING_A_VECTOR_METHOD_ON_A_MATRIX)
|
145
|
+
|
146
|
+
// static assertion failing if the type \a TYPE is not fixed-size
|
147
|
+
#define EIGEN_STATIC_ASSERT_FIXED_SIZE(TYPE) \
|
148
|
+
EIGEN_STATIC_ASSERT(TYPE::SizeAtCompileTime!=Eigen::Dynamic, \
|
149
|
+
YOU_CALLED_A_FIXED_SIZE_METHOD_ON_A_DYNAMIC_SIZE_MATRIX_OR_VECTOR)
|
150
|
+
|
151
|
+
// static assertion failing if the type \a TYPE is not dynamic-size
|
152
|
+
#define EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(TYPE) \
|
153
|
+
EIGEN_STATIC_ASSERT(TYPE::SizeAtCompileTime==Eigen::Dynamic, \
|
154
|
+
YOU_CALLED_A_DYNAMIC_SIZE_METHOD_ON_A_FIXED_SIZE_MATRIX_OR_VECTOR)
|
155
|
+
|
156
|
+
// static assertion failing if the type \a TYPE is not a vector type of the given size
|
157
|
+
#define EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(TYPE, SIZE) \
|
158
|
+
EIGEN_STATIC_ASSERT(TYPE::IsVectorAtCompileTime && TYPE::SizeAtCompileTime==SIZE, \
|
159
|
+
THIS_METHOD_IS_ONLY_FOR_VECTORS_OF_A_SPECIFIC_SIZE)
|
160
|
+
|
161
|
+
// static assertion failing if the type \a TYPE is not a vector type of the given size
|
162
|
+
#define EIGEN_STATIC_ASSERT_MATRIX_SPECIFIC_SIZE(TYPE, ROWS, COLS) \
|
163
|
+
EIGEN_STATIC_ASSERT(TYPE::RowsAtCompileTime==ROWS && TYPE::ColsAtCompileTime==COLS, \
|
164
|
+
THIS_METHOD_IS_ONLY_FOR_MATRICES_OF_A_SPECIFIC_SIZE)
|
165
|
+
|
166
|
+
// static assertion failing if the two vector expression types are not compatible (same fixed-size or dynamic size)
|
167
|
+
#define EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(TYPE0,TYPE1) \
|
168
|
+
EIGEN_STATIC_ASSERT( \
|
169
|
+
(int(TYPE0::SizeAtCompileTime)==Eigen::Dynamic \
|
170
|
+
|| int(TYPE1::SizeAtCompileTime)==Eigen::Dynamic \
|
171
|
+
|| int(TYPE0::SizeAtCompileTime)==int(TYPE1::SizeAtCompileTime)),\
|
172
|
+
YOU_MIXED_VECTORS_OF_DIFFERENT_SIZES)
|
173
|
+
|
174
|
+
#define EIGEN_PREDICATE_SAME_MATRIX_SIZE(TYPE0,TYPE1) \
|
175
|
+
( \
|
176
|
+
(int(Eigen::internal::size_of_xpr_at_compile_time<TYPE0>::ret)==0 && int(Eigen::internal::size_of_xpr_at_compile_time<TYPE1>::ret)==0) \
|
177
|
+
|| (\
|
178
|
+
(int(TYPE0::RowsAtCompileTime)==Eigen::Dynamic \
|
179
|
+
|| int(TYPE1::RowsAtCompileTime)==Eigen::Dynamic \
|
180
|
+
|| int(TYPE0::RowsAtCompileTime)==int(TYPE1::RowsAtCompileTime)) \
|
181
|
+
&& (int(TYPE0::ColsAtCompileTime)==Eigen::Dynamic \
|
182
|
+
|| int(TYPE1::ColsAtCompileTime)==Eigen::Dynamic \
|
183
|
+
|| int(TYPE0::ColsAtCompileTime)==int(TYPE1::ColsAtCompileTime))\
|
184
|
+
) \
|
185
|
+
)
|
186
|
+
|
187
|
+
#define EIGEN_STATIC_ASSERT_NON_INTEGER(TYPE) \
|
188
|
+
EIGEN_STATIC_ASSERT(!Eigen::NumTraits<TYPE>::IsInteger, THIS_FUNCTION_IS_NOT_FOR_INTEGER_NUMERIC_TYPES)
|
189
|
+
|
190
|
+
|
191
|
+
// static assertion failing if it is guaranteed at compile-time that the two matrix expression types have different sizes
|
192
|
+
#define EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(TYPE0,TYPE1) \
|
193
|
+
EIGEN_STATIC_ASSERT( \
|
194
|
+
EIGEN_PREDICATE_SAME_MATRIX_SIZE(TYPE0,TYPE1),\
|
195
|
+
YOU_MIXED_MATRICES_OF_DIFFERENT_SIZES)
|
196
|
+
|
197
|
+
#define EIGEN_STATIC_ASSERT_SIZE_1x1(TYPE) \
|
198
|
+
EIGEN_STATIC_ASSERT((TYPE::RowsAtCompileTime == 1 || TYPE::RowsAtCompileTime == Eigen::Dynamic) && \
|
199
|
+
(TYPE::ColsAtCompileTime == 1 || TYPE::ColsAtCompileTime == Eigen::Dynamic), \
|
200
|
+
THIS_METHOD_IS_ONLY_FOR_1x1_EXPRESSIONS)
|
201
|
+
|
202
|
+
#define EIGEN_STATIC_ASSERT_LVALUE(Derived) \
|
203
|
+
EIGEN_STATIC_ASSERT(Eigen::internal::is_lvalue<Derived>::value, \
|
204
|
+
THIS_EXPRESSION_IS_NOT_A_LVALUE__IT_IS_READ_ONLY)
|
205
|
+
|
206
|
+
#define EIGEN_STATIC_ASSERT_ARRAYXPR(Derived) \
|
207
|
+
EIGEN_STATIC_ASSERT((Eigen::internal::is_same<typename Eigen::internal::traits<Derived>::XprKind, ArrayXpr>::value), \
|
208
|
+
THIS_METHOD_IS_ONLY_FOR_ARRAYS_NOT_MATRICES)
|
209
|
+
|
210
|
+
#define EIGEN_STATIC_ASSERT_SAME_XPR_KIND(Derived1, Derived2) \
|
211
|
+
EIGEN_STATIC_ASSERT((Eigen::internal::is_same<typename Eigen::internal::traits<Derived1>::XprKind, \
|
212
|
+
typename Eigen::internal::traits<Derived2>::XprKind \
|
213
|
+
>::value), \
|
214
|
+
YOU_CANNOT_MIX_ARRAYS_AND_MATRICES)
|
215
|
+
|
216
|
+
// Check that a cost value is positive, and that is stay within a reasonable range
|
217
|
+
// TODO this check could be enabled for internal debugging only
|
218
|
+
#define EIGEN_INTERNAL_CHECK_COST_VALUE(C) \
|
219
|
+
EIGEN_STATIC_ASSERT((C)>=0 && (C)<=HugeCost*HugeCost, EIGEN_INTERNAL_ERROR_PLEASE_FILE_A_BUG_REPORT__INVALID_COST_VALUE);
|
220
|
+
|
221
|
+
#endif // EIGEN_STATIC_ASSERT_H
|
@@ -0,0 +1,293 @@
|
|
1
|
+
// This file is part of Eigen, a lightweight C++ template library
|
2
|
+
// for linear algebra.
|
3
|
+
//
|
4
|
+
// Copyright (C) 2017 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_SYMBOLIC_INDEX_H
|
11
|
+
#define EIGEN_SYMBOLIC_INDEX_H
|
12
|
+
|
13
|
+
namespace Eigen {
|
14
|
+
|
15
|
+
/** \namespace Eigen::symbolic
|
16
|
+
* \ingroup Core_Module
|
17
|
+
*
|
18
|
+
* This namespace defines a set of classes and functions to build and evaluate symbolic expressions of scalar type Index.
|
19
|
+
* Here is a simple example:
|
20
|
+
*
|
21
|
+
* \code
|
22
|
+
* // First step, defines symbols:
|
23
|
+
* struct x_tag {}; static const symbolic::SymbolExpr<x_tag> x;
|
24
|
+
* struct y_tag {}; static const symbolic::SymbolExpr<y_tag> y;
|
25
|
+
* struct z_tag {}; static const symbolic::SymbolExpr<z_tag> z;
|
26
|
+
*
|
27
|
+
* // Defines an expression:
|
28
|
+
* auto expr = (x+3)/y+z;
|
29
|
+
*
|
30
|
+
* // And evaluate it: (c++14)
|
31
|
+
* std::cout << expr.eval(x=6,y=3,z=-13) << "\n";
|
32
|
+
*
|
33
|
+
* // In c++98/11, only one symbol per expression is supported for now:
|
34
|
+
* auto expr98 = (3-x)/2;
|
35
|
+
* std::cout << expr98.eval(x=6) << "\n";
|
36
|
+
* \endcode
|
37
|
+
*
|
38
|
+
* It is currently only used internally to define and manipulate the Eigen::last and Eigen::lastp1 symbols in Eigen::seq and Eigen::seqN.
|
39
|
+
*
|
40
|
+
*/
|
41
|
+
namespace symbolic {
|
42
|
+
|
43
|
+
template<typename Tag> class Symbol;
|
44
|
+
template<typename Arg0> class NegateExpr;
|
45
|
+
template<typename Arg1,typename Arg2> class AddExpr;
|
46
|
+
template<typename Arg1,typename Arg2> class ProductExpr;
|
47
|
+
template<typename Arg1,typename Arg2> class QuotientExpr;
|
48
|
+
|
49
|
+
// A simple wrapper around an integral value to provide the eval method.
|
50
|
+
// We could also use a free-function symbolic_eval...
|
51
|
+
template<typename IndexType=Index>
|
52
|
+
class ValueExpr {
|
53
|
+
public:
|
54
|
+
ValueExpr(IndexType val) : m_value(val) {}
|
55
|
+
template<typename T>
|
56
|
+
IndexType eval_impl(const T&) const { return m_value; }
|
57
|
+
protected:
|
58
|
+
IndexType m_value;
|
59
|
+
};
|
60
|
+
|
61
|
+
// Specialization for compile-time value,
|
62
|
+
// It is similar to ValueExpr(N) but this version helps the compiler to generate better code.
|
63
|
+
template<int N>
|
64
|
+
class ValueExpr<internal::FixedInt<N> > {
|
65
|
+
public:
|
66
|
+
ValueExpr() {}
|
67
|
+
template<typename T>
|
68
|
+
EIGEN_CONSTEXPR Index eval_impl(const T&) const { return N; }
|
69
|
+
};
|
70
|
+
|
71
|
+
|
72
|
+
/** \class BaseExpr
|
73
|
+
* \ingroup Core_Module
|
74
|
+
* Common base class of any symbolic expressions
|
75
|
+
*/
|
76
|
+
template<typename Derived>
|
77
|
+
class BaseExpr
|
78
|
+
{
|
79
|
+
public:
|
80
|
+
const Derived& derived() const { return *static_cast<const Derived*>(this); }
|
81
|
+
|
82
|
+
/** Evaluate the expression given the \a values of the symbols.
|
83
|
+
*
|
84
|
+
* \param values defines the values of the symbols, it can either be a SymbolValue or a std::tuple of SymbolValue
|
85
|
+
* as constructed by SymbolExpr::operator= operator.
|
86
|
+
*
|
87
|
+
*/
|
88
|
+
template<typename T>
|
89
|
+
Index eval(const T& values) const { return derived().eval_impl(values); }
|
90
|
+
|
91
|
+
#if EIGEN_HAS_CXX14
|
92
|
+
template<typename... Types>
|
93
|
+
Index eval(Types&&... values) const { return derived().eval_impl(std::make_tuple(values...)); }
|
94
|
+
#endif
|
95
|
+
|
96
|
+
NegateExpr<Derived> operator-() const { return NegateExpr<Derived>(derived()); }
|
97
|
+
|
98
|
+
AddExpr<Derived,ValueExpr<> > operator+(Index b) const
|
99
|
+
{ return AddExpr<Derived,ValueExpr<> >(derived(), b); }
|
100
|
+
AddExpr<Derived,ValueExpr<> > operator-(Index a) const
|
101
|
+
{ return AddExpr<Derived,ValueExpr<> >(derived(), -a); }
|
102
|
+
ProductExpr<Derived,ValueExpr<> > operator*(Index a) const
|
103
|
+
{ return ProductExpr<Derived,ValueExpr<> >(derived(),a); }
|
104
|
+
QuotientExpr<Derived,ValueExpr<> > operator/(Index a) const
|
105
|
+
{ return QuotientExpr<Derived,ValueExpr<> >(derived(),a); }
|
106
|
+
|
107
|
+
friend AddExpr<Derived,ValueExpr<> > operator+(Index a, const BaseExpr& b)
|
108
|
+
{ return AddExpr<Derived,ValueExpr<> >(b.derived(), a); }
|
109
|
+
friend AddExpr<NegateExpr<Derived>,ValueExpr<> > operator-(Index a, const BaseExpr& b)
|
110
|
+
{ return AddExpr<NegateExpr<Derived>,ValueExpr<> >(-b.derived(), a); }
|
111
|
+
friend ProductExpr<ValueExpr<>,Derived> operator*(Index a, const BaseExpr& b)
|
112
|
+
{ return ProductExpr<ValueExpr<>,Derived>(a,b.derived()); }
|
113
|
+
friend QuotientExpr<ValueExpr<>,Derived> operator/(Index a, const BaseExpr& b)
|
114
|
+
{ return QuotientExpr<ValueExpr<>,Derived>(a,b.derived()); }
|
115
|
+
|
116
|
+
template<int N>
|
117
|
+
AddExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator+(internal::FixedInt<N>) const
|
118
|
+
{ return AddExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(), ValueExpr<internal::FixedInt<N> >()); }
|
119
|
+
template<int N>
|
120
|
+
AddExpr<Derived,ValueExpr<internal::FixedInt<-N> > > operator-(internal::FixedInt<N>) const
|
121
|
+
{ return AddExpr<Derived,ValueExpr<internal::FixedInt<-N> > >(derived(), ValueExpr<internal::FixedInt<-N> >()); }
|
122
|
+
template<int N>
|
123
|
+
ProductExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator*(internal::FixedInt<N>) const
|
124
|
+
{ return ProductExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(),ValueExpr<internal::FixedInt<N> >()); }
|
125
|
+
template<int N>
|
126
|
+
QuotientExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator/(internal::FixedInt<N>) const
|
127
|
+
{ return QuotientExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(),ValueExpr<internal::FixedInt<N> >()); }
|
128
|
+
|
129
|
+
template<int N>
|
130
|
+
friend AddExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator+(internal::FixedInt<N>, const BaseExpr& b)
|
131
|
+
{ return AddExpr<Derived,ValueExpr<internal::FixedInt<N> > >(b.derived(), ValueExpr<internal::FixedInt<N> >()); }
|
132
|
+
template<int N>
|
133
|
+
friend AddExpr<NegateExpr<Derived>,ValueExpr<internal::FixedInt<N> > > operator-(internal::FixedInt<N>, const BaseExpr& b)
|
134
|
+
{ return AddExpr<NegateExpr<Derived>,ValueExpr<internal::FixedInt<N> > >(-b.derived(), ValueExpr<internal::FixedInt<N> >()); }
|
135
|
+
template<int N>
|
136
|
+
friend ProductExpr<ValueExpr<internal::FixedInt<N> >,Derived> operator*(internal::FixedInt<N>, const BaseExpr& b)
|
137
|
+
{ return ProductExpr<ValueExpr<internal::FixedInt<N> >,Derived>(ValueExpr<internal::FixedInt<N> >(),b.derived()); }
|
138
|
+
template<int N>
|
139
|
+
friend QuotientExpr<ValueExpr<internal::FixedInt<N> >,Derived> operator/(internal::FixedInt<N>, const BaseExpr& b)
|
140
|
+
{ return QuotientExpr<ValueExpr<internal::FixedInt<N> > ,Derived>(ValueExpr<internal::FixedInt<N> >(),b.derived()); }
|
141
|
+
|
142
|
+
#if (!EIGEN_HAS_CXX14)
|
143
|
+
template<int N>
|
144
|
+
AddExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator+(internal::FixedInt<N> (*)()) const
|
145
|
+
{ return AddExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(), ValueExpr<internal::FixedInt<N> >()); }
|
146
|
+
template<int N>
|
147
|
+
AddExpr<Derived,ValueExpr<internal::FixedInt<-N> > > operator-(internal::FixedInt<N> (*)()) const
|
148
|
+
{ return AddExpr<Derived,ValueExpr<internal::FixedInt<-N> > >(derived(), ValueExpr<internal::FixedInt<-N> >()); }
|
149
|
+
template<int N>
|
150
|
+
ProductExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator*(internal::FixedInt<N> (*)()) const
|
151
|
+
{ return ProductExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(),ValueExpr<internal::FixedInt<N> >()); }
|
152
|
+
template<int N>
|
153
|
+
QuotientExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator/(internal::FixedInt<N> (*)()) const
|
154
|
+
{ return QuotientExpr<Derived,ValueExpr<internal::FixedInt<N> > >(derived(),ValueExpr<internal::FixedInt<N> >()); }
|
155
|
+
|
156
|
+
template<int N>
|
157
|
+
friend AddExpr<Derived,ValueExpr<internal::FixedInt<N> > > operator+(internal::FixedInt<N> (*)(), const BaseExpr& b)
|
158
|
+
{ return AddExpr<Derived,ValueExpr<internal::FixedInt<N> > >(b.derived(), ValueExpr<internal::FixedInt<N> >()); }
|
159
|
+
template<int N>
|
160
|
+
friend AddExpr<NegateExpr<Derived>,ValueExpr<internal::FixedInt<N> > > operator-(internal::FixedInt<N> (*)(), const BaseExpr& b)
|
161
|
+
{ return AddExpr<NegateExpr<Derived>,ValueExpr<internal::FixedInt<N> > >(-b.derived(), ValueExpr<internal::FixedInt<N> >()); }
|
162
|
+
template<int N>
|
163
|
+
friend ProductExpr<ValueExpr<internal::FixedInt<N> >,Derived> operator*(internal::FixedInt<N> (*)(), const BaseExpr& b)
|
164
|
+
{ return ProductExpr<ValueExpr<internal::FixedInt<N> >,Derived>(ValueExpr<internal::FixedInt<N> >(),b.derived()); }
|
165
|
+
template<int N>
|
166
|
+
friend QuotientExpr<ValueExpr<internal::FixedInt<N> >,Derived> operator/(internal::FixedInt<N> (*)(), const BaseExpr& b)
|
167
|
+
{ return QuotientExpr<ValueExpr<internal::FixedInt<N> > ,Derived>(ValueExpr<internal::FixedInt<N> >(),b.derived()); }
|
168
|
+
#endif
|
169
|
+
|
170
|
+
|
171
|
+
template<typename OtherDerived>
|
172
|
+
AddExpr<Derived,OtherDerived> operator+(const BaseExpr<OtherDerived> &b) const
|
173
|
+
{ return AddExpr<Derived,OtherDerived>(derived(), b.derived()); }
|
174
|
+
|
175
|
+
template<typename OtherDerived>
|
176
|
+
AddExpr<Derived,NegateExpr<OtherDerived> > operator-(const BaseExpr<OtherDerived> &b) const
|
177
|
+
{ return AddExpr<Derived,NegateExpr<OtherDerived> >(derived(), -b.derived()); }
|
178
|
+
|
179
|
+
template<typename OtherDerived>
|
180
|
+
ProductExpr<Derived,OtherDerived> operator*(const BaseExpr<OtherDerived> &b) const
|
181
|
+
{ return ProductExpr<Derived,OtherDerived>(derived(), b.derived()); }
|
182
|
+
|
183
|
+
template<typename OtherDerived>
|
184
|
+
QuotientExpr<Derived,OtherDerived> operator/(const BaseExpr<OtherDerived> &b) const
|
185
|
+
{ return QuotientExpr<Derived,OtherDerived>(derived(), b.derived()); }
|
186
|
+
};
|
187
|
+
|
188
|
+
template<typename T>
|
189
|
+
struct is_symbolic {
|
190
|
+
// BaseExpr has no conversion ctor, so we only have to check whether T can be statically cast to its base class BaseExpr<T>.
|
191
|
+
enum { value = internal::is_convertible<T,BaseExpr<T> >::value };
|
192
|
+
};
|
193
|
+
|
194
|
+
/** Represents the actual value of a symbol identified by its tag
|
195
|
+
*
|
196
|
+
* It is the return type of SymbolValue::operator=, and most of the time this is only way it is used.
|
197
|
+
*/
|
198
|
+
template<typename Tag>
|
199
|
+
class SymbolValue
|
200
|
+
{
|
201
|
+
public:
|
202
|
+
/** Default constructor from the value \a val */
|
203
|
+
SymbolValue(Index val) : m_value(val) {}
|
204
|
+
|
205
|
+
/** \returns the stored value of the symbol */
|
206
|
+
Index value() const { return m_value; }
|
207
|
+
protected:
|
208
|
+
Index m_value;
|
209
|
+
};
|
210
|
+
|
211
|
+
/** Expression of a symbol uniquely identified by the template parameter type \c tag */
|
212
|
+
template<typename tag>
|
213
|
+
class SymbolExpr : public BaseExpr<SymbolExpr<tag> >
|
214
|
+
{
|
215
|
+
public:
|
216
|
+
/** Alias to the template parameter \c tag */
|
217
|
+
typedef tag Tag;
|
218
|
+
|
219
|
+
SymbolExpr() {}
|
220
|
+
|
221
|
+
/** Associate the value \a val to the given symbol \c *this, uniquely identified by its \c Tag.
|
222
|
+
*
|
223
|
+
* The returned object should be passed to ExprBase::eval() to evaluate a given expression with this specified runtime-time value.
|
224
|
+
*/
|
225
|
+
SymbolValue<Tag> operator=(Index val) const {
|
226
|
+
return SymbolValue<Tag>(val);
|
227
|
+
}
|
228
|
+
|
229
|
+
Index eval_impl(const SymbolValue<Tag> &values) const { return values.value(); }
|
230
|
+
|
231
|
+
#if EIGEN_HAS_CXX14
|
232
|
+
// C++14 versions suitable for multiple symbols
|
233
|
+
template<typename... Types>
|
234
|
+
Index eval_impl(const std::tuple<Types...>& values) const { return std::get<SymbolValue<Tag> >(values).value(); }
|
235
|
+
#endif
|
236
|
+
};
|
237
|
+
|
238
|
+
template<typename Arg0>
|
239
|
+
class NegateExpr : public BaseExpr<NegateExpr<Arg0> >
|
240
|
+
{
|
241
|
+
public:
|
242
|
+
NegateExpr(const Arg0& arg0) : m_arg0(arg0) {}
|
243
|
+
|
244
|
+
template<typename T>
|
245
|
+
Index eval_impl(const T& values) const { return -m_arg0.eval_impl(values); }
|
246
|
+
protected:
|
247
|
+
Arg0 m_arg0;
|
248
|
+
};
|
249
|
+
|
250
|
+
template<typename Arg0, typename Arg1>
|
251
|
+
class AddExpr : public BaseExpr<AddExpr<Arg0,Arg1> >
|
252
|
+
{
|
253
|
+
public:
|
254
|
+
AddExpr(const Arg0& arg0, const Arg1& arg1) : m_arg0(arg0), m_arg1(arg1) {}
|
255
|
+
|
256
|
+
template<typename T>
|
257
|
+
Index eval_impl(const T& values) const { return m_arg0.eval_impl(values) + m_arg1.eval_impl(values); }
|
258
|
+
protected:
|
259
|
+
Arg0 m_arg0;
|
260
|
+
Arg1 m_arg1;
|
261
|
+
};
|
262
|
+
|
263
|
+
template<typename Arg0, typename Arg1>
|
264
|
+
class ProductExpr : public BaseExpr<ProductExpr<Arg0,Arg1> >
|
265
|
+
{
|
266
|
+
public:
|
267
|
+
ProductExpr(const Arg0& arg0, const Arg1& arg1) : m_arg0(arg0), m_arg1(arg1) {}
|
268
|
+
|
269
|
+
template<typename T>
|
270
|
+
Index eval_impl(const T& values) const { return m_arg0.eval_impl(values) * m_arg1.eval_impl(values); }
|
271
|
+
protected:
|
272
|
+
Arg0 m_arg0;
|
273
|
+
Arg1 m_arg1;
|
274
|
+
};
|
275
|
+
|
276
|
+
template<typename Arg0, typename Arg1>
|
277
|
+
class QuotientExpr : public BaseExpr<QuotientExpr<Arg0,Arg1> >
|
278
|
+
{
|
279
|
+
public:
|
280
|
+
QuotientExpr(const Arg0& arg0, const Arg1& arg1) : m_arg0(arg0), m_arg1(arg1) {}
|
281
|
+
|
282
|
+
template<typename T>
|
283
|
+
Index eval_impl(const T& values) const { return m_arg0.eval_impl(values) / m_arg1.eval_impl(values); }
|
284
|
+
protected:
|
285
|
+
Arg0 m_arg0;
|
286
|
+
Arg1 m_arg1;
|
287
|
+
};
|
288
|
+
|
289
|
+
} // end namespace symbolic
|
290
|
+
|
291
|
+
} // end namespace Eigen
|
292
|
+
|
293
|
+
#endif // EIGEN_SYMBOLIC_INDEX_H
|