ruby-eigen 0.0.9 → 0.0.10.pre1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE +22 -0
- data/README.md +21 -0
- data/ext/eigen/eigen3/COPYING.BSD +26 -0
- data/ext/eigen/eigen3/COPYING.MPL2 +373 -0
- data/ext/eigen/eigen3/COPYING.README +18 -0
- data/ext/eigen/eigen3/Eigen/Array +11 -0
- data/ext/eigen/eigen3/Eigen/Cholesky +32 -0
- data/ext/eigen/eigen3/Eigen/CholmodSupport +45 -0
- data/ext/eigen/eigen3/Eigen/Core +376 -0
- data/ext/eigen/eigen3/Eigen/Dense +7 -0
- data/ext/eigen/eigen3/Eigen/Eigen +2 -0
- data/ext/eigen/eigen3/Eigen/Eigen2Support +95 -0
- data/ext/eigen/eigen3/Eigen/Eigenvalues +48 -0
- data/ext/eigen/eigen3/Eigen/Geometry +63 -0
- data/ext/eigen/eigen3/Eigen/Householder +23 -0
- data/ext/eigen/eigen3/Eigen/IterativeLinearSolvers +40 -0
- data/ext/eigen/eigen3/Eigen/Jacobi +26 -0
- data/ext/eigen/eigen3/Eigen/LU +41 -0
- data/ext/eigen/eigen3/Eigen/LeastSquares +32 -0
- data/ext/eigen/eigen3/Eigen/MetisSupport +28 -0
- data/ext/eigen/eigen3/Eigen/PaStiXSupport +46 -0
- data/ext/eigen/eigen3/Eigen/PardisoSupport +30 -0
- data/ext/eigen/eigen3/Eigen/QR +45 -0
- data/ext/eigen/eigen3/Eigen/QtAlignedMalloc +34 -0
- data/ext/eigen/eigen3/Eigen/SPQRSupport +29 -0
- data/ext/eigen/eigen3/Eigen/SVD +37 -0
- data/ext/eigen/eigen3/Eigen/Sparse +27 -0
- data/ext/eigen/eigen3/Eigen/SparseCore +64 -0
- data/ext/eigen/eigen3/Eigen/SparseLU +49 -0
- data/ext/eigen/eigen3/Eigen/SparseQR +33 -0
- data/ext/eigen/eigen3/Eigen/StdDeque +27 -0
- data/ext/eigen/eigen3/Eigen/StdList +26 -0
- data/ext/eigen/eigen3/Eigen/StdVector +27 -0
- data/ext/eigen/eigen3/Eigen/SuperLUSupport +59 -0
- data/ext/eigen/eigen3/Eigen/UmfPackSupport +36 -0
- data/ext/eigen/eigen3/Eigen/src/Cholesky/LDLT.h +611 -0
- data/ext/eigen/eigen3/Eigen/src/Cholesky/LLT.h +498 -0
- data/ext/eigen/eigen3/Eigen/src/Cholesky/LLT_MKL.h +102 -0
- data/ext/eigen/eigen3/Eigen/src/CholmodSupport/CholmodSupport.h +607 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Array.h +323 -0
- data/ext/eigen/eigen3/Eigen/src/Core/ArrayBase.h +226 -0
- data/ext/eigen/eigen3/Eigen/src/Core/ArrayWrapper.h +264 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Assign.h +590 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Assign_MKL.h +224 -0
- data/ext/eigen/eigen3/Eigen/src/Core/BandMatrix.h +334 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Block.h +406 -0
- data/ext/eigen/eigen3/Eigen/src/Core/BooleanRedux.h +154 -0
- data/ext/eigen/eigen3/Eigen/src/Core/CommaInitializer.h +154 -0
- data/ext/eigen/eigen3/Eigen/src/Core/CoreIterators.h +61 -0
- data/ext/eigen/eigen3/Eigen/src/Core/CwiseBinaryOp.h +230 -0
- data/ext/eigen/eigen3/Eigen/src/Core/CwiseNullaryOp.h +864 -0
- data/ext/eigen/eigen3/Eigen/src/Core/CwiseUnaryOp.h +126 -0
- data/ext/eigen/eigen3/Eigen/src/Core/CwiseUnaryView.h +139 -0
- data/ext/eigen/eigen3/Eigen/src/Core/DenseBase.h +521 -0
- data/ext/eigen/eigen3/Eigen/src/Core/DenseCoeffsBase.h +754 -0
- data/ext/eigen/eigen3/Eigen/src/Core/DenseStorage.h +434 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Diagonal.h +237 -0
- data/ext/eigen/eigen3/Eigen/src/Core/DiagonalMatrix.h +313 -0
- data/ext/eigen/eigen3/Eigen/src/Core/DiagonalProduct.h +131 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Dot.h +263 -0
- data/ext/eigen/eigen3/Eigen/src/Core/EigenBase.h +131 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Flagged.h +140 -0
- data/ext/eigen/eigen3/Eigen/src/Core/ForceAlignedAccess.h +146 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Functors.h +1026 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Fuzzy.h +150 -0
- data/ext/eigen/eigen3/Eigen/src/Core/GeneralProduct.h +635 -0
- data/ext/eigen/eigen3/Eigen/src/Core/GenericPacketMath.h +350 -0
- data/ext/eigen/eigen3/Eigen/src/Core/GlobalFunctions.h +92 -0
- data/ext/eigen/eigen3/Eigen/src/Core/IO.h +250 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Map.h +192 -0
- data/ext/eigen/eigen3/Eigen/src/Core/MapBase.h +247 -0
- data/ext/eigen/eigen3/Eigen/src/Core/MathFunctions.h +768 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Matrix.h +420 -0
- data/ext/eigen/eigen3/Eigen/src/Core/MatrixBase.h +563 -0
- data/ext/eigen/eigen3/Eigen/src/Core/NestByValue.h +111 -0
- data/ext/eigen/eigen3/Eigen/src/Core/NoAlias.h +134 -0
- data/ext/eigen/eigen3/Eigen/src/Core/NumTraits.h +150 -0
- data/ext/eigen/eigen3/Eigen/src/Core/PermutationMatrix.h +721 -0
- data/ext/eigen/eigen3/Eigen/src/Core/PlainObjectBase.h +822 -0
- data/ext/eigen/eigen3/Eigen/src/Core/ProductBase.h +290 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Random.h +152 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Redux.h +409 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Ref.h +278 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Replicate.h +177 -0
- data/ext/eigen/eigen3/Eigen/src/Core/ReturnByValue.h +99 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Reverse.h +224 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Select.h +162 -0
- data/ext/eigen/eigen3/Eigen/src/Core/SelfAdjointView.h +314 -0
- data/ext/eigen/eigen3/Eigen/src/Core/SelfCwiseBinaryOp.h +191 -0
- data/ext/eigen/eigen3/Eigen/src/Core/SolveTriangular.h +260 -0
- data/ext/eigen/eigen3/Eigen/src/Core/StableNorm.h +203 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Stride.h +108 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Swap.h +126 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Transpose.h +419 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Transpositions.h +436 -0
- data/ext/eigen/eigen3/Eigen/src/Core/TriangularMatrix.h +839 -0
- data/ext/eigen/eigen3/Eigen/src/Core/VectorBlock.h +95 -0
- data/ext/eigen/eigen3/Eigen/src/Core/VectorwiseOp.h +642 -0
- data/ext/eigen/eigen3/Eigen/src/Core/Visitor.h +237 -0
- data/ext/eigen/eigen3/Eigen/src/Core/arch/AltiVec/Complex.h +217 -0
- data/ext/eigen/eigen3/Eigen/src/Core/arch/AltiVec/PacketMath.h +501 -0
- data/ext/eigen/eigen3/Eigen/src/Core/arch/Default/Settings.h +49 -0
- data/ext/eigen/eigen3/Eigen/src/Core/arch/NEON/Complex.h +253 -0
- data/ext/eigen/eigen3/Eigen/src/Core/arch/NEON/PacketMath.h +420 -0
- data/ext/eigen/eigen3/Eigen/src/Core/arch/SSE/Complex.h +442 -0
- data/ext/eigen/eigen3/Eigen/src/Core/arch/SSE/MathFunctions.h +475 -0
- data/ext/eigen/eigen3/Eigen/src/Core/arch/SSE/PacketMath.h +649 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/CoeffBasedProduct.h +476 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h +1341 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix.h +427 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +278 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_MKL.h +146 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixMatrix_MKL.h +118 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixVector.h +566 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/GeneralMatrixVector_MKL.h +131 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/Parallelizer.h +162 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +436 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointMatrixMatrix_MKL.h +295 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector.h +281 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointMatrixVector_MKL.h +114 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointProduct.h +123 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/SelfadjointRank2Update.h +93 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix.h +427 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularMatrixMatrix_MKL.h +309 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularMatrixVector.h +348 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularMatrixVector_MKL.h +247 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularSolverMatrix.h +332 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularSolverMatrix_MKL.h +155 -0
- data/ext/eigen/eigen3/Eigen/src/Core/products/TriangularSolverVector.h +139 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/BlasUtil.h +264 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/Constants.h +451 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/DisableStupidWarnings.h +40 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/ForwardDeclarations.h +302 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/MKL_support.h +158 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/Macros.h +451 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/Memory.h +977 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/Meta.h +243 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/NonMPL2.h +3 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/ReenableStupidWarnings.h +14 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/StaticAssert.h +208 -0
- data/ext/eigen/eigen3/Eigen/src/Core/util/XprHelper.h +469 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Block.h +126 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Cwise.h +192 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/CwiseOperators.h +298 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/AlignedBox.h +159 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/All.h +115 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/AngleAxis.h +214 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Hyperplane.h +254 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/ParametrizedLine.h +141 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Quaternion.h +495 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Rotation2D.h +145 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/RotationBase.h +123 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Scaling.h +167 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Transform.h +786 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Geometry/Translation.h +184 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/LU.h +120 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Lazy.h +71 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/LeastSquares.h +169 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Macros.h +20 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/MathFunctions.h +57 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Memory.h +45 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Meta.h +75 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/Minor.h +117 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/QR.h +67 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/SVD.h +637 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/TriangularSolver.h +42 -0
- data/ext/eigen/eigen3/Eigen/src/Eigen2Support/VectorBlock.h +94 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/ComplexEigenSolver.h +341 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/ComplexSchur.h +456 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/ComplexSchur_MKL.h +94 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/EigenSolver.h +607 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +350 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +227 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/HessenbergDecomposition.h +373 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +160 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/RealQZ.h +624 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/RealSchur.h +525 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/RealSchur_MKL.h +83 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +801 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_MKL.h +92 -0
- data/ext/eigen/eigen3/Eigen/src/Eigenvalues/Tridiagonalization.h +557 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/AlignedBox.h +392 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/AngleAxis.h +233 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/EulerAngles.h +104 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/Homogeneous.h +307 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/Hyperplane.h +280 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/OrthoMethods.h +218 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/ParametrizedLine.h +195 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/Quaternion.h +776 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/Rotation2D.h +160 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/RotationBase.h +206 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/Scaling.h +166 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/Transform.h +1455 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/Translation.h +206 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/Umeyama.h +177 -0
- data/ext/eigen/eigen3/Eigen/src/Geometry/arch/Geometry_SSE.h +115 -0
- data/ext/eigen/eigen3/Eigen/src/Householder/BlockHouseholder.h +68 -0
- data/ext/eigen/eigen3/Eigen/src/Householder/Householder.h +171 -0
- data/ext/eigen/eigen3/Eigen/src/Householder/HouseholderSequence.h +441 -0
- data/ext/eigen/eigen3/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +149 -0
- data/ext/eigen/eigen3/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +263 -0
- data/ext/eigen/eigen3/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +256 -0
- data/ext/eigen/eigen3/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +282 -0
- data/ext/eigen/eigen3/Eigen/src/Jacobi/Jacobi.h +433 -0
- data/ext/eigen/eigen3/Eigen/src/LU/Determinant.h +101 -0
- data/ext/eigen/eigen3/Eigen/src/LU/FullPivLU.h +751 -0
- data/ext/eigen/eigen3/Eigen/src/LU/Inverse.h +400 -0
- data/ext/eigen/eigen3/Eigen/src/LU/PartialPivLU.h +509 -0
- data/ext/eigen/eigen3/Eigen/src/LU/PartialPivLU_MKL.h +85 -0
- data/ext/eigen/eigen3/Eigen/src/LU/arch/Inverse_SSE.h +329 -0
- data/ext/eigen/eigen3/Eigen/src/MetisSupport/MetisSupport.h +137 -0
- data/ext/eigen/eigen3/Eigen/src/OrderingMethods/Amd.h +444 -0
- data/ext/eigen/eigen3/Eigen/src/OrderingMethods/Eigen_Colamd.h +1850 -0
- data/ext/eigen/eigen3/Eigen/src/PaStiXSupport/PaStiXSupport.h +721 -0
- data/ext/eigen/eigen3/Eigen/src/PardisoSupport/PardisoSupport.h +592 -0
- data/ext/eigen/eigen3/Eigen/src/QR/ColPivHouseholderQR.h +580 -0
- data/ext/eigen/eigen3/Eigen/src/QR/ColPivHouseholderQR_MKL.h +99 -0
- data/ext/eigen/eigen3/Eigen/src/QR/FullPivHouseholderQR.h +622 -0
- data/ext/eigen/eigen3/Eigen/src/QR/HouseholderQR.h +388 -0
- data/ext/eigen/eigen3/Eigen/src/QR/HouseholderQR_MKL.h +71 -0
- data/ext/eigen/eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +338 -0
- data/ext/eigen/eigen3/Eigen/src/SVD/JacobiSVD.h +976 -0
- data/ext/eigen/eigen3/Eigen/src/SVD/JacobiSVD_MKL.h +92 -0
- data/ext/eigen/eigen3/Eigen/src/SVD/UpperBidiagonalization.h +148 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCholesky/SimplicialCholesky.h +671 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +199 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/AmbiVector.h +373 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/CompressedStorage.h +233 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +245 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/MappedSparseMatrix.h +181 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseBlock.h +537 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseColEtree.h +206 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +325 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +163 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseDenseProduct.h +311 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseDiagonalProduct.h +196 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseDot.h +101 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseFuzzy.h +26 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseMatrix.h +1262 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseMatrixBase.h +461 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparsePermutation.h +148 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseProduct.h +188 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseRedux.h +45 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseSelfAdjointView.h +507 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +150 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseTranspose.h +63 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseTriangularView.h +179 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseUtil.h +172 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseVector.h +448 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/SparseView.h +99 -0
- data/ext/eigen/eigen3/Eigen/src/SparseCore/TriangularSolver.h +334 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU.h +806 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLUImpl.h +66 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_Memory.h +227 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_Structs.h +111 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +298 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_Utils.h +80 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_column_bmod.h +180 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_column_dfs.h +177 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +106 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_gemm_kernel.h +279 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +127 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +130 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_panel_bmod.h +223 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_panel_dfs.h +258 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_pivotL.h +137 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_pruneL.h +135 -0
- data/ext/eigen/eigen3/Eigen/src/SparseLU/SparseLU_relax_snode.h +83 -0
- data/ext/eigen/eigen3/Eigen/src/SparseQR/SparseQR.h +714 -0
- data/ext/eigen/eigen3/Eigen/src/StlSupport/StdDeque.h +134 -0
- data/ext/eigen/eigen3/Eigen/src/StlSupport/StdList.h +114 -0
- data/ext/eigen/eigen3/Eigen/src/StlSupport/StdVector.h +126 -0
- data/ext/eigen/eigen3/Eigen/src/StlSupport/details.h +84 -0
- data/ext/eigen/eigen3/Eigen/src/SuperLUSupport/SuperLUSupport.h +1026 -0
- data/ext/eigen/eigen3/Eigen/src/UmfPackSupport/UmfPackSupport.h +474 -0
- data/ext/eigen/eigen3/Eigen/src/misc/Image.h +84 -0
- data/ext/eigen/eigen3/Eigen/src/misc/Kernel.h +81 -0
- data/ext/eigen/eigen3/Eigen/src/misc/Solve.h +76 -0
- data/ext/eigen/eigen3/Eigen/src/misc/SparseSolve.h +128 -0
- data/ext/eigen/eigen3/Eigen/src/misc/blas.h +658 -0
- data/ext/eigen/eigen3/Eigen/src/plugins/ArrayCwiseBinaryOps.h +253 -0
- data/ext/eigen/eigen3/Eigen/src/plugins/ArrayCwiseUnaryOps.h +187 -0
- data/ext/eigen/eigen3/Eigen/src/plugins/BlockMethods.h +935 -0
- data/ext/eigen/eigen3/Eigen/src/plugins/CommonCwiseBinaryOps.h +46 -0
- data/ext/eigen/eigen3/Eigen/src/plugins/CommonCwiseUnaryOps.h +172 -0
- data/ext/eigen/eigen3/Eigen/src/plugins/MatrixCwiseBinaryOps.h +143 -0
- data/ext/eigen/eigen3/Eigen/src/plugins/MatrixCwiseUnaryOps.h +52 -0
- data/ext/eigen/eigen3/signature_of_eigen3_matrix_library +1 -0
- data/ext/eigen/eigen_wrap.cxx +19420 -10396
- data/ext/eigen/extconf.rb +37 -2
- data/lib/eigen.rb +146 -3
- metadata +294 -7
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
/** \returns an expression of the coefficient wise product of \c *this and \a other
|
|
2
|
+
*
|
|
3
|
+
* \sa MatrixBase::cwiseProduct
|
|
4
|
+
*/
|
|
5
|
+
template<typename OtherDerived>
|
|
6
|
+
EIGEN_STRONG_INLINE const EIGEN_CWISE_PRODUCT_RETURN_TYPE(Derived,OtherDerived)
|
|
7
|
+
operator*(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
|
8
|
+
{
|
|
9
|
+
return EIGEN_CWISE_PRODUCT_RETURN_TYPE(Derived,OtherDerived)(derived(), other.derived());
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** \returns an expression of the coefficient wise quotient of \c *this and \a other
|
|
13
|
+
*
|
|
14
|
+
* \sa MatrixBase::cwiseQuotient
|
|
15
|
+
*/
|
|
16
|
+
template<typename OtherDerived>
|
|
17
|
+
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>
|
|
18
|
+
operator/(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
|
19
|
+
{
|
|
20
|
+
return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** \returns an expression of the coefficient-wise min of \c *this and \a other
|
|
24
|
+
*
|
|
25
|
+
* Example: \include Cwise_min.cpp
|
|
26
|
+
* Output: \verbinclude Cwise_min.out
|
|
27
|
+
*
|
|
28
|
+
* \sa max()
|
|
29
|
+
*/
|
|
30
|
+
EIGEN_MAKE_CWISE_BINARY_OP(min,internal::scalar_min_op)
|
|
31
|
+
|
|
32
|
+
/** \returns an expression of the coefficient-wise min of \c *this and scalar \a other
|
|
33
|
+
*
|
|
34
|
+
* \sa max()
|
|
35
|
+
*/
|
|
36
|
+
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_min_op<Scalar>, const Derived,
|
|
37
|
+
const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> >
|
|
38
|
+
#ifdef EIGEN_PARSED_BY_DOXYGEN
|
|
39
|
+
min
|
|
40
|
+
#else
|
|
41
|
+
(min)
|
|
42
|
+
#endif
|
|
43
|
+
(const Scalar &other) const
|
|
44
|
+
{
|
|
45
|
+
return (min)(Derived::PlainObject::Constant(rows(), cols(), other));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** \returns an expression of the coefficient-wise max of \c *this and \a other
|
|
49
|
+
*
|
|
50
|
+
* Example: \include Cwise_max.cpp
|
|
51
|
+
* Output: \verbinclude Cwise_max.out
|
|
52
|
+
*
|
|
53
|
+
* \sa min()
|
|
54
|
+
*/
|
|
55
|
+
EIGEN_MAKE_CWISE_BINARY_OP(max,internal::scalar_max_op)
|
|
56
|
+
|
|
57
|
+
/** \returns an expression of the coefficient-wise max of \c *this and scalar \a other
|
|
58
|
+
*
|
|
59
|
+
* \sa min()
|
|
60
|
+
*/
|
|
61
|
+
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_max_op<Scalar>, const Derived,
|
|
62
|
+
const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> >
|
|
63
|
+
#ifdef EIGEN_PARSED_BY_DOXYGEN
|
|
64
|
+
max
|
|
65
|
+
#else
|
|
66
|
+
(max)
|
|
67
|
+
#endif
|
|
68
|
+
(const Scalar &other) const
|
|
69
|
+
{
|
|
70
|
+
return (max)(Derived::PlainObject::Constant(rows(), cols(), other));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
#define EIGEN_MAKE_CWISE_COMP_OP(OP, COMPARATOR) \
|
|
75
|
+
template<typename OtherDerived> \
|
|
76
|
+
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const OtherDerived> \
|
|
77
|
+
OP(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
|
|
78
|
+
{ \
|
|
79
|
+
return CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const OtherDerived>(derived(), other.derived()); \
|
|
80
|
+
}\
|
|
81
|
+
typedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> > Cmp ## COMPARATOR ## ReturnType; \
|
|
82
|
+
typedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_ ## COMPARATOR>, const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject>, const Derived > RCmp ## COMPARATOR ## ReturnType; \
|
|
83
|
+
EIGEN_STRONG_INLINE const Cmp ## COMPARATOR ## ReturnType \
|
|
84
|
+
OP(const Scalar& s) const { \
|
|
85
|
+
return this->OP(Derived::PlainObject::Constant(rows(), cols(), s)); \
|
|
86
|
+
} \
|
|
87
|
+
friend EIGEN_STRONG_INLINE const RCmp ## COMPARATOR ## ReturnType \
|
|
88
|
+
OP(const Scalar& s, const Derived& d) { \
|
|
89
|
+
return Derived::PlainObject::Constant(d.rows(), d.cols(), s).OP(d); \
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
#define EIGEN_MAKE_CWISE_COMP_R_OP(OP, R_OP, RCOMPARATOR) \
|
|
93
|
+
template<typename OtherDerived> \
|
|
94
|
+
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_##RCOMPARATOR>, const OtherDerived, const Derived> \
|
|
95
|
+
OP(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
|
|
96
|
+
{ \
|
|
97
|
+
return CwiseBinaryOp<internal::scalar_cmp_op<Scalar, internal::cmp_##RCOMPARATOR>, const OtherDerived, const Derived>(other.derived(), derived()); \
|
|
98
|
+
} \
|
|
99
|
+
\
|
|
100
|
+
inline const RCmp ## RCOMPARATOR ## ReturnType \
|
|
101
|
+
OP(const Scalar& s) const { \
|
|
102
|
+
return Derived::PlainObject::Constant(rows(), cols(), s).R_OP(*this); \
|
|
103
|
+
} \
|
|
104
|
+
friend inline const Cmp ## RCOMPARATOR ## ReturnType \
|
|
105
|
+
OP(const Scalar& s, const Derived& d) { \
|
|
106
|
+
return d.R_OP(Derived::PlainObject::Constant(d.rows(), d.cols(), s)); \
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
/** \returns an expression of the coefficient-wise \< operator of *this and \a other
|
|
111
|
+
*
|
|
112
|
+
* Example: \include Cwise_less.cpp
|
|
113
|
+
* Output: \verbinclude Cwise_less.out
|
|
114
|
+
*
|
|
115
|
+
* \sa all(), any(), operator>(), operator<=()
|
|
116
|
+
*/
|
|
117
|
+
EIGEN_MAKE_CWISE_COMP_OP(operator<, LT)
|
|
118
|
+
|
|
119
|
+
/** \returns an expression of the coefficient-wise \<= operator of *this and \a other
|
|
120
|
+
*
|
|
121
|
+
* Example: \include Cwise_less_equal.cpp
|
|
122
|
+
* Output: \verbinclude Cwise_less_equal.out
|
|
123
|
+
*
|
|
124
|
+
* \sa all(), any(), operator>=(), operator<()
|
|
125
|
+
*/
|
|
126
|
+
EIGEN_MAKE_CWISE_COMP_OP(operator<=, LE)
|
|
127
|
+
|
|
128
|
+
/** \returns an expression of the coefficient-wise \> operator of *this and \a other
|
|
129
|
+
*
|
|
130
|
+
* Example: \include Cwise_greater.cpp
|
|
131
|
+
* Output: \verbinclude Cwise_greater.out
|
|
132
|
+
*
|
|
133
|
+
* \sa all(), any(), operator>=(), operator<()
|
|
134
|
+
*/
|
|
135
|
+
EIGEN_MAKE_CWISE_COMP_R_OP(operator>, operator<, LT)
|
|
136
|
+
|
|
137
|
+
/** \returns an expression of the coefficient-wise \>= operator of *this and \a other
|
|
138
|
+
*
|
|
139
|
+
* Example: \include Cwise_greater_equal.cpp
|
|
140
|
+
* Output: \verbinclude Cwise_greater_equal.out
|
|
141
|
+
*
|
|
142
|
+
* \sa all(), any(), operator>(), operator<=()
|
|
143
|
+
*/
|
|
144
|
+
EIGEN_MAKE_CWISE_COMP_R_OP(operator>=, operator<=, LE)
|
|
145
|
+
|
|
146
|
+
/** \returns an expression of the coefficient-wise == operator of *this and \a other
|
|
147
|
+
*
|
|
148
|
+
* \warning this performs an exact comparison, which is generally a bad idea with floating-point types.
|
|
149
|
+
* In order to check for equality between two vectors or matrices with floating-point coefficients, it is
|
|
150
|
+
* generally a far better idea to use a fuzzy comparison as provided by isApprox() and
|
|
151
|
+
* isMuchSmallerThan().
|
|
152
|
+
*
|
|
153
|
+
* Example: \include Cwise_equal_equal.cpp
|
|
154
|
+
* Output: \verbinclude Cwise_equal_equal.out
|
|
155
|
+
*
|
|
156
|
+
* \sa all(), any(), isApprox(), isMuchSmallerThan()
|
|
157
|
+
*/
|
|
158
|
+
EIGEN_MAKE_CWISE_COMP_OP(operator==, EQ)
|
|
159
|
+
|
|
160
|
+
/** \returns an expression of the coefficient-wise != operator of *this and \a other
|
|
161
|
+
*
|
|
162
|
+
* \warning this performs an exact comparison, which is generally a bad idea with floating-point types.
|
|
163
|
+
* In order to check for equality between two vectors or matrices with floating-point coefficients, it is
|
|
164
|
+
* generally a far better idea to use a fuzzy comparison as provided by isApprox() and
|
|
165
|
+
* isMuchSmallerThan().
|
|
166
|
+
*
|
|
167
|
+
* Example: \include Cwise_not_equal.cpp
|
|
168
|
+
* Output: \verbinclude Cwise_not_equal.out
|
|
169
|
+
*
|
|
170
|
+
* \sa all(), any(), isApprox(), isMuchSmallerThan()
|
|
171
|
+
*/
|
|
172
|
+
EIGEN_MAKE_CWISE_COMP_OP(operator!=, NEQ)
|
|
173
|
+
|
|
174
|
+
#undef EIGEN_MAKE_CWISE_COMP_OP
|
|
175
|
+
#undef EIGEN_MAKE_CWISE_COMP_R_OP
|
|
176
|
+
|
|
177
|
+
// scalar addition
|
|
178
|
+
|
|
179
|
+
/** \returns an expression of \c *this with each coeff incremented by the constant \a scalar
|
|
180
|
+
*
|
|
181
|
+
* Example: \include Cwise_plus.cpp
|
|
182
|
+
* Output: \verbinclude Cwise_plus.out
|
|
183
|
+
*
|
|
184
|
+
* \sa operator+=(), operator-()
|
|
185
|
+
*/
|
|
186
|
+
inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>
|
|
187
|
+
operator+(const Scalar& scalar) const
|
|
188
|
+
{
|
|
189
|
+
return CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>(derived(), internal::scalar_add_op<Scalar>(scalar));
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>
|
|
193
|
+
operator+(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
|
|
194
|
+
{
|
|
195
|
+
return other + scalar;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/** \returns an expression of \c *this with each coeff decremented by the constant \a scalar
|
|
199
|
+
*
|
|
200
|
+
* Example: \include Cwise_minus.cpp
|
|
201
|
+
* Output: \verbinclude Cwise_minus.out
|
|
202
|
+
*
|
|
203
|
+
* \sa operator+(), operator-=()
|
|
204
|
+
*/
|
|
205
|
+
inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>
|
|
206
|
+
operator-(const Scalar& scalar) const
|
|
207
|
+
{
|
|
208
|
+
return *this + (-scalar);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const Derived> >
|
|
212
|
+
operator-(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
|
|
213
|
+
{
|
|
214
|
+
return (-other) + scalar;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/** \returns an expression of the coefficient-wise && operator of *this and \a other
|
|
218
|
+
*
|
|
219
|
+
* \warning this operator is for expression of bool only.
|
|
220
|
+
*
|
|
221
|
+
* Example: \include Cwise_boolean_and.cpp
|
|
222
|
+
* Output: \verbinclude Cwise_boolean_and.out
|
|
223
|
+
*
|
|
224
|
+
* \sa operator||(), select()
|
|
225
|
+
*/
|
|
226
|
+
template<typename OtherDerived>
|
|
227
|
+
inline const CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>
|
|
228
|
+
operator&&(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
|
229
|
+
{
|
|
230
|
+
EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value),
|
|
231
|
+
THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);
|
|
232
|
+
return CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>(derived(),other.derived());
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/** \returns an expression of the coefficient-wise || operator of *this and \a other
|
|
236
|
+
*
|
|
237
|
+
* \warning this operator is for expression of bool only.
|
|
238
|
+
*
|
|
239
|
+
* Example: \include Cwise_boolean_or.cpp
|
|
240
|
+
* Output: \verbinclude Cwise_boolean_or.out
|
|
241
|
+
*
|
|
242
|
+
* \sa operator&&(), select()
|
|
243
|
+
*/
|
|
244
|
+
template<typename OtherDerived>
|
|
245
|
+
inline const CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>
|
|
246
|
+
operator||(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
|
247
|
+
{
|
|
248
|
+
EIGEN_STATIC_ASSERT((internal::is_same<bool,Scalar>::value && internal::is_same<bool,typename OtherDerived::Scalar>::value),
|
|
249
|
+
THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);
|
|
250
|
+
return CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>(derived(),other.derived());
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
/** \returns an expression of the coefficient-wise absolute value of \c *this
|
|
4
|
+
*
|
|
5
|
+
* Example: \include Cwise_abs.cpp
|
|
6
|
+
* Output: \verbinclude Cwise_abs.out
|
|
7
|
+
*
|
|
8
|
+
* \sa abs2()
|
|
9
|
+
*/
|
|
10
|
+
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs_op<Scalar>, const Derived>
|
|
11
|
+
abs() const
|
|
12
|
+
{
|
|
13
|
+
return derived();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** \returns an expression of the coefficient-wise squared absolute value of \c *this
|
|
17
|
+
*
|
|
18
|
+
* Example: \include Cwise_abs2.cpp
|
|
19
|
+
* Output: \verbinclude Cwise_abs2.out
|
|
20
|
+
*
|
|
21
|
+
* \sa abs(), square()
|
|
22
|
+
*/
|
|
23
|
+
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, const Derived>
|
|
24
|
+
abs2() const
|
|
25
|
+
{
|
|
26
|
+
return derived();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** \returns an expression of the coefficient-wise exponential of *this.
|
|
30
|
+
*
|
|
31
|
+
* Example: \include Cwise_exp.cpp
|
|
32
|
+
* Output: \verbinclude Cwise_exp.out
|
|
33
|
+
*
|
|
34
|
+
* \sa pow(), log(), sin(), cos()
|
|
35
|
+
*/
|
|
36
|
+
inline const CwiseUnaryOp<internal::scalar_exp_op<Scalar>, const Derived>
|
|
37
|
+
exp() const
|
|
38
|
+
{
|
|
39
|
+
return derived();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** \returns an expression of the coefficient-wise logarithm of *this.
|
|
43
|
+
*
|
|
44
|
+
* Example: \include Cwise_log.cpp
|
|
45
|
+
* Output: \verbinclude Cwise_log.out
|
|
46
|
+
*
|
|
47
|
+
* \sa exp()
|
|
48
|
+
*/
|
|
49
|
+
inline const CwiseUnaryOp<internal::scalar_log_op<Scalar>, const Derived>
|
|
50
|
+
log() const
|
|
51
|
+
{
|
|
52
|
+
return derived();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** \returns an expression of the coefficient-wise square root of *this.
|
|
56
|
+
*
|
|
57
|
+
* Example: \include Cwise_sqrt.cpp
|
|
58
|
+
* Output: \verbinclude Cwise_sqrt.out
|
|
59
|
+
*
|
|
60
|
+
* \sa pow(), square()
|
|
61
|
+
*/
|
|
62
|
+
inline const CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, const Derived>
|
|
63
|
+
sqrt() const
|
|
64
|
+
{
|
|
65
|
+
return derived();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** \returns an expression of the coefficient-wise cosine of *this.
|
|
69
|
+
*
|
|
70
|
+
* Example: \include Cwise_cos.cpp
|
|
71
|
+
* Output: \verbinclude Cwise_cos.out
|
|
72
|
+
*
|
|
73
|
+
* \sa sin(), acos()
|
|
74
|
+
*/
|
|
75
|
+
inline const CwiseUnaryOp<internal::scalar_cos_op<Scalar>, const Derived>
|
|
76
|
+
cos() const
|
|
77
|
+
{
|
|
78
|
+
return derived();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
/** \returns an expression of the coefficient-wise sine of *this.
|
|
83
|
+
*
|
|
84
|
+
* Example: \include Cwise_sin.cpp
|
|
85
|
+
* Output: \verbinclude Cwise_sin.out
|
|
86
|
+
*
|
|
87
|
+
* \sa cos(), asin()
|
|
88
|
+
*/
|
|
89
|
+
inline const CwiseUnaryOp<internal::scalar_sin_op<Scalar>, const Derived>
|
|
90
|
+
sin() const
|
|
91
|
+
{
|
|
92
|
+
return derived();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** \returns an expression of the coefficient-wise arc cosine of *this.
|
|
96
|
+
*
|
|
97
|
+
* Example: \include Cwise_acos.cpp
|
|
98
|
+
* Output: \verbinclude Cwise_acos.out
|
|
99
|
+
*
|
|
100
|
+
* \sa cos(), asin()
|
|
101
|
+
*/
|
|
102
|
+
inline const CwiseUnaryOp<internal::scalar_acos_op<Scalar>, const Derived>
|
|
103
|
+
acos() const
|
|
104
|
+
{
|
|
105
|
+
return derived();
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** \returns an expression of the coefficient-wise arc sine of *this.
|
|
109
|
+
*
|
|
110
|
+
* Example: \include Cwise_asin.cpp
|
|
111
|
+
* Output: \verbinclude Cwise_asin.out
|
|
112
|
+
*
|
|
113
|
+
* \sa sin(), acos()
|
|
114
|
+
*/
|
|
115
|
+
inline const CwiseUnaryOp<internal::scalar_asin_op<Scalar>, const Derived>
|
|
116
|
+
asin() const
|
|
117
|
+
{
|
|
118
|
+
return derived();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** \returns an expression of the coefficient-wise tan of *this.
|
|
122
|
+
*
|
|
123
|
+
* Example: \include Cwise_tan.cpp
|
|
124
|
+
* Output: \verbinclude Cwise_tan.out
|
|
125
|
+
*
|
|
126
|
+
* \sa cos(), sin()
|
|
127
|
+
*/
|
|
128
|
+
inline const CwiseUnaryOp<internal::scalar_tan_op<Scalar>, Derived>
|
|
129
|
+
tan() const
|
|
130
|
+
{
|
|
131
|
+
return derived();
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
/** \returns an expression of the coefficient-wise power of *this to the given exponent.
|
|
136
|
+
*
|
|
137
|
+
* Example: \include Cwise_pow.cpp
|
|
138
|
+
* Output: \verbinclude Cwise_pow.out
|
|
139
|
+
*
|
|
140
|
+
* \sa exp(), log()
|
|
141
|
+
*/
|
|
142
|
+
inline const CwiseUnaryOp<internal::scalar_pow_op<Scalar>, const Derived>
|
|
143
|
+
pow(const Scalar& exponent) const
|
|
144
|
+
{
|
|
145
|
+
return CwiseUnaryOp<internal::scalar_pow_op<Scalar>, const Derived>
|
|
146
|
+
(derived(), internal::scalar_pow_op<Scalar>(exponent));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
/** \returns an expression of the coefficient-wise inverse of *this.
|
|
151
|
+
*
|
|
152
|
+
* Example: \include Cwise_inverse.cpp
|
|
153
|
+
* Output: \verbinclude Cwise_inverse.out
|
|
154
|
+
*
|
|
155
|
+
* \sa operator/(), operator*()
|
|
156
|
+
*/
|
|
157
|
+
inline const CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const Derived>
|
|
158
|
+
inverse() const
|
|
159
|
+
{
|
|
160
|
+
return derived();
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/** \returns an expression of the coefficient-wise square of *this.
|
|
164
|
+
*
|
|
165
|
+
* Example: \include Cwise_square.cpp
|
|
166
|
+
* Output: \verbinclude Cwise_square.out
|
|
167
|
+
*
|
|
168
|
+
* \sa operator/(), operator*(), abs2()
|
|
169
|
+
*/
|
|
170
|
+
inline const CwiseUnaryOp<internal::scalar_square_op<Scalar>, const Derived>
|
|
171
|
+
square() const
|
|
172
|
+
{
|
|
173
|
+
return derived();
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/** \returns an expression of the coefficient-wise cube of *this.
|
|
177
|
+
*
|
|
178
|
+
* Example: \include Cwise_cube.cpp
|
|
179
|
+
* Output: \verbinclude Cwise_cube.out
|
|
180
|
+
*
|
|
181
|
+
* \sa square(), pow()
|
|
182
|
+
*/
|
|
183
|
+
inline const CwiseUnaryOp<internal::scalar_cube_op<Scalar>, const Derived>
|
|
184
|
+
cube() const
|
|
185
|
+
{
|
|
186
|
+
return derived();
|
|
187
|
+
}
|
|
@@ -0,0 +1,935 @@
|
|
|
1
|
+
// This file is part of Eigen, a lightweight C++ template library
|
|
2
|
+
// for linear algebra.
|
|
3
|
+
//
|
|
4
|
+
// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
|
|
5
|
+
// Copyright (C) 2006-2010 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
|
+
|
|
12
|
+
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
|
13
|
+
|
|
14
|
+
/** \internal expression type of a column */
|
|
15
|
+
typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ColXpr;
|
|
16
|
+
typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, 1, !IsRowMajor> ConstColXpr;
|
|
17
|
+
/** \internal expression type of a row */
|
|
18
|
+
typedef Block<Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowXpr;
|
|
19
|
+
typedef const Block<const Derived, 1, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowXpr;
|
|
20
|
+
/** \internal expression type of a block of whole columns */
|
|
21
|
+
typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor> ColsBlockXpr;
|
|
22
|
+
typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, Dynamic, !IsRowMajor> ConstColsBlockXpr;
|
|
23
|
+
/** \internal expression type of a block of whole rows */
|
|
24
|
+
typedef Block<Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> RowsBlockXpr;
|
|
25
|
+
typedef const Block<const Derived, Dynamic, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> ConstRowsBlockXpr;
|
|
26
|
+
/** \internal expression type of a block of whole columns */
|
|
27
|
+
template<int N> struct NColsBlockXpr { typedef Block<Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor> Type; };
|
|
28
|
+
template<int N> struct ConstNColsBlockXpr { typedef const Block<const Derived, internal::traits<Derived>::RowsAtCompileTime, N, !IsRowMajor> Type; };
|
|
29
|
+
/** \internal expression type of a block of whole rows */
|
|
30
|
+
template<int N> struct NRowsBlockXpr { typedef Block<Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> Type; };
|
|
31
|
+
template<int N> struct ConstNRowsBlockXpr { typedef const Block<const Derived, N, internal::traits<Derived>::ColsAtCompileTime, IsRowMajor> Type; };
|
|
32
|
+
|
|
33
|
+
typedef VectorBlock<Derived> SegmentReturnType;
|
|
34
|
+
typedef const VectorBlock<const Derived> ConstSegmentReturnType;
|
|
35
|
+
template<int Size> struct FixedSegmentReturnType { typedef VectorBlock<Derived, Size> Type; };
|
|
36
|
+
template<int Size> struct ConstFixedSegmentReturnType { typedef const VectorBlock<const Derived, Size> Type; };
|
|
37
|
+
|
|
38
|
+
#endif // not EIGEN_PARSED_BY_DOXYGEN
|
|
39
|
+
|
|
40
|
+
/** \returns a dynamic-size expression of a block in *this.
|
|
41
|
+
*
|
|
42
|
+
* \param startRow the first row in the block
|
|
43
|
+
* \param startCol the first column in the block
|
|
44
|
+
* \param blockRows the number of rows in the block
|
|
45
|
+
* \param blockCols the number of columns in the block
|
|
46
|
+
*
|
|
47
|
+
* Example: \include MatrixBase_block_int_int_int_int.cpp
|
|
48
|
+
* Output: \verbinclude MatrixBase_block_int_int_int_int.out
|
|
49
|
+
*
|
|
50
|
+
* \note Even though the returned expression has dynamic size, in the case
|
|
51
|
+
* when it is applied to a fixed-size matrix, it inherits a fixed maximal size,
|
|
52
|
+
* which means that evaluating it does not cause a dynamic memory allocation.
|
|
53
|
+
*
|
|
54
|
+
* \sa class Block, block(Index,Index)
|
|
55
|
+
*/
|
|
56
|
+
inline Block<Derived> block(Index startRow, Index startCol, Index blockRows, Index blockCols)
|
|
57
|
+
{
|
|
58
|
+
return Block<Derived>(derived(), startRow, startCol, blockRows, blockCols);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** This is the const version of block(Index,Index,Index,Index). */
|
|
62
|
+
inline const Block<const Derived> block(Index startRow, Index startCol, Index blockRows, Index blockCols) const
|
|
63
|
+
{
|
|
64
|
+
return Block<const Derived>(derived(), startRow, startCol, blockRows, blockCols);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
/** \returns a dynamic-size expression of a top-right corner of *this.
|
|
71
|
+
*
|
|
72
|
+
* \param cRows the number of rows in the corner
|
|
73
|
+
* \param cCols the number of columns in the corner
|
|
74
|
+
*
|
|
75
|
+
* Example: \include MatrixBase_topRightCorner_int_int.cpp
|
|
76
|
+
* Output: \verbinclude MatrixBase_topRightCorner_int_int.out
|
|
77
|
+
*
|
|
78
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
79
|
+
*/
|
|
80
|
+
inline Block<Derived> topRightCorner(Index cRows, Index cCols)
|
|
81
|
+
{
|
|
82
|
+
return Block<Derived>(derived(), 0, cols() - cCols, cRows, cCols);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** This is the const version of topRightCorner(Index, Index).*/
|
|
86
|
+
inline const Block<const Derived> topRightCorner(Index cRows, Index cCols) const
|
|
87
|
+
{
|
|
88
|
+
return Block<const Derived>(derived(), 0, cols() - cCols, cRows, cCols);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** \returns an expression of a fixed-size top-right corner of *this.
|
|
92
|
+
*
|
|
93
|
+
* \tparam CRows the number of rows in the corner
|
|
94
|
+
* \tparam CCols the number of columns in the corner
|
|
95
|
+
*
|
|
96
|
+
* Example: \include MatrixBase_template_int_int_topRightCorner.cpp
|
|
97
|
+
* Output: \verbinclude MatrixBase_template_int_int_topRightCorner.out
|
|
98
|
+
*
|
|
99
|
+
* \sa class Block, block<int,int>(Index,Index)
|
|
100
|
+
*/
|
|
101
|
+
template<int CRows, int CCols>
|
|
102
|
+
inline Block<Derived, CRows, CCols> topRightCorner()
|
|
103
|
+
{
|
|
104
|
+
return Block<Derived, CRows, CCols>(derived(), 0, cols() - CCols);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** This is the const version of topRightCorner<int, int>().*/
|
|
108
|
+
template<int CRows, int CCols>
|
|
109
|
+
inline const Block<const Derived, CRows, CCols> topRightCorner() const
|
|
110
|
+
{
|
|
111
|
+
return Block<const Derived, CRows, CCols>(derived(), 0, cols() - CCols);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** \returns an expression of a top-right corner of *this.
|
|
115
|
+
*
|
|
116
|
+
* \tparam CRows number of rows in corner as specified at compile-time
|
|
117
|
+
* \tparam CCols number of columns in corner as specified at compile-time
|
|
118
|
+
* \param cRows number of rows in corner as specified at run-time
|
|
119
|
+
* \param cCols number of columns in corner as specified at run-time
|
|
120
|
+
*
|
|
121
|
+
* This function is mainly useful for corners where the number of rows is specified at compile-time
|
|
122
|
+
* and the number of columns is specified at run-time, or vice versa. The compile-time and run-time
|
|
123
|
+
* information should not contradict. In other words, \a cRows should equal \a CRows unless
|
|
124
|
+
* \a CRows is \a Dynamic, and the same for the number of columns.
|
|
125
|
+
*
|
|
126
|
+
* Example: \include MatrixBase_template_int_int_topRightCorner_int_int.cpp
|
|
127
|
+
* Output: \verbinclude MatrixBase_template_int_int_topRightCorner_int_int.out
|
|
128
|
+
*
|
|
129
|
+
* \sa class Block
|
|
130
|
+
*/
|
|
131
|
+
template<int CRows, int CCols>
|
|
132
|
+
inline Block<Derived, CRows, CCols> topRightCorner(Index cRows, Index cCols)
|
|
133
|
+
{
|
|
134
|
+
return Block<Derived, CRows, CCols>(derived(), 0, cols() - cCols, cRows, cCols);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** This is the const version of topRightCorner<int, int>(Index, Index).*/
|
|
138
|
+
template<int CRows, int CCols>
|
|
139
|
+
inline const Block<const Derived, CRows, CCols> topRightCorner(Index cRows, Index cCols) const
|
|
140
|
+
{
|
|
141
|
+
return Block<const Derived, CRows, CCols>(derived(), 0, cols() - cCols, cRows, cCols);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
/** \returns a dynamic-size expression of a top-left corner of *this.
|
|
147
|
+
*
|
|
148
|
+
* \param cRows the number of rows in the corner
|
|
149
|
+
* \param cCols the number of columns in the corner
|
|
150
|
+
*
|
|
151
|
+
* Example: \include MatrixBase_topLeftCorner_int_int.cpp
|
|
152
|
+
* Output: \verbinclude MatrixBase_topLeftCorner_int_int.out
|
|
153
|
+
*
|
|
154
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
155
|
+
*/
|
|
156
|
+
inline Block<Derived> topLeftCorner(Index cRows, Index cCols)
|
|
157
|
+
{
|
|
158
|
+
return Block<Derived>(derived(), 0, 0, cRows, cCols);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** This is the const version of topLeftCorner(Index, Index).*/
|
|
162
|
+
inline const Block<const Derived> topLeftCorner(Index cRows, Index cCols) const
|
|
163
|
+
{
|
|
164
|
+
return Block<const Derived>(derived(), 0, 0, cRows, cCols);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** \returns an expression of a fixed-size top-left corner of *this.
|
|
168
|
+
*
|
|
169
|
+
* The template parameters CRows and CCols are the number of rows and columns in the corner.
|
|
170
|
+
*
|
|
171
|
+
* Example: \include MatrixBase_template_int_int_topLeftCorner.cpp
|
|
172
|
+
* Output: \verbinclude MatrixBase_template_int_int_topLeftCorner.out
|
|
173
|
+
*
|
|
174
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
175
|
+
*/
|
|
176
|
+
template<int CRows, int CCols>
|
|
177
|
+
inline Block<Derived, CRows, CCols> topLeftCorner()
|
|
178
|
+
{
|
|
179
|
+
return Block<Derived, CRows, CCols>(derived(), 0, 0);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** This is the const version of topLeftCorner<int, int>().*/
|
|
183
|
+
template<int CRows, int CCols>
|
|
184
|
+
inline const Block<const Derived, CRows, CCols> topLeftCorner() const
|
|
185
|
+
{
|
|
186
|
+
return Block<const Derived, CRows, CCols>(derived(), 0, 0);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** \returns an expression of a top-left corner of *this.
|
|
190
|
+
*
|
|
191
|
+
* \tparam CRows number of rows in corner as specified at compile-time
|
|
192
|
+
* \tparam CCols number of columns in corner as specified at compile-time
|
|
193
|
+
* \param cRows number of rows in corner as specified at run-time
|
|
194
|
+
* \param cCols number of columns in corner as specified at run-time
|
|
195
|
+
*
|
|
196
|
+
* This function is mainly useful for corners where the number of rows is specified at compile-time
|
|
197
|
+
* and the number of columns is specified at run-time, or vice versa. The compile-time and run-time
|
|
198
|
+
* information should not contradict. In other words, \a cRows should equal \a CRows unless
|
|
199
|
+
* \a CRows is \a Dynamic, and the same for the number of columns.
|
|
200
|
+
*
|
|
201
|
+
* Example: \include MatrixBase_template_int_int_topLeftCorner_int_int.cpp
|
|
202
|
+
* Output: \verbinclude MatrixBase_template_int_int_topLeftCorner_int_int.out
|
|
203
|
+
*
|
|
204
|
+
* \sa class Block
|
|
205
|
+
*/
|
|
206
|
+
template<int CRows, int CCols>
|
|
207
|
+
inline Block<Derived, CRows, CCols> topLeftCorner(Index cRows, Index cCols)
|
|
208
|
+
{
|
|
209
|
+
return Block<Derived, CRows, CCols>(derived(), 0, 0, cRows, cCols);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/** This is the const version of topLeftCorner<int, int>(Index, Index).*/
|
|
213
|
+
template<int CRows, int CCols>
|
|
214
|
+
inline const Block<const Derived, CRows, CCols> topLeftCorner(Index cRows, Index cCols) const
|
|
215
|
+
{
|
|
216
|
+
return Block<const Derived, CRows, CCols>(derived(), 0, 0, cRows, cCols);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
/** \returns a dynamic-size expression of a bottom-right corner of *this.
|
|
222
|
+
*
|
|
223
|
+
* \param cRows the number of rows in the corner
|
|
224
|
+
* \param cCols the number of columns in the corner
|
|
225
|
+
*
|
|
226
|
+
* Example: \include MatrixBase_bottomRightCorner_int_int.cpp
|
|
227
|
+
* Output: \verbinclude MatrixBase_bottomRightCorner_int_int.out
|
|
228
|
+
*
|
|
229
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
230
|
+
*/
|
|
231
|
+
inline Block<Derived> bottomRightCorner(Index cRows, Index cCols)
|
|
232
|
+
{
|
|
233
|
+
return Block<Derived>(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/** This is the const version of bottomRightCorner(Index, Index).*/
|
|
237
|
+
inline const Block<const Derived> bottomRightCorner(Index cRows, Index cCols) const
|
|
238
|
+
{
|
|
239
|
+
return Block<const Derived>(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/** \returns an expression of a fixed-size bottom-right corner of *this.
|
|
243
|
+
*
|
|
244
|
+
* The template parameters CRows and CCols are the number of rows and columns in the corner.
|
|
245
|
+
*
|
|
246
|
+
* Example: \include MatrixBase_template_int_int_bottomRightCorner.cpp
|
|
247
|
+
* Output: \verbinclude MatrixBase_template_int_int_bottomRightCorner.out
|
|
248
|
+
*
|
|
249
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
250
|
+
*/
|
|
251
|
+
template<int CRows, int CCols>
|
|
252
|
+
inline Block<Derived, CRows, CCols> bottomRightCorner()
|
|
253
|
+
{
|
|
254
|
+
return Block<Derived, CRows, CCols>(derived(), rows() - CRows, cols() - CCols);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/** This is the const version of bottomRightCorner<int, int>().*/
|
|
258
|
+
template<int CRows, int CCols>
|
|
259
|
+
inline const Block<const Derived, CRows, CCols> bottomRightCorner() const
|
|
260
|
+
{
|
|
261
|
+
return Block<const Derived, CRows, CCols>(derived(), rows() - CRows, cols() - CCols);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/** \returns an expression of a bottom-right corner of *this.
|
|
265
|
+
*
|
|
266
|
+
* \tparam CRows number of rows in corner as specified at compile-time
|
|
267
|
+
* \tparam CCols number of columns in corner as specified at compile-time
|
|
268
|
+
* \param cRows number of rows in corner as specified at run-time
|
|
269
|
+
* \param cCols number of columns in corner as specified at run-time
|
|
270
|
+
*
|
|
271
|
+
* This function is mainly useful for corners where the number of rows is specified at compile-time
|
|
272
|
+
* and the number of columns is specified at run-time, or vice versa. The compile-time and run-time
|
|
273
|
+
* information should not contradict. In other words, \a cRows should equal \a CRows unless
|
|
274
|
+
* \a CRows is \a Dynamic, and the same for the number of columns.
|
|
275
|
+
*
|
|
276
|
+
* Example: \include MatrixBase_template_int_int_bottomRightCorner_int_int.cpp
|
|
277
|
+
* Output: \verbinclude MatrixBase_template_int_int_bottomRightCorner_int_int.out
|
|
278
|
+
*
|
|
279
|
+
* \sa class Block
|
|
280
|
+
*/
|
|
281
|
+
template<int CRows, int CCols>
|
|
282
|
+
inline Block<Derived, CRows, CCols> bottomRightCorner(Index cRows, Index cCols)
|
|
283
|
+
{
|
|
284
|
+
return Block<Derived, CRows, CCols>(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/** This is the const version of bottomRightCorner<int, int>(Index, Index).*/
|
|
288
|
+
template<int CRows, int CCols>
|
|
289
|
+
inline const Block<const Derived, CRows, CCols> bottomRightCorner(Index cRows, Index cCols) const
|
|
290
|
+
{
|
|
291
|
+
return Block<const Derived, CRows, CCols>(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
/** \returns a dynamic-size expression of a bottom-left corner of *this.
|
|
297
|
+
*
|
|
298
|
+
* \param cRows the number of rows in the corner
|
|
299
|
+
* \param cCols the number of columns in the corner
|
|
300
|
+
*
|
|
301
|
+
* Example: \include MatrixBase_bottomLeftCorner_int_int.cpp
|
|
302
|
+
* Output: \verbinclude MatrixBase_bottomLeftCorner_int_int.out
|
|
303
|
+
*
|
|
304
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
305
|
+
*/
|
|
306
|
+
inline Block<Derived> bottomLeftCorner(Index cRows, Index cCols)
|
|
307
|
+
{
|
|
308
|
+
return Block<Derived>(derived(), rows() - cRows, 0, cRows, cCols);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/** This is the const version of bottomLeftCorner(Index, Index).*/
|
|
312
|
+
inline const Block<const Derived> bottomLeftCorner(Index cRows, Index cCols) const
|
|
313
|
+
{
|
|
314
|
+
return Block<const Derived>(derived(), rows() - cRows, 0, cRows, cCols);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/** \returns an expression of a fixed-size bottom-left corner of *this.
|
|
318
|
+
*
|
|
319
|
+
* The template parameters CRows and CCols are the number of rows and columns in the corner.
|
|
320
|
+
*
|
|
321
|
+
* Example: \include MatrixBase_template_int_int_bottomLeftCorner.cpp
|
|
322
|
+
* Output: \verbinclude MatrixBase_template_int_int_bottomLeftCorner.out
|
|
323
|
+
*
|
|
324
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
325
|
+
*/
|
|
326
|
+
template<int CRows, int CCols>
|
|
327
|
+
inline Block<Derived, CRows, CCols> bottomLeftCorner()
|
|
328
|
+
{
|
|
329
|
+
return Block<Derived, CRows, CCols>(derived(), rows() - CRows, 0);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/** This is the const version of bottomLeftCorner<int, int>().*/
|
|
333
|
+
template<int CRows, int CCols>
|
|
334
|
+
inline const Block<const Derived, CRows, CCols> bottomLeftCorner() const
|
|
335
|
+
{
|
|
336
|
+
return Block<const Derived, CRows, CCols>(derived(), rows() - CRows, 0);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/** \returns an expression of a bottom-left corner of *this.
|
|
340
|
+
*
|
|
341
|
+
* \tparam CRows number of rows in corner as specified at compile-time
|
|
342
|
+
* \tparam CCols number of columns in corner as specified at compile-time
|
|
343
|
+
* \param cRows number of rows in corner as specified at run-time
|
|
344
|
+
* \param cCols number of columns in corner as specified at run-time
|
|
345
|
+
*
|
|
346
|
+
* This function is mainly useful for corners where the number of rows is specified at compile-time
|
|
347
|
+
* and the number of columns is specified at run-time, or vice versa. The compile-time and run-time
|
|
348
|
+
* information should not contradict. In other words, \a cRows should equal \a CRows unless
|
|
349
|
+
* \a CRows is \a Dynamic, and the same for the number of columns.
|
|
350
|
+
*
|
|
351
|
+
* Example: \include MatrixBase_template_int_int_bottomLeftCorner_int_int.cpp
|
|
352
|
+
* Output: \verbinclude MatrixBase_template_int_int_bottomLeftCorner_int_int.out
|
|
353
|
+
*
|
|
354
|
+
* \sa class Block
|
|
355
|
+
*/
|
|
356
|
+
template<int CRows, int CCols>
|
|
357
|
+
inline Block<Derived, CRows, CCols> bottomLeftCorner(Index cRows, Index cCols)
|
|
358
|
+
{
|
|
359
|
+
return Block<Derived, CRows, CCols>(derived(), rows() - cRows, 0, cRows, cCols);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/** This is the const version of bottomLeftCorner<int, int>(Index, Index).*/
|
|
363
|
+
template<int CRows, int CCols>
|
|
364
|
+
inline const Block<const Derived, CRows, CCols> bottomLeftCorner(Index cRows, Index cCols) const
|
|
365
|
+
{
|
|
366
|
+
return Block<const Derived, CRows, CCols>(derived(), rows() - cRows, 0, cRows, cCols);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
/** \returns a block consisting of the top rows of *this.
|
|
372
|
+
*
|
|
373
|
+
* \param n the number of rows in the block
|
|
374
|
+
*
|
|
375
|
+
* Example: \include MatrixBase_topRows_int.cpp
|
|
376
|
+
* Output: \verbinclude MatrixBase_topRows_int.out
|
|
377
|
+
*
|
|
378
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
379
|
+
*/
|
|
380
|
+
inline RowsBlockXpr topRows(Index n)
|
|
381
|
+
{
|
|
382
|
+
return RowsBlockXpr(derived(), 0, 0, n, cols());
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/** This is the const version of topRows(Index).*/
|
|
386
|
+
inline ConstRowsBlockXpr topRows(Index n) const
|
|
387
|
+
{
|
|
388
|
+
return ConstRowsBlockXpr(derived(), 0, 0, n, cols());
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/** \returns a block consisting of the top rows of *this.
|
|
392
|
+
*
|
|
393
|
+
* \tparam N the number of rows in the block as specified at compile-time
|
|
394
|
+
* \param n the number of rows in the block as specified at run-time
|
|
395
|
+
*
|
|
396
|
+
* The compile-time and run-time information should not contradict. In other words,
|
|
397
|
+
* \a n should equal \a N unless \a N is \a Dynamic.
|
|
398
|
+
*
|
|
399
|
+
* Example: \include MatrixBase_template_int_topRows.cpp
|
|
400
|
+
* Output: \verbinclude MatrixBase_template_int_topRows.out
|
|
401
|
+
*
|
|
402
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
403
|
+
*/
|
|
404
|
+
template<int N>
|
|
405
|
+
inline typename NRowsBlockXpr<N>::Type topRows(Index n = N)
|
|
406
|
+
{
|
|
407
|
+
return typename NRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/** This is the const version of topRows<int>().*/
|
|
411
|
+
template<int N>
|
|
412
|
+
inline typename ConstNRowsBlockXpr<N>::Type topRows(Index n = N) const
|
|
413
|
+
{
|
|
414
|
+
return typename ConstNRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
/** \returns a block consisting of the bottom rows of *this.
|
|
420
|
+
*
|
|
421
|
+
* \param n the number of rows in the block
|
|
422
|
+
*
|
|
423
|
+
* Example: \include MatrixBase_bottomRows_int.cpp
|
|
424
|
+
* Output: \verbinclude MatrixBase_bottomRows_int.out
|
|
425
|
+
*
|
|
426
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
427
|
+
*/
|
|
428
|
+
inline RowsBlockXpr bottomRows(Index n)
|
|
429
|
+
{
|
|
430
|
+
return RowsBlockXpr(derived(), rows() - n, 0, n, cols());
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
/** This is the const version of bottomRows(Index).*/
|
|
434
|
+
inline ConstRowsBlockXpr bottomRows(Index n) const
|
|
435
|
+
{
|
|
436
|
+
return ConstRowsBlockXpr(derived(), rows() - n, 0, n, cols());
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/** \returns a block consisting of the bottom rows of *this.
|
|
440
|
+
*
|
|
441
|
+
* \tparam N the number of rows in the block as specified at compile-time
|
|
442
|
+
* \param n the number of rows in the block as specified at run-time
|
|
443
|
+
*
|
|
444
|
+
* The compile-time and run-time information should not contradict. In other words,
|
|
445
|
+
* \a n should equal \a N unless \a N is \a Dynamic.
|
|
446
|
+
*
|
|
447
|
+
* Example: \include MatrixBase_template_int_bottomRows.cpp
|
|
448
|
+
* Output: \verbinclude MatrixBase_template_int_bottomRows.out
|
|
449
|
+
*
|
|
450
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
451
|
+
*/
|
|
452
|
+
template<int N>
|
|
453
|
+
inline typename NRowsBlockXpr<N>::Type bottomRows(Index n = N)
|
|
454
|
+
{
|
|
455
|
+
return typename NRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/** This is the const version of bottomRows<int>().*/
|
|
459
|
+
template<int N>
|
|
460
|
+
inline typename ConstNRowsBlockXpr<N>::Type bottomRows(Index n = N) const
|
|
461
|
+
{
|
|
462
|
+
return typename ConstNRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
/** \returns a block consisting of a range of rows of *this.
|
|
468
|
+
*
|
|
469
|
+
* \param startRow the index of the first row in the block
|
|
470
|
+
* \param n the number of rows in the block
|
|
471
|
+
*
|
|
472
|
+
* Example: \include DenseBase_middleRows_int.cpp
|
|
473
|
+
* Output: \verbinclude DenseBase_middleRows_int.out
|
|
474
|
+
*
|
|
475
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
476
|
+
*/
|
|
477
|
+
inline RowsBlockXpr middleRows(Index startRow, Index n)
|
|
478
|
+
{
|
|
479
|
+
return RowsBlockXpr(derived(), startRow, 0, n, cols());
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/** This is the const version of middleRows(Index,Index).*/
|
|
483
|
+
inline ConstRowsBlockXpr middleRows(Index startRow, Index n) const
|
|
484
|
+
{
|
|
485
|
+
return ConstRowsBlockXpr(derived(), startRow, 0, n, cols());
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/** \returns a block consisting of a range of rows of *this.
|
|
489
|
+
*
|
|
490
|
+
* \tparam N the number of rows in the block as specified at compile-time
|
|
491
|
+
* \param startRow the index of the first row in the block
|
|
492
|
+
* \param n the number of rows in the block as specified at run-time
|
|
493
|
+
*
|
|
494
|
+
* The compile-time and run-time information should not contradict. In other words,
|
|
495
|
+
* \a n should equal \a N unless \a N is \a Dynamic.
|
|
496
|
+
*
|
|
497
|
+
* Example: \include DenseBase_template_int_middleRows.cpp
|
|
498
|
+
* Output: \verbinclude DenseBase_template_int_middleRows.out
|
|
499
|
+
*
|
|
500
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
501
|
+
*/
|
|
502
|
+
template<int N>
|
|
503
|
+
inline typename NRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N)
|
|
504
|
+
{
|
|
505
|
+
return typename NRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
/** This is the const version of middleRows<int>().*/
|
|
509
|
+
template<int N>
|
|
510
|
+
inline typename ConstNRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N) const
|
|
511
|
+
{
|
|
512
|
+
return typename ConstNRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
/** \returns a block consisting of the left columns of *this.
|
|
518
|
+
*
|
|
519
|
+
* \param n the number of columns in the block
|
|
520
|
+
*
|
|
521
|
+
* Example: \include MatrixBase_leftCols_int.cpp
|
|
522
|
+
* Output: \verbinclude MatrixBase_leftCols_int.out
|
|
523
|
+
*
|
|
524
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
525
|
+
*/
|
|
526
|
+
inline ColsBlockXpr leftCols(Index n)
|
|
527
|
+
{
|
|
528
|
+
return ColsBlockXpr(derived(), 0, 0, rows(), n);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
/** This is the const version of leftCols(Index).*/
|
|
532
|
+
inline ConstColsBlockXpr leftCols(Index n) const
|
|
533
|
+
{
|
|
534
|
+
return ConstColsBlockXpr(derived(), 0, 0, rows(), n);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/** \returns a block consisting of the left columns of *this.
|
|
538
|
+
*
|
|
539
|
+
* \tparam N the number of columns in the block as specified at compile-time
|
|
540
|
+
* \param n the number of columns in the block as specified at run-time
|
|
541
|
+
*
|
|
542
|
+
* The compile-time and run-time information should not contradict. In other words,
|
|
543
|
+
* \a n should equal \a N unless \a N is \a Dynamic.
|
|
544
|
+
*
|
|
545
|
+
* Example: \include MatrixBase_template_int_leftCols.cpp
|
|
546
|
+
* Output: \verbinclude MatrixBase_template_int_leftCols.out
|
|
547
|
+
*
|
|
548
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
549
|
+
*/
|
|
550
|
+
template<int N>
|
|
551
|
+
inline typename NColsBlockXpr<N>::Type leftCols(Index n = N)
|
|
552
|
+
{
|
|
553
|
+
return typename NColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
/** This is the const version of leftCols<int>().*/
|
|
557
|
+
template<int N>
|
|
558
|
+
inline typename ConstNColsBlockXpr<N>::Type leftCols(Index n = N) const
|
|
559
|
+
{
|
|
560
|
+
return typename ConstNColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
/** \returns a block consisting of the right columns of *this.
|
|
566
|
+
*
|
|
567
|
+
* \param n the number of columns in the block
|
|
568
|
+
*
|
|
569
|
+
* Example: \include MatrixBase_rightCols_int.cpp
|
|
570
|
+
* Output: \verbinclude MatrixBase_rightCols_int.out
|
|
571
|
+
*
|
|
572
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
573
|
+
*/
|
|
574
|
+
inline ColsBlockXpr rightCols(Index n)
|
|
575
|
+
{
|
|
576
|
+
return ColsBlockXpr(derived(), 0, cols() - n, rows(), n);
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
/** This is the const version of rightCols(Index).*/
|
|
580
|
+
inline ConstColsBlockXpr rightCols(Index n) const
|
|
581
|
+
{
|
|
582
|
+
return ConstColsBlockXpr(derived(), 0, cols() - n, rows(), n);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
/** \returns a block consisting of the right columns of *this.
|
|
586
|
+
*
|
|
587
|
+
* \tparam N the number of columns in the block as specified at compile-time
|
|
588
|
+
* \param n the number of columns in the block as specified at run-time
|
|
589
|
+
*
|
|
590
|
+
* The compile-time and run-time information should not contradict. In other words,
|
|
591
|
+
* \a n should equal \a N unless \a N is \a Dynamic.
|
|
592
|
+
*
|
|
593
|
+
* Example: \include MatrixBase_template_int_rightCols.cpp
|
|
594
|
+
* Output: \verbinclude MatrixBase_template_int_rightCols.out
|
|
595
|
+
*
|
|
596
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
597
|
+
*/
|
|
598
|
+
template<int N>
|
|
599
|
+
inline typename NColsBlockXpr<N>::Type rightCols(Index n = N)
|
|
600
|
+
{
|
|
601
|
+
return typename NColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
/** This is the const version of rightCols<int>().*/
|
|
605
|
+
template<int N>
|
|
606
|
+
inline typename ConstNColsBlockXpr<N>::Type rightCols(Index n = N) const
|
|
607
|
+
{
|
|
608
|
+
return typename ConstNColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
/** \returns a block consisting of a range of columns of *this.
|
|
614
|
+
*
|
|
615
|
+
* \param startCol the index of the first column in the block
|
|
616
|
+
* \param numCols the number of columns in the block
|
|
617
|
+
*
|
|
618
|
+
* Example: \include DenseBase_middleCols_int.cpp
|
|
619
|
+
* Output: \verbinclude DenseBase_middleCols_int.out
|
|
620
|
+
*
|
|
621
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
622
|
+
*/
|
|
623
|
+
inline ColsBlockXpr middleCols(Index startCol, Index numCols)
|
|
624
|
+
{
|
|
625
|
+
return ColsBlockXpr(derived(), 0, startCol, rows(), numCols);
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/** This is the const version of middleCols(Index,Index).*/
|
|
629
|
+
inline ConstColsBlockXpr middleCols(Index startCol, Index numCols) const
|
|
630
|
+
{
|
|
631
|
+
return ConstColsBlockXpr(derived(), 0, startCol, rows(), numCols);
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/** \returns a block consisting of a range of columns of *this.
|
|
635
|
+
*
|
|
636
|
+
* \tparam N the number of columns in the block as specified at compile-time
|
|
637
|
+
* \param startCol the index of the first column in the block
|
|
638
|
+
* \param n the number of columns in the block as specified at run-time
|
|
639
|
+
*
|
|
640
|
+
* The compile-time and run-time information should not contradict. In other words,
|
|
641
|
+
* \a n should equal \a N unless \a N is \a Dynamic.
|
|
642
|
+
*
|
|
643
|
+
* Example: \include DenseBase_template_int_middleCols.cpp
|
|
644
|
+
* Output: \verbinclude DenseBase_template_int_middleCols.out
|
|
645
|
+
*
|
|
646
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
647
|
+
*/
|
|
648
|
+
template<int N>
|
|
649
|
+
inline typename NColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N)
|
|
650
|
+
{
|
|
651
|
+
return typename NColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/** This is the const version of middleCols<int>().*/
|
|
655
|
+
template<int N>
|
|
656
|
+
inline typename ConstNColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N) const
|
|
657
|
+
{
|
|
658
|
+
return typename ConstNColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
/** \returns a fixed-size expression of a block in *this.
|
|
664
|
+
*
|
|
665
|
+
* The template parameters \a BlockRows and \a BlockCols are the number of
|
|
666
|
+
* rows and columns in the block.
|
|
667
|
+
*
|
|
668
|
+
* \param startRow the first row in the block
|
|
669
|
+
* \param startCol the first column in the block
|
|
670
|
+
*
|
|
671
|
+
* Example: \include MatrixBase_block_int_int.cpp
|
|
672
|
+
* Output: \verbinclude MatrixBase_block_int_int.out
|
|
673
|
+
*
|
|
674
|
+
* \note since block is a templated member, the keyword template has to be used
|
|
675
|
+
* if the matrix type is also a template parameter: \code m.template block<3,3>(1,1); \endcode
|
|
676
|
+
*
|
|
677
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
678
|
+
*/
|
|
679
|
+
template<int BlockRows, int BlockCols>
|
|
680
|
+
inline Block<Derived, BlockRows, BlockCols> block(Index startRow, Index startCol)
|
|
681
|
+
{
|
|
682
|
+
return Block<Derived, BlockRows, BlockCols>(derived(), startRow, startCol);
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
/** This is the const version of block<>(Index, Index). */
|
|
686
|
+
template<int BlockRows, int BlockCols>
|
|
687
|
+
inline const Block<const Derived, BlockRows, BlockCols> block(Index startRow, Index startCol) const
|
|
688
|
+
{
|
|
689
|
+
return Block<const Derived, BlockRows, BlockCols>(derived(), startRow, startCol);
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
/** \returns an expression of a block in *this.
|
|
693
|
+
*
|
|
694
|
+
* \tparam BlockRows number of rows in block as specified at compile-time
|
|
695
|
+
* \tparam BlockCols number of columns in block as specified at compile-time
|
|
696
|
+
* \param startRow the first row in the block
|
|
697
|
+
* \param startCol the first column in the block
|
|
698
|
+
* \param blockRows number of rows in block as specified at run-time
|
|
699
|
+
* \param blockCols number of columns in block as specified at run-time
|
|
700
|
+
*
|
|
701
|
+
* This function is mainly useful for blocks where the number of rows is specified at compile-time
|
|
702
|
+
* and the number of columns is specified at run-time, or vice versa. The compile-time and run-time
|
|
703
|
+
* information should not contradict. In other words, \a blockRows should equal \a BlockRows unless
|
|
704
|
+
* \a BlockRows is \a Dynamic, and the same for the number of columns.
|
|
705
|
+
*
|
|
706
|
+
* Example: \include MatrixBase_template_int_int_block_int_int_int_int.cpp
|
|
707
|
+
* Output: \verbinclude MatrixBase_template_int_int_block_int_int_int_int.cpp
|
|
708
|
+
*
|
|
709
|
+
* \sa class Block, block(Index,Index,Index,Index)
|
|
710
|
+
*/
|
|
711
|
+
template<int BlockRows, int BlockCols>
|
|
712
|
+
inline Block<Derived, BlockRows, BlockCols> block(Index startRow, Index startCol,
|
|
713
|
+
Index blockRows, Index blockCols)
|
|
714
|
+
{
|
|
715
|
+
return Block<Derived, BlockRows, BlockCols>(derived(), startRow, startCol, blockRows, blockCols);
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/** This is the const version of block<>(Index, Index, Index, Index). */
|
|
719
|
+
template<int BlockRows, int BlockCols>
|
|
720
|
+
inline const Block<const Derived, BlockRows, BlockCols> block(Index startRow, Index startCol,
|
|
721
|
+
Index blockRows, Index blockCols) const
|
|
722
|
+
{
|
|
723
|
+
return Block<const Derived, BlockRows, BlockCols>(derived(), startRow, startCol, blockRows, blockCols);
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
/** \returns an expression of the \a i-th column of *this. Note that the numbering starts at 0.
|
|
727
|
+
*
|
|
728
|
+
* Example: \include MatrixBase_col.cpp
|
|
729
|
+
* Output: \verbinclude MatrixBase_col.out
|
|
730
|
+
*
|
|
731
|
+
* \sa row(), class Block */
|
|
732
|
+
inline ColXpr col(Index i)
|
|
733
|
+
{
|
|
734
|
+
return ColXpr(derived(), i);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
/** This is the const version of col(). */
|
|
738
|
+
inline ConstColXpr col(Index i) const
|
|
739
|
+
{
|
|
740
|
+
return ConstColXpr(derived(), i);
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
/** \returns an expression of the \a i-th row of *this. Note that the numbering starts at 0.
|
|
744
|
+
*
|
|
745
|
+
* Example: \include MatrixBase_row.cpp
|
|
746
|
+
* Output: \verbinclude MatrixBase_row.out
|
|
747
|
+
*
|
|
748
|
+
* \sa col(), class Block */
|
|
749
|
+
inline RowXpr row(Index i)
|
|
750
|
+
{
|
|
751
|
+
return RowXpr(derived(), i);
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
/** This is the const version of row(). */
|
|
755
|
+
inline ConstRowXpr row(Index i) const
|
|
756
|
+
{
|
|
757
|
+
return ConstRowXpr(derived(), i);
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
/** \returns a dynamic-size expression of a segment (i.e. a vector block) in *this.
|
|
761
|
+
*
|
|
762
|
+
* \only_for_vectors
|
|
763
|
+
*
|
|
764
|
+
* \param start the first coefficient in the segment
|
|
765
|
+
* \param n the number of coefficients in the segment
|
|
766
|
+
*
|
|
767
|
+
* Example: \include MatrixBase_segment_int_int.cpp
|
|
768
|
+
* Output: \verbinclude MatrixBase_segment_int_int.out
|
|
769
|
+
*
|
|
770
|
+
* \note Even though the returned expression has dynamic size, in the case
|
|
771
|
+
* when it is applied to a fixed-size vector, it inherits a fixed maximal size,
|
|
772
|
+
* which means that evaluating it does not cause a dynamic memory allocation.
|
|
773
|
+
*
|
|
774
|
+
* \sa class Block, segment(Index)
|
|
775
|
+
*/
|
|
776
|
+
inline SegmentReturnType segment(Index start, Index n)
|
|
777
|
+
{
|
|
778
|
+
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
|
779
|
+
return SegmentReturnType(derived(), start, n);
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
/** This is the const version of segment(Index,Index).*/
|
|
784
|
+
inline ConstSegmentReturnType segment(Index start, Index n) const
|
|
785
|
+
{
|
|
786
|
+
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
|
787
|
+
return ConstSegmentReturnType(derived(), start, n);
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
/** \returns a dynamic-size expression of the first coefficients of *this.
|
|
791
|
+
*
|
|
792
|
+
* \only_for_vectors
|
|
793
|
+
*
|
|
794
|
+
* \param n the number of coefficients in the segment
|
|
795
|
+
*
|
|
796
|
+
* Example: \include MatrixBase_start_int.cpp
|
|
797
|
+
* Output: \verbinclude MatrixBase_start_int.out
|
|
798
|
+
*
|
|
799
|
+
* \note Even though the returned expression has dynamic size, in the case
|
|
800
|
+
* when it is applied to a fixed-size vector, it inherits a fixed maximal size,
|
|
801
|
+
* which means that evaluating it does not cause a dynamic memory allocation.
|
|
802
|
+
*
|
|
803
|
+
* \sa class Block, block(Index,Index)
|
|
804
|
+
*/
|
|
805
|
+
inline SegmentReturnType head(Index n)
|
|
806
|
+
{
|
|
807
|
+
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
|
808
|
+
return SegmentReturnType(derived(), 0, n);
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/** This is the const version of head(Index).*/
|
|
812
|
+
inline ConstSegmentReturnType head(Index n) const
|
|
813
|
+
{
|
|
814
|
+
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
|
815
|
+
return ConstSegmentReturnType(derived(), 0, n);
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
/** \returns a dynamic-size expression of the last coefficients of *this.
|
|
819
|
+
*
|
|
820
|
+
* \only_for_vectors
|
|
821
|
+
*
|
|
822
|
+
* \param n the number of coefficients in the segment
|
|
823
|
+
*
|
|
824
|
+
* Example: \include MatrixBase_end_int.cpp
|
|
825
|
+
* Output: \verbinclude MatrixBase_end_int.out
|
|
826
|
+
*
|
|
827
|
+
* \note Even though the returned expression has dynamic size, in the case
|
|
828
|
+
* when it is applied to a fixed-size vector, it inherits a fixed maximal size,
|
|
829
|
+
* which means that evaluating it does not cause a dynamic memory allocation.
|
|
830
|
+
*
|
|
831
|
+
* \sa class Block, block(Index,Index)
|
|
832
|
+
*/
|
|
833
|
+
inline SegmentReturnType tail(Index n)
|
|
834
|
+
{
|
|
835
|
+
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
|
836
|
+
return SegmentReturnType(derived(), this->size() - n, n);
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
/** This is the const version of tail(Index).*/
|
|
840
|
+
inline ConstSegmentReturnType tail(Index n) const
|
|
841
|
+
{
|
|
842
|
+
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
|
843
|
+
return ConstSegmentReturnType(derived(), this->size() - n, n);
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
/** \returns a fixed-size expression of a segment (i.e. a vector block) in \c *this
|
|
847
|
+
*
|
|
848
|
+
* \only_for_vectors
|
|
849
|
+
*
|
|
850
|
+
* \tparam N the number of coefficients in the segment as specified at compile-time
|
|
851
|
+
* \param start the index of the first element in the segment
|
|
852
|
+
* \param n the number of coefficients in the segment as specified at compile-time
|
|
853
|
+
*
|
|
854
|
+
* The compile-time and run-time information should not contradict. In other words,
|
|
855
|
+
* \a n should equal \a N unless \a N is \a Dynamic.
|
|
856
|
+
*
|
|
857
|
+
* Example: \include MatrixBase_template_int_segment.cpp
|
|
858
|
+
* Output: \verbinclude MatrixBase_template_int_segment.out
|
|
859
|
+
*
|
|
860
|
+
* \sa class Block
|
|
861
|
+
*/
|
|
862
|
+
template<int N>
|
|
863
|
+
inline typename FixedSegmentReturnType<N>::Type segment(Index start, Index n = N)
|
|
864
|
+
{
|
|
865
|
+
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
|
866
|
+
return typename FixedSegmentReturnType<N>::Type(derived(), start, n);
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
/** This is the const version of segment<int>(Index).*/
|
|
870
|
+
template<int N>
|
|
871
|
+
inline typename ConstFixedSegmentReturnType<N>::Type segment(Index start, Index n = N) const
|
|
872
|
+
{
|
|
873
|
+
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
|
874
|
+
return typename ConstFixedSegmentReturnType<N>::Type(derived(), start, n);
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
/** \returns a fixed-size expression of the first coefficients of *this.
|
|
878
|
+
*
|
|
879
|
+
* \only_for_vectors
|
|
880
|
+
*
|
|
881
|
+
* \tparam N the number of coefficients in the segment as specified at compile-time
|
|
882
|
+
* \param n the number of coefficients in the segment as specified at run-time
|
|
883
|
+
*
|
|
884
|
+
* The compile-time and run-time information should not contradict. In other words,
|
|
885
|
+
* \a n should equal \a N unless \a N is \a Dynamic.
|
|
886
|
+
*
|
|
887
|
+
* Example: \include MatrixBase_template_int_start.cpp
|
|
888
|
+
* Output: \verbinclude MatrixBase_template_int_start.out
|
|
889
|
+
*
|
|
890
|
+
* \sa class Block
|
|
891
|
+
*/
|
|
892
|
+
template<int N>
|
|
893
|
+
inline typename FixedSegmentReturnType<N>::Type head(Index n = N)
|
|
894
|
+
{
|
|
895
|
+
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
|
896
|
+
return typename FixedSegmentReturnType<N>::Type(derived(), 0, n);
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
/** This is the const version of head<int>().*/
|
|
900
|
+
template<int N>
|
|
901
|
+
inline typename ConstFixedSegmentReturnType<N>::Type head(Index n = N) const
|
|
902
|
+
{
|
|
903
|
+
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
|
904
|
+
return typename ConstFixedSegmentReturnType<N>::Type(derived(), 0, n);
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
/** \returns a fixed-size expression of the last coefficients of *this.
|
|
908
|
+
*
|
|
909
|
+
* \only_for_vectors
|
|
910
|
+
*
|
|
911
|
+
* \tparam N the number of coefficients in the segment as specified at compile-time
|
|
912
|
+
* \param n the number of coefficients in the segment as specified at run-time
|
|
913
|
+
*
|
|
914
|
+
* The compile-time and run-time information should not contradict. In other words,
|
|
915
|
+
* \a n should equal \a N unless \a N is \a Dynamic.
|
|
916
|
+
*
|
|
917
|
+
* Example: \include MatrixBase_template_int_end.cpp
|
|
918
|
+
* Output: \verbinclude MatrixBase_template_int_end.out
|
|
919
|
+
*
|
|
920
|
+
* \sa class Block
|
|
921
|
+
*/
|
|
922
|
+
template<int N>
|
|
923
|
+
inline typename FixedSegmentReturnType<N>::Type tail(Index n = N)
|
|
924
|
+
{
|
|
925
|
+
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
|
926
|
+
return typename FixedSegmentReturnType<N>::Type(derived(), size() - n);
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
/** This is the const version of tail<int>.*/
|
|
930
|
+
template<int N>
|
|
931
|
+
inline typename ConstFixedSegmentReturnType<N>::Type tail(Index n = N) const
|
|
932
|
+
{
|
|
933
|
+
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
|
|
934
|
+
return typename ConstFixedSegmentReturnType<N>::Type(derived(), size() - n);
|
|
935
|
+
}
|